Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of AEB by
rt_nonfinite.cpp
00001 /* 00002 * Academic License - for use in teaching, academic research, and meeting 00003 * course requirements at degree granting institutions only. Not for 00004 * government, commercial, or other organizational use. 00005 * 00006 * File: rt_nonfinite.c 00007 * 00008 * Code generated for Simulink model 'AEB0'. 00009 * 00010 * Model version : 1.63 00011 * Simulink Coder version : 8.10 (R2016a) 10-Feb-2016 00012 * C/C++ source code generated on : Tue Jul 26 21:28:16 2016 00013 * 00014 * Target selection: ert.tlc 00015 * Embedded hardware selection: Intel->x86-64 (Windows64) 00016 * Code generation objectives: Unspecified 00017 * Validation result: Not run 00018 */ 00019 00020 /* 00021 * Abstract: 00022 * Function to intialize non-finites, 00023 * (Inf, NaN and -Inf). 00024 */ 00025 #include "rt_nonfinite.h" 00026 #include "rtGetNaN.h" 00027 #include "rtGetInf.h" 00028 00029 real_T rtInf; 00030 real_T rtMinusInf; 00031 real_T rtNaN; 00032 real32_T rtInfF; 00033 real32_T rtMinusInfF; 00034 real32_T rtNaNF; 00035 00036 /* 00037 * Initialize the rtInf, rtMinusInf, and rtNaN needed by the 00038 * generated code. NaN is initialized as non-signaling. Assumes IEEE. 00039 */ 00040 void rt_InitInfAndNaN(size_t realSize) 00041 { 00042 (void) (realSize); 00043 rtNaN = rtGetNaN(); 00044 rtNaNF = rtGetNaNF(); 00045 rtInf = rtGetInf(); 00046 rtInfF = rtGetInfF(); 00047 rtMinusInf = rtGetMinusInf(); 00048 rtMinusInfF = rtGetMinusInfF(); 00049 } 00050 00051 /* Test if value is infinite */ 00052 boolean_T rtIsInf(real_T value) 00053 { 00054 return (boolean_T)((value==rtInf || value==rtMinusInf) ? 1U : 0U); 00055 } 00056 00057 /* Test if single-precision value is infinite */ 00058 boolean_T rtIsInfF(real32_T value) 00059 { 00060 return (boolean_T)(((value)==rtInfF || (value)==rtMinusInfF) ? 1U : 0U); 00061 } 00062 00063 /* Test if value is not a number */ 00064 boolean_T rtIsNaN(real_T value) 00065 { 00066 return (boolean_T)((value!=value) ? 1U : 0U); 00067 } 00068 00069 /* Test if single-precision value is not a number */ 00070 boolean_T rtIsNaNF(real32_T value) 00071 { 00072 return (boolean_T)(((value!=value) ? 1U : 0U)); 00073 } 00074 00075 /* 00076 * File trailer for generated code. 00077 * 00078 * [EOF] 00079 */
Generated on Sun Jul 17 2022 12:07:24 by
