[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: v2.53 cat-ms352 regression test fails on x86 platform
From: |
Gary E. Miller |
Subject: |
Re: v2.53 cat-ms352 regression test fails on x86 platform |
Date: |
Mon, 6 Feb 2023 18:23:13 -0800 |
Yo Nathan!
On Mon, 06 Feb 2023 10:23:33 -0500
Nathan Angelacos <nangel@tetrasec.net> wrote:
> A weirdness for 2.53 and x86 platform only (ARM, x86_64, etc work
> fine)
As updated: it is 3.25.
And as Fred noted, it works on his i386.
> -{"class":"TPV","status":2,"mode":3,"time":"2022-11-
> 23T11:39:45.500Z","ept":0.005,"lat":38.714334375,"lon":-
> 117.090607515,
Notice the last digit of if "lon" is a 5.
> +{"class":"TPV","status":2,"mode":3,"time":"2022-11-
> 23T11:39:45.500Z","ept":0.005,"lat":38.714334375,"lon":-
> 117.090607516,
Notice the last digit of if "lon" is a 6.
Classic rounding error. A bug in your C compiler, or how it is called.
C99 and higher, specify IEEE 754 math. IEEE 754 math specifies very
exact rounding rules. So IEEE 754 is exactly the same on all architectures,
compilers and libraries.
Except when the distro gets lazy.
You did not mention much of your toolchain, but that is where the
problem lies.
I'll bet if you run gpsd with the -D4 logging you get a message like
this one:
gpsd: WARN: __STDC_IEC_559__ is 0, s/b 1
Or worse:
gpsd: WARN: __STDC_IEC_559__ is missing.
Nothing we can do about. Sometimes it happens because libm, or gpsd,
were compiled with some of the higher optimizations.
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
gem@rellim.com Tel:+1 541 382 8588
Veritas liberabit vos. -- Quid est veritas?
"If you can't measure it, you can't improve it." - Lord Kelvin
pgpfITEhgzy0O.pgp
Description: OpenPGP digital signature