https://github.com/JuliaLang/julia
Revision a3eb9d43f859e8fab3e2dd81cc4c3fc47ef47228 authored by Keno Fischer on 28 September 2019, 19:17:12 UTC, committed by GitHub on 28 September 2019, 19:17:12 UTC
* Re-arrange fld/cld code

In preparation for supporting other rounding modes in div, create
a three-argument div function that takes a rounding mode as the last
argument and make this the fundamental fallback for fld/cld.

* Implemented rounded division

* add various divrem combinations to avoid overflow

* Whitespace/test fixes

* Small tweaks to docstrings

* Bugfixes

* Add the exhaustive test

* Tigthen up types for div fallback

I think it's better to give a MethodError here than an approximate
answer for non-AbstractFloat reals (e.g. custom integer types).
1 parent e5c3ffc
History
Tip revision: a3eb9d43f859e8fab3e2dd81cc4c3fc47ef47228 authored by Keno Fischer on 28 September 2019, 19:17:12 UTC
div with rounding modes [+ rounded division] (#33040)
Tip revision: a3eb9d4
File Mode Size
CODE_OF_CONDUCT.md -rw-r--r-- 2.5 KB
FUNDING.yml -rw-r--r-- 45 bytes
ISSUE_TEMPLATE.md -rw-r--r-- 508 bytes
SECURITY.md -rw-r--r-- 404 bytes
SUPPORT.md -rw-r--r-- 690 bytes

back to top