# Number of decimal places on Android 9 calculator?

**URL:** https://boards.straightdope.com/t/number-of-decimal-places-on-android-9-calculator/847742
**Category:** Factual Questions
**Created:** [February 10, 2020, 6:40pm UTC](https://boards.straightdope.com/t/number-of-decimal-places-on-android-9-calculator/847742 "2020-02-10T18:40:55Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Darren\_Garrison](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/darren_garrison/32/92_2.png) [@Darren\_Garrison](https://boards.straightdope.com/u/Darren_Garrison)
#### Post date: [February 10, 2020, 6:40pm UTC](https://boards.straightdope.com/t/number-of-decimal-places-on-android-9-calculator/847742/1 "2020-02-10T18:40:55Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Limmin](https://avatars.discourse-cdn.com/v4/letter/l/f04885/32.png) [@Limmin](https://boards.straightdope.com/u/Limmin)
#### Post date: [February 10, 2020, 6:53pm UTC](https://boards.straightdope.com/t/number-of-decimal-places-on-android-9-calculator/847742/2 "2020-02-10T18:53:34Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![scr4](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@scr4](https://boards.straightdope.com/u/scr4)
#### Post date: [February 10, 2020, 7:16pm UTC](https://boards.straightdope.com/t/number-of-decimal-places-on-android-9-calculator/847742/3 "2020-02-10T19:16:29Z")

</div>

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](https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic) library.

---

<div class="post-metadata">

### Author: ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)
#### Post date: [February 10, 2020, 10:21pm UTC](https://boards.straightdope.com/t/number-of-decimal-places-on-android-9-calculator/847742/4 "2020-02-10T22:21:06Z")

</div>

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)?

---

<div class="post-metadata">

### Author: ![psychonaut](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/psychonaut/32/4655_2.png) [@psychonaut](https://boards.straightdope.com/u/psychonaut)
#### Post date: [February 10, 2020, 10:57pm UTC](https://boards.straightdope.com/t/number-of-decimal-places-on-android-9-calculator/847742/5 "2020-02-10T22:57:21Z")

</div>

> [@Chronos](#):
>
> 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.

---

<div class="post-metadata">

### Author: ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)
#### Post date: [February 10, 2020, 11:01pm UTC](https://boards.straightdope.com/t/number-of-decimal-places-on-android-9-calculator/847742/6 "2020-02-10T23:01:28Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Chingon](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chingon/32/17645_2.png) [@Chingon](https://boards.straightdope.com/u/Chingon)
#### Post date: [February 10, 2020, 11:08pm UTC](https://boards.straightdope.com/t/number-of-decimal-places-on-android-9-calculator/847742/7 "2020-02-10T23:08:37Z")

</div>

Try Cos(2). Pretty sure it’s computing the numerical approximation.

---

<div class="post-metadata">

### Author: ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)
#### Post date: [February 10, 2020, 11:11pm UTC](https://boards.straightdope.com/t/number-of-decimal-places-on-android-9-calculator/847742/8 "2020-02-10T23:11:09Z")

</div>

> [@Chronos](#):
>
> 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](https://apfloat.appspot.com/)) 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.

---

<div class="post-metadata">

### Author: ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)
#### Post date: [February 10, 2020, 11:16pm UTC](https://boards.straightdope.com/t/number-of-decimal-places-on-android-9-calculator/847742/9 "2020-02-10T23:16:47Z")

</div>

> [@Chingon](#):
>
> 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.

---

<div class="post-metadata">

### Author: ![Darren\_Garrison](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/darren_garrison/32/92_2.png) [@Darren\_Garrison](https://boards.straightdope.com/u/Darren_Garrison)
#### Post date: [February 11, 2020, 12:01am UTC](https://boards.straightdope.com/t/number-of-decimal-places-on-android-9-calculator/847742/10 "2020-02-11T00:01:55Z")

</div>

> [@Dr.Strangelove](#):
>
> 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.6190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190476190

---

<div class="post-metadata">

### Author: ![Darren\_Garrison](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/darren_garrison/32/92_2.png) [@Darren\_Garrison](https://boards.straightdope.com/u/Darren_Garrison)
#### Post date: [February 11, 2020, 12:03am UTC](https://boards.straightdope.com/t/number-of-decimal-places-on-android-9-calculator/847742/11 "2020-02-11T00:03:49Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Chingon](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chingon/32/17645_2.png) [@Chingon](https://boards.straightdope.com/u/Chingon)
#### Post date: [February 11, 2020, 12:17am UTC](https://boards.straightdope.com/t/number-of-decimal-places-on-android-9-calculator/847742/12 "2020-02-11T00:17:54Z")

</div>

> [@Dr.Strangelove](#):
>
> 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.
