I'm working on a computer software application, dealing with very large quantities of numeric data, and I'd prefer to remove the domain conditions from this graph to help boost performance.
Right now I'm looking at slope functions, with a ceiling set for y.
y = x / 4 for x <= 16
y = 16 / 4 for x > 16
I've noticed that there are other relatively simple functions that naturally enforce a ceiling for y, without any domains.
y = 4 - sqrt( 16 - ( x^2 / 16 ) )
What is going on here that gives y a ceiling?
In general, what are some simple ways to enforce a ceiling, or potentially a floor?
I understand that computing the domain condition might be the best-performing option in many cases, but this can also be dependent on the complexity of the input for x, as well as dependent on the number of domains needed, etc.
Therefore we'd like to keep on hand some simple alternatives to domains, that we can test on a case-by-case basis to see which calculations perform best in different contexts.