SymPy floor and ceiling for complex values

27 views
Skip to first unread message

Aaron Meurer

unread,
Jun 7, 2016, 3:10:53 PM6/7/16
to sy...@googlegroups.com
I noticed that floor() and ceiling() evaluate on complex values, like

In [13]: ceiling(1.5*I + 1.5)
Out[13]: 2 + 2⋅ⅈ

In [14]: floor(1.5*I + 1.5)
Out[14]: 1 + ⅈ

In other words, the usual floor and ceiling are applied to the real
and imaginary parts separately.

I'm curious if anyone knows why this particular generalization was used.

Aaron Meurer
Reply all
Reply to author
Forward
0 new messages