From 2ef2f9d5c78ad4a1d265b7386e13c41d41ba410a Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sat, 23 Jun 2012 10:37:35 -0500 Subject: Print "inf" for infinite floating point numbers (using isinf()). http://code.google.com/p/arduino/issues/detail?id=961 --- cores/arduino/Print.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'cores') 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) -- cgit v1.2.3-18-g5258