logo       

Re: standard NaN: msg#00010

Subject: Re: standard NaN
C99 provides nan().  I see that this is available on Linux (well Debian
Sarge and Fedora Core 3, at least)

Solaris provides quiet_nan() and signaling_nan().

Perhaps the best approach would be to have a single PDL routine
returning NaN which is tuned for platforms with explicit support, with a
fall back for those without any special NaN support.

Diab


On Sun, 2006-07-02 at 16:39 -0400, Douglas Burke wrote:
> 
> On Sun, 2 Jul 2006, Douglas Burke wrote:
> 
> >
> > I think afot("NaN") works on many unix-ey systems but I don't know about
> 
> Or atof() even...
> 
> > Windows. If you dig around in the bad-value handling code in either
> > Basic/bad.pd or somewhere in Core/ then you can see a nasty way I did it
> > using structs, but I worry about the portability of this construct.
> >
> > Doug
> >
> > On Fri, 30 Jun 2006, Bill Coffman wrote:
> >
> > > Is there a way to generate NaN values that works on all platforms?  I mean
> > > ones that support ieee floats, of course.
> > >
> > > GCC 4 and ICC 9 (intel) don't complain a bit for:
> > >
> > >  ((double)0.0/(double)0.0)
> > >
> > > and I noticed Sisyphus coded this for microsoft VC (except using an
> > > intermediate var).  The nan("NaN") is not universally supported, but it
> > > seems that 0/0.0 is pretty clearly a NaN.
> > >
> > > I noticed someone else used sqrt(-1) and mentioned specifically maximizing
> > > cross-compatibility.  This seems a little wasteful to me, as a call to 
> > > sqrt
> > > could be avoided if one is building a matrix full of NaN's.
> > >
> > > Bill
> > >
> >
> > _______________________________________________
> > PDL-porters mailing list
> > PDL-porters@xxxxxxxxxxxxxxx
> > http://mailman.jach.hawaii.edu/mailman/listinfo/pdl-porters
> >
> 
> _______________________________________________
> PDL-porters mailing list
> PDL-porters@xxxxxxxxxxxxxxx
> http://mailman.jach.hawaii.edu/mailman/listinfo/pdl-porters


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe