interpolate! is that table read. It takes the table, the key, and three roundings:
Rate a limit between two filed points
Save the rater asliability/rater.rsl:
Complete example: liability/rater.rsl
Complete example: liability/rater.rsl
liability/rater.rsl
liability/tables/LimitFactor.csv
liability/tables/DeductibleCredit.csv
120 × 1.3 = 156.
Declare the filed points
List the filed points as a values type inTypes:
- Use
IntValuesfor whole points andDecimalValuesfor points with decimals. - List two points or more.
- Put the interpolated key last in
dims. Each key before it reads its row aslookup!does. - Select a number column after the call, here
.factor.
State the three roundings
Between two filed pointsp1 and p2 with values v1 and v2, the read does three calculations:
E-LOOKUP-SYNTAX.
Check the limit of 365,000 by hand:
At a filed point, the read returns the value in that row as filed.
Round only the result
Some manuals round only the interpolated value. Writeexact for ratio: and step::
exact keeps the part as an exact fraction. result: always takes decimal places and a mode.
A deductible of 2,000 lies two thirds of the way from 1,000 to 2,500:
0.08 + 2/3 × (0.17 − 0.08) = 0.14. The premium is 120 × 1.3 × (1 − 0.14) = 134.16.
Keep the key inside the filed points
- The key lies between the first filed point and the last.
- The table has a row for each filed point. A missing row gets
E-LOOKUP-GAP.
limit input states the range of the filed points:
deductible input accepts 250 to 10,000, and the manual holds the end credits flat.
The read clamps its key to the first and last points:
A key outside the filed points
The raterwide/rater.rsl accepts limits up to 2,000,000 and reads the same table:
Complete example: wide/rater.rsl and its table
Complete example: wide/rater.rsl and its table
wide/rater.rsl
wide/tables/LimitFactor.csv
E-INTERP-RANGE shows the corrected rater.
Interpolate on filed points only
The raterbands/rater.rsl declares the limits as bands and interpolates on them:
Complete example: bands/rater.rsl and its table
Complete example: bands/rater.rsl and its table
bands/rater.rsl
bands/tables/LimitFactor.csv
lookup! reads it.
To interpolate, declare the points with IntValues or DecimalValues, as liability/rater.rsl does.
E-INTERP-KEY explains the message.
Related
- Use a filed rate table declares tables, CSV files and
lookup!. - Round a premium describes each rounding mode.
interpolatein the function reference gives the call’s forms.