Commit Graph

13 Commits

Author SHA1 Message Date
gufe44 d4077aa131
Suggestions
https://github.com/JuliaMath/openlibm/pull/197#pullrequestreview-307404318
2019-10-26 01:05:27 +02:00
gufe44 2080b23690
NetBSD fix 2019-10-25 18:32:47 +02:00
Jeff Walden 787652b054
msun: signed overflow in atan2
As a component of atan2(y, x), the case of x == 1.0 is farmed out to
atan(y). The current implementation of this comparison is vulnerable
to signed integer underflow (that is, undefined behavior), and it's
performed in a somewhat more complicated way than it need be. Change
it to not be quite so cute, rather directly comparing the high/low
bits of x to the specific IEEE-754 bit pattern that encodes 1.0.

Note that while there are three different e_atan* files in the
relevant directory, only this one needs fixing. e_atan2f.c already
compares against the full bit pattern encoding 1.0f, while
e_atan2l.cuses bitwise-ands/ors/nots and so doesn't require a change.

Incorporated from FreeBSD source tree. See:
b21ccf63f2
2018-04-07 10:35:06 -07:00
Keno Fischer 28fb939b0d Blanket rename DLLEXPORT->OLM_DLLEXPORT 2016-03-13 21:07:55 -04:00
Ed Schouten 7e5585aaca Rename openlibm.h to openlibm_math.h.
This is a bit more consistent with the naming of the other header files
(openlibm_complex.h and openlibm_fenv.h). Re-add an openlibm.h header
that includes all of the public headers as a shorthand.

Fix up all of the source files to include <openlibm_math.h> instead of
<openlibm.h>. While there, fix ordering of the includes.
2015-01-11 23:37:01 +01:00
Ed Schouten 06dbb6e72b Use more uniform style of including headers.
Put external headers before internal ones. While there, replace a lot of
occurences of "openlibm.h" with <openlibm.h>. It should be thought of as
an external header, as it is installed along with the library.
2015-01-09 14:24:24 +01:00
Jameson Nash f7c5ad7088 add DLLEXPORT to files in src and `int isopenlibm() = 1` function" 2013-08-03 05:16:01 -04:00
Keno Fischer 04e12006e5 address compiler warnings in #3 2012-05-24 23:45:05 -04:00
Jameson Nash 0df00dd0f7 initial attempt getting everything to build on windows 2012-04-08 20:03:36 -04:00
Viral B. Shah b0b27a0ff4 Replace math.h with openlibm.h
Remove man
2011-12-15 11:54:24 +05:30
Viral B. Shah 51a63c3270 Comment out __FBSDID 2011-12-15 11:46:26 +05:30
Viral B. Shah 16b9264f9d Import entire msun from FreeBSD. 2011-12-15 11:29:35 +05:30
Viral B. Shah aba7ae910f Initialize repo. FreeBSD 8.2 msun code + some tweaks 2011-08-13 00:31:25 +05:30