* [LTP] [PATCH] float_exp_log: Fix ldexp exponents written by genldexp @ 2026-10-19 12:34 Jan Stancek via ltp 2026-10-19 13:28 ` Petr Vorel 2026-10-19 19:05 ` [LTP] " linuxtestproject.agent 0 siblings, 2 replies; 5+ messages in thread From: Jan Stancek via ltp @ 2026-10-19 12:34 UTC (permalink / raw) To: ltp genldexp stores the ldexp() exponents in a double array but writes only sizeof(int) bytes of each element to ildexp_inp.ref. For a double holding a small integer the low 32 bits of the IEEE-754 encoding are zero, so on little-endian every exponent read back by the test is 0 and ldexp(x, 0) == x is the only thing float_exp_log ever checks. On big-endian the exponents are garbage from the high word instead. Declare the exponent array as int so the intended 20000..1 exponents are written and the ldexp threads exercise real scaling. Large exponents overflow to inf for both the generated and computed value, which check_error() already treats as equal. Signed-off-by: Jan Stancek <jstancek@redhat.com> --- testcases/misc/math/float/exp_log/genldexp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testcases/misc/math/float/exp_log/genldexp.c b/testcases/misc/math/float/exp_log/genldexp.c index fc81c9efa648..98a28edec3e7 100644 --- a/testcases/misc/math/float/exp_log/genldexp.c +++ b/testcases/misc/math/float/exp_log/genldexp.c @@ -102,8 +102,8 @@ static int create_Result_file(void) static int create_Data_file(void) { - int i, nbVal; - double tabDD[20000], tabDI[20000], Inc; + int i, nbVal, tabDI[20000]; + double tabDD[20000], Inc; char *F_named, *F_namei; int fp, fpi; -- 2.56.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH] float_exp_log: Fix ldexp exponents written by genldexp 2026-10-19 12:34 [LTP] [PATCH] float_exp_log: Fix ldexp exponents written by genldexp Jan Stancek via ltp @ 2026-10-19 13:28 ` Petr Vorel 2026-10-19 19:05 ` [LTP] " linuxtestproject.agent 1 sibling, 0 replies; 5+ messages in thread From: Petr Vorel @ 2026-10-19 13:28 UTC (permalink / raw) To: Jan Stancek; +Cc: ltp Hi Jan, Acked-by: Petr Vorel <pvorel@suse.cz> Kind regards, Petr -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] float_exp_log: Fix ldexp exponents written by genldexp 2026-10-19 12:34 [LTP] [PATCH] float_exp_log: Fix ldexp exponents written by genldexp Jan Stancek via ltp 2026-10-19 13:28 ` Petr Vorel @ 2026-10-19 19:05 ` linuxtestproject.agent 2026-10-21 9:33 ` Andrea Cervesato via ltp 1 sibling, 1 reply; 5+ messages in thread From: linuxtestproject.agent @ 2026-10-19 19:05 UTC (permalink / raw) To: Jan Stancek; +Cc: ltp Hi Jan, On Mon, 19 Oct 2026, Jan Stancek wrote: > float_exp_log: Fix ldexp exponents written by genldexp Verdict - Reviewed --- Note: The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions. Regards, LTP AI Reviewer -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] float_exp_log: Fix ldexp exponents written by genldexp 2026-10-19 19:05 ` [LTP] " linuxtestproject.agent @ 2026-10-21 9:33 ` Andrea Cervesato via ltp 2026-10-21 15:42 ` Jan Stancek via ltp 0 siblings, 1 reply; 5+ messages in thread From: Andrea Cervesato via ltp @ 2026-10-21 9:33 UTC (permalink / raw) To: linuxtestproject.agent; +Cc: ltp Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com> -- Andrea Cervesato SUSE QE Automation Engineer Linux andrea.cervesato@suse.com -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] float_exp_log: Fix ldexp exponents written by genldexp 2026-10-21 9:33 ` Andrea Cervesato via ltp @ 2026-10-21 15:42 ` Jan Stancek via ltp 0 siblings, 0 replies; 5+ messages in thread From: Jan Stancek via ltp @ 2026-10-21 15:42 UTC (permalink / raw) To: Andrea Cervesato; +Cc: ltp, linuxtestproject.agent Pushed. On Wed, Oct 21, 2026 at 11:33 AM Andrea Cervesato <andrea.cervesato@suse.com> wrote: > > Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com> > > -- > Andrea Cervesato > SUSE QE Automation Engineer Linux > andrea.cervesato@suse.com > -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-10-21 15:42 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-10-19 12:34 [LTP] [PATCH] float_exp_log: Fix ldexp exponents written by genldexp Jan Stancek via ltp 2026-10-19 13:28 ` Petr Vorel 2026-10-19 19:05 ` [LTP] " linuxtestproject.agent 2026-10-21 9:33 ` Andrea Cervesato via ltp 2026-10-21 15:42 ` Jan Stancek via ltp
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox