mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
Print "ovf" if float to be printed doesn't fit in a long.
http://code.google.com/p/arduino/issues/detail?id=967
This commit is contained in:
parent
1daeba6fd6
commit
6036846ce3
@ -228,6 +228,8 @@ size_t Print::printFloat(double number, uint8_t digits)
|
||||
|
||||
if (isnan(number)) return print("nan");
|
||||
if (isinf(number)) return print("inf");
|
||||
if (number > 4294967040.0) return print ("ovf"); // constant determined empirically
|
||||
if (number <-4294967040.0) return print ("ovf"); // constant determined empirically
|
||||
|
||||
// Handle negative numbers
|
||||
if (number < 0.0)
|
||||
|
Loading…
Reference in New Issue
Block a user