testprofile on i686

Linus Torvalds torvalds at linux-foundation.org
Wed Dec 1 14:21:28 PST 2021


On Wed, Dec 1, 2021 at 12:53 PM Alan Brown via subsurface
<subsurface at subsurface-divelog.org> wrote:
>
> Scratch that, I hadn't chrooted into the build environment properly. The
> profiles in x86_64 built by TestProfile are identical to the reference
> files. Repeating the tests in the i686 environment does produce a lot of
> differences. The diffs are at.
>
> https://gist.github.com/adbrown101/82d218a7107520812768e4fed665aad4

Hmm. If I read that right, it's the "EAD" column that differs.

Maybe others do too.

> > That would explain why it fails on i686 but nowhere else: x87 floating point,
> > which keeps extra precision between operations that the other ones don't.
>
> Does this mean it is a known issue? I had planned to build a 32 bit
> version of another distribution to see if it is repeatable there. Would
> this be worthwhile?

It's certainly not a known issue, the FP precision thing was just a guess.

And honestly, the differences seem to be too big to be FP precision
issues, particularly the i386 kind where the most common issue is that
the calculations are done with a 64-bit mantissa rather than a 53 (or
24, for 'float') bit mantissa.

If I'm seeing things right (not a huge fan of CSV files with lots of
columns), the EAD difference are things like 6407.426376 ->
6386.683739. Not exactly least-significant-digit kind of thing.

I'm not seeing what's going on, but it smells like some instability in
the calculations rather than some extra non-ieee precision of the
i387.

But it's also not any kind of *cumulative* error - looking at that
diff, the very next line both files have an ead column with the same
value (6508.706786).

Very strange. Why would that odd difference only show up on 32-bit i386?

Adding Robert to the cc, in case he sees what is up. I thionk all the
EAD calculations are his code. Robert?

                 Linus


More information about the subsurface mailing list