On Thu, 2023-11-30 at 18:33 -0700, Daniel Xu wrote: [...] > Good call about adding tests -- I found a few bugs with the code from > the other thread. But boy did they take a lot of brain cells to figure > out. > > There was some 6th grade algebra involved too -- I'll do my best to > explain it in the commit msg for v3. > > Here are the fixes in case you are curious: Ouch, I knew my code from 3am can't be trusted, sorry for that. Your math seem to make sense, thank you. [...]