Domain error in sqrt

Can anyone help me with this? I know most people are in the qnxrtp camp
already but I have a QNX 4.25 system delivered to a customer. I’m piping
the output of my TCP/IP server to a file using:
server > server.start 2>&1
After a few days of running, and my customer sending commands, we are
seeing the following error message in my log:
Domain error in sqrt

My initial thought was that it was coming from one of the sqrt functions in
my program. But to test I wrote a small test program and ran it:

int main()
{
double fTest = -1.00;
double fResult = 0.00;

fResult=sqrt(fTest);
printf(“fResult = sqrt(fTest) = sqrt(%f) = %f\n”,fTest,fResult);
}

This doesn’t show the error string I’m seeing. Any ideas?? Is this a
dump/flush issue?!?

Jeff

“Jeff Holtz” <holtzj@mediaone.net> wrote in message
news:a2pq0k$6nq$1@inn.qnx.com

Can anyone help me with this? I know most people are in the qnxrtp camp
already but I have a QNX 4.25 system delivered to a customer. I’m piping
the output of my TCP/IP server to a file using:
server > server.start 2>&1
After a few days of running, and my customer sending commands, we are
seeing the following error message in my log:
Domain error in sqrt

My initial thought was that it was coming from one of the sqrt functions
in
my program. But to test I wrote a small test program and ran it:

int main()
{
double fTest = -1.00;
double fResult = 0.00;

fResult=sqrt(fTest);
printf(“fResult = sqrt(fTest) = sqrt(%f) = %f\n”,fTest,fResult);
}

Compile this program with -g2 (debug flag) and you will see the

“Domain error” being printer

So I assume your application is compile with some debug flag while
your test program isn’t.

  • Mario

This doesn’t show the error string I’m seeing. Any ideas?? Is this a
dump/flush issue?!?

Jeff

Thanks for the help. I found out that I’m doing a strerror(errno) when and
error occurs. Maybe it’s a sqrt problem and maybe not. But at least I now
know what happening. Thanks again


“Mario Charest” <goto@nothingness.com> wrote in message
news:a2s5n9$sem$1@inn.qnx.com

“Jeff Holtz” <> holtzj@mediaone.net> > wrote in message
news:a2pq0k$6nq$> 1@inn.qnx.com> …
Can anyone help me with this? I know most people are in the qnxrtp camp
already but I have a QNX 4.25 system delivered to a customer. I’m
piping
the output of my TCP/IP server to a file using:
server > server.start 2>&1
After a few days of running, and my customer sending commands, we are
seeing the following error message in my log:
Domain error in sqrt

My initial thought was that it was coming from one of the sqrt functions
in
my program. But to test I wrote a small test program and ran it:

int main()
{
double fTest = -1.00;
double fResult = 0.00;

fResult=sqrt(fTest);
printf(“fResult = sqrt(fTest) = sqrt(%f) = %f\n”,fTest,fResult);
}

Compile this program with -g2 (debug flag) and you will see the
“Domain error” being printer

So I assume your application is compile with some debug flag while
your test program isn’t.

  • Mario

This doesn’t show the error string I’m seeing. Any ideas?? Is this a
dump/flush issue?!?

Jeff

\