remove superfluous test

This commit is contained in:
Axel Kohlmeyer
2025-06-12 11:26:08 -04:00
parent 768d5bb9c1
commit 349def92d2
2 changed files with 2 additions and 2 deletions

View File

@ -371,7 +371,7 @@ double ValueTokenizer::next_double()
char *end;
auto val = std::strtod(current.c_str(), &end);
// return value of denormal
if ((val != 0.0) && (val > -HUGE_VAL) && (val < HUGE_VAL)) return val;
if ((val > -HUGE_VAL) && (val < HUGE_VAL)) return val;
throw InvalidFloatException(current);
} catch (std::invalid_argument const &) {
throw InvalidFloatException(current);

View File

@ -557,7 +557,7 @@ double utils::numeric(const char *file, int line, const std::string &str, bool d
char *end;
rv = std::strtod(buf.c_str(), &end);
// return value if denormal
if ((rv != 0.0) && (rv > -HUGE_VAL) && (rv < HUGE_VAL)) return rv;
if ((rv > -HUGE_VAL) && (rv < HUGE_VAL)) return rv;
msg = fmt::format("Floating point number {} in input script or data file is out of range", buf);
if (do_abort)