summaryrefslogtreecommitdiffstats
path: root/lib/libm (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* - enable fenvmartynas2011-04-283-3/+75
| | | | - add nearbyint, nearbyintf and nearbyintl implemented using fenv
* fenv improvements and cleanupsmartynas2011-04-2813-734/+1366
|
* fenv for mips64martynas2011-04-261-0/+316
|
* fenv for sparc; mostly cloned from sparc64martynas2011-04-252-1/+354
|
* fenv for powerpcmartynas2011-04-251-0/+354
|
* fenv for shmartynas2011-04-241-0/+381
|
* fenv for i386, and sparc64; from matthew@martynas2011-04-242-0/+849
| | | | not reviewed yet, but it's better to track changes in cvs
* fenv for armmartynas2011-04-241-0/+269
|
* Implement C99 floating-point environment for Alpha.martynas2011-04-231-0/+362
| | | | | | | | | Delivering FPE with non-masked exceptions doesn't work on Alpha; I suspect there's a bug in the kernel trap handler. FE_INEXACT is intentionally left out of FE_ALL_EXCEPT; since the inexact exception is not being maintained. Otherwise it will lead to the bogus results.
* fenv for amd64; from matthew@martynas2011-04-211-0/+423
| | | | feedback & ok guenther@, matthew@
* fenv for hppamartynas2011-04-211-0/+355
|
* fenv for m68kmartynas2011-04-201-0/+360
|
* Trick GCC optimizer into clipping any extra precision by making wmartynas2011-04-204-7/+11
| | | | | | | volatile; a similar hack was already being used in lrintf(). This will make rint and {,l}lrint family functions actually work; i.e. on m68k rintf(8.6F) was 8.625.
* The {,l}lround{,f} implementations are based on {,l}lrint{,f},martynas2011-04-174-13/+13
| | | | | | | | therefore affected by the same bugs I've fixed a week ago. The high part was being clipped for all exponents greater or equal to 52. Fix this to use RESTYPE_BITS instead; also make the code consistent.
* 20 -> DBL_FRACHBITSmartynas2011-04-171-4/+4
|
* Document what happens when x equals y.martynas2011-04-161-2/+9
|
* C99: "The nextafter functions return y if x equals y."martynas2011-04-162-2/+2
| | | | | | | | Therefore, in nextafter() and nextafterf(): - if(x==y) return x; /* x=y, return x */ - if(x==y) return y; /* x=y, return y */ This matters for negative zero inputs of x or y.
* The {,l}lrint{,f} functions avoid to shift results by more than 31martynas2011-04-102-8/+8
| | | | | | | | | | | | | bits, because "behavior is implementation defined in this case". However, this is wrong; behavior is undefined if the right operand is greater than or equal to the width of the promoted left operand. This broke {,l}lrint{,f} (64-bit architectures), and llrint{,f} (32-bit architectures) where results are actually 64-bit values. The high part was clipped for all exponents greater or equal to 52. Fix this to use RESTYPE_BITS instead; {,l}lrint{,f} are now able to pass our regression tests, and I think are right now.
* 20 -> DBL_FRACHBITSmartynas2011-04-101-4/+4
|
* The assumption that |1.0 * 2^exp| = 0, exp < -1 cannot be made whenmartynas2011-04-102-8/+8
| | | | we round towards -inf or +inf.
* Add barebones manual pages for cimag(3), conj(3) and cproj(3)millert2010-07-194-2/+168
| | | | OK kettenis@ jmc@
* Fix the cproj family to not return garbage on finite arguments.guenther2010-07-194-4/+12
| | | | ok millert@
* Use crealf() and cimagf() instead of creal() and cimag() when theguenther2010-07-1811-34/+34
| | | | | | argument is a float. Eliminate a cast rendered superfluous as a result. ok kettenis@, millert@
* typo in a commentderaadt2010-06-031-2/+2
|
* Tweak inline asm to prevent gcc4 from optimizing away crucial bits of it.kettenis2010-05-058-24/+24
| | | | ok miod@
* dispense with some wacky escape sequences;jmc2010-03-262-10/+10
|
* Multiple issues were killing the build with mandoc(1), thus:schwarze2010-02-201-23/+13
| | | | | | | | * do not use low-level roff macros like .if and .ds * add the missing .Os to the preamble * move unqualified text out of .Bl ok jmc@
* Use MACHINE_CPU instead of MACHINE_ARCH to pick the correct machine dependentmiod2010-02-031-2/+2
| | | | | | | files or directories when applicable. The inspiration and name of MACHINE_CPU come from NetBSD, although the way to provide it to Makefiles is completely different. ok kettenis@
* Provide assembly version of sqrtl(3).kettenis2009-11-062-1/+14
| | | | ok pirofti@
* Provide assembly version of sqrtl(3).kettenis2009-11-052-1/+14
| | | | ok otto@
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-27147-621/+33
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* reorder the log functions slightly; from thomas pfaffjmc2009-10-271-10/+10
|
* Add man pages for the fdim/fmin/fmax family of functions and make sure fdimlkettenis2009-10-265-10/+195
| | | | | | is defined on all architectures. ok jmc@ (man pages) and martynas@
* document log2() and log2f(); from thomas pfaffjmc2009-10-242-5/+22
| | | | ok otto millert martynas
* remove, or replace Xr of ieee to either ilogb, nextafter or scalbnmartynas2009-08-039-29/+27
| | | | where appropriate. pointed out by jmc@
* now that the pages are split and we track separate HISTORY:martynas2009-07-294-13/+32
| | | | | | | double => 4.3BSD float => NetBSD 1.1 long double => OpenBSD 4.5 scalbln, scalblnf, scalblnl => OpenBSD 4.7
* ieee, and ieeef aren't real, and the amount of functions it documentsmartynas2009-07-295-90/+240
| | | | | is getting ridiculous. split them into groups of copysign, ilogb, nextafter, scalbn. discussed long ago with millert@
* ieee_test isn't real; rename header to logb, toomartynas2009-07-291-3/+3
|
* document scalbln, scalblnf, scalblnlmartynas2009-07-282-8/+30
|
* int is big enough to fully represent exponents of all supported fpmartynas2009-07-254-5/+80
| | | | | | | | formats. which even for 80-bit & 128-bit long doubles is only 15 bits. therefore, scalbln, scalblnf, scalblnl are essentially the same as scalbn, scalbnf, scalbnl with bounds checking so that LONG_MIN..INT_MIN, and INT_MAX..LONG_MAX ranges properly raise exceptions & yield correct values. looks good to millert@
* round, roundf, trunc, truncf for hppa; ok kettenis@martynas2009-07-155-2/+111
|
* fe_towardzero not on openbsd. ok millert@martynas2009-07-061-5/+3
|
* floor(3) should round towards -inf instead of towards zero.kettenis2009-06-302-6/+4
| | | | ok martynas@, deraadt@
* fix scalbn, scalbnf, frexpf on amd64. don't use double argmartynas2009-04-252-10/+16
| | | | | | | | | | float/double prologue/epilogue, since the second argument is not float/double. were never working properly (always returned inf). actually, should help other math funcs (like pow) too, since they use it internally tested by kurt@; devel/boost fp regresses are working better now. ok kurt@
* alias and give frexpf symbol external linkage to scalbnf; this wasmartynas2009-04-212-2/+8
| | | | | | | | overriden by md source. spotted by kurt@ actually; on amd64 scalbnf, scalbn (and therefore now frexpf) have always been broken since second argument is not float. fix is under reviewal / will be committed separately ok kurt@, kettenis@, millert@. tested by kurt@
* make ldexpf behavior consistent with the double and extended-precisionmartynas2009-04-194-72/+10
| | | | | | versions; spotted by kettenis@ while here also remove unused ldexp; it lives in libc ok kettenis@, "looks good" millert@
* in the old days compiler could not convert decimal constantsmartynas2009-04-1114-306/+82
| | | | | | | | | | accurately, hence the tricks in libm, using machine representation of constants. remove kludges and switch to use decimal constants, much simplifying the code. since, the compiler converts them accurately. generated values match on vaxfp discussed with millert@, and miod@ testing todd@, and myself ok millert@
* lrint, llrint, lrintf, llrintf for amd64. ok kettenis@, oga@martynas2009-04-105-1/+50
|
* missing rcs ids; spacingmartynas2009-04-084-18/+19
|
* remove i386/x86_64 ifdefs. i386 lives @ i387. miod@ agreesmartynas2009-04-0811-183/+10
| | | | object code matches so this got to be oki