xref: /relibc/openlibm/README.md (revision 4164da0d613b8bd985fb9dc2b6a559ddc4865d08)
1## OpenLibm
2
3OpenLibm is an effort to have a high quality, portable, standalone
4`libm` library. It can be used standalone in applications and
5programming language implementations.
6
7The project was born out of a need to have a good `libm` for the
8[Julia programming langage](http://www.julialang.org) that worked
9consistently across compilers and operating systems, and in 32-bit and
1064-bit environments.
11
12### History
13
14The OpenLibm code derives from the [FreeBSD
15msun](http://ftp.freebsd.org/pub/FreeBSD/FreeBSD/development/FreeBSD-CVS/src/lib/msun/)
16implementation, which in turn derives from [FDLIBM
175.3](http://www.netlib.org/fdlibm/). As a result, it includes a number
18of fixes and updates to FDLIBM that have accumulated over the years in
19`msun`, and optimized versions of many functions.
20
21### Platform support
22
23OpenLibm builds on Linux, Mac OS X, and Windows, and with little
24effort, should build on FreeBSD as well. It builds with both, GCC and
25clang. Although largely tested on x86, it also includes experimental
26support for ARM. The original `msun` also includes support for mips,
27sparc64, powerpc, ia64, and alpha. These are present in the OpenLibm
28source tree, but no attempt has been made to build any of these.
29
30### Build instructions
31
321. `make` or `make USEGCC=1` to build with GCC. This is the default on
33Linux and Windows.
342. `make USECLANG=1` to build with clang. This is the default on OS X.
35