4 ms·
side note some numbers^* cannot be meaningfully multiplied or divided. For example, 3^rd place, 30° F, or 37.388N,-122.067S. Some numbers can only be added to
by pvillano 5y ago
side note
some numbers^* cannot be meaningfully multiplied or divided. For example, 3^rd place, 30° F, or 37.388N,-122.067S.
Some numbers can only be added to by numbers of a different type. For example x°C + y°K, 3rd grader + year, absolute position + offset. Similarly, subtracting two of these numbers results in a different unit. e.g. position - position = offset
it would be great if someone could comment the exact terminology for what I'm trying to describe.
* Types/Units
- mind-blight 5y agoI'm not sure if it's what you're looking for, but algebraic days types are a fairly common way to encode different kinds of days that have the same shape. You may also be looking for fields: https://en.m.wikipedia.org/wiki/Field_(mathematics) https://en.m.wikipedia.org/wiki/Field_(mathematics). You could probably also describe the relation between different number types as linear operators over a vector space
- john-aj 5y agoIn statistics, one usually differentiates between - nominal scales (e.g. man/woman), - ordinal scales (elementary school/middle school/high school), - interval scales (degrees Celsius) and - ratio scales (human height, degrees Kelvin). Only ratio scales may be multiplied and divided. Interval scales may be subtracted and added. Ordinal scales may only be compared (less/greater/equal). Nominal scales may only be compared in terms of (in)equality. https://en.wikipedia.org/wiki/Level_of_measurement https://en.wikipedia.org/wiki/Level_of_measurement
- pvillano 5y agothank you! this is that I was looking for
- jongalloway2 5y agoF# has Units of Measure: https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/units-of-measure https://docs.microsoft.com/en-us/dotnet/fsharp/language-refe... There are libraries that implement this concept in other programming languages (C++, Java, C#, etc.)
- samus 5y agoLevels of measurement: https://en.wikipedia.org/wiki/Level_of_measurement https://en.wikipedia.org/wiki/Level_of_measurement