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

Grids of `AttractorViaRecurrences` unecessarily limit the number type to `Float64`

Open Datseris opened this issue 2 years ago • 2 comments

The grids used in AttractorsViaRecurrences convert all numbers to Float64. E.g., we have:

function RegularGrid(grid::NTuple)
    D = length(grid)
    grid_steps = SVector{D,Float64}(step.(grid))
    grid_maxima = SVector{D,Float64}(maximum.(grid))
    grid_minima = SVector{D,Float64}(minimum.(grid))
    return RegularGrid(grid_steps, grid_minima, grid_maxima, grid)
end

This is unecessary. We should simply extract the number type T and use vectors of type T. This can impact performance if different number types are used.

Datseris avatar Oct 01 '23 09:10 Datseris

Are there a large number of places in DynamicalSystems.jl where this lower precision type specification is hard-coded? I'm asking because I'm experimenting with root finding algorithm basins and I need to use very high precision for the standards of that field. I don't mind changing a few functions by hand but if it's the whole package .... Thank you.

nihcompmed avatar Nov 27 '23 23:11 nihcompmed

No other place. See also the function 'fixedpoints' from ChaosTools.jl that uses interval arethmetic for max precision

Datseris avatar Nov 28 '23 09:11 Datseris