atof and qnx 4.25

Hello,

I try this program

#include<stdlib.h>
#include<stdio.h>

void main()
{
double Temp;

Temp = atof(“53.25”);

printf("\n Temp : %f \n", Temp);

}

the compilation is cc essai.c -o essai -lmath -5
I try the sample program under windows and dos the result is correct.
but under QNX4.25 and Watcom 10.6 the result is ever -nan, Why???

regards,
Stephane Varet

#include<stdlib.h
#include<stdio.h

void main()
{
double Temp;

Temp = atof(“53.25”);

printf("\n Temp : %f \n", Temp);

}

the compilation is cc essai.c -o essai -lmath -5
I try the sample program under windows and dos the result is correct.
but under QNX4.25 and Watcom 10.6 the result is ever -nan, Why???

Try without math.h or -lmath in the cc compiler.

\

-=[ .caco. ]=-


Sent via Deja.com http://www.deja.com/
Before you buy.

Sounds as if your computer is having a problem in mathematic coprocessor.
On our computers (almost P I and P II) your program runs fine.

Regards
M.Koehler

SROC <sroc@oma.be> schrieb in im Newsbeitrag: 39B77B96.DCAD5149@oma.be

Hello,

I try this program

#include<stdlib.h
#include<stdio.h

void main()
{
double Temp;

Temp = atof(“53.25”);

printf("\n Temp : %f \n", Temp);

}

the compilation is cc essai.c -o essai -lmath -5
I try the sample program under windows and dos the result is correct.
but under QNX4.25 and Watcom 10.6 the result is ever -nan, Why???

regards,
Stephane Varet

If you CPU is an special 486 (no math co) or a 386 you need to
run the emulatur: emu387

“Martin Koehler” <software@pcds.de> wrote in message
news:8p8imf$dpp$1@inn.qnx.com

Sounds as if your computer is having a problem in mathematic coprocessor.
On our computers (almost P I and P II) your program runs fine.

Regards
M.Koehler

SROC <> sroc@oma.be> > schrieb in im Newsbeitrag: > 39B77B96.DCAD5149@oma.be> …

Hello,

I try this program

#include<stdlib.h
#include<stdio.h

void main()
{
double Temp;

Temp = atof(“53.25”);

printf("\n Temp : %f \n", Temp);

}

the compilation is cc essai.c -o essai -lmath -5
I try the sample program under windows and dos the result is correct.
but under QNX4.25 and Watcom 10.6 the result is ever -nan, Why???

regards,
Stephane Varet