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.

V1.1.25 added new function fp64_etoa for engineering format

A lot of microcomputer applications display data of sensors or calculations over a bigger range, e.g. voltages from millivolts to volts or resistors from ohm to kiloohm to megaohm. Usually, data is then displayed in engineering format, which is similar to scientific notation, but the exponent is always a multiple of 3 (e.g. 12.345E3 instead of 1.2345E4).

A new function, fp64_etoa is available for this use case. It has the exact same parameters as fp64_ftoa, making code changes easy. Application could even offer the user the possibility to switch between the scientific notation and engineering notation by using fp64_ftoa or fp64_etoa respectively.

V1.1.25 also fixed a bug in fp64_ftoa, that occured only on the MEGA 256 processors like on the Arduino Mega board.

V1.1.24 changed handling of 0 in fp64_to_decimalExp

fp64_to_decimalExp now returns the specified number of decimal digits instead of just “0”.

E.g., fp64_to_decimalExp(x,4,false,NULL) will return “0.000E0” instead of “0“.

With that change, behaviour is now consistent for all finite numbers, but it will be no longer consistent with the the previous 64-bit C-library avr_f64.c.

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.

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…