8 ms·
Calculator Forensics
- Y_Y 5y agoThis is a really cool idea. I think you could get a long way by finding calculations whose results depend on the chip being used. Even more interesting would be a generalized version that sought to discover properties of an unknown calculator. For example, working out the internal precision by looking at rounding errors, or you could time calculations on numbers of different sizes and make inferences about the size of available memory. This would be cool because you can then apply it to more general sorts of things, like human brains.
- yjftsjthsd-h 5y ago> This would be cool because you can then apply it to more general sorts of things, like human brains. I would expect that to fall apart because the underlying mechanics are different; we know what errors converting between base 2 and 10 look like, but I think it's pretty far from obvious that the same principles extend to whatever everyone's favorite biological neural network uses to execute mathematics. You could do the same kinds of analysis, and it would tell you something interesting probably, I just wouldn't trust inferences made on the basis of lessons learned from digital computers.
- LeoPanthera 5y agoUsing this method (and other related "test" functions) I discovered that the default iOS calculator operates with significantly greater precision that the popular third party "PCalc", which was a little disappointing.
- fhdch 5y agoIf you like RPN, try freecalc42. I got a plain 9 It implements the HP42, but with a math library w/ 34 decimal digits of precision. You can also buy a calculator, the DM-42 that runs on it and itd be the best calculator in the world if the key board weren't so… bleh
- sbierwagen 5y agoFree42*, no calc. Also heads up: the automod seems to have banned you. I had to vouch this comment. You might be commenting too fast for a new user or be commenting from an IP it doesn't like.
- saagarjha 5y agoYeah, the iPhone calculator app has precision to something like 30 decimal places. I think it is probably using 128-bit floating points?
- earksiinni 5y agoInteresting. I got 8.999999999959657 on my Mac Mini M1 using Calculator.app.
- xattt 5y agoCalculator app on an iPhone 6s brings it back to 9. Is there some sort emulation shenanigans that are happening? Using the SC-323 (Sharp calc emulator) app brings it to 9.0000000000000000005. According to the table, this is the same as the Sharp PC-E500 calc.
- saagarjha 5y agoI believe the Mac and iOS calculator implementations are different.
- johnklos 5y agoTiger on PowerPC: 8.99999999983257 Catalina on Intel: 9.000000000000055
- analog31 5y ago9.00000000000001 using Python / numpy on an Intel box, converting degrees to radians using numpy's built-in value of pi
- audiometry 5y agoMy soulver app on iphone says 9 - answer = 1.162985x10^-97 wow. That's basically infinite precision. But then excel gives a compartively horrible result 8.99999999983268000 (maybe all the casting to and fro degrees and radians makes it worse?) And python on the same machine, similar: degrees(asin(degrees(acos(degrees(atan(tan(radians(cos(radians(sin(radians(9)))))))))))) = 8.99999999983257
- hazbot 5y agoMy android calculator app gives me 9.00000... and lets me scroll through the decimal expansion, it's zeros at least to 1000 places, so presumably the calculator's answer is exactly 9. I wonder if our calculator apps are doing some symbolic computations? Or just have >>64 bit precision (which I presume is the default for excel/python)?
- raphlinus 5y agoThe Android calculator is indeed doing unbounded precision calculations[0.999999999999]. It was developed by Hans-J Boehm, also known for the Boehm-Weiser conservative garbage collector. [0.999999999999]: https://cacm.acm.org/magazines/2017/8/219594-small-data-computing/fulltext https://cacm.acm.org/magazines/2017/8/219594-small-data-comp...
- Groxx 5y agoThe Android calculator really has no reason to be so excellent, but I greatly appreciate it. Everything should do unbounded precision. The results are much more human-friendly. And if you're not building a calculator app for humans, who are you building it for?
- hazbot 5y agoI remember as a kid doing: 100/3 ans×3 on different calculators, and at the time being baffled at how they often said 99.9999999.
- jstanley 5y agoI have a calculator which doesn't appear on the results table: http://www.rskey.org/~mwsebastian/miscprj/models.htm http://www.rskey.org/~mwsebastian/miscprj/models.htm It's a "Casio fx-991ES PLUS", and I get 9.00000000733338. I want to submit this result to the author but I can't find contact information anywhere, despite this page explicitly asking for help: http://www.rskey.org/~mwsebastian/calcinfo.htm http://www.rskey.org/~mwsebastian/calcinfo.htm