Skip to content

Commit

Permalink
FlattenMapper: mod 1 is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Nov 7, 2024
1 parent fd9d07d commit 01b3233
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pymbolic/mapper/flattener.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ def map_remainder(self, expr: p.Remainder) -> ExpressionT:
if p.is_zero(r_num):
return 0
if p.is_zero(r_den - 1):
return r_num
# mod 1 is zero
return 0

return expr.__class__(r_num, r_den)

Expand Down

0 comments on commit 01b3233

Please sign in to comment.