rbs icon indicating copy to clipboard operation
rbs copied to clipboard

Update Float

Open sampersand opened this issue 2 years ago • 1 comments

This updates Float:

  • Move constants inside it
  • Added Numeric::_XXX interfaces for operators, as well as Numeric::_Coerce
  • Float#{+,-,*,/,%,**,<,>,<=,>=,<=>,divmod,quo}: Now uses Numeric::_XXX methods.
  • Multiple methods (eg Float#=== and Float#fdiv) are now aliases
  • Revamped Float#round.
  • Moved all functions not defined on Float, but rather Numeric, to the bottom of the function and marked them as deprecated
  • Overhauled the tests

sampersand avatar Feb 05 '24 22:02 sampersand

The changes look good, but it doesn't work well with the current version of Steep. It is a kind of bug of Steep, so I will fix the problem and then merge this PR, to avoid unnecessary type checking issues at the end users side.

soutaro avatar Jun 05 '24 02:06 soutaro