www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13032] New: std.internal.math.gammfunction assumes 80-bit real


          Issue ID: 13032
           Summary: std.internal.math.gammfunction assumes 80-bit real
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: Phobos
          Assignee: nobody puremagic.com
          Reporter: johannespfau gmail.com

std.internal.math.gammfunction assumes that reals are in x86 Extended Precision
Format. This is only true for x86 and gammafunction is actually the only module
with failing tests on ARM.

A simple way to test for systems where real==double is to use the -mlong-double
flag with gdc:

#Install gdc via linux distribution or from gdcproject.org/downloads/
tar xf native_2.065_gcc4.9.0_a8ad6a6678_20140615.tar.xz
echo "void main(){}" > main.d
# With default precision, tests should pass on x86 systems
./x86_64-gdcproject-linux-gnu/bin/x86_64-unknown-linux-gnu-gdc gammafunction.d
main.d -funittest -g
# With real==double precision, tests fail
./x86_64-gdcproject-linux-gnu/bin/x86_64-unknown-linux-gnu-gdc gammafunction.d
main.d -funittest  -g -mlong-double-64

Jul 03 2014