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
Raw File
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
.gitignore
/*.tar.gz
/tmp
/dist
/dist-extras
/julia
/julia.bat
/usr
/oprofile_data
/usr-staging
/Make.user
/julia-*
/source-dist.tmp
/source-dist.tmp1

*.exe
*.dll
*.dwo
*.do
*.o
*.obj
*.so
*.dylib
*.dSYM
*.jl.cov
*.jl.*.cov
*.jl.mem
*.jl.*.mem
*.ji

/perf*
.DS_Store
back to top