Casting from xs:float to xs:double

According to appendix B <http://www.w3.org/TR/xquery/>  of the XQuery
spec.

		A value of type xs:float (or any type derived by
restriction from xs:float) can be promoted to the type xs:double. The
result is the xs:double value that is the same as the original value.
This kind of promotion may cause loss of precision.

I'm wondering where the imprecision could come from.  Every xs:float
value can be represented EXACTLY as a xs:double value.
Read IEEE-754 float value can be represented exactly as an IEEE-754
double value.   So where could the loss of precision come from?




All the best, Ashok

Received on Monday, 17 May 2004 20:02:55 UTC