> This seems to explain everything since the code (in trigi.lisp) is
>
> #.(SETQ EPS ... (scale-float 1.0 -24)...)
> (DEFMFUN ASIN (NUM)
> (LET ((YFLO (FLOAT NUM)))
> (COND ((> (ABS YFLO) 1.0) (LOGARC '%ASIN YFLO))
> ((< (ABS YFLO) #.(SQRT EPS)) YFLO)
...
Besides the problem with gcl's scale-float, the value of eps is wrong.
It should be the real machine epsilon (DOUBLE-FLOAT-EPSILON =
1.1107651257113995E-16). With the current value, we are only getting
HALF as many correct digits as we should be for values around 2e-4:
:lisp (fset '|$sysasin| (symbol-function 'system::asin))
[asin(float(x)),float(asin(bfloat(x))),sysasin(x)],x=2e-4 =>
[2.0E-4, 2.000000013333334E-4, 2.000000013333334E-4]
Anyway, why not use system::asin when it's available? gcl's seems to be
fine.
-s