Nan value in Remote Sensing Image Processing

Source: Internet
Author: User

Source: http://blog.csdn.net/kupe87826/article/details/8306780

 

Reference: http://stackoverflow.com/questions/4744437/testing-if-float-value-is-nan

Http://stackoverflow.com/questions/570669/checking-if-a-double-or-float-is-nan-in-c

Environment: vs2010, system win7

During remote sensing image processing, the returned value is 1 .. # ind000000000000, Which is confused. I checked the Nan value on the Internet, which is inconsistent with the storage format of floating point numbers, so I cannot read the value.

Solution:

1,

If (X! =X){//
X is Nan} (This has not been tested. You can try it)

2,

Use the _ isnan () function provided by VC (this should be okay)

 

3,

But how does one implement cross-platform? I think there should be boost!

# Include <boost/Math/special_functions/fpclassify. HPP>

If (boost: Math: isnan) (xval ))

{

// X is Nan

}

 

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.