You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Julia suggests using Rational numbers rather than floating-point literals, as floats are more disruptive. While good advice in general, this means code following the style guide will tend to disrupt fixed point numbers, since promote_type(::Fixed, ::Rational) currently returns Rational. I think we should flip this convention, to have fixed point numbers behave like floats in this regard.
The text was updated successfully, but these errors were encountered:
You can convert nearly every Fixed number into a Rational, but not vice-versa. If we made this change, we might get errors that currently aren't a problem. Are you arguing that's worth it?
You can convert nearly every Fixed number into a Rational, but not vice-versa. If we made this change, we might get errors that currently aren't a problem. Are you arguing that's worth it?
I think it is, for consistency with Float. I assume you're referring to cases where the Rational is too big to be represented by a Fixed number?
Julia suggests using
Rational
numbers rather than floating-point literals, as floats are more disruptive. While good advice in general, this means code following the style guide will tend to disrupt fixed point numbers, sincepromote_type(::Fixed, ::Rational)
currently returnsRational
. I think we should flip this convention, to have fixed point numbers behave like floats in this regard.The text was updated successfully, but these errors were encountered: