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

Bradley Lucier lucier at math.purdue.edu
Thu Oct 31 09:40:52 EDT 2013


On Oct 31, 2013, at 8:16 AM, Marc Feeley wrote:

> 
> If you define
> 
> (define (flsinh x)
>  (fl* 0.5 (fl- (flexp x) (flexp (fl- x)))))
> 
> (define (flcosh x)
>  (fl* 0.5 (fl+ (flexp x) (flexp (fl- x)))))
> 
> (define (fltanh x)
>  (let ((a (flexp (fl* 2.0 x))))
>    (fl/ (fl- a 1.0) (fl+ a 1.0))))
> 
> can you use those functions to improve the precision of complex asin and acos?

No

>  Can these Scheme definitions be improved?

Yes

>  And how good is the precision when compared to the C sinh and cosh?

Crap.

Marc, I'm too busy right now to prepare a lecture on this stuff.

Brad


More information about the Gambit-list mailing list