master
Finalize work on the math library. It's time to do this monster commit, and deal with problems (if any) in tree.
Nuke whitespace foolish enough to expose itself during the great "warning:" rectification.
Reduce libm's exports and make internal calls go direct. All dependencies on libc are now via reserved/standardized names.
spelling fixes; from paul tagliamonte any changes not taken noted on tech, but chiefly here i did not take the cancelation - cancellation changes;
Declare __p1evll and __polevll protos in math_private.h instead of redeclaring each time in ld{80,128}. Pointed out by theo.
- 80-bit and quad precision trigonometric and other most important functions: acosl, asinl, atanl, atan2l, cosl, sinl, tanl, exp2l, frexpl, ilogbl, ldexpl, logbl, scalbnl, fabsl, hypotl, powl, sqrtl, rintl, copysignl, nanl, fdiml, fmaxl, fminl. mostly taken from freebsd, needed alot of changes to adapt. note, these are all c versions; and are quite slow when architectures have, e.g. sqrt. assembly versions will be added afterwards - make them .weak/__weak_alias to the double precision versions on other archs - no need to have two finites. finite() and finitef() are non-standard 3BSD obsolete versions of isfinite. remove from libm. make them weak_alias in libc to __isfinite and __isfinitef instead. similarly make 3BSD obsolete versions of isinf, isinff, isnan, isnanf weak_aliases to C99's __isinf, __isinff, __isnan, __isnanf - remove unused infinity.c. the c library has infinities for each supported platform - use STRICT_ASSIGN cast hack for _kernel_rem_pio2, so that the double version has a chance of working on i386 with extra precision - avoid storing multiple copies of the pi/2 array, since it won't vary - bump major due to removed finite/finitef. although they will be in libc, which anything is linked to, minor bump might be enough ok millert@. tested by sthen@, jsg@, ajacoutot@, kili@, naddy@
Fix declaration of S1 by swapping misplaced ',' and ';'. This is inside !(defined(__amd64__) || defined(__i386__)), while the file is only used on those two architectures.
Remove excessive sys/cdefs.h inclusion ok guenther millert kettenis
fix a case where ceill() returns 1.0L: in the x86 extended precision format the fraction part has no implicit bit ok deraadt@
Switch from <sys/endian.h> or <machine/endian.h> to the new, being-standardized <endian.h>
Fix ilogb(3) implementation. The results have to match FP_ILOGB0 and FP_ILOGBNAN which isn't the case for the amd64 and i386 assembly versions. Drop these in favour of C implementations. Als reimplement ilogbl(3) by providing separate ld80 and ld128 implementations that replace the existing implementation which may hit an infinite loop when built for quad-precision long double.
Implement gcc suggestion of extra parentheses. No functional change.
Trick the compiler that volatile temporary is used while raising the underflow.