Thread: Returning Nan or Inf

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    INFINITY is C99, NAN is not. http://www.gnu.org/software/libtool/...y-and-NaN.html

    [edit] Hmm, strike that. NAN looks like it might be C99 too.
    C99 adds all sorts of stuff:
    ...
    -- macros INFINITY, NAN for special floating-point values
    http://std.dkuug.dk/jtc1/sc22/wg21/d...2002/n1372.txt

    Of course, the GCC page is likely more trustworthy than that source . . . . [/edit]
    Last edited by dwks; 07-01-2008 at 06:05 PM.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with struct... not returning correct results.
    By drty2 in forum C Programming
    Replies: 7
    Last Post: 01-18-2009, 11:25 PM
  2. Recursion: base case returning 1, function returning 0
    By yougene in forum C Programming
    Replies: 5
    Last Post: 09-07-2007, 05:38 PM
  3. double, NaN, and super small numbers
    By nbo10 in forum C Programming
    Replies: 5
    Last Post: 08-17-2007, 06:50 PM
  4. a question about nan
    By FOOTOO in forum C Programming
    Replies: 14
    Last Post: 04-26-2007, 01:19 PM
  5. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM