Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Base: twiceprecision: optimize mul12
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.
- Loading branch information