Skip to content

CRlibm fails many tests on 32 bit systems #45

@c42f

Description

@c42f

With the new binarybuilder build from #26, we now have the ability to test on 32 bit systems.

This led to finding the test failure noted in JuliaIntervals/IntervalArithmetic.jl#440. These have probably always existed with this package on 32 bit linux, but nobody noticed until now.

I've built crlibm locally with 32 bit gcc (from a 64 bit host) and have managed to reproduce the failures using the underlying crlibm test suite. Build instructions:

# Get the source from https://github.com/taschini/crlibm
# Build
./prepare
./configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu CC=i686-linux-gnu-gcc
make
make check

This results in many test failures (log summary attached at bottom)

I also build crlibm in a 32 bit userland inside a docker container with the default prepare and configure and all build settings autodetected — I found that the errors persist. So these may be real bugs in crlibm (or its build system) rather than an issue with cross compilation.

It seems that CRLibm.jl should not use the current binarybuilder build for 32 bit systems unless this is fixed. The simple fix is to fall back to MPFR on 32 bit.

On a related note, it would be nice to convert the relatively comprehensive tests which come with CRLibm itself into tests for this package. They are well designed data-driven tests so the test files could just be copied into this package and run with a new test runner.

Test failure log summary:

FAIL: check_exp
FAIL: check_expm1
PASS: check_log
FAIL: check_log2
FAIL: check_log10
PASS: check_log1p
FAIL: check_sin
FAIL: check_cos
FAIL: check_tan
PASS: check_asin
PASS: check_acos
PASS: check_atan
FAIL: check_sinh
FAIL: check_cosh
PASS: check_sinpi
PASS: check_cospi
PASS: check_tanpi
FAIL: check_asinpi
FAIL: check_acospi
FAIL: check_atanpi
PASS: check_pow
Testsuite summary for 
============================================================================
# TOTAL: 21
# PASS:  9
# SKIP:  0
# XFAIL: 0
# FAIL:  12
# XPASS: 0
# ERROR: 0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions