Not sure if there is an Apple document on this at all but here are some of the mathematical functions and symbols you can use in formulas while making calculations with Spotlight of macOS Ventura (13.4.1) with examples and the results returned:
Basic: 1 + 1 = 2, 1 - 1 = 0, 2 * 3 = 6, 6 / 2 = 3
Precendence: 2 + 3 * 5 = 17
Parentheses: (1 + 1) / 2 = 2
Multiplication (Implied): 2(8+1) = 18
Absolute Value: abs(-1.1) = fabs(-1.1) = 1.1
Percentage: 25% = 0.25, 60 * 25% = 15
Include unit in formula: 5 miles * 4 = 20 miles
Include a unit conversion in formula: 5 miles * 4 in km = 32.19 kilometers
Use a rate with units in a formula: 20 mph * 5 hours = 100 miles
Modulus (Remainder): 5 % 2 = 1
Base 10 and Natural Logarithms: log(10) = 1, ln(e) = 1,
Exponentiation: 2^3 = 2 ** 3 = 8
Exponentiation (Natural Base): e^2 = e ** 2 = exp(2) = 7,3890560989
Square and Cube Roots: sqrt(4) = 2, cbrt(27) = 3
Factorial: 3! = 6
Trigonometric (Radian): sin(pi/2) = 1, cos(pi) = -1, tan(pi/4) = 1
Trigonometric (Degree): sind(90) = 1, cosd(180) = -1, tand(45) = 1
Trigonometric (Degree): sin(90deg) = 1, cos(180deg) = -1, tan(45deg) = 1
Inverse Trigonometric (Radian): arcsin(1) = 1,57 radians, arccos(-1) = 3,14 radians, arctan(1) = 0,79 radians
Inverse Trigonometric (Degree): arcsind(1) = 90 degrees, arccosd(-1) = 180 degrees, tand(1) = 45 degrees
Hyperbolic: sinh(1) = 1.1752011936, cosh(0) = 1, tanh(0) = 0
Inverse Hyperpolic: arcsinh(1) = 0.881373587; arccosh(1) = 0, arctanh(0.5) = 0.5493061443
Rounding: ceil(1.2) = 2, floor(1.2) = 1, round(1.6) = 2
Bitwise Operators: 3 & 5 = 3 and 5 = 1, 3 | 5 = 3 or 5 = 7, 3 xor 5 = 6
Error and Complementary Error Functions: erf(1) = 0.8427007929, erfc(1) = 0.1572992071
One can combine any of the above symbols or operators, using parentheses for correct prioritization whenever necessary, as shown in the example below:
ln(e ** (4 / sind(90))) = 4
Though the constants pi and e are allowed, variables are not.
To get a result into clipboard, just press Command ⌘+C once the result appears. A calculation result is not shown when the formula is not proper or the outcome is undefined.
Credits:
- "Spotlight calculator can do more than simple arithmetic" by Eren Jeager of Reddit, 2013
- "Advanced Calculations With Spotlight" by MacMost, 2016
- "Advanced Math Calculations Using Spotlight" by MacMost, 2023
1's
and2's
buttons to view the number in these representation, but it doesn't even let me type negatives.