vendredi 22 décembre 2017

why is the result of boost::math::float_distance(1.0, 0.0) so big?

As the title mentioned, why is the result of boost::math::float_distance(1.0, 0.0), which is -4.60718e+18, so big?

According to this definition about ULP: In general, if the floating-point number d.d...d × e is used to represent z, then it is in error by d.d...d - (z/e)p-1 units in the last place. Source: http://ift.tt/12hOJjN

The result shouldn't be such a big number, isn't it?

Aucun commentaire:

Enregistrer un commentaire