https://github.com/JuliaLang/julia
Revision c90aa7705a7edf09af74ed1372d59fc27508f546 authored by Neven Sajko on 04 May 2023, 10:48:48 UTC, committed by GitHub on 04 May 2023, 10:48:48 UTC
It is well known and obvious that the algorithm behind `Base.mul12`
(sometimes known as "Fast2Mult") doesn't require a "Fast2Sum" (known in
the Julia codebase as `Base.canonicalize2`) call at the end, so remove
it. This follows from the fact that IEEE-754 floating-point
multiplication is required to be well-rounded, so Fast2Sum can't change
the result.

Reference, for example, the beginning of
https://doi.org/10.1145/3121432 by Joldes, Muller, Popescu.

Furthermore, `Base.Math.two_mul` already exists, so use it as a kernel
function. This required adding a general fallback method for
`Base.Math.two_mul`, required, for example, for `BigFloat`.

Also removed the `iszero` check that is now obviously not necessary.
1 parent ce2c3ae
History
Tip revision: c90aa7705a7edf09af74ed1372d59fc27508f546 authored by Neven Sajko on 04 May 2023, 10:48:48 UTC
Base: twiceprecision: optimize mul12 (#49568)
Tip revision: c90aa77
File Mode Size
.devcontainer
.github
base
cli
contrib
deps
doc
etc
src
stdlib
test
.buildkite-external-version -rw-r--r-- 5 bytes
.clang-format -rw-r--r-- 3.3 KB
.clangd -rw-r--r-- 114 bytes
.codecov.yml -rw-r--r-- 52 bytes
.git-blame-ignore-revs -rw-r--r-- 294 bytes
.gitattributes -rw-r--r-- 65 bytes
.gitignore -rw-r--r-- 514 bytes
.mailmap -rw-r--r-- 12.1 KB
CITATION.bib -rw-r--r-- 513 bytes
CITATION.cff -rw-r--r-- 940 bytes
CONTRIBUTING.md -rw-r--r-- 23.1 KB
HISTORY.md -rw-r--r-- 363.4 KB
LICENSE.md -rw-r--r-- 1.3 KB
Make.inc -rw-r--r-- 54.3 KB
Makefile -rw-r--r-- 29.8 KB
NEWS.md -rw-r--r-- 5.2 KB
README.md -rw-r--r-- 7.4 KB
THIRDPARTY.md -rw-r--r-- 3.8 KB
VERSION -rw-r--r-- 11 bytes
julia.spdx.json -rw-r--r-- 35.8 KB
pkgimage.mk -rw-r--r-- 5.8 KB
sysimage.mk -rw-r--r-- 4.2 KB

README.md

back to top