Long variable names: Difference between revisions
From Why start at x, y, z
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
\[ x \text{speed} \] | \[ x \text{speed} \] | ||
==Why?== | |||
<ref>[https://math.stackexchange.com/questions/24241/why-do-mathematicians-use-single-letter-variables Why do mathematicians use single-letter variables?] on math.stackexchange.com</ref> |
Revision as of 08:51, 8 July 2021
Mathematicians normally stick to single-letter variable names. But when they don't, it can be hard to tell if there's a missing multiplication symbol or not.
Some people use an upright font for long variable names to distinguish them from single-letter variable names, drawn in italics (see Use of different typefaces to convey meaning)
Examples
\[ speed = distance \div time \]
\[ \text{speed} = \text{distance} \div \text{time} \]
Is it OK to mix single-letter variable names and longer ones?
\[ x \text{speed} \]
Why?
- ↑ Why do mathematicians use single-letter variables? on math.stackexchange.com