mirror of
https://github.com/vale981/arb
synced 2025-03-04 17:01:40 -05:00
add arb_equal_si and acb_equal_si
This commit is contained in:
parent
7002d5ae12
commit
4033d51c42
4 changed files with 20 additions and 0 deletions
6
acb.h
6
acb.h
|
@ -185,6 +185,12 @@ acb_equal(const acb_t x, const acb_t y)
|
|||
arb_equal(acb_imagref(x), acb_imagref(y));
|
||||
}
|
||||
|
||||
ACB_INLINE int
|
||||
acb_equal_si(const acb_t x, slong y)
|
||||
{
|
||||
return arb_equal_si(acb_realref(x), y) && arb_is_zero(acb_imagref(x));
|
||||
}
|
||||
|
||||
ACB_INLINE int
|
||||
acb_eq(const acb_t x, const acb_t y)
|
||||
{
|
||||
|
|
6
arb.h
6
arb.h
|
@ -126,6 +126,12 @@ arb_equal(const arb_t x, const arb_t y)
|
|||
mag_equal(arb_radref(x), arb_radref(y));
|
||||
}
|
||||
|
||||
ARB_INLINE int
|
||||
arb_equal_si(const arb_t x, slong y)
|
||||
{
|
||||
return arf_equal_si(arb_midref(x), y) && mag_is_zero(arb_radref(x));
|
||||
}
|
||||
|
||||
int arb_eq(const arb_t x, const arb_t y);
|
||||
int arb_ne(const arb_t x, const arb_t y);
|
||||
int arb_lt(const arb_t x, const arb_t y);
|
||||
|
|
|
@ -207,6 +207,10 @@ Precision and comparisons
|
|||
quantity, use :func:`acb_overlaps` or :func:`acb_contains`,
|
||||
depending on the circumstance.
|
||||
|
||||
.. function:: int acb_equal_si(const acb_t x, slong y)
|
||||
|
||||
Returns nonzero iff *x* is equal to the integer *y*.
|
||||
|
||||
.. function:: int acb_eq(const acb_t x, const acb_t y)
|
||||
|
||||
Returns nonzero iff *x* and *y* are certainly equal, as determined
|
||||
|
|
|
@ -466,6 +466,10 @@ Comparisons
|
|||
quantity, use :func:`arb_overlaps` or :func:`arb_contains`,
|
||||
depending on the circumstance.
|
||||
|
||||
.. function:: int arb_equal_si(const arb_t x, slong y)
|
||||
|
||||
Returns nonzero iff *x* is equal to the integer *y*.
|
||||
|
||||
.. function:: int arb_is_positive(const arb_t x)
|
||||
|
||||
.. function:: int arb_is_nonnegative(const arb_t x)
|
||||
|
|
Loading…
Add table
Reference in a new issue