Main Page
Modules
Namespaces
Classes
Files
File List
File Members
sm
csm
test_math_utils_sanity.c
Go to the documentation of this file.
1
#include "
csm_all.h
"
2
#include <time.h>
3
4
#include "
math_utils.h
"
5
6
int
main
() {
7
8
int
errors = 0;
9
double
should_be_nan[2] = { 0.0 / 0.0, GSL_NAN };
10
11
int
i;
12
for
(i=0;i<2;i++) {
13
if
(!isnan(should_be_nan[i])) {
14
printf(
"#%d: isnan(%f) failed \n"
, i, should_be_nan[i]);
15
errors++;
16
}
17
if
(!
is_nan
(should_be_nan[i])) {
18
printf(
"#%d: is_nan(%f) failed \n"
, i, should_be_nan[i]);
19
errors++;
20
}
21
}
22
23
return
errors;
24
}
main
int main()
Definition:
test_math_utils_sanity.c:6
csm_all.h
math_utils.h
is_nan
int is_nan(double v)
Definition:
math_utils.c:60
csm
Author(s): Andrea Censi
autogenerated on Tue May 11 2021 02:18:23