|
|
@ -42,7 +42,7 @@ func ParseFraction(f string) (Fraction, error) { |
|
|
|
return Fraction{}, errors.New("denominator can't be 0") |
|
|
|
} |
|
|
|
if numerator > math.MaxInt64 || denominator > math.MaxInt64 { |
|
|
|
return Fraction{}, fmt.Errorf("value overflow, numerator and denominator must be less than %d", math.MaxInt64) |
|
|
|
return Fraction{}, fmt.Errorf("value overflow, numerator and denominator must be less than %d", int64(math.MaxInt64)) |
|
|
|
} |
|
|
|
return Fraction{Numerator: numerator, Denominator: denominator}, nil |
|
|
|
} |