Skip to content

Commit

Permalink
Adapt to MultiFloats.jl v2: exp(::MultiFloat) has been removed
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelBadr committed Jan 31, 2024
1 parent 19235f2 commit f1b0595
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 59 deletions.
11 changes: 8 additions & 3 deletions src/SparseIR.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@ export AugmentedBasis, TauConst, TauLinear, MatsubaraConst
export TauSampling, MatsubaraSampling, evaluate, fit, evaluate!, fit!,
MatsubaraSampling64F, MatsubaraSampling64B, TauSampling64, sampling_points

using MultiFloats: Float64x2
using MultiFloats: MultiFloats, Float64x2, _call_big
# If we call MultiFloats.use_bigfloat_transcendentals() like MultiFloats
# recommends, we get an error during precompilation:
for name in (:exp, :sinh, :cosh)
eval(:(function Base.$name(x::Float64x2)
Float64x2(_call_big($name, x, precision(Float64x2) + 20))
end))
end
using LinearAlgebra: LinearAlgebra, cond, dot, svd, SVD, QRIteration, mul!
using QuadGK: gauss, quadgk
using Bessels: sphericalbesselj
using PrecompileTools

include("_multifloat_funcs.jl")

include("_linalg.jl")
include("_roots.jl")
include("_specfuncs.jl")
Expand Down
50 changes: 0 additions & 50 deletions src/_multifloat_funcs.jl

This file was deleted.

6 changes: 0 additions & 6 deletions test/_multifloat_funcs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ logrange(x1, x2, length) = (exp10(y) for y in range(log10(x1), log10(x2); length
@test cosh(x) isa Float64x2
end

@testset "allocations" begin
x = rand(xx)
@test iszero(@allocated sinh(x))
@test iszero(@allocated cosh(x))
end

@testset "sinh(x) where x = $x" for x in xx
@test sinh(x)sinh(big(x)) rtol=eps(Float64x2)
end
Expand Down

0 comments on commit f1b0595

Please sign in to comment.