Round-to-Dollars and Cents

Not Reviewed
Equation / Last modified by AndrewS on 2016/11/07 17:44
`"nnn.nn" = `
Rating
ID
MichaelBartmess.Round-to-Dollars and Cents
UUID
25373d50-63c6-11e4-a9fb-bc764e2038f2

The Round-to-Dollars and Cents rounds an input number to two decimal places, rounding up at 5 in the third place and it treats negative numbers as absolute values in rounding.

Examples:

Round-to-Dollars and Cents(2.4445) = 2.44

Round-to-Dollars and Cents(2.5153) = 2.52

Round-to-Dollars and Cents(2.515) = 2.52

Round-to-Dollars and Cents(3.499999999999999) = 3.50

Round-to-Dollars and Cents(-3.57777) = -3.58