General > General Technical Chat
11⁶/13 = 156158413 × π / 3600 for Casio
<< < (3/3)
Nominal Animal:

--- Quote from: mathsquid on July 20, 2020, 01:41:08 pm ---
--- Quote from: tom66 on July 20, 2020, 07:26:51 am ---I really doubt these calculators use floating point.

--- End quote ---

That's a good point. I don't know what they do internally, but when casio calculators talk to each other via the serial port (the 2.5 mm jack on top), they encode numbers using BCD.

https://www.qsl.net/la9sja/electronics/casio-comm.pdf?q=casio

--- End quote ---
No, they most definitely use some form of floating-point format to describe numbers.  It is unlikely it is IEEE-754 Binary64, though.

For the transfer, the PDF says the format is a sign/info byte, a single byte exponent, and a 15 BCD digit mantissa.

The sign/info byte has only 4 bits, so it looks like at least some Casio devices use 9 bytes to describe a real number, and 18 for complex numbers: one byte for the base-10 exponent, and 8 bytes of BCD digits, with the most significant 4 bits replaced with the sign/info byte.  (The extra byte, since each real variable takes 10 bytes of memory, is the name of the variable.) This is a particularly nice format to process with a 8-bit microcontroller.  Multiplication and division can be implemented with a 256-byte look-up table each, via long multiplication and division.

The thing that I'm unsure of is logarithms and hyperbolic functions.  I know of the binary approaches (that can be implemented even on an 8-bit processor), but don't know about other radixes, especially decimal/BCD.  However, the Wikipedia CORDIC page links to a 1971 paper by John Stephen Walter, A unified algorithm for elementary functions (PDF), which shows how it is done; so, in my opinion, BCD is more likely than binary for the mantissa.

Circling back to the topic at hand, a mantissa of 15 decimal digits corresponds to about 50 bits, or slightly less than IEEE-754 Binary64 (53 bits), which explains the reason Casio calculators think 8958937768937 ÷ 2851718461558 = π: their internal floating point representation is the same for both, 3.14159265358979×100.
Navigation
Message Index
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod