The docstring for acos references the definition given in DLMF:
https://dlmf.nist.gov/4.23

Definition 4.23.2 gives the value of acos(1.279) with the following 
integral:

In [17]: Integral(1/(sqrt(1-t**2)), (t, 1.279, 1)).n()
Out[17]: 0.730633885542373⋅ⅈ

SymPy's acos gives the principle value i.e. what DLMF calls arccos as 
opposed to the multivalued Arccos. Other possible values of Arccos arise 
from taking integration paths that loop around the singularities at +-1 but 
the principle values are defined by requiring that the integration path not 
cross these cuts.

Oscar

On Thursday, 9 December 2021 at 00:03:18 UTC emanuel.c...@gmail.com wrote:

> >>> from sympy import *
> >>> x,y=map(symbols, "xy")
>
> Abraham de Moivre <https://en.wikipedia.org/wiki/Abraham_de_Moivre> 
> taught us that :
>
> >>> cos(x).rewrite(exp)
> exp(I*x)/2 + exp(-I*x)/2
>
> This expression can be solved for all possible values, not only for reals 
> of absolute value not superior to 1. However, the latter are the only ones 
> for which the solution is real. Generally :
>
> >>> solve(Eq(y,cos(x).rewrite(exp)), x)
> [-I*log(y - sqrt(y**2 - 1)), -I*log(y + sqrt(y**2 - 1))]
>
> Sympy’sacos returns one of these values.
>
> HTH,
> ​
> Le mercredi 8 décembre 2021 à 23:49:48 UTC+1, raphael.g...@gmail.com a 
> écrit :
>
>> Hello
>> Example for acos(1.279) one get the complex value *0.730*I *
>> What the meaning of that ?
>>
>> Best regards
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/2ccfe07c-ac62-4241-a492-45b7e5fba3acn%40googlegroups.com.

Reply via email to