elixir-lang/elixir — pull request #1989 by chaslemley (2014-01-12 17:25:58+00:00)
Title: fix error with float midpoint rounding

There is an issue in Float.round/3, where the midpoint rounding is causing the number to always round up by default or down if that option is passed. This PR removes the midpoint_rounding option and will always round away from 0 (same as ruby and most other languages).

Current:

```elixir
iex> Float.round(3.991, 2)
4.0 # incorrect should round to 3.99
iex> Float.round(3.996, 2, :down)
3.99 # incorrect should only round 3.995 down
```

After this change:

```elixir
iex> Float.round(3.991, 2)
3.99
iex> Float.round(3.995, 2)
4.0
```