Fixed bug #292 (mathematica ignores the 'digits' parameter) -- patch contributed by Sidney Cadot
parent
6b0572bc90
commit
527951b7bd
|
@ -298,10 +298,12 @@ public:
|
||||||
if (m_fileFormat == EMATLAB) {
|
if (m_fileFormat == EMATLAB) {
|
||||||
os << *ptr;
|
os << *ptr;
|
||||||
} else {
|
} else {
|
||||||
|
/* Mathematica uses the peculiar '*^' notation rather than the standard 'e' notation. */
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
|
oss << std::setprecision(m_digits);
|
||||||
oss << *ptr;
|
oss << *ptr;
|
||||||
std::string str = oss.str();
|
std::string str = oss.str();
|
||||||
boost::replace_first(str, "e", " * 10^");
|
boost::replace_first(str, "e", "*^");
|
||||||
os << str;
|
os << str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue