Andrew Lentvorski wrote:
> 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.

Hey thanks! Though there might still be room for improvement. ;-)

Answers, I've already got perfect (although) only a few:

 - 42

 - Oil it, Hit it with a hammer, Buy a new one

 - It depends


> 
>> 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.

I guess it's been a long time since I've seen a string of trailing 9s.

I just plugged in my hp45, and (after removing the disgusting nicad
pack) find it still works! I kinda recall some tricks doing things like
1 10 / .1 - 20 [10^x] * and getting non-zero.

..or maybe my memory is in worse shape than the nicads?


Regards,
..jim

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

Reply via email to