<div dir="ltr"><div><div>Hi,<br><br></div>Nothing to do with clang, but why didn't the code use numeric_limits?<br><br></div>Matthieu<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/15 Will Wilson <span dir="ltr"><<a href="mailto:will@indefiant.com" target="_blank">will@indefiant.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi All,
<div><br></div><div>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.</div><div><br>
</div><div>From MS float.h:</div><div><br></div>#define DBL_MAX         1.7976931348623158e+308<div>// Becomes 1.797693134862316E<span>+</span>308</div>







<div><br></div><div>#define FLT_MAX         3.402823466e+38F<br></div><div>// Becomes 3.4028235E+38F</div><div><br></div><div>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?</div>
<span class="HOEnZb"><font color="#888888">
<div><br></div><div>- Will.</div></font></span></div>
<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" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Information System Engineer, Ph.D.<br>Blog: <a href="http://matt.eifelle.com" target="_blank">http://matt.eifelle.com</a><span style="padding-right:16px;width:16px;height:16px"></span><span style="padding-right:16px;width:16px;height:16px"></span><br>
LinkedIn: <a href="http://www.linkedin.com/in/matthieubrucher" target="_blank">http://www.linkedin.com/in/matthieubrucher</a><span style="padding-right:16px;width:16px;height:16px"></span><br>Music band: <a href="http://liliejay.com/" target="_blank">http://liliejay.com/</a><span style="padding-right:16px;width:16px;height:16px"></span><br>
<span style="padding-right:16px;width:16px;height:16px"></span>
</div>