{{ !articles[0].partner.isSponsoringArticle ? "Platinum" : "Portal" }} Partner
architects,bigdata,theory,tips and tricks,tools & methods

Mutually Odd Functions

The floor of a real number x is the largest integer n ≤ x, written ⌊x⌋.

The ceiling of a real number x is the smallest integer n ≥ x, written ⌈x⌉.

The floor and ceiling have the following symmetric relationship:

⌊-x⌋ = -⌈x
⌈-x⌉ = -⌊x

The floor and ceiling functions are not odd, but as a pair they satisfy a generalized parity condition:

f(-x) = -g(x)
g(-x) = -f(x)

If the functions f and g are equal, then each is an odd function. But in general f and g could be different, as with floor and ceiling.

Is there an established name for this sort of relation? I thought of “mutually odd” because it reminds me of mutual recursion.

Can you think of other examples of mutually odd functions?

Published at DZone with permission of {{ articles[0].authors[0].realName }}, DZone MVB. (source)

Opinions expressed by DZone contributors are their own.

{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks