JuliaMath / openlibm

High quality system independent, portable, open source libm implementation
https://openlibm.org
Other
507 stars 139 forks source link

Questions about openlibm. #266

Closed PowerUser1234 closed 1 year ago

PowerUser1234 commented 1 year ago

-Does openlibm support these functions: sin, cos, tan, asin, acos, atan, exp, log, log10, cbrt, atan2, pow, sinh, cosh, tanh, hypot, expm1, and log1p?

-Is openlibm different from fdlibm, in regards that it presumes IEEE 754 floating point? Does openlibm in fact NOT allow floating point value errors for return values, the way that fdlibm can?

-Is openlibm multiplatform capable? Could it be compiled and run on Linux/AArch64, Linux/x64, macOS/AArch64, macOS/x64, and Windows/x64 with no problems?

ararslan commented 1 year ago

Does openlibm support these functions: [...]

Yes to all you listed. You can find all of these in the src/ directory.

The answers to your other questions can be found from openlibm.org, relevant sections reproduced here. Note that the platform support section is also in the repository's README.

History

The OpenLibm code derives from the FreeBSD msun and OpenBSD libm implementations, which in turn derive from FDLIBM 5.3. Over and above that, OpenLibm itself has received a number of patches to make it platform independent and portable.

Platform support

OpenLibm builds on Linux, macOS, Windows, FreeBSD, OpenBSD, NetBSD, and DragonFly BSD. It builds with both GCC and clang. Although largely tested and widely used on the x86 and x86-64 architectures, OpenLibm also supports arm, aarch64, ppc64le, mips, wasm32, and s390(x).