Reply
 
Thread Tools Display Modes
  #1  
Old 02-10-2020, 01:40 PM
Darren Garrison's Avatar
Darren Garrison is offline
Guest
 
Join Date: Oct 2016
Posts: 12,738

Number of decimal places on Android 9 calculator?


I just accidentally discovered that on the Android 9 calculator, if you swipe across the total it adds decimal places. I swiped a few times on a number and got it up over 500 decimal places before quitting. Anyone know what the limit is?
  #2  
Old 02-10-2020, 01:53 PM
Limmin's Avatar
Limmin is offline
Guest
 
Join Date: Oct 2018
Posts: 222
Hm, "double precision" type variables in computing are good to only about 15 or 16 decimal places.

Not sure how they could get to 500 decimal places accurately, or for that matter, why anyone would want an android calculator app to output at this level of precision.
  #3  
Old 02-10-2020, 02:16 PM
scr4 is offline
Guest
 
Join Date: Aug 1999
Location: Alabama
Posts: 16,400
I hit the "pi" button and checked, it seems to be correct at least to 1000 digits. That may be a special case for built-in constants, but I'd guess it uses some type of arbitrary precision library.
  #4  
Old 02-10-2020, 05:21 PM
Chronos's Avatar
Chronos is offline
Charter Member
Moderator
 
Join Date: Jan 2000
Location: The Land of Cleves
Posts: 86,733
If you have some means for checking that many digits, but want to rule out it just being for built-in constants, maybe try sqrt(2)?
  #5  
Old 02-10-2020, 05:57 PM
psychonaut is online now
Guest
 
Join Date: Apr 2001
Location: Europe
Posts: 6,142
Quote:
Originally Posted by Chronos View Post
If you have some means for checking that many digits, but want to rule out it just being for built-in constants, maybe try sqrt(2)?
If any constants are built into Android, then sqrt(2) has got to be in the top three.
  #6  
Old 02-10-2020, 06:01 PM
Chronos's Avatar
Chronos is offline
Charter Member
Moderator
 
Join Date: Jan 2000
Location: The Land of Cleves
Posts: 86,733
pi and e probably are, but I doubt that sqrt(2) would come up enough more often than any other square root to make it worthwhile. But if you're worried about it, just use sqrt(3) or sqrt(17) or something.
  #7  
Old 02-10-2020, 06:08 PM
Chingon is offline
Guest
 
Join Date: Dec 2006
Location: the hypersphere
Posts: 874
Try Cos(2). Pretty sure it's computing the numerical approximation.

Last edited by Chingon; 02-10-2020 at 06:10 PM.
  #8  
Old 02-10-2020, 06:11 PM
Dr. Strangelove's Avatar
Dr. Strangelove is offline
Guest
 
Join Date: Dec 2010
Posts: 8,345
Quote:
Originally Posted by Chronos View Post
pi and e probably are, but I doubt that sqrt(2) would come up enough more often than any other square root to make it worthwhile. But if you're worried about it, just use sqrt(3) or sqrt(17) or something.
I did a little test (source) of sqrt(33337777), and indeed the Android calculator seems to be arbitrary precision. It's painful to check since you have to scroll through the digits manually, but I did spot checks at a few positions and it matches up to 80+ digits.

At any rate, none of this is difficult. I wrote an arbitrary precision library a while back to learn how FFTs work. Millions of digits take just a fraction of a second even on a 20 year old computer. A modern phone that only has to work at human input rates is a piece of cake.
  #9  
Old 02-10-2020, 06:16 PM
Dr. Strangelove's Avatar
Dr. Strangelove is offline
Guest
 
Join Date: Dec 2010
Posts: 8,345
Quote:
Originally Posted by Chingon View Post
Try Cos(2). Pretty sure it's computing the numerical approximation.
Well, of course it's computing the numerical approximation. Nevertheless, I checked and it's accurate to at least 500 places.
  #10  
Old 02-10-2020, 07:01 PM
Darren Garrison's Avatar
Darren Garrison is offline
Guest
 
Join Date: Oct 2016
Posts: 12,738
Quote:
Originally Posted by Dr. Strangelove View Post
It's painful to check since you have to scroll through the digits manually
You can copy the whole mess to the clipboard and paste it anywhere. Here is 2500 digits of 2020/210:
9.61904761904761904761904761904761904761904761904761904761904761904761904761904761904761904761904761 9047619047619047619047619047619047619047619047619047619047619047619047619047619047619047619047619047 6190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190 4761904761904761904761904761904761904761904761904761904761904761904761904761904761904761904761904761 9047619047619047619047619047619047619047619047619047619047619047619047619047619047619047619047619047 6190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190 4761904761904761904761904761904761904761904761904761904761904761904761904761904761904761904761904761 9047619047619047619047619047619047619047619047619047619047619047619047619047619047619047619047619047 6190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190 4761904761904761904761904761904761904761904761904761904761904761904761904761904761904761904761904761 9047619047619047619047619047619047619047619047619047619047619047619047619047619047619047619047619047 6190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190 4761904761904761904761904761904761904761904761904761904761904761904761904761904761904761904761904761 9047619047619047619047619047619047619047619047619047619047619047619047619047619047619047619047619047 6190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190 4761904761904761904761904761904761904761904761904761904761904761904761904761904761904761904761904761 9047619047619047619047619047619047619047619047619047619047619047619047619047619047619047619047619047 6190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190 4761904761904761904761904761904761904761904761904761904761904761904761904761904761904761904761904761 9047619047619047619047619047619047619047619047619047619047619047619047619047619047619047619047619047 6190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190 4761904761904761904761904761904761904761904761904761904761904761904761904761904761904761904761904761 9047619047619047619047619047619047619047619047619047619047619047619047619047619047619047619047619047 6190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190 4761904761904761904761904761904761904761904761904761904761904761904761904761904761904761904761904761 90
  #11  
Old 02-10-2020, 07:03 PM
Darren Garrison's Avatar
Darren Garrison is offline
Guest
 
Join Date: Oct 2016
Posts: 12,738
And I'm just wondering if there is a hard cutoff on the number of digits it will display, or if it will keep going until memory runs out.
  #12  
Old 02-10-2020, 07:17 PM
Chingon is offline
Guest
 
Join Date: Dec 2006
Location: the hypersphere
Posts: 874
Quote:
Originally Posted by Dr. Strangelove View Post
Well, of course it's computing the numerical approximation. Nevertheless, I checked and it's accurate to at least 500 places.
I didn't mean to imply otherwise.
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:31 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.

Send questions for Cecil Adams to: cecil@straightdope.com

Send comments about this website to: webmaster@straightdope.com

Terms of Use / Privacy Policy

Advertise on the Straight Dope!
(Your direct line to thousands of the smartest, hippest people on the planet, plus a few total dipsticks.)

Copyright 2019 STM Reader, LLC.

 
Copyright © 2017