#include <bits/stdc++.h>
using namespace std;
int main()
{
float x=6.3;
float y=sqrt(-9);
cout<<"The value of x is= "<< x << endl;
cout<<"The value of y is= "<< y << endl;
cout<<"isunordered(x, y) = "<<isunordered(x, y);
return 0;
}
输出:
x的值是6.3
y的值是= -nan
isunordered(x,y)= 1
说明:在示例1中,y的值为NAN,这就是函数返回1的原因。
示例2:
#include <bits/stdc++.h>
using namespace std;
int main()
{
float x=4.6;
float y=9.2;
cout<<"The value of x is= "<< x << endl;
cout<<"The value of y is= "<< y << endl;
cout<<"isunordered(x, y) = "<<isunordered(x, y);
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
float x=6.3;
float y=sqrt(-9);
cout<<"The value of x is= "<< x << endl;
cout<<"The value of y is= "<< y << endl;
cout<<"isunordered(x, y) = "<<isunordered(x, y);
return 0;
}
输出:
x的值是6.3
y的值是= -nan
isunordered(x,y)= 1
说明:在示例1中,y的值为NAN,这就是函数返回1的原因。
示例2:
#include <bits/stdc++.h>
using namespace std;
int main()
{
float x=4.6;
float y=9.2;
cout<<"The value of x is= "<< x << endl;
cout<<"The value of y is= "<< y << endl;
cout<<"isunordered(x, y) = "<<isunordered(x, y);
return 0;
}