<div dir="ltr"><div>Hey Matt,</div><div><br></div>DBL_MAX is a standard symbol in C/C++, defined in the headers <cfloat> and <float.h> (included above, that's where the definition comes from). In C++, you can include the header file <limits> and get the same value with<div><br></div><div>std::numeric_limits<double>::max</div><div><br></div><div>This is cleaner and returns the precise floating point value of the largest representable double value, whereas DBL_MAX is a macro that returns some sort of string representation. In most cases, though, they should give the identical result (there are strange exceptions, see <a href="http://goo.gl/6qca25">http://goo.gl/6qca25</a>).</div><div><br></div><div>Looking at this header file, it looks like we tried to eliminate the use of DBL_MAX, but didn't quite finish the job :). I think you're right that it would be better to use COIN_DBL_MAX here, but I'm always hesitant to make these seemingly inconsequential changes when things are working :). I might go ahead and commit this to trunk and see if anything breaks.</div><div><br></div><div>Cheers,</div><div><br><div>Ted</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 24, 2015 at 2:32 PM, Matthew Galati <span dir="ltr"><<a href="mailto:matthew.galati@gmail.com" target="_blank">matthew.galati@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">If COIN_C_FINITE is not defined, I don't see where DBL_MAX is defined.<div><br></div><div>Should this be using COIN_DBL_MAX instead?<br><div><div><br></div><div><div>bool CoinFinite(double val)</div><div>{</div><div>#ifdef COIN_C_FINITE</div><div>    return COIN_C_FINITE(val)!=0;</div><div>#else</div><div>    return val != DBL_MAX && val != -DBL_MAX;</div><div>#endif</div><div>}</div></div></div></div></div>
<br>_______________________________________________<br>
CoinUtils mailing list<br>
<a href="mailto:CoinUtils@list.coin-or.org">CoinUtils@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/coinutils" rel="noreferrer" target="_blank">http://list.coin-or.org/mailman/listinfo/coinutils</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Dr. Ted Ralphs<br>Professor, Lehigh University<br>(610) 628-1280<br>ted 'at' lehigh 'dot' edu<br><a href="http://coral.ie.lehigh.edu/~ted" target="_blank">coral.ie.lehigh.edu/~ted</a><br></div></div>
</div>