GNU bug report logs - #78985
sort-float failure on ppc64, LDBL_MIN fraction part too long for test command to parse

Previous Next

Package: coreutils;

Reported by: "C. Neidahl" <opna2608 <at> protonmail.com>

Date: Wed, 9 Jul 2025 21:57:03 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "C. Neidahl" <opna2608 <at> protonmail.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 78985 <at> debbugs.gnu.org
Subject: bug#78985: sort-float failure on ppc64, LDBL_MIN fraction part too long for test command to parse
Date: Fri, 11 Jul 2025 11:28:13 +0000
[Message part 1 (text/plain, inline)]
Am 10.07.25 um 19:20 schrieb Paul Eggert:
> Thanks for reporting that false positive in the test. I installed the
> attached patch, which should fix things.

The patch fixes the error with the long fraction part being unparsable, 
but it seems like the resulting order for the test input is still wrong. 
The LDBL_MIN fraction is longer than the DBL_MIN fraction, so it appears 
as a bigger number to test/expr, and the <= comparison fails.

↪ expr 225073858507201383090232717332 '<=' 2250738585072014 >/dev/null; 
echo $?
1

So the function still determines that DBL_MIN < LDBL_MIN, and the test 
fails due to exp != out. Maybe the two fractions could be cropped/padded 
with 0's to have the same length, or all of these comparisons / the 
expected output generation in general could be done in C?

- Cosima
[publickey - opna2608@protonmail.com - 0xC802C863.asc (application/pgp-keys, attachment)]
[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 33 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.