Skip to content

Missing fmpz_tdiv_r, fmpz_cdiv_r #2420

@mozhewen

Description

@mozhewen

Is your feature request related to a problem? Please describe.
fmpz_tdiv_r is useful in the implementation of the % operator in some languages for a wrapping type of fmpz.
fmpz_cdiv_r may be useful in some other cases.

GMP does implement the corresponding mpz_tdiv_r and mpz_cdiv_r functions.

Describe the solution you'd like
Add these functions.

Describe alternatives you've considered
I can also use fmpz_tdiv_qr or fmpz_cdiv_qr and ignore the quotient, or make a conditional subtraction after mpz_fdiv_r. I'm not sure if these are suboptimal compared with directly calling mpz_t(c)div_r.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions