David kerber wrote:
>> in-ex-act adj Not exact, accurate or true.
>>
>> That's the full definition. All floating point operations
>> are exact, accurate, and true. They just aren't the same
>> as the corresponding operations on (mathematical) real numbers.
>> In fact, floating point numbers are integers, just with
>> a different set of operations defined on them. As such, the
>> operations on them are exact, accurate, and true in precisely
>> the same way ordinary integer operations on them are exact,
>> accurate, and true. There is only one exact result which must
>> be the one produced.
>>
>> Each FP number may be used to represent precisely one real number.
>> The operations on the FP numbers correspond closely to other operations
>> performed on those representable real numbers. But the result is
>> constrained to be another integer, an exact machine number. This number
>> may or may not correspond to the real number which is the result
>>   
> If it doesn't correspond to the real number, then it's inexact.  Take 
> the calculation 7 divided by 10.  The correct answer is 0.7 (seven 
> tenths).  If you try this in a binary computer, you do not get the 
> correct answer; you get the the closest number that floating-point 
> numbers can come to 0.7, but it is not exactly 0.7, and therefore is 
> inexact, or inaccurate if you prefer that term.

Well, that's the common misconception, yes. The reality is
that FP ops are defined only on a discrete set, and yield
values only on a discrete set. They are not defined on the
reals. The reals are a different set, and have different
operations on them. The fact that 0.7 is not representable
by a binary floating point number no more implies that
FP math is inexact, than does the exact same statement
that 7 / 10 in integers is 0. The result is not inexact,
nor incorrect. It is exact. It is correct. It just isn't the
same as what you get when you use reals instead of integers.

>> of the corresponding real number operation. That's all. If the
>> result of the real number operation is not representable, then
>> the FP result cannot, even in principle, correspond to the
>> real number result. There is no inaccuracy or inexactness or
>> incorrectness involved.
>>   
> I guess it's just a difference in our definitions of inexact.  By 
> standard scientific definitions (which I guess may not correspond to 
> computer science's definitions), if it can't represent the correct 
> answer exactly, then it's inexact.

Hmm. I gave the definition of inexact above.

If you want to use the word in a non standard way, then ok. But
then you should also state that integer arithmetic is inexact.
Floating point arithmetic *is* arithmetic on integers, and if
you consider FP arithmetic to be inexact, then you should
also consider ordinary integer arithmetic to be inexct.

The only difference between FP and integer arithmetic
(on machines, I mean) is which numbers have representations
and which do not. They are equally exact and well defined
for the operations on the discrete sets they represent.

Anyway, as I said, I don't want to start a debate.

Mike
-- 
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!
_______________________________________________
Prime mailing list
[email protected]
http://hogranch.com/mailman/listinfo/prime

Reply via email to