MultiFloats.jl icon indicating copy to clipboard operation
MultiFloats.jl copied to clipboard

Fast extended-precision floating-point arithmetic for Julia

Results 19 MultiFloats.jl issues
Sort by recently updated
recently updated
newest added

Because of this bit of code ```julia _sincos(x::AbstractFloat) = sincos(x) _sincos(x) = (sin(x), cos(x)) sincos(x) = _sincos(float(x)) ``` in `julia\base\special\trig.jl` Calling sincos with a MultiFloat causes a stackoverflow. Minimum working...

`repr(x)` should output ``` Float64xN((x1, x2, ..., xN)) ``` That way you can actually copy and paste them.

After running the QR algorithm for a bunch of iterations, I'm hitting 99% of the cases numbers like these, which lose precision when multiplied: ```julia julia> x = Float64x4((-1.4426767353575964e-39, -4.620737599002311e-57,...

```julia julia> pi * Float64x4(2) ERROR: MethodError: Cannot `convert` an object of type Irrational{:π} to an object of type NTuple{4, Float64} ``` Perhaps there might be a way to convert...

See the second argument here, note that it can also be negative or zero: https://docs.julialang.org/en/v1/base/numbers/#Base.nextfloat A stopgap implementation is obvious: just call `nextfloat`/`prevfloat` repeatedly.

``` julia> using MultiFloats julia> MultiFloats.use_standard_multifloat_arithmetic(20) julia> g(n::Integer) = rand(MultiFloat{Float64, n}) g (generic function with 1 method) julia> x = g(20) -2.2914735159347884e+302 julia> 1 < x false julia> x <...

Just a little note on performance: ``` f(v::Vector{

These all fail with `MethodError: no method matching round(::MultiFloat{Float64, 2}, ::RoundingMode{:Down})`: ``` map(Float64x2, 0:5) Float64x2(0):Float64x2(5) Float64x2(0):Float64x2(1):Float64x2(5) ``` The workaround is to use generators: ``` julia> (Float64x2(i) for i in 0:3)...

I've tried on MultiFloats.jl on the GPU, but I'm getting loss of precision compared to the CPU: ``` using CUDA, MultiFloats A = rand(Float64x8, 100, 100) B = rand(Float64x8, 100,...

```julia julia> significand(Float64x2(123.4)) ERROR: MethodError: no method matching significand(::MultiFloat{Float64, 2}) Closest candidates are: significand(::T) where T