Use truncation division in mod for floats (#7118)
* Use truncation division in mod for floats * Add changelog entry * Add floorDiv/floorMod to math.nim * Update changelog
This commit is contained in:
parent
2107c81d6d
commit
65070a6936
2 changed files with 44 additions and 11 deletions
|
|
@ -39,6 +39,9 @@
|
|||
The proc is no longer deprecated.
|
||||
- ``posix.Timeval.tv_sec`` has changed type to ``posix.Time``.
|
||||
|
||||
- ``math.`mod` `` for floats now behaves the same as ``mod`` for integers
|
||||
(previously it used floor division like Python). Use ``math.floorMod`` for the old behavior.
|
||||
|
||||
#### Breaking changes in the compiler
|
||||
|
||||
- The undocumented ``#? braces`` parsing mode was removed.
|
||||
|
|
@ -60,6 +63,7 @@
|
|||
- Added the proc ``algorithm.upperBound``.
|
||||
- Added inverse hyperbolic functions, ``math.arcsinh``, ``math.arccosh`` and ``math.arctanh`` procs.
|
||||
- Added cotangent, secant and cosecant procs ``math.cot``, ``math.sec`` and ``math.csc``; and their hyperbolic, inverse and inverse hyperbolic functions, ``math.coth``, ``math.sech``, ``math.csch``, ``math.arccot``, ``math.arcsec``, ``math.arccsc``, ``math.arccoth``, ``math.arcsech`` and ``math.arccsch`` procs.
|
||||
- Added the procs ``math.floorMod`` and ``math.floorDiv`` for floor based integer division.
|
||||
|
||||
### Library changes
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue