Calculators often denote the arc sin function as sin-1
(probably because it's more compact to write on the button) because arc sin is the inverse of sin (that is, one computes an angle given the sine, the other computes the sine given an angle).
However arc sin(x) is not equal to sin(x)-1. It's easy to see that if you take a more extreme angle. arc sin(0) is zero (note that WolframAlpha transcribes the input arcsin(0)
to sin-1(0)
, which should not be confused with sin(0)-1
), however sin(0)-1 gives a slightly larger result ;-)
sin-1(x)
denotes the inverse sine of x, where the superscript -1 is not an exponent. Whereas sin(x)-1
is the reciprocal of sin(x), in which case the -1 is an exponent, which means 1/sin(x)
(see this thread and Crowley's comment below this answer). However very few systems understand the sin-1(x)
notation (probably Wolfram and one or two more), because it's tricky to teach a parser that a ^-1
after sin
means a completely different thing than a ^2
in the very same place. Add that to the usual difficulty of programming anything in TeX and you see why this doesn't work.
If you use the proper notation, pgfmath
computes both correctly:
\documentclass[border=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{math}
\tikzmath { \anglea=sin(9.00000/9.48683)^-1; }
\tikzmath { \angleb=asin(9.00000/9.48683); }
\begin{document}
\anglea % 60.38649
\space
\angleb % 71.56462
\end{document}
so does xfp
;-)
\documentclass[border=5mm]{standalone}
\usepackage{xfp}
\begin{document}
\fpeval{sind(9.00000/9.48683)^-1} % 60.39779524788624
\space
\fpeval{asind(9.00000/9.48683)} % 71.56510517950239
\end{document}
asin(9.00000/9.48683)
is 71.56462, andsin(9.00000/9.48683)^-1
(or1/sin(9.00000/9.48683)
) is 60.38649.asin(x)
is not the same assin(x)^-1
. – Phelype Oleinik Nov 14 '19 at 23:06