/* isnan example */
#include <stdio.h> /* printf */
#include <math.h> /* isnan, sqrt */
int main()
{
printf ("isnan(0.0) : %d
",isnan(0.0));
printf ("isnan(1.0/0.0) : %d
",isnan(1.0/0.0));
printf ("isnan(-1.0/0.0) : %d
",isnan(-1.0/0.0));
printf ("isnan(sqrt(-1.0)): %d
",isnan(sqrt(-1.0)));
return 0;
}
doubel a = 0 ;
bool isnan_a = std::isnan(a) || std::isnan(-a);
Code Example |
---|
Cpp :: subsequence |
Cpp :: combination sum iv leetcode |
Cpp :: what does : mean in c++ |
Cpp :: Determine if map contains a value for a key c++ |
Cpp :: how to append two vectors in c++ |
Cpp :: c++ variables |
Cpp :: C++ Area and Circumference of a Circle |
Cpp :: who made c++ |
Cpp :: Fibonacci Series Program. in c++ |
Cpp :: Arduino Counting without Millis |
Cpp :: insert into a vector more than once c++ |
Cpp :: read from standard input cpp |
Cpp :: create a bitset of 1024 bits, |
C :: c colourful text |
C :: terminal size in c |
C :: install gitk mac |
C :: arma 3 get group size |
C :: sum of list in C |
C :: c data types |
C :: first program in c |
C :: factorial in c using recursion |
C :: merge sort code c |
C :: check if the c code is a palindrome |
C :: c binary search |
C :: c# for loop decrement |
C :: accessing elements of 1d array using pointers |
C :: initialize array c |
C :: addition of two numbers in c |
C :: getting string input in c |
C :: c typedef |