Since by AGI, we usually mean human-like, that system should be able to self correct the same way we do.
Edit: The assumption is that the calculators are using specific branches of the inverse functions but that's still a choice being made b/c the functions are periodic there are no unique choices of inverse functions. You have to pick a branch that is within the domain/range of periodicity.
Calculator Forensics (2002) - https://news.ycombinator.com/item?id=42757455 - Jan 2025 (1 comment)
Calculator Forensics (2002) - https://news.ycombinator.com/item?id=28561298 - Sept 2021 (19 comments)
Calculator Forensics (2002) - https://news.ycombinator.com/item?id=7682045 - May 2014 (2 comments)
To be somewhat concrete, on amd64 with valgrind --tool=callgrind my non-BCD decimal fixed-point RPN calculator program https://gitlab.com/kragen/bubbleos/tree/master/yeso/rpncalc.... compiled for the console (rpncalc_linux.c) takes 228,141 instructions to process the input "2 3q" from the keyboard, and 229,824 instructions to process the input "2 3/q", an additional 1,683 instructions for the division, mostly to display the result. Division is probably the worst case for regular arithmetic. An additional division operation takes another 1,601 instructions. A subtraction instead takes 1,563.
On an 8-bit processor like a PIC or AVR, you need to run more instructions to do the same work, but it's typically maybe a factor of 8 for data processing and less for things like looping. So we're talking about maybe 10,000 instructions per keystroke, probably less. On a 16MHz 1T microcontroller, that's less than a millisecond.
You might think that if the microcontroller doesn't have space for floating-point circuitry it also doesn't have space for enough memory for software floating point, but that would be wrong. My decimal floating point library is 1204 bytes (≈602 instructions) compiled for AVR, and the calculator UI logic is 2134 bytes (≈1067 instructions). This fits in all but the smallest microcontrollers. Like, it doesn't quite fit in an ATTiny25.
https://www.rskey.org/~mwsebastian/miscprj/forensics.htm
This is where this post should probably point, IMHO.
3pi - 9
= 0.42477796076937971538793014983850865259150819812531746292483377692344921885
Note that all of the inverse trig functions are multivalued because the trig functions are periodic. Here, Wolfram Alpha is giving you one of the possible answers. The entire family of answers should be +/-9 + n*pi for any integer n; the sign on the 9 is due to cos being an even function.
kazinator•4mo ago
gs17•4mo ago
bobmcnamara•4mo ago
maxbond•4mo ago
maxbond•4mo ago
kstrauser•4mo ago
maxbond•4mo ago
gblargg•4mo ago