bernedom / SI

A header only C++ library that provides type safety and user defined literals for physical units
https://si.dominikberner.ch/doc/
MIT License
486 stars 40 forks source link

Comparing inifinity won't work #125

Open spira-inhabitant opened 11 months ago

spira-inhabitant commented 11 months ago

https://github.com/bernedom/SI/blob/63b267211a6f256f7ba8d5a26e17138bbcf95ba8/include/SI/detail/eps_equal.h#L24

If two variables are set to std::numeric_limits<double>::infinity(), == will return false.

bernedom commented 11 months ago

Thanks for the heads up, I'll have to look into it how to fix that without adding too much overhead as this operation could happen in very frequently