Featured

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, like the original Arduino UNO, the Arduino Mega, the Arduino Nano or the Arduino Nano Every. 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…

More than 100 functions in fp64lib!

It started as a small task to save space for a calculator project with 1 function. Now, as of mid October 2026, fp64lib transformed into a full blown library with more than 100 functions! And it’s still growing, as the IEEE 754 standard contains a wealth of functions that should/could be implemented.

I hope you like it. If so, consider giving me a star on my github page or leave a comment in the discussion forum. I’m always happy to see, what you use the library for. This gives me additional energy to keep up maintaining and extending it.

V1.1.31 extends fp64_pow for negative arguments

With V1.1.31, fp64_pow(x,y) returns results if both x and y are negative, if y is an integer, e.g. fp64_pow(-2,-2) = 0.25, or fp64_pow(-2,-3) = -0.125. If y is not an integer, the result is NaN, e.g. fp64_pow(-2,-2.5) = NaN.

NB.: When y is not an integer, the correct mathematical result can no longer be represented as a real number but would be a complex number, e.g. (-2)^(-2.5) = 0 – 0.176776695297i.

Documentation updated

I cleaned up the library reference, inserted a table of contents and organized the reference in a slightly different way: All the conversion functions are now grouped together towards the end of the reference. Additionally, links between the documentation of the functional groups and the library reference were installed. All this shold it make easier to quickly find the functions needed.

Due to some questions regarding sin(pi), an article is available explaing the problems of floating point math: fp64_sin(float64_NUMBER_PI) is not 0.