[gambit-list] Which function in libm are portable enough to assume that they will be on all platforms?

Joe Doyle Ardent gambit at ardent.nebcorp.com
Thu Oct 31 15:58:40 EDT 2013


On Wed, Oct 30, 2013 at 11:30:47PM -0400, Bradley Lucier wrote:
> 
> So my question is---is it reasonable to import these floating-point 
> functions into Gambit to make better versions of the standard 
> functions?
> 

	Here's the POSIX standard for math.h, which includes 32 and 
64-bit versions of the trigonometric functions, including the 
hyperbolic ones:

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/math.h.html

The Android version of that C header file is compliant 
(http://mobilepearls.com/labs/native-android-api/include/math.h).  I 
can't find the iOS version, but I assume it's also compliant, as it'll 
likely be the same as the system one for OS X.  Windows seems to lack 
the inverse hyperbolic functions, though:

http://www.johndcook.com/math_h.html

	I hope this helps.


-Joe


More information about the Gambit-list mailing list