This function came up as a programming solution for (very roughly) extrapolating CPU usage of virtual machines. p is the Percent CPU utilization reported by the host (0 < p <= 100), r is the Reserved virtual cores of running guests (0 < r), and d is the Demanded virtual cores of running and non-running guests (0 < r <= d).
Before committing this to code, I wanted to know if d should exclude running guests or not, so I thought I'd want to see how either form of d interacts with the other two variables. I barely passed calculus I, and that was 17 years ago, but this felt like the same beast as the two-variable optimization problems I remember doing, just with 3 variables.
I couldn't figure out how to do it analytically; ultimately, I used a three-nested for-loop to generate close to 600k rows of Cartesian products within the ranges I expect to see in production, loaded that into a spreadsheet, and analyzed it visually. That let me determine that d should include all guests' cores, so problem solved, I guess.
How could this have been done analytically, though? (Is that even an intelligent question??)