Comment on Hmmmm

<- View Parent
Buddahriffic@lemmy.world ⁨2⁩ ⁨days⁩ ago

Variables can be in arbitrary units. If you put the units through the same steps as the values, you’ll end up with the right unit, plus you need the values to be in compatible units for the operations to even make sense. At least as long as any constants are also given the correct units. This can also help discover cases where you accidentally mix similar but different units (like litres and gallons).

I also find it very satisfying to do those equations on the units, adding ones that get multiplied in and cancelling ones that get divided out, and then ending up with a unit that makes sense, given what the equation was supposed to express.

Though we might be saying the same thing, because while I don’t think variables need units, expanding that variable with a value absolutely should involve a unit, as should any examples of that equation’s use.

source
Sort:hotnewtop