mirror of
https://github.com/PaddiM8/kalker.git
synced 2025-01-08 06:28:56 +01:00
gcd: return NaN when encountering non-Gaussian integer
This commit is contained in:
parent
31700634af
commit
ba553f0c38
@ -504,6 +504,8 @@ pub mod funcs {
|
|||||||
if x.has_imaginary() || y.has_imaginary() {
|
if x.has_imaginary() || y.has_imaginary() {
|
||||||
if x.imaginary_value.fract() != 0 || y.imaginary_value.fract() != 0 {
|
if x.imaginary_value.fract() != 0 || y.imaginary_value.fract() != 0 {
|
||||||
// Not a Gaussian integer!
|
// Not a Gaussian integer!
|
||||||
|
// TODO: throw an actual error instead of returning NaN
|
||||||
|
return KalkNum::from(NaNf64);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
Loading…
Reference in New Issue
Block a user