James G. Sack (jim) wrote:
Out of curiosity, how do the current crop of calculators deal with (eg)
"representing 0.1" exactly?

Just a side note, Jim. In the last year or two, your questions are getting really good.

Do they use different representations in different ranges? (seems
unlikely to really work), or do they maybe recognize & distinguish
rationals?

What magic lurks within?

Decimal arithmetic.

Most modern calculators actually store .1 as .1 (my $7 HP seems to, the TI website indicates that their expensive ones do too)

They handle everything by using decimal digits and digit serial algorithms. Given modern processing power and memory, that's not much of a big deal. IIRC, one of the HP calculators had to be slowed down because people didn't trust it. Probably the 12C.

This was a much bigger deal when calculators first came out and memory was scarce.

-a

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to