Skip to content

Commit

Permalink
Allow +/- infinity in binding constraint RHS (#631)
Browse files Browse the repository at this point in the history
* Handle inf, +inf and -inf when loading CSV files

* Handle garbage values starting with an 'i'

* Use strtod, remove custom implementation

* Remove strtod in THANKS.txt
  • Loading branch information
flomnes authored Apr 21, 2022
1 parent 219ece9 commit 303cc38
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 362 deletions.
4 changes: 0 additions & 4 deletions THANKS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ license: Mozilla Public License 2.0 https://spdx.org/licenses/MPL-2.0.html
Mersenne Twister Copyright (c) 1997-2002 M.Matsumoto and T.Nishimura
license: 3-clause BSD https://spdx.org/licenses/BSD-3-Clause.html

strtod library Copyright (c) 1988-1993 The Regents of the University of California
Copyright (c) 1994 Sun Microsystems, Inc
license: ISC license https://spdx.org/licenses/ISC.html

Sirius_Solver 6.0.0 Copyright (c) 2007-2018 RTE
license: EPL 2.0 https://spdx.org/licenses/EPL-2.0.html

Expand Down
3 changes: 0 additions & 3 deletions src/libs/antares/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,6 @@ set(SRC
locale.h
locale.cpp

string-to-double.h
string-to-double.cpp

emergency.h emergency.cpp

# wx-wrapper
Expand Down
6 changes: 3 additions & 3 deletions src/libs/antares/array/matrix.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <yuni/core/math.h>
#include <logs.h>
#include <utility>
#include "../string-to-double.h"
#include <cstdlib>
#include "../io/statistics.h"
#include "matrix-to-buffer.h"

Expand Down Expand Up @@ -113,7 +113,7 @@ public:
inline static bool Do(const AnyString& str, double& out)
{
char* pend;
out = ::mystrtod(str.c_str(), &pend);
out = ::strtod(str.c_str(), &pend);
return (NULL != pend and '\0' == *pend);
}
};
Expand All @@ -131,7 +131,7 @@ public:
inline static bool Do(const AnyString& str, float& out)
{
char* pend;
out = static_cast<float>(::mystrtod(str.c_str(), &pend));
out = static_cast<float>(::strtod(str.c_str(), &pend));
return (NULL != pend and '\0' == *pend);
}
};
Expand Down
315 changes: 0 additions & 315 deletions src/libs/antares/string-to-double.cpp

This file was deleted.

35 changes: 0 additions & 35 deletions src/libs/antares/string-to-double.h

This file was deleted.

Loading

0 comments on commit 303cc38

Please sign in to comment.