Carl Lowenstein wrote:
> On 6/29/07, Carl Lowenstein <[EMAIL PROTECTED]> wrote:
>> On 6/29/07, James G. Sack (jim) <[EMAIL PROTECTED]> wrote:
>> > Andrew Lentvorski wrote:
>> > > Christopher Smith wrote:
>> > >..
>> > >> And of course his problem with "knowing" that a binary calculator
>> > >> cannot represent 0.1 exactly, fails to recognize the capabilities of
>> > >> calculators that maintain internal results as rational numbers
>> > >
>> > > None that I am aware of as still being in production do this.
>> >
>> > Out of curiosity, how do the current crop of calculators deal with (eg)
>> > "representing 0.1" exactly?
>> >
>> > Do they use different representations in different ranges? (seems
>> > unlikely to really work), or do they maybe recognize & distinguish
>> > rationals?
>>
>> The only calculators I have readily to hand are various vintages of
>> HP.  As far as I can tell by some button pushing, they have no problem
>> with representing 0.1 exactly.  I think that they are binary-coded
>> decimal and base 10 floating point internally.  Somewhere I have a
>> book on programming the internal machine language of the HP 45, but I
>> am not looking for it right now.
>>
>> It is the vast majority of digital computers that do not represent
>> decimal fractions such as 0.1 exactly.  But this is a different part
>> of the problem space.
> 
> Other thoughts and probing of calculator foibles.  The HP calculators,
> which work internally with decimal arithmetic and base-10 floating
> point, show some interesting results when probed with numbers that can
> not be represented exactly, such as 1/3.
> 
> 1 <enter> 3 <divide> 3 <multiply> 1 <subtract> gives an answer of
> -1.00e-12 on my newest calculator (HP 32SII) and an answer of
> -1.00 -10 on a rather older one (HP 10C).
> So the new one carries more digits internally.
> 
> I can't locate the '45 or '80 to try an older one.
> 

hp45 gives -1.0x10-10

Regards,
..jim

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

Reply via email to