NetBSD-Users archive

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

NetBSD math asinf() Issue

I am using math library from NetBSD libraries.
I faced some issue while using the API asinf().
asinf() does not return proper values for some inputs

The following is the test code to reproduce the issue:

$ cat asinf_test.c

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

#ifndef NAN
#define NAN (0.0f/0.0f)

#ifndef INF
#define INF (1.0f/0.0f)

int main()
float result = asinf(0x1.fffffep+127F);
float expected = NAN;
 * Result is expected to be NAN for the above
 * input
printf("Returned :%.8eF, expected: %.8eF\n",result,expected);
return 0;

$ ./asinf_test
Returned :0.00000000e+00F, expected: nanF

Is this a bug with the respect to asinf() ?
Please help me in this regard.
Awaiting for reply.

Thanks & Regards,

Home | Main Index | Thread Index | Old Index