Open christianp opened 6 years ago
I learnt a good word recently: 'torsor'. The nLab says a torsor is "roughly speaking, a group that has forgotten its identity element". There's a slightly more understandable essay by John Baez.
Temperatures are examples of torsors: they can be compared, but there's no meaningful zero.
The
number
data type is a straightforward IEEE float at the moment. This is an easy solution that covers most kinds of number, but means authors need to understand all the edge cases or implement non-standard operations on top of floating point arithmetic.It would be nice if we could add more number-like data types, so that the right behaviour happens automatically.
Examples of number-like types:
(100*n)%
; only exactly 0 should round to 0%; "percentage of" and "percentage change" have different meanings)