diff options
author | David A. Mellis <d.mellis@arduino.cc> | 2012-06-23 10:37:35 -0500 |
---|---|---|
committer | David A. Mellis <d.mellis@arduino.cc> | 2012-06-23 10:37:35 -0500 |
commit | 2ef2f9d5c78ad4a1d265b7386e13c41d41ba410a (patch) | |
tree | a6551f8e43399261e64f476de7f168ae83d95e92 | |
parent | 29ff4f779a37019c5218145cb15b036b51fc5e25 (diff) |
Print "inf" for infinite floating point numbers (using isinf()).
http://code.google.com/p/arduino/issues/detail?id=961
-rwxr-xr-x | cores/arduino/Print.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cores/arduino/Print.cpp b/cores/arduino/Print.cpp index 98969f5..711251c 100755 --- a/cores/arduino/Print.cpp +++ b/cores/arduino/Print.cpp @@ -227,6 +227,7 @@ size_t Print::printFloat(double number, uint8_t digits) size_t n = 0; if (isnan(number)) return print("nan"); + if (isinf(number)) return print("inf"); // Handle negative numbers if (number < 0.0) |