• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: simple float/double question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: simple float/double question


  • Subject: Re: simple float/double question
  • From: Tom Sutcliffe <email@hidden>
  • Date: Fri, 30 May 2003 23:34:38 +0100

NaN is a mathematical shorthand to represent things that aren't real numbers - eg taking the square root of -1 would return NaN, because the answer cannot be expressed without using complex numbers. Also it can be used for the result of queries that don't make sense - eg the arcsine of a number > 1.

It may help to consider the relationship between nil and an instantiated object - NaN and a normal floating point value are sort of similar.

Tom

On Friday, May 30, 2003, at 10:48 pm, Ben Dougall wrote:

On Friday, May 30, 2003, at 07:54 am, Lloyd Dupont wrote:

how to test if a float/double is a number or not ?
I mean acos(2) for example return NaN, how to know programatically it's NaN ?

i don't understand. how can a float or a double not be a number?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: simple float/double question (From: Ben Dougall <email@hidden>)

  • Prev by Date: Re: simple float/double question
  • Next by Date: [ANN] A simple Cocoa library for OpenGL
  • Previous by thread: Re: simple float/double question
  • Next by thread: Thanks
  • Index(es):
    • Date
    • Thread