Skip to content

Commit 4ed9fc6

Browse files
committed
Use unsigned longs for precision
1 parent fda9635 commit 4ed9fc6

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

M2/Macaulay2/d/interface.dd

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,19 @@ export rawRandomQQ(e:Expr):Expr := (
7171
setupfun("rawRandomQQ",rawRandomQQ);
7272
export rawRandomRRUniform(e:Expr):Expr := (
7373
when e
74-
is prec:ZZcell do if !isULong(prec.v) then WrongArgSmallInteger()
74+
is prec:ZZcell do if !isULong(prec.v) then WrongArgSmallUInteger()
7575
else toExpr(Ccode(RR, "rawRandomRRUniform(", toULong(prec.v), ")"))
7676
else WrongArgZZ());
7777
setupfun("rawRandomRRUniform",rawRandomRRUniform);
7878
export rawRandomRRNormal(e:Expr):Expr := (
7979
when e
80-
is prec:ZZcell do if !isULong(prec.v) then WrongArgSmallInteger()
80+
is prec:ZZcell do if !isULong(prec.v) then WrongArgSmallUInteger()
8181
else toExpr(Ccode(RR, "rawRandomRRNormal(", toULong(prec.v), ")"))
8282
else WrongArgZZ());
8383
setupfun("rawRandomRRNormal",rawRandomRRNormal);
8484
export rawRandomCC(e:Expr):Expr := (
8585
when e
86-
is prec:ZZcell do if !isULong(prec.v) then WrongArgSmallInteger()
86+
is prec:ZZcell do if !isULong(prec.v) then WrongArgSmallUInteger()
8787
else toExpr(Ccode(CC, "rawRandomCC(", toULong(prec.v), ")"))
8888
else WrongArgZZ());
8989
setupfun("rawRandomCC",rawRandomCC);
@@ -480,20 +480,20 @@ export rawConwayPolynomial(e:Expr):Expr := (
480480
setupfun("rawConwayPolynomial",rawConwayPolynomial);
481481

482482
export rawRRi(e:Expr):Expr := (
483-
when e is prec:ZZcell do if !isInt(prec) then WrongArgSmallInteger(1)
484-
else toExpr(Ccode(RawRingOrNull, "IM2_Ring_RRi(",toInt(prec),")" ))
483+
when e is prec:ZZcell do if !isULong(prec) then WrongArgSmallUInteger(1)
484+
else toExpr(Ccode(RawRingOrNull, "IM2_Ring_RRi(",toULong(prec),")" ))
485485
else WrongArgZZ(1));
486486
setupfun("rawRRi",rawRRi);
487487

488488
export rawRR(e:Expr):Expr := (
489-
when e is prec:ZZcell do if !isInt(prec) then WrongArgSmallInteger(1)
490-
else toExpr(Ccode(RawRingOrNull, "IM2_Ring_RRR(",toInt(prec),")" ))
489+
when e is prec:ZZcell do if !isULong(prec) then WrongArgSmallUInteger(1)
490+
else toExpr(Ccode(RawRingOrNull, "IM2_Ring_RRR(",toULong(prec),")" ))
491491
else WrongArgZZ(1));
492492
setupfun("rawRR",rawRR);
493493

494494
export rawCC(e:Expr):Expr := (
495-
when e is prec:ZZcell do if !isInt(prec) then WrongArgSmallInteger(1)
496-
else toExpr(Ccode(RawRingOrNull, "IM2_Ring_CCC(",toInt(prec),")" ))
495+
when e is prec:ZZcell do if !isULong(prec) then WrongArgSmallUInteger(1)
496+
else toExpr(Ccode(RawRingOrNull, "IM2_Ring_CCC(",toULong(prec),")" ))
497497
else WrongArgZZ(1));
498498
setupfun("rawCC",rawCC);
499499

0 commit comments

Comments
 (0)