Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

scalbn and scalbnf failure on amd64



If you do (in -current) something like:

  cd /usr/tests/lib/libm && atf-run t_scalbn | atf-report

you will get:

Failed test cases:
    t_scalbn:scalbn_ldexp, t_scalbn:scalbnf_ldexpf

Summary for 1 test programs:
    18 passed test cases.
    2 failed test cases.
    0 expected failed test cases.
    0 skipped test cases.

The failures in more detail show up if you only run "atf-run t_scalbn":

tc-se:*** Check failed: /usr/src/tests/lib/libm/t_scalbn.c:168: test 2: 
exponent=-1, y=inf, expected 1.45644 (diff: inf)
tc-se:*** Check failed: /usr/src/tests/lib/libm/t_scalbn.c:168: test 4: 
exponent=-100, y=inf, expected 2.29786e-30 (diff: inf)

and:

tc-se:*** Check failed: /usr/src/tests/lib/libm/t_scalbn.c:321: test 2: 
exponent=-1, y=1.45644 ldexpf returns inf (diff: -inf)
tc-se:*** Check failed: /usr/src/tests/lib/libm/t_scalbn.c:321: test 4: 
exponent=-100, y=2.29786e-30 ldexpf returns inf (diff: -inf)

which basically means that

   scalbnf(2.91288191221812821, -1)

as well as

   scalbnf(2.91288191221812821, -100)

return "inf". Same for scalbn().

This is wrong, and at least on my amd64 hardware 100% reproducable. I
can't spot the bug in src/lib/libm/arch/i387/s_scalbn.S (or
s_scalbnf.S) - anyone?

Martin



Home | Main Index | Thread Index | Old Index