Calculator truncates some exponent values, leading to incorrect results
| Originator: | igeek1 | ||
| Number: | rdar://15877530 | Date Originated: | 21-Jan-2014 11:52 PM |
| Status: | Closed | Resolved: | 30-Jul-2015 06:08 PM |
| Product: | OS X | Product Version: | OS X 10.9.1 (13B3116) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: Some values, such as 2.22222222222222E17, display correctly in Scientific mode, but incorrectly (by a factor of 10^16) in Basic mode. Steps to Reproduce: I prefer entering values with the keyboard, so that is how I will be notating it, but it works with onscreen key-presses as well. The number is arbitrary - any number with enough significant figures will suffice. The sequence I present here is just a convenient way to enter a number that will reproduce this bug. 1. Open Calculator.app. 2. Make sure you are not in RPN mode. 3. Enter Basic mode with Command-1. 4. Make sure the calculator is cleared 5. Enter the following value: 2.222222222222222222 (18 2s after the decimal point). 6. Multiply by typing * (star). 7. Enter 10. 8. Type ^ to raise the 10 to a power. 9. Enter 17 as the power. 10. Press Return to finish the calculation. That calculation one one line, as copied from the Paper Tape window, is: 2.2222222222222222 * pow(10,17) = 2.222222222222222E17 Expected Results: The value 2.222222222222222E17 appears on the calculator's onscreen LCD. If the full expansion can't fit, the values after the decimal place are truncated. Actual Results: The value 2.22222222222222E1 appears on the screen. This is equivalent to 2.22222222222222 * 10 ^ 1, or 2.22222222222222. This is incorrect by a factor of 10^16, which in the words of Richard Dawkins regarding the creationist estimate of the age of the earth, "is not a trivial error." If you type Command-2 to switch to Scientific mode, you will see that the correct exponent is 17, not 1. Switch back to Basic mode with Command-1, and the 7 is truncated again. Version: OS X 10.9.1 (13B3116) 10.8 (123) Notes: Configuration: Tested on Retina and non-Retina screens. Attachments:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
This issue appears to be resolved as of OS X Yosemite.
Dawkins quote cited in the bug: http://www.youtube.com/watch?v=W3-BNO1xzJo