mirror of
https://github.com/vale981/arb
synced 2025-03-05 09:21:38 -05:00
fix acos
This commit is contained in:
parent
6eabee7efa
commit
0673fc935f
1 changed files with 5 additions and 2 deletions
|
@ -20,6 +20,8 @@ acb_acos(acb_t res, const acb_t z, slong prec)
|
|||
}
|
||||
else
|
||||
{
|
||||
acb_t t;
|
||||
acb_init(t);
|
||||
if (arb_is_zero(acb_imagref(z)))
|
||||
{
|
||||
arb_t one;
|
||||
|
@ -27,15 +29,16 @@ acb_acos(acb_t res, const acb_t z, slong prec)
|
|||
arb_one(one);
|
||||
if (arb_gt(acb_realref(z), one))
|
||||
{
|
||||
acb_zero(t);
|
||||
acb_asin(res, z, prec);
|
||||
acb_sub(res, t, res, prec);
|
||||
arb_zero(acb_realref(res));
|
||||
arb_clear(one);
|
||||
arb_clear(t);
|
||||
return;
|
||||
}
|
||||
arb_clear(one);
|
||||
}
|
||||
acb_t t;
|
||||
acb_init(t);
|
||||
acb_asin(res, z, prec);
|
||||
acb_const_pi(t, prec);
|
||||
acb_mul_2exp_si(t, t, -1);
|
||||
|
|
Loading…
Add table
Reference in a new issue