Skip to content

bignum division test failure #1101

Description

@fuhsnn

On both 0.12 tag and trunk, the bignum division group in tests/division-tests.scm fails while running make test-division.
System is X86-64 Linux, same failure with GCC, Clang and my C compiler project.

full log
[user@archlinux chibi-scheme]$ make test-division
LD_LIBRARY_PATH=".:" DYLD_LIBRARY_PATH=".:" CHIBI_IGNORE_SYSTEM_PATH=1 CHIBI_MODULE_PATH=lib ./chibi-scheme tests/division-tests.scm
division: 
 
    rounding: 
     ..........................................
    42 out of 42 (100.0%) tests passed in 0.017520904541015625 seconds.
    trivial zero divisor: 
     ........................
    24 out of 24 (100.0%) tests passed in 0.007565021514892578 seconds.
    trivial one dividend: 
     ........................
    24 out of 24 (100.0%) tests passed in 0.010894060134887695 seconds.
    fixnum division: 
     ................................................
    48 out of 48 (100.0%) tests passed in 0.018965959548950195 seconds.
    one half remainder: 
     ................................................
    48 out of 48 (100.0%) tests passed in 0.021697044372558594 seconds.
    exactness: 
     ......................................................
    54 out of 54 (100.0%) tests passed in 0.022603988647460938 seconds.
    bignum division: 
     ......xx......xx..............xx......xx......xx
    38 out of 48 (79.2%) tests passed in 0.021856069564819336 seconds.
    10 failures (20.8%).
    FAIL: (ceiling-remainder -1300000000000000000000 400000000000000000000)
        expected 100000000000000000000 but got -100000000000000000000
        on line 391 of file "tests/division-tests.scm"
    FAIL: (ceiling-remainder 1300000000000000000000 400000000000000000000)
        expected 300000000000000000000 but got -300000000000000000000
        on line 393 of file "tests/division-tests.scm"
    FAIL: (floor-remainder -1300000000000000000000 400000000000000000000)
        expected -300000000000000000000 but got 300000000000000000000
        on line 405 of file "tests/division-tests.scm"
    FAIL: (floor-remainder 1300000000000000000000 400000000000000000000)
        expected -100000000000000000000 but got 100000000000000000000
        on line 407 of file "tests/division-tests.scm"
    FAIL: (round-remainder -1300000000000000000000 400000000000000000000)
        expected 100000000000000000000 but got -100000000000000000000
        on line 433 of file "tests/division-tests.scm"
    FAIL: (round-remainder 1300000000000000000000 400000000000000000000)
        expected -100000000000000000000 but got 100000000000000000000
        on line 435 of file "tests/division-tests.scm"
    FAIL: (euclidean-remainder -1300000000000000000000 400000000000000000...
        expected 100000000000000000000 but got -100000000000000000000
        on line 447 of file "tests/division-tests.scm"
    FAIL: (euclidean-remainder 1300000000000000000000 400000000000000000000)
        expected 300000000000000000000 but got -300000000000000000000
        on line 449 of file "tests/division-tests.scm"
    FAIL: (balanced-remainder -1300000000000000000000 400000000000000000000)
        expected 100000000000000000000 but got -100000000000000000000
        on line 461 of file "tests/division-tests.scm"
    FAIL: (balanced-remainder 1300000000000000000000 400000000000000000000)
        expected -100000000000000000000 but got 100000000000000000000
        on line 463 of file "tests/division-tests.scm"
    remainder infinity: 
     ................
    16 out of 16 (100.0%) tests passed in 0.009628057479858398 seconds.
294 out of 304 (96.7%) tests passed in 0.16271090507507324 seconds.
10 failures (3.3%).
7 out of 8 (87.5%) subgroups passed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions