Subject: Re: Implicit casting from double to float
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Thu, 8 Jan 2009 13:56:48 +0530
|
On Thu, Jan 8, 2009 at 4:17 AM, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> My first thoughts are that XSLT should raise an error on this, and if Saxon
> isn't raising an error then it's a bug. But I need to investigate a bit more
> deeply.
If this is a bug, I think I found it accidentally :)
Though I find Saxon's implementation about this to be reasonable (may
be we need to add some explanation to the XPath 2.0 spec inline with
Saxon's implementation).
According to me, casting (promoting) a double to float is a reasonable
operation. The only problem is, that double values larger than 32 bit
(which is the size of float) cannot be represented in a float value
space, and there will be significant loss of information. Saxon
produces the value INF as a result of this cast operation.
--
Regards,
Mukul Gandhi
| Current Thread |
Michael Kay - 7 Jan 2009 22:48:21 -0000
- Mukul Gandhi - 8 Jan 2009 08:27:10 -0000 <=
|
|