dReal4
string_to_interval.h
1 #pragma once
2 
3 #include <string>
4 
5 #include "dreal/util/box.h"
6 
7 namespace dreal {
8 /// Convert a string @p s into an interval `[lb, ub]` where `lb` is a
9 /// parsed result of @p s with FE_DOWNWARD round-mode and `ub` is a
10 /// parsed result of @p s with FE_UPWARD round-mode.
11 ///
12 /// @throw if @p s does not represent a double number. (see std::stod)
13 ///
14 /// @note This function assumes that std::stod implementation honors
15 /// the current round-mode. There are old versions of Visual C++ and
16 /// GLIBC where this assumption does not hold. See
17 /// http://www.exploringbinary.com/visual-c-plus-plus-and-glibc-strtod-ignore-rounding-mode
18 /// for more information.
19 Box::Interval StringToInterval(const std::string& s);
20 } // namespace dreal
Sum type of symbolic::Expression and symbolic::Formula.
Definition: api.cc:9
Box::Interval StringToInterval(const string &s)
Convert a string s into an interval [lb, ub] where lb is a parsed result of s with FE_DOWNWARD round-...
Definition: string_to_interval.cc:10