// Testing the fp64lib library
// Forum: https://forum.arduino.cc/t/64-bit-floating-point-library-fp64lib-precision-issue/1162360
// This Wokwi project: https://wokwi.com/projects/374196675432414209
#include <fp64lib.h>
float64_t a = fp64_atof("1.11111111111111111"); // more than enough digits
float64_t b = fp64_atof("1.11111111111111111");
float64_t c;
void setup()
{
Serial.begin(9600);
c = fp64_add( a, b);
Serial.println( fp64_to_string( a, 20, 0));
Serial.println( fp64_to_string( b, 20, 0));
Serial.println( fp64_to_string( c, 20, 0));
}
void loop() {}