Skip to content

Commit

Permalink
Changed output of Approximation classes to use '~' to indicate non-ex…
Browse files Browse the repository at this point in the history
…actness.
  • Loading branch information
pietercollins committed Sep 26, 2024
1 parent 44e5968 commit d329a7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/numeric/float_approximation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ template<class F> class Approximation
//!@{
//! \name Input/output operations
friend OutputStream& operator<<(OutputStream& os, Approximation<F> const& x) {
return write(os,x.raw(),DecimalPrecision{Approximation<F>::output_places},to_nearest); } //!< Write to an output stream.
os << "~"; write(os,x.raw(),DecimalPrecision{Approximation<F>::output_places},to_nearest); os << "~"; return os; } //!< Write to an output stream.
friend InputStream& operator>>(InputStream& is, Approximation<F>& x) {
is >> x._a; return is; } //!< Read from an input stream.
char c; is >> c; assert(c=='~'); is >> x._a; is >> c; assert(c=='~'); return is; } //!< Read from an input stream.
//!@}
public:
static Nat output_places;
Expand Down

0 comments on commit d329a7a

Please sign in to comment.