Skip to content

Drop DoubleFloats dependency? #170

Open

Description

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions