Skip to content

Commit

Permalink
Fix modulo, add power and divide
Browse files Browse the repository at this point in the history
  • Loading branch information
linusheck committed Sep 24, 2023
1 parent c6eb165 commit dacae69
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion probably/prism/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ 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})"
elif expr.operator == Binop.DIVIDE:
return f"pow({lhs}, {rhs})"
raise PrismTranslatorException("Operator not implemented:", expr)
elif isinstance(expr, SubstExpr):
raise PrismTranslatorException(
Expand Down

0 comments on commit dacae69

Please sign in to comment.