Re: [xslt] floating point conversion
- From: Daniel Veillard <veillard redhat com>
- To: The Gnome XSLT library mailing-list <xslt gnome org>
- Subject: Re: [xslt] floating point conversion
- Date: Fri, 5 Nov 2010 21:22:43 +0100
On Sat, Sep 11, 2010 at 03:55:46PM -0400, Phil Shafer wrote:
> Vincent Lefevre writes:
> >I fear that's not sufficient. A few lines above, the multiplications
> >by 10 and additions introduce rounding errors for 17 digits and more.
> >An integer just below a rounding boundary will probably not be rounded
> >correctly.
>
> [repeating my bugzilla comment]
>
> We can just use strtod(), which handle both my fractional issue and
> your big number issue perfectly. Unless there are objections, I'll
> redo the patch on Monday.
and repeating my bugzilla comment here too, the problem is that
strtod is locale dependant and really 1/ can allow deviation 2/
switch locale from the library at each call , so fixing this is really
a matter of writing down equivalent code but limiting the roundings.
(<grin/> it's not fun)
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel veillard com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]