You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If one desires to set arb_t variable to be an integer, a precision is not required to do so. On the other hand, in order for a user to set an arb_t variable to be rational, one must specify a precision.
Would it be better to allow rational numbers to be stored exactly?
The text was updated successfully, but these errors were encountered:
This only works for integers because integers are a subset of floating-point numbers. Doing it with rationals would require a union type. I'm not sure if this would be worth the effort to implement at the moment, considering that there are workarounds.
Where it's beneficial to preserve exact rationals, I've generally just made two versions of a function: one that takes an fmpq_t argument and one that takes an arb_t.
In some other places, I've allowed the input p / q to be passed as two separate arb_t variables, doing arithmetic with numerators and denominators separated.
If one desires to set arb_t variable to be an integer, a precision is not required to do so. On the other hand, in order for a user to set an arb_t variable to be rational, one must specify a precision.
Would it be better to allow rational numbers to be stored exactly?
The text was updated successfully, but these errors were encountered: