48 printf(
"checkFinite() ERROR: we have encountered a nan!\n");
49 }
else if (_fpclass(tmp) == _FPCLASS_PINF) {
50 printf(
"checkFinite() ERROR: we have encountered a pos inf!\n");
52 printf(
"checkFinite() ERROR: we have encountered a neg inf!\n");
54 const std::string s =
"checkFinite()";
55 throw std::range_error(s);
63 printf(
"checkFinite() ERROR: we have encountered a nan!\n");
64 }
else if (isinf(tmp) == 1) {
65 printf(
"checkFinite() ERROR: we have encountered a pos inf!\n");
67 printf(
"checkFinite() ERROR: we have encountered a neg inf!\n");
69 const std::string s =
"checkFinite()";
70 throw std::range_error(s);
101 if (fabs(tmp) >= trigger) {
103 sprintf(sbuf,
"checkMagnitude() ERROR: Trigger %g exceeded: %g\n", trigger,
105 throw std::range_error(sbuf);
119 if ((tmp == 0.0) || (! _finite(tmp))) {
121 printf(
"checkZeroFinite() ERROR: we have encountered a zero!\n");
122 }
else if (_isnan(tmp)) {
123 printf(
"checkZeroFinite() ERROR: we have encountered a nan!\n");
124 }
else if (_fpclass(tmp) == _FPCLASS_PINF) {
125 printf(
"checkZeroFinite() ERROR: we have encountered a pos inf!\n");
127 printf(
"checkZeroFinite() ERROR: we have encountered a neg inf!\n");
130 sprintf(sbuf,
"checkZeroFinite() ERROR: zero or indef exceeded: %g\n",
132 throw std::range_error(sbuf);
138 if ((tmp == 0.0) || (! finite(tmp))) {
140 printf(
"checkZeroFinite() ERROR: we have encountered a zero!\n");
141 }
else if (isnan(tmp)) {
142 printf(
"checkZeroFinite() ERROR: we have encountered a nan!\n");
143 }
else if (isinf(tmp) == 1) {
144 printf(
"checkZeroFinite() ERROR: we have encountered a pos inf!\n");
146 printf(
"checkZeroFinite() ERROR: we have encountered a neg inf!\n");
149 sprintf(sbuf,
"checkZeroFinite() ERROR: zero or indef exceeded: %g\n",
151 throw std::range_error(sbuf);