Descriptionhttps://sourceforge.net/p/testlilyissues/issues/5790/
This review squashes these commits that mainly clean up initialization
and conversion of Rationals, though there are some minor bug fixes.
For most of the unit tests which are disabled here, I have fixes that
I am holding back for the sake of simplifying this review.
1: create unit tests
2: remove unused infinity_rat
3: use default copy-construction and assignment
4: disambiguate integer conversions
and fix sign when initialized by unsigned integer
5: disable implicit conversion to bool
6: discard r.to_double () in favor of static_cast<double> (r)
This helps developers avoid question-raising statements like this:
Real x = r.to_double ();
and encourages statements like this:
auto x = static_cast<Real> (r);
7: disable implicit conversion to double
This helps emphasize places where exactness might be lost.
8: to_int () becomes trunc_int ()
and returns I64 like num () and den ().
Patch Set 1 #
MessagesTotal messages: 3
|