the classic problem for such number systems is linear algebra <a href="https://yosefk.com/blog/can-your-static-type-system-handle-linear-algebra.html" rel="nofollow noreferrer">https://yosefk.com/blog/can-your-static-type-system-handle-l...</a><p>the issue is that each column and each row of a matrix can have different units. worse, gauss-jordan elimination chooses which rows to operate on dynamically. there is eventually a solution to this problem in c++ far down the comments thread<p>i don't see anything in <a href="https://numbat.dev/doc/type-system.html" rel="nofollow noreferrer">https://numbat.dev/doc/type-system.html</a> about aggregate types such as vectors, matrices, maps, arrays, lists, trees, records, etc., though it does have a suggestively named scalar type. i wonder how it handles this sort of thing