FLINT3.7.0-dev

ca_fmpq_div, ca_fmpz_div, ca_ui_div, ca_si_div, ca_div_fmpq, ca_div_fmpz, ca_div_ui, ca_div_si, ca_div

Synopsis#include <flint/ca.h>
void ca_fmpq_div(ca_t res, const fmpq_t x, const ca_t y, ca_ctx_t ctx)source
void ca_fmpz_div(ca_t res, const fmpz_t x, const ca_t y, ca_ctx_t ctx)source
void ca_ui_div(ca_t res, ulong x, const ca_t y, ca_ctx_t ctx)source
void ca_si_div(ca_t res, slong x, const ca_t y, ca_ctx_t ctx)source
void ca_div_fmpq(ca_t res, const ca_t x, const fmpq_t y, ca_ctx_t ctx)source
void ca_div_fmpz(ca_t res, const ca_t x, const fmpz_t y, ca_ctx_t ctx)source
void ca_div_ui(ca_t res, const ca_t x, ulong y, ca_ctx_t ctx)source
void ca_div_si(ca_t res, const ca_t x, slong y, ca_ctx_t ctx)source
void ca_div(ca_t res, const ca_t x, const ca_t y, ca_ctx_t ctx)source

Sets res to x / y, which is x \cdot (1/y) for numbers.

For special values and division by zero:

  • z / 0 = \tilde \infty for z \ne 0, and 0/0 is Undefined;
  • c \infty / z = (c / \operatorname{sgn}(z)) \infty for z \ne 0, and c \infty / 0 = \tilde \infty / 0 = \tilde \infty;
  • z / (c \infty) = z / \tilde \infty = 0;
  • a quotient of two infinities is Undefined;
  • Undefined divided by or into any value is Undefined; otherwise Unknown gives Unknown.

If the case cannot be decided because a zero test fails, the result is Unknown.

Guides#

Cite this page

The FLINT team, “ca_fmpq_div, ca_fmpz_div, ca_ui_div, ca_si_div, ca_div_fmpq, ca_div_fmpz, ca_div_ui, ca_div_si, ca_div (ca.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/ca/ca_fmpq_div.html (generated 2026-10-20).