I was looking into https://github.com/beacon-biosignals/Onda.jl/pull/120 and was getting very confused. I started to doubt TimeSpans.index_from_time, so I wrote a test to compare to an extremely naive algorithm in exact arithmetic, to be sure the +1 was right and rounding wasn't causing an issue. As these tests show, our index_from_time seems perfectly fine (as expected probably 🙂). I figured they could still be useful to have here so others can be reassured as well (or me in the future,) and so we don't regress.
I was looking into https://github.com/beacon-biosignals/Onda.jl/pull/120 and was getting very confused. I started to doubt
TimeSpans.index_from_time
, so I wrote a test to compare to an extremely naive algorithm in exact arithmetic, to be sure the +1 was right and rounding wasn't causing an issue. As these tests show, ourindex_from_time
seems perfectly fine (as expected probably 🙂). I figured they could still be useful to have here so others can be reassured as well (or me in the future,) and so we don't regress.