[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: scons check breaks with latest version of gpsd
From: |
Greg Troxel |
Subject: |
Re: scons check breaks with latest version of gpsd |
Date: |
Tue, 13 Jul 2021 19:00:39 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (berkeley-unix) |
"Gary E. Miller" <gem@rellim.com> writes:
>> I would expect that all the rounding is specified between IEE754 and
>> POSIX. So was this a glibc bug fix?
>
> C99 and ISO/IEC 9899:TC3 (Draft C 2007) say of printf("%f"):
>
> The value is rounded to the appropriate number of digits.
>
> That does not explicitly explain 0.00 and -0.00.
This is tricky, because C99 doesn't (I'm pretty sure) require IEEE754,
but on the other hand the only computer I'm aware of people using that
doesn't do IEEE754 is a Vax.
https://en.wikipedia.org/wiki/Signed_zero
> POSIX 2007 says it include C99 definition of pritnf() by reference.
Interesting. So I'd say that on a computer using IEEE754 the printf
rounding has to follow the 754 rules.
> There has been at least one other RasPi report of rounding issues:
>
> https://gitlab.com/gpsd/gpsd/-/issues/65
>
> "lat":41.575030049
>
> vs:
>
> "lat":41.575030048
>
> But that was on Debian Buster Pi that no one else could duplicate.
Interesting, and I wonder if tests should just have some sort of
epsilson/close-enough in numerical comparison vs bit-for-bit ascii
compare -- but I realize that's a big change.
signature.asc
Description: PGP signature
- Re: scons check breaks with latest version of gpsd, (continued)
- Re: scons check breaks with latest version of gpsd, Greg Troxel, 2021/07/12
- Re: scons check breaks with latest version of gpsd, Gary E. Miller, 2021/07/12
- Re: scons check breaks with latest version of gpsd, Michael Byczkowski, 2021/07/12
- Re: scons check breaks with latest version of gpsd, Greg Troxel, 2021/07/12
- Re: scons check breaks with latest version of gpsd, Gary E. Miller, 2021/07/12
- Re: scons check breaks with latest version of gpsd, Gary E. Miller, 2021/07/12
- Re: scons check breaks with latest version of gpsd, Gary E. Miller, 2021/07/13
- Re: scons check breaks with latest version of gpsd, Greg Troxel, 2021/07/13
- Re: scons check breaks with latest version of gpsd, Gary E. Miller, 2021/07/13
- Re: scons check breaks with latest version of gpsd,
Greg Troxel <=
Re: scons check breaks with latest version of gpsd, Greg Troxel, 2021/07/12