Skip to content

powl yields NaN instead of +0 #334

@zimmermann6

Description

@zimmermann6

for x=0x1.98p-3072l and y=0xa.ab43b6dba9a6383p+16364l, powl yields NaN instead of +0 (even with only one thread, cf
#222)

zimmerma@coriandre:~/svn/tbd/20/src/binary80$ cat test2_pow_openlibm.c
#include <stdio.h>
#include <math.h>
#include <omp.h>

int main()
{
long double x = 0x1.98p-3072l;
long double y = 0xa.ab43b6dba9a6383p+16364l;
long double z;
z = powl (x, y);
printf ("z=%La\n", z);
return 0;
}

zimmerma@coriandre:/svn/tbd/20/src/binary80$ gcc -fno-builtin test2_pow_openlibm.c /localdisk/zimmerma/openlibm-0.8.7/libopenlibm.a
zimmerma@coriandre:
/svn/tbd/20/src/binary80$ ./a.out
z=-nan

zimmerma@coriandre:/svn/tbd/20/src/binary80$ gcc -fno-builtin test2_pow_openlibm.c -lm # with GNU libc
zimmerma@coriandre:
/svn/tbd/20/src/binary80$ ./a.out
z=0x0p+0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions