# RANGE in Empower formula

I have a custom field with the formula RANGE(ROUND(Amount,0),CConst1,CConst2) and my current spec states the range is 90-100 (integers) but if I put 90 in CConst1, it doesn't include this value because Range excludes the first value (X+1,Y). I tried to account for this by editing the formula to RANGE(ROUND(Amount,0),CConst1-1,CConst2) but strangely when I tested this formula it didn't work. I got an Amount value of 98.769 which when rounded to zero decimal places rounds to 99 so I put 100 into CConst1 and it should have included 99 because 100-1 is 99 but my value came to Fail instead of Pass. Am I missing something here about the formula or does Empower not work when you subtract 1 from CConst?

0

## Answers

The RANGE custom field expects RANGE(Parameter, Lower_Boundary, Upper_Boundary). As far as I am aware the Parameter is allowed to be mathematical in nature and a nested function (e.g. ROUND(Amount,0)). However, the boundary conditions must be a number.

When I have setup range calculations I've always used one decimal more than required (e.g. 89.9) and rounded that reportable parameter to the correct number of sig figs via the report.

That is a complicated question with a complicated answer.

The core subject won't be relevant to you, but this part is:

Microsoft defined double-precision floating-point numbers as 15 digits. Oracle defines stroed double-precision numbers as being rounded from the 17th digit.So there is your under the hood answer. Clearly you can always change this be fixing the precision in your custom fields / reports.

Hmmmm... can seem to attach a PDF, so how about:

https://us.v-cdn.net/6030142/uploads/editor/h7/1jtczwrch0zt.pdf

I think you will find the attached helpful.

I think you will find this link helpful.

https://us.v-cdn.net/6030142/uploads/editor/h7/1jtczwrch0zt.pdf

Microsoft defines double-precision floating point numbers as 15 digits. Oracle defines stored double-precision numbers as being rounded from the 17th digit.