Skip to content

Commit

Permalink
Fix modulo, add power
Browse files Browse the repository at this point in the history
  • Loading branch information
linusheck committed Sep 24, 2023
1 parent c6eb165 commit 4942ce4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion probably/prism/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ def expression_prism(expr: Expr) -> str:
elif expr.operator == Binop.TIMES:
return f"({lhs}) * ({rhs})"
elif expr.operator == Binop.MODULO:
return f"({lhs}) * ({rhs})"
return f"mod({lhs}, {rhs})"
elif expr.operator == Binop.POWER:
return f"pow({lhs}, {rhs})"
raise PrismTranslatorException("Operator not implemented:", expr)
elif isinstance(expr, SubstExpr):
raise PrismTranslatorException(
Expand Down

0 comments on commit 4942ce4

Please sign in to comment.