For starters, the standard C++ <cmath> library is already much better. You
get an overloaded/templatized pow(x,y) that does the right thing, instead
of pow()-only-for-double / powf()-only-for-float.

http://en.cppreference.com/w/cpp/numeric/math/pow

Benoit

2013/1/16 Zack Weinberg <za...@panix.com>

> Do we have any alternative to <math.h> when you need pow() or other such
> elementary functions?  Normally I am Mr. We Should Use The Standard
> Library, but <math.h> in particular tends to have weird shit in it that
> causes conflicts with xpcom headers, surprising behavior when everything
> isn't a 'double', etc.  I unfortunately don't remember the details, but
> nsCSSScanner.cpp has workarounds for these problems and I do remember that
> I tried to take them out once and the build blew up on Windows.
>
> zw
> ______________________________**_________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/**listinfo/dev-platform<https://lists.mozilla.org/listinfo/dev-platform>
>
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to