# Difference between revisions of "Advanced Ratings: Rounding Values"

(→See Also:) |
|||

Line 17: | Line 17: | ||

− | [[Introduction to Rates in SchemeServe]] | + | #[[Introduction to Rates in SchemeServe]] |

− | + | #[[Uploading SchemeServe Rating Files]] | |

− | [[Uploading SchemeServe Rating Files]] | + | #[[Downloading SchemeServe Rating Files]] |

− | + | #[[Flat Rating: Building Your First SchemeServe Rating File]] | |

− | [[Downloading SchemeServe Rating Files]] | + | #[[Rating Modifiers: What they are and when to use them]] |

− | + | #[[Multi-Step Ratings: Using Multiple Sections in Rating Files]] | |

− | [[Flat Rating: Building Your First SchemeServe Rating File]] | + | #[[Advanced Ratings: Using Formulae]] |

− | + | #[[Advanced Ratings: Conditional Statements and Functions]] | |

− | [[Rating Modifiers: What they are and when to use them]] | + | #[[Advanced Ratings: Rounding Values]] |

− | + | #[[Master Rating: Using Tables and Row Lookup Loops]] | |

− | [[Multi-Step Ratings: Using Multiple Sections in Rating Files]] | + | #[[Example Ratings for Specific Insurance Types (Life and Public Liability)]] |

− | + | #[[Conditions for Rating Files]] | |

− | [[Advanced Ratings: Using Formulae]] | + | #[[Actions for Rating Files]] |

− | + | #[[Mathematical Helper Functions for Ratings Files]] | |

− | [[Advanced Ratings: Conditional Statements and Functions]] | + | #[[Rating Agents: Tips and Tricks]] |

− | |||

− | [[Master Rating: Using Tables and Row Lookup Loops]] | ||

− | |||

− | [[Example Ratings for Specific Insurance Types (Life and Public Liability)]] | ||

− | |||

− | [[Conditions for Rating Files]] | ||

− | |||

− | [[Actions for Rating Files]] | ||

− | |||

− | [[Mathematical Helper Functions for Ratings Files]] | ||

− | |||

− | [[Rating Agents: Tips and Tricks]] |

## Revision as of 01:50, 4 December 2012

There are a number of ways of rounding results in SchemeServe, the recommended methods are to use the **CEILING** function which rounds up and the **FLOOR** function which rounds down.

It's important to define where the decimal point lands for accurate rounding.

E.g. 101 round up to 200 = **CEILING**(101/100.0) * 100 = **CEILING**(1.01) * 100

You can also use the expression **Math.Round(number)**. However it is important to understand that the default behaviour of this expression in SchemeServe is to round to the *nearest even number*. That means 1.5 and 2.5 both round to two. The reason for this is that because most numbers tend to be positive rounding away from zero (the standard form of rounding) is statistically less acccurate than rounding to an even number.

If you wish *to round away from zero* you must use this expression: **Math.Round(Number, MidpointRounding.AwayFromZero**)

If you are looking for financially accurate rounding the correct way to handle the operation is to mutiply the number, truncate it and then divide it back again. (i.e. for 2 decimal places n = int(v * 100 +.5) / 100).

It's important to fully understand all the options for rounding before calculating ratings for use in SchemeServe otherwise the answers to your expressions may not be as you would assume.

## See Also:

- Introduction to Rates in SchemeServe
- Uploading SchemeServe Rating Files
- Downloading SchemeServe Rating Files
- Flat Rating: Building Your First SchemeServe Rating File
- Rating Modifiers: What they are and when to use them
- Multi-Step Ratings: Using Multiple Sections in Rating Files
- Advanced Ratings: Using Formulae
- Advanced Ratings: Conditional Statements and Functions
- Advanced Ratings: Rounding Values
- Master Rating: Using Tables and Row Lookup Loops
- Example Ratings for Specific Insurance Types (Life and Public Liability)
- Conditions for Rating Files
- Actions for Rating Files
- Mathematical Helper Functions for Ratings Files
- Rating Agents: Tips and Tricks