Note about floating-point units

Comparisons between negative floating-point values with units do not work correctly, as reported here.

In the meantime, this seems to work.

To decide whether (X - testval) is truly less than (Y - testval):
    let Z be X minus Y;
    decide on whether or not Z is less than 0Z.

Replace testvals with your own units as you see fit. There should be some way to make this work for all arithmetic kinds, but I haven’t managed it.