Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop DoubleFloats dependency? #170

Open
oxinabox opened this issue Sep 11, 2021 · 0 comments
Open

Drop DoubleFloats dependency? #170

oxinabox opened this issue Sep 11, 2021 · 0 comments

Comments

@oxinabox
Copy link

DoubleFloats has a fair few dependencies.
Like SpecialFunctions, Polynomials, QuadMath etc.
(including some like Intervals.jl which trigger a fairly high number of invalidations, thus making loading this slow).
Removing it should speed up loading a fair bit.

It is only used for

TextParse.jl/src/field.jl

Lines 145 to 164 in ced8d24

@inline function convert_to_double(f1::Int64, exp::Int)
f = Float64(f1)
r = f1 - Int64(f) # get the remainder
x = Double64(f) + Double64(r)
maxexp = 308
minexp = -256
if exp >= 0
x *= pre_comp_exp_double[exp+1]
else
if exp < minexp # not sure why this is a good choice, but it seems to be!
x /= pre_comp_exp_double[-minexp+1]
x /= pre_comp_exp_double[-exp + minexp + 1]
else
x /= pre_comp_exp_double[-exp+1]
end
end
return Float64(x)
end

Which in turn only needs:

  • Creation
  • Conversion to float
  • Multiply
  • Divide
  • ^

We could port just those functions across.
Or maybe there is another algorithm for x*10^y (integer x, y) that we can use that doesn't need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant