Closed nsajko closed 1 year ago
Hey @nsajko, thanks for contributing this fix! I was unaware of the Val
form of ntuple
(perhaps it was not available back in 2019 when I started working on MultiFloats.jl) and I agree that it is not only faster but conceptually clearer, by communicating that N
is known statically.
As an unrelated note, you probably already realize this, but I do want to point out that I do not recommend use of Float64x{11}
and beyond. Past Float64x8
, the limited exponent range of Float64
starts to become a serious issue, as lower limbs become truncated to zero. Also, I haven't benchmarked this recently, but at least on 2019 hardware, the cubic runtime of the Float64x{N}
arithmetic algorithms becomes worse than simply using BigFloat
right around N == 8
.
The
ntuple
function has a form taking aVal
argument, instead of anInt
argument. Using it prevents runtime dispatch in basic arithmetic functions for MultiFloat{Float64, m} for m>=11.State on master (0f15f4c2b869bfc4e7) before patch:
State after patch: