I'm concerned that this case in the code is going to require a bunch of extra logic. Is there some way we can design this which separates the logic of performing mathematical operations from the logic of what the semantics of those mathematical operations are?