General

Profile

ankane (Andrew Kane)

  • Login: ankane
  • Registered on: 05/15/2020
  • Last sign in: 06/13/2024

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 2 0 2

Activity

09/20/2021

04:09 AM Ruby master Feature #18179 (Open): Add Math methods to Numeric
Hi, I wanted to get thoughts on adding class methods from `Math` as instance methods on `Numeric`.
```ruby
x.sqrt...
ankane (Andrew Kane)

05/16/2020

01:43 AM Ruby master Feature #16894: Integer division for Ruby 3
fwiw, array indexing code likely wouldn't need changed.
``` ruby
a = ["zero", "one", "two"]
a[1/2] # "zero"
a...
ankane (Andrew Kane)

05/15/2020

09:52 AM Ruby master Feature #16894: Integer division for Ruby 3
Here's a good read on the thoughts and motivation behind Python changing it: https://www.python.org/dev/peps/pep-0238/ ankane (Andrew Kane)
04:39 AM Ruby master Feature #16894: Integer division for Ruby 3
Thanks for the responses!
Re 0.5 vs 1/2r: In my experience, developers use floats way more than rationals.
Re "...
ankane (Andrew Kane)
03:29 AM Ruby master Feature #16894: Integer division for Ruby 3
Sorry, for the edits, first issue! Changed normal to floating point. ankane (Andrew Kane)
03:20 AM Ruby master Feature #16894 (Assigned): Integer division for Ruby 3
Hi Ruby team,
It'd be great if division in Ruby matched what we all learned in school.
``` ruby
1 / 2 == 0.5
...
ankane (Andrew Kane)

Also available in: Atom