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

Marc Feeley feeley at iro.umontreal.ca
Wed Oct 30 17:32:11 EDT 2013


On Oct 30, 2013, at 4:04 PM, Bradley Lucier <lucier at math.purdue.edu> wrote:

> I'm thinking about writing improved complex versions of existing Scheme
> functions, but some of these use floating-point versions of functions
> that are not now in Scheme, or in Gambit, e.g., sinh.
> 
> So I decided to look through what's declared by <math.h> on Ubuntu 13.10
> (which I happen to be sitting in front of) and I include a test file
> with all the declared "double" functions (there are also "float"
> versions of these functions and "long double" versions of these functions).
> 
> So, my question is, would it be reasonable to assume that a good quality
> sinh (or other routines) is available on all platforms we want Gambit to
> run on, so we could define flsinh and use it elsehwere?  (I wouldn't
> even want a general, complex sinh at first.)
> 
> This would really make the job of writing complex library code in Scheme
> easier.
> 
> Brad

It is pretty easy to add flsinh, etc to Gambit and I can do that if needed.  Do you think the quality of the C sinh is higher than the alternative (i.e. using the existing transcendental functions to do the same computation)?  Can you show a few examples where using sinh is a win?

Marc



More information about the Gambit-list mailing list