What steps will reproduce the problem? 1. Further to bug report 946 ... 2. Set a float to infinity (eg. 1.0/0.0 ) 3. Print it 4. See 0.00000000
What is the expected output? What do you see instead?
I expect to see "inf" but I see zero. Issue 946 now prints nan rather than zero (for 0.0/0.0), but I suggest that 1.0/0.0 should print "inf" and not zero.
What version of the Arduino software are you using? On what operating system? Which Arduino board are you using?
IDE 1.0.1 OS/X. Board not relevant.
Please provide any additional information below.
Suggest changing Print::printFloat to add, near the start:
if (isinf (number)) return print ("inf");
Comment #1
Posted on Jun 23, 2012 by Happy Rhinohttps://github.com/arduino/Arduino/commit/71a615c65d9422c202c86fbe3290c2e529a8f296
Status: Fixed
Labels:
Type-Defect
Priority-Medium
Milestone-1.0.2
Component-Core