WSL/SLF GitLab Repository

Skip to content
  • Mathias Bavay's avatar
    A rounding bug has been found in the Date class: when using a Date object in a... · 2ddc7feb
    Mathias Bavay authored
    A rounding bug has been found in the Date class: when using a Date object in a loop where it gets incremented, it accumulates errors and after ~70000 iterations, the error would get bigger than one second, making date comparisons with a fixed date impossible. This has been solved by always rounding the internal gmt Julian date to the closest second, after each assignment (from the constructors, the setDate() calls or any arithmetic operation). Moreover, the rounding methods have been re-written to be more efficient as well as other roundings (specially when computing the date decomposition from Julian). 
    
    The seek() call performing a binary search has also been simplified, in order to remove unnecessary tests, put some similar tests together and make the code clearer. 
    
    Some constification and better vector usage took place in ResamplingAlgorithms and Meteo1DInterpolator.
    2ddc7feb