stochastics-uni-luebeck / LevyArea.jl

Iterated stochastic integrals in Julia.
https://stochastics-uni-luebeck.github.io/LevyArea.jl/stable
MIT License
9 stars 0 forks source link

Float64 vs. Float32 #5

Closed frankschae closed 2 years ago

frankschae commented 2 years ago

I think it would be good to replace 0.5.* by 1//2* in lines such as https://github.com/stochastics-uni-luebeck/LevyArea.jl/blob/68c5cb08ab103b4dcd3178651f7a5dd9ce8c666d/src/iterated_integrals.jl#L67 to avoid conversion between different accuracies of floating point numbers.

using LevyArea
h = 1/2;
W = [1.0f0, 0.5f0]
eltype(iterated_integrals(W, h, h^(3/2)))  # Float64
fkastner commented 2 years ago

Moin Frank, thanks for catching that. It should be fixed with 50d18a08d86654398f291d14538ff95834db9aeb.