isNaN functions for iOS

Source: Internet
Author: User

Suppose that a number is a definite number. Then it's not a Nan value.

Suppose a number is infinitely large and infinitely small. Then it's the Nan value.

I tried to print the following value is not a Nan value

if (isnan(1)) {

DLog(@ "1 is NAN");

}

Else {

DLog(@ "1 is not NAN");

}

if (isnan(YES)) {

DLog(@ "Yes is nan value "); /c17>

}

Else {

DLog(@ "Yes is not NAN");

}

if (isNaN(-1)) {

DLog(@ "-1 is nan value ");

}

Else {

DLog(@ "-1 is not NAN");

}

if (isnan(m_pi)) {

DLog(@ "M_pi is nan value ");

}

Else {

DLog(@ "M_pi is not NAN");

}

Printing results:

2015-08-26 20:19:23.082 jimustock[2276:919998] [line] 1 is not NAN

2015-08-26 20:19:23.083 jimustock[2276:919998] [line] Yes is not NAN

2015-08-26 20:19:23.083 jimustock[2276:919998] [line]-1 is not NAN

2015-08-26 20:19:23.083 jimustock[2276:919998] [line] M_PI is not NAN


Please correct me!

!

!

isNaN functions for iOS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.