gcd: return NaN when encountering non-Gaussian integer

This commit is contained in:
Kiëd Llaentenn 2021-10-03 23:33:48 +00:00 committed by PaddiM8
parent 31700634af
commit ba553f0c38

View File

@ -504,6 +504,8 @@ pub mod funcs {
if x.has_imaginary() || y.has_imaginary() {
if x.imaginary_value.fract() != 0 || y.imaginary_value.fract() != 0 {
// Not a Gaussian integer!
// TODO: throw an actual error instead of returning NaN
return KalkNum::from(NaNf64);
}
// TODO