[
Lists Home |
Date Index |
Thread Index
]
From: "Dare Obasanjo" <dareo@microsoft.com>
> Your entire argument is incorrect. A decimal type can hold and represent
> 1.1 with ease. A floating point type cannot accurately represent 1.1.
Yes, thanks Dare, I meant floating point. I also transposed "type" and "value" in
one place, so at least let me plead Alzheimers! Here is rewritten to be less stupid., I hope.
---------------------
My perspective is slightly different than Jonathan's or Uche's nominal positions.
The concrete example is the one currently under discussion in various places: that with
XML Schema's floats you cannot represent many exact amounts that
have decimal positions. So the float "1.1" is not the exact number 1.1.
This will be well-known to most people who have done undergraduate
computer science, and for a catch up, see Sun's BigDecimal documentation.
As soon as I assign the value 1.1 to the datatype xs:float I am fixing its
value and precision to something different than almost any "average"
user will be expecting. They are typing 1.1 and what they get will be
the nearest value available in xs:float (and xs:double).
Whether I can "throw away" that typing (i.e., adopt the natural typing that
conforms to "average" user's expectation or change the type from one kind of number
to another) depends entirely on the particular situation, it seems to me. (There is
no need to adopt either extreme, unfortunately, that datatyping can always be
thrown away or that datatyping can never be thrown away.)
-----------------------
Cheers
Rick impending-stroke-victim Jelliffe
|