Modification to implementation of round() such that it returns a float and accepts a places argument (fixes #3473).
This also involved moving some functions around to get the hierarchy correct and the documentation for frexp was modified such that it was clear that it can return a float in either the range [-1, -0.5] or [0.5, 1].
This commit is contained in:
parent
f3fdad0eda
commit
0cc7c9a13c
4 changed files with 74 additions and 27 deletions
|
|
@ -45,6 +45,11 @@ Changes affecting backwards compatibility
|
|||
- The path handling changed. The project directory is not added to the
|
||||
search path automatically anymore. Add this line to your project's
|
||||
config to get back the old behaviour: ``--path:"$projectdir"``.
|
||||
- The ``round`` function in ``math.nim`` now returns a float and has been
|
||||
corrected such that the C implementation always rounds up from .5 rather
|
||||
than changing the operation for even and odd numbers.
|
||||
- The ``round`` function now accepts a ``places`` argument to round to a
|
||||
given number of places (e.g. round 4.35 to 4.4 if ``places`` is 1).
|
||||
|
||||
|
||||
Library Additions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue