-
Notifications
You must be signed in to change notification settings - Fork 0
/
rt_nonfinite.c
76 lines (67 loc) · 1.6 KB
/
rt_nonfinite.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
* File: rt_nonfinite.c
*
* MATLAB Coder version : 5.4
* C/C++ source code generated on : 17-May-2022 16:48:18
*/
/*
* Abstract:
* MATLAB for code generation function to initialize non-finites,
* (Inf, NaN and -Inf).
*/
/* Include Files */
#include "rt_nonfinite.h"
#include <math.h>
#if defined(__ICL) && __ICL == 1700
#pragma warning(disable : 264)
#endif
real_T rtNaN = (real_T)NAN;
real_T rtInf = (real_T)INFINITY;
real_T rtMinusInf = -(real_T)INFINITY;
real32_T rtNaNF = (real32_T)NAN;
real32_T rtInfF = (real32_T)INFINITY;
real32_T rtMinusInfF = -(real32_T)INFINITY;
#if defined(__ICL) && __ICL == 1700
#pragma warning(default : 264)
#endif
/*
* Function: rtIsInf ==================================================
* Abstract:
* Test if value is infinite
*/
boolean_T rtIsInf(real_T value)
{
return (isinf(value) != 0U);
}
/*
* Function: rtIsInfF =================================================
* Abstract:
* Test if single-precision value is infinite
*/
boolean_T rtIsInfF(real32_T value)
{
return (isinf((real_T)value) != 0U);
}
/*
* Function: rtIsNaN ==================================================
* Abstract:
* Test if value is not a number
*/
boolean_T rtIsNaN(real_T value)
{
return (isnan(value) != 0U);
}
/*
* Function: rtIsNaNF =================================================
* Abstract:
* Test if single-precision value is not a number
*/
boolean_T rtIsNaNF(real32_T value)
{
return (isnan((real_T)value) != 0U);
}
/*
* File trailer for rt_nonfinite.c
*
* [EOF]
*/