Re:Floor, Ceiling, Bracket
by ben_bradley on Friday April 16, 2021 @03:58PM
(#26838425)
Both math(s) and (almost?) all programming languages have their quirks and inconsistencies. What immediately comes to mind is (a thing I've recently learned) the template syntax of C++ where if you get a single character wrong you get dozens of lines of error messages (there's a code golf on exactly this).
At least with programming, you generally don't see different semantics depending on the value of something! With math, there's sin^2 as in:
sin^2 theta + cos^2 theta = 1, which reads the square of the sin of theta, etc.
But then there's
sin^-1
which means the inverse sine AKA arcsine, and NOT 1 / sine, which would be consistent with previous usage.
At least with programming, you generally don't see different semantics depending on the value of something! With math, there's sin^2 as in: sin^2 theta + cos^2 theta = 1, which reads the square of the sin of theta, etc. But then there's sin^-1 which means the inverse sine AKA arcsine, and NOT 1 / sine, which would be consistent with previous usage.