diff options
Diffstat (limited to 'lib/libm/noieee_src/n_cbrt.c')
-rw-r--r-- | lib/libm/noieee_src/n_cbrt.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/libm/noieee_src/n_cbrt.c b/lib/libm/noieee_src/n_cbrt.c index f0aafd54f38..03f23d4e657 100644 --- a/lib/libm/noieee_src/n_cbrt.c +++ b/lib/libm/noieee_src/n_cbrt.c @@ -1,3 +1,4 @@ +/* $OpenBSD: n_cbrt.c,v 1.4 2008/06/12 22:43:36 martynas Exp $ */ /* $NetBSD: n_cbrt.c,v 1.1 1995/10/10 23:36:40 ragge Exp $ */ /* * Copyright (c) 1985, 1993 @@ -47,8 +48,8 @@ static char sccsid[] = "@(#)cbrt.c 8.1 (Berkeley) 6/4/93"; * long interger at the address of a floating point number will be the * leading 32 bits of that floating point number (i.e., sign, exponent, * and the 20 most significant bits). - * On a National machine, it has different ordering; therefore, this code - * must be compiled with flag -DNATIONAL. + * On a National machine, it has different ordering; therefore, this code + * must be compiled with flag -DNATIONAL. */ #if !defined(__vax__)&&!defined(tahoe) @@ -62,7 +63,7 @@ static const double F= 45./28., G= 5./14.; -double cbrt(x) +double cbrt(x) double x; { double r,s,t=0.0,w; @@ -90,15 +91,15 @@ double x; t*=x; pt[n0]=pt[n0]/3+B2; } else - pt[n0]=px[n0]/3+B1; + pt[n0]=px[n0]/3+B1; /* new cbrt to 23 bits, may be implemented in single precision */ r=t*t/x; s=C+r*t; - t*=G+F/(s+E+D/s); + t*=G+F/(s+E+D/s); - /* chopped to 20 bits and make it larger than cbrt(x) */ + /* chopped to 20 bits and make it larger than cbrt(x) */ pt[n1]=0; pt[n0]+=0x00000001; |