NetBSD-Bugs archive

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

port-sparc64/47834: 128 bit softfloat scalbnl broken



>Number:         47834
>Category:       port-sparc64
>Synopsis:       128 bit softfloat scalbnl broken
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-sparc64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 18 13:45:00 +0000 2013
>Originator:     Martin Husemann
>Release:        NetBSD 6.99.19
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD thirdstage.duskware.de 6.99.19 NetBSD 6.99.19 (MODULAR) #92: Wed 
May 15 20:37:29 CEST 2013 
martin%night-porter.duskware.de@localhost:/usr/src/sys/arch/sparc64/compile/MODULAR
 sparc64
Architecture: sparc64
Machine: sparc64
>Description:

Running the below test program (natively compiled on sparc64) reports
different, but all wrong numeric results depending on the optimization
level used.

With -O0 it says:
        0 (should be: 1.00085)

Letting the compiler pre-compute it with -O2 it says:
        2.0017 (should be: 1.00085)

>How-To-Repeat:
Natively compile this program (with -lm) on sparc64:

#include <math.h>
#include <stdio.h>

int main(int argc, char **argv)
{
        long double val = 1.00085;
        long double res = scalbnl(val, 1);

        printf("%Lg (should be: %Lg)\n", res, val);

        return 0;
}

>Fix:
n/a



Home | Main Index | Thread Index | Old Index