Skip to content

Why use floor divide in shape_div? #1770

Answered by ccecka
XieXiating asked this question in Q&A
Discussion options

You must be logged in to vote

After a cup of coffee on an actual workday, I realize that this particular composition case should fail and the current behavior is correct. One post-condition of composition is that the result is compatible with the rhs input, so composition can never perform any rounding at all. Because there is no possible output that satisfies all of the post-conditions of composition, it should fail on these inputs (perhaps with better runtime assertions, of course).

There is a related set of known artificial limitations around composition and logical_divide that can be loosened, but this problem is not an example of them.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@XieXiating
Comment options

@ccecka
Comment options

Answer selected by XieXiating
@XieXiating
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants