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
Problem:
A BadPeriodError is raised (or the corresponding tuple returned) when the period is 0, but not when the period is negative or even a floating-point number.
When porting to C, this could lead to unwanted behavior when typecasting floats to integers. However, I'm not sure how the GMP library handles this case.
It should be resolved nevertheless; from a user's perspective this is unwanted behavior.
Solution:
Periods should come in the form of a non-zero unsigned integer. Anything else should raise a BadPeriodError, or return {:error, :bad_period}.
The text was updated successfully, but these errors were encountered:
Problem:
A
BadPeriodError
is raised (or the corresponding tuple returned) when the period is 0, but not when the period is negative or even a floating-point number.When porting to C, this could lead to unwanted behavior when typecasting floats to integers. However, I'm not sure how the GMP library handles this case.
It should be resolved nevertheless; from a user's perspective this is unwanted behavior.
Solution:
Periods should come in the form of a non-zero unsigned integer. Anything else should raise a
BadPeriodError
, or return{:error, :bad_period}
.The text was updated successfully, but these errors were encountered: