change argument order for arb_abs and arb_neg; correct documentation of arb_abs

This commit is contained in:
Alexander Kobel 2015-07-23 12:20:42 +02:00
parent 59203d90ef
commit a8ad82f43c
4 changed files with 9 additions and 13 deletions

5
arb.h
View file

@ -190,11 +190,11 @@ void arb_set_round(arb_t z, const arb_t x, long prec);
void arb_trim(arb_t y, const arb_t x);
void arb_neg(arb_t x, const arb_t y);
void arb_neg(arb_t y, const arb_t x);
void arb_neg_round(arb_t x, const arb_t y, long prec);
void arb_abs(arb_t x, const arb_t y);
void arb_abs(arb_t y, const arb_t x);
void _arb_digits_round_inplace(char * s, mp_bitcnt_t * shift, fmpz_t error, long n, arf_rnd_t rnd);
@ -1070,4 +1070,3 @@ void arb_atan_arf_bb(arb_t z, const arf_t x, long prec);
#endif
#endif

View file

@ -26,9 +26,8 @@
#include "arb.h"
void
arb_abs(arb_t x, const arb_t y)
arb_abs(arb_t y, const arb_t x)
{
arf_abs(arb_midref(x), arb_midref(y));
mag_set(arb_radref(x), arb_radref(y));
arf_abs(arb_midref(y), arb_midref(x));
mag_set(arb_radref(y), arb_radref(x));
}

View file

@ -26,9 +26,8 @@
#include "arb.h"
void
arb_neg(arb_t x, const arb_t y)
arb_neg(arb_t y, const arb_t x)
{
arf_neg(arb_midref(x), arb_midref(y));
mag_set(arb_radref(x), arb_radref(y));
arf_neg(arb_midref(y), arb_midref(x));
mag_set(arb_radref(y), arb_radref(x));
}

View file

@ -525,7 +525,7 @@ Arithmetic
Sets *y* to the negation of *x*.
.. function:: void arb_abs(arb_t x, const arb_t y)
.. function:: void arb_abs(arb_t y, const arb_t x)
Sets *y* to the absolute value of *x*. No attempt is made to improve the
interval represented by *x* if it contains zero.
@ -1429,4 +1429,3 @@ Vector functions
Calls :func:`arb_get_unique_fmpz` elementwise and returns nonzero if
all entries can be rounded uniquely to integers. If any entry in *vec*
cannot be rounded uniquely to an integer, returns zero.