Arccos
Arccosine, the inverse of Cos restricted to .
✓ checked against that system · ! checked, with disagreements (hover a chip)Wikipedia
Inverse trigonometric functionsMathWorldInverseCosineInverseTrigonometricFunctionsWikidataQ674533nLabinverse trigonometric functionBritannicatopic/arc-sineDLMF4.23.ii.p1FungrimAcos✓Fungrim entry33e034✓718f3a✓b8fdcd✓ec7f2d✓fda800✓Wolfram LanguageArcCos!Arccos(x)the principal value with .SageMath
arccos(x)SymPyacos(x)mpmathacos(x)Juliaenumeratio_ball(_acos, x)Rustacos(x)Typed signatures
| Type | Package | Applies |
|---|---|---|
(complex | quantity) -> number | analyticreplaces compute-engine | always |
(complex | quantity) -> number | compute-engine | always |
Details
- Real-valued only for ; outside that range the result is complex.
- Co-function with Arcsin: .
- Undoes Cos on its principal branch: for .
- Differs from Wolfram: past its real domain a rational argument reduces to the exact principal value, on every inverse trigonometric and hyperbolic head alike (Arcsin, Arccos, Arcsec, Arccsc, Arcosh, Artanh, Arcoth, Arsech); Wolfram leaves the exact call unevaluated and gives the same number from
N[...]. Checked against mpmath andwolframscripton a grid of rationals to double precision. A float andN(...)already took the same branch. Compiled code is separate: the JavaScript target is real-valued (NaN past the domain), the WGSL target returns a complex pair, and Arcsin and Arccos decline to compile. Principal branch, same cuts as Arcsin: for , (mpmathacos(2)is ), and for , .
Examples
1 more kept as data, checked against the oraclesScope #
live ↗
InOut
Arccos(+Infinity) is a directed infinity along the positive imaginary axis:
live ↗Known value · DLMF 4.23.22
Properties #
Negating the argument gives minus the previous angle
live ↗InOut
Known value · Wolfram MathematicalFunctionData, ArcCos
Negative golden-ratio cosine gives
live ↗InOut
Known value · Wolfram MathematicalFunctionData, ArcCos
Cosine of is a negative golden-ratio value
live ↗InOut
Known value · Wolfram MathematicalFunctionData, ArcCos
Possible issues #
Arccos(ComplexInfinity) is ComplexInfinity, unbounded in every direction as Arcsin is
live ↗Known value · DLMF 4.23.22
About
| Examples | 40 |
|---|---|
| Checked against | Wolfram Language 37 agree3 differSageMath 34 agree2 differ2 errorSymPy 35 agree4 differmpmath 31 agree2 differJulia 30 agree2 errorRust 27 agree3 error |
| Crosswalk | WikipediaMathWorld ×2WikidatanLabBritannicaDLMFFungrimFungrim entry ×5Wolfram LanguageSageMathSymPympmathJuliaRust |
Implementation
mapped
sympypackages/oracle/src/mappings.tsmapped
mpmathpackages/oracle/src/mappings.tsmapped
sagepackages/oracle/src/mappings.tsmapped
juliapackages/oracle/src/mappings.tsmapped
rustpackages/oracle/src/mappings.ts