<p dir="ltr"><br>
On Apr 16, 2013 8:01 AM, "Will Wilson" <<a href="mailto:will@indefiant.com">will@indefiant.com</a>> wrote:<br>
><br>
> Hi All,<br>
><br>
> I'm rewriting MS C++ code via clang and have an issue involving the printed representations of FLT_MAX and DBL_MAX. In both cases the printed literals exceed the inputs.<br>
><br>
> From MS float.h:<br>
><br>
> #define DBL_MAX         1.7976931348623158e+308<br>
> // Becomes 1.797693134862316E+308<br>
><br>
> #define FLT_MAX         3.402823466e+38F<br>
> // Becomes 3.4028235E+38F<br>
><br>
> Rewriting the values leads to compilation errors due to the literals exceeding their maximums. This doesn't altogether surprise me given the nature of FP arithmetic and string conversion but I was wondering if this could/should be treated as a bug given the significance of these values?</p>

<p dir="ltr">How are you printing these values out? Libstdc++ or libc++? Does the behavior reproduce under GCC too? I could guess/assume a bug in the standard library implementation you are using, but that's just a guess</p>

<p dir="ltr">><br>
> - Will.<br>
><br>
> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
><br>
</p>