About

double on the Arduino Uno is not what you think, double on the Arduino Uno is the same as float, giving you only 6-7 digits of precision! fp64lib was created to implement full 64-bit floating point arithmetic on the AVR MegaAVR architecure microprocessors. Data format is fully compatible with IEEE 754 binary64 standard, providing you 15-17 digits of accuracy.

The library also comes with a math.h compatible header 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 includes functions for basic arithmetic, checking and comparing, trigonometry, conversion, logarithms and hyperbelic math. Read more…

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.

V1.1.11 Space optimizations for asin & acos

The code for asin & acos was optimized to use less flash space.

For Linux users, the makefile was extended to allow creation of libraries for different AVR mcrocontrollers (MCU) named libfp64-%.a, where % stands for the selected MCU, e.g. libfp64-atmega328p.a for the Atmega 328p. libfp64.a will always link to the latest created library.