Variables have been replaced with numbers to illustrate the issue.
var ratio = (78 - 42) / (78 - 42); // ratio=1
var center = 2.27 + ((5.15 - 2.27) * ratio) + .08; // center = 5.23
var upper_boundary = 1.39 + 3.84; // upperboundary=5.23
Actual returned values:
The center value failed a check that it was less than or equal (<=) to the upper_boundary.
To manage the rounding errors of this nature you need to implement the following code change. This example would be valid for a 2 decimal point accuracy.
(Math.round((value1 + value2)*100))/100
This first multiplies the result by 100
5.2299999999999995*100 = 522.99999999999995
Math.round rounds the target value to the closest Integer value
Math.round(522.99999999999995) = 523
Finally divide the resulting value by 100
523/100 = 5.23
To implement for 3 decimal places change 100 to 1000, or if you want no decimal places you can simply use the Math.round without the multiplication or division.
Error rendering macro 'contentbylabel' : com.atlassian.confluence.macro.params.ParameterException: 'ETS' is not an existing space's key