round(x, places, mode). RSL keeps every value exact until a
round changes it. So the premium rounds exactly where the filing says, and only there.
Round to cents or dollars
round takes three parts: the value, the number of decimal places, and the mode.
2rounds to cents,0to whole dollars, and-1to tens of dollars.- The mode is required. Write the mode the filing states.
- A value already on the target, such as 2.10 rounded to cents, stays the same in every mode.
Choose the mode
This rater rounds one amount to cents in each mode:
relativities-examples/rsl/round-modes:
Round the premium and cite the rule
Each premium the rater returns passes through around. A premium with a step after its last
round fails the check:
=, as the first example on this page does.
Round after each factor
Some filings multiply a chain of factors and round after each one. Write aproduct with by,
to fix the order, and round_each:
order, multiplies them in turn, and rounds to 4 places after each
step. Two factors of 1.00005 give 1.0002. One round at the end gives 1.0001. The sample download includes
this rater in relativities-examples/rsl/round-stepwise:
bynames a number or date input of each element.- Each
ordervalue appears once. The rater refuses a repeat withINPUT-KEYon akeyed bylist, and withINPUT-UNIQUEon other lists. round_eachworks withsumandproduct.
Related
- Exact numbers explains why values stay exact until a
round. - Citations lists each value that needs a citation.