|
From: Baptiste L. <bap...@gm...> - 2011-05-27 12:38:10
|
2011/5/27 Aaron Jacobs <ja...@go...>
> Wow, that's crazy. I think your solution to the first problem is good.
> For the second, maybe the best would be to *parse* the floating point
> string to be checked, checking that it parses successfully and differs
> from the original double by no more than 0.1% or whatever?
>
I've went ahead and did the "normalize exponent string" approach since
comparing double with ratio is always tricky (e.g; 0.1% of which number...).
I'm done fixing most portability issues. It now compiles and pass all tests
on:
IBM AIX on Power6 with XLC 7
Solaris X86 / Sunstudio 12
Solaris SPARC / Sunstudio 12
Windows XP SP3 / MSVS 6.6, 2003, 2005, 2008
Linux redhat 3 / gcc 3.2.3
Linux redhat5. 3 / gcc 4.1.2
There is still some failing unit tests with MSVS 2010 that I need to
investigate...
>
> On Thu, May 26, 2011 at 5:45 PM, Baptiste Lepilleur
> <bap...@gm...> wrote:
> >
> >
> > 2011/5/25 Aaron Jacobs <ja...@go...>
> >>
> >> Hmm, but does it make sense to say a default constructed value is all
> >> of null, an array, and an object? Wouldn't it make more sense to have
> >> isArray (and only isArray) start returning true once the value is
> >> "turned into" an array by appending something to it?
> >>
> >> I'd appreciate if you could investigate the VC++ issues; I don't have
> >> easy access to a Windows machine.
> >
> > The unit test failures are real strange:
> > double x = kint64max;
> > double y = val.asDouble();
> > int count = 0;
> > if ( y == x ) // OK (case 1)
> > {
> > ++count;
> > }
> > if ( double(kint64max) == y ) // BAD (case 2)
> > {
> > ++count;
> > }
>
[...]
>
|