fp64lib is a library for implementing 64-bit floating point arithmetic on the AVR MegaAVR architecure microprocessors, like the popular Arduino series. Data format is fully compatible with IEEE 754 binary64 standard, providing about 15-17 digits of accuracy.

The library comes with a math.h compatible head file named “fp64-math.h”. All fp64lib routines start with “fp64_”, e.g. fp64_sin or fp64_add. Library is fully compatible to usual “math.h” routines and include functions for basic arithmetic, checking and comparing, trigonometry, conversion, logarithms and hyperbelic math. Read more…

Homepage updated

With V1.2.20, fp64lib already implements 80 functions and it was time to give the users a little bit more structure on what is available. Therefore, the library references was made consistent in style, a table of contents for the more complex pages were introduced and a new page lists the functions by functional groups (like basic math, trigonometric functions, …). Hope this helps especially new users.

V1.1.16 fixes bug in fp64_modf

This release contains a complete rewrite of fp64_modf, both to fix a code and to have an easier way to get both the fraction part and the integer part of a number. Additionaly, the new code is now fully compatible with C/C++ for +INF/-INF.

V1.1.13 New functions and experimental support for long double

The upcoming release of gcc 10 has 64-bit long double as an configurable option. In order to prepare fp64lib for that, a new macro was introduced GCC_ENTRY to provide compatible naming with gcc 10. Furthermore, the following functions were added for improved compatibility: fp64_cotan(x), fp64_exp10(x), fp64_pow10(x) and fp64_log2.

For further instruction on how to use the long double support, see this page.

Except for the new functions, the implicit long double support is currently not availabe inside the Arduino IDE, as gcc 10 is still in the testing/ experimental phase and not yet offically released.