Precision issue in JsonFloat serialization
Created by: pgn69
Serializing certain float numbers the result contains unexpected decimals.
Test case:
StaticJsonBuffer<128> jsonBuffer;
JsonObject& jsonObject = jsonBuffer.createObject();
float x = 999.9;
jsonObject["x"] = x;
jsonObject.printTo(Serial);
Serial.println();
The output is:
{"x":999.900024}
- Target platform: Bluno Nano SKU:DFR0296, based on Atmega328
- Compiler version: 4.9.2