I have recently started working on a swi-prolog library for unit aware arithmetic[1].
It is still very bare bone (especially in documentation), but I started writing some examples[2] to showcase the library.
It is essentially a port of the mp-units[3] library in c++.
It was a lot of fun, and I found prolog especially well suited for manipulating symbolic representation of units and quantities.
[1] https://github.com/kwon-young/units
[2] https://github.com/kwon-young/units/blob/master/examples/spe...
[3] https://mpusz.github.io/mp-units/latest/