The fyl2xp1 instruction has a limited range:

-(1 - (sqrt(2) / 2)) <= x <= sqrt(2) - 1
so we can't use it.

Also, I'm not sure fyl2xp1's extra precision will
matter once the result is converted from extended
real (80 bits) back to double real (64 bits).
This commit is contained in:
jtc 1994-08-19 03:55:57 +00:00
parent fad867417f
commit 1af6796a8d
1 changed files with 13 additions and 2 deletions

View File

@ -35,10 +35,21 @@
#include <machine/asm.h>
RCSID("$Id: s_log1p.S,v 1.3 1994/08/18 20:42:35 jtc Exp $")
RCSID("$Id: s_log1p.S,v 1.4 1994/08/19 03:55:57 jtc Exp $")
/*
* The fyl2xp1 instruction has such a limited range:
* -(1 - (sqrt(2) / 2)) <= x <= sqrt(2) - 1
* it's not worth trying to use it.
*
* Also, I'm not sure fyl2xp1's extra precision will
* matter once the result is converted from extended
* real (80 bits) back to double real (64 bits).
*/
ENTRY(log1p)
fldln2
fldl 4(%esp)
fyl2xp1
fld1
faddp
fyl2x
ret