🐐 Small fix

This commit is contained in:
Nikolaj
2026-04-13 11:45:21 +02:00
parent 675e3ecc9d
commit e0bff7cb7e
2 changed files with 2 additions and 2 deletions

View File

@@ -169,7 +169,7 @@ def frac_to_fraction(s, magnvm=False, svbnvlla=False):
def fraction_to_frac(f, magnvm=False, svbnvlla=False):
if f < 0:
if not svbnvlla:
raise CentvrionError("Cannot display negative fractions without 'SVBNVLLA' module")
raise CentvrionError("Cannot display negative numbers without 'SVBNVLLA' module")
return "-" + fraction_to_frac(-f, magnvm, svbnvlla)
integer_part = int(f)

View File

@@ -236,7 +236,7 @@ static int write_val(CentValue v, char *buf, int bufsz) {
long num = v.fval.num, den = v.fval.den;
if (den < 0) { num = -num; den = -den; }
if (num < 0)
cent_runtime_error("cannot display negative fraction without SVBNVLLA");
cent_runtime_error("cannot display negative numbers without SVBNVLLA");
long int_part = num / den;
long rem_num = num % den;