Is there a rounding function

Is there a rounding function

Is there access to a rounding function in deluge script? When I designed the form, I mixed number, decimal, and currency fields. Now when I do the calculations on the input data, and send the result to the currency field, It occasionally adds too many decimal places and therefore errors on submit.