Finding the number of digits on the iPhone Calculator

11222019, 04:06 PM
Post: #1




Finding the number of digits on the iPhone Calculator
Hi,
I'm trying to figure out the number of internal digits used in the iPhone standard Calculator App but I'm not sure I'm doing it right. By calculating 1/3 and removing all the visible digits I start seeing weird results after the 20th digit or so. I guess it's an artifact caused by the binary representation? Is there a way to infer the exact number of binary digits used? I guess it's 64 bits but I want to be able to test my guess. Any help appreciated! Thanks! Software Failure: Guru Meditation  Antonio IU2KIY 

11222019, 05:47 PM
(This post was last modified: 11222019 08:22 PM by Albert Chan.)
Post: #2




RE: Finding the number of digits on the iPhone Calculator
Try to find eps, such that eps + 1  1 = 0
For example, my ipad Sci:Pro Calc apps has 128 bits precision Code: 2 ^ 127 + 1  1 = Update: it is safer to double check around found eps, since 1+eps is a halfway case. 3e39 + 1  1 → 5.877471754111438e39 2e39 + 1  1 → 0 

11222019, 06:36 PM
Post: #3




RE: Finding the number of digits on the iPhone Calculator
nice trick, thank you!
Using this method it turns out it's 64 bit precision Software Failure: Guru Meditation  Antonio IU2KIY 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)