4 ms·
I generally separate operands, but in dense math expressions it's not always the best for readability. x = (-b + sqrt(b**2 + 4*a*c) / (2*a) x = (- b
by blt 8y ago
I generally separate operands, but in dense math expressions it's not always the best for readability.
x = (-b + sqrt(b**2 + 4*a*c) / (2*a)
x = (- b + sqrt(b ** 2 + 4 * a * c) / (2 * a)
... Although, one could argue that allowing tightened multiplication and division are enough.
- AnimalMuppet 8y agoNot to be that guy, but... x = (-b + sqrt(b**2 - 4*a*c) / (2*a)
- blt 8y agolol, thank you.
- wtetzner 8y agoWell, if you're only interested in kebab-case, then specifying that identifiers can't start or end with hyphens solves most of the problem. The only restriction would be that you'd need whitespace around '-' only when used as an infix operator.