From: TOMAZ <tomas.zajc@gmail.com>
To: linux-c-programming@vger.kernel.org
Subject: NAN and complex.h
Date: Tue, 18 Sep 2007 14:52:08 -0700 (PDT) [thread overview]
Message-ID: <12766829.post@talk.nabble.com> (raw)
Hi I made a program which basically averages data from a file. The data is
stored as complex float and I'm reading it with fread with no problem. Some
data are taged as NAN (at least ENVI, an image procesing soft read these
values as NAN). If I average the whole data adding a number with a NAN gives
me a NAN and my whole program fails.
What I did is the folowing which doesn't seems to work:
if(cabsf(zhhzhh)!= NAN)
{
printf("%f\n", cabsf(zhhzhh));
}
For some reason the test seeams to be positive all the time, I keep printing
NAN's ("nan" actualy).
Any idea?
Tomas
--
View this message in context: http://www.nabble.com/NAN-and-complex.h-tf4477349.html#a12766829
Sent from the linux-c-programming mailing list archive at Nabble.com.
next reply other threads:[~2007-09-18 21:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-18 21:52 TOMAZ [this message]
2007-09-18 22:21 ` NAN and complex.h Glynn Clements
2007-09-24 6:31 ` Lukasz Mielicki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12766829.post@talk.nabble.com \
--to=tomas.zajc@gmail.com \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).