Changeset 940
- Timestamp:
- 06/01/20 13:21:50 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/util/extvalue.cpp
r925 r940 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-20 19Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2020 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 13 13 #include <common/Convert.h> 14 14 #include <climits> 15 #include <float.h> 15 16 #include <errno.h> 16 17 … … 1071 1072 { 1072 1073 logPrintf("ExtValue", "parseNumber", LOG_WARN, "Unrepresentable number and strtod() signalled ERANGE: parsed %d chars of '%s' and returned '%f'", after - in, in, fpvalue); 1073 if (f pvalue == 0) errno = 0; //otherwise we have+inf or -inf from a string number because it was too large for double-type, and we don't want to have infinities in ExtValue so we leave errno!=01074 if (fabs(fpvalue) < DBL_MIN) errno = 0; //Underflow OK. Otherwise we have overflow: +inf or -inf from a string number because it was too large for double-type, and we don't want to have infinities in ExtValue so we leave errno!=0 1074 1075 } 1075 1076 if ((after > in) && (errno == 0))
Note: See TracChangeset
for help on using the changeset viewer.