Donald,
Try the script below. It rounds to n digits after the decimal point. n may
even be negative. Use do read %filename to load the script.
Jerry
round: func [x[integer! decimal!] n[integer!]]
[
either x >= 0
[
x: (x * (10 ** n)) + 0.5
x: x - (x // 1)
x: x * (10 ** - n)
]
[x: - round - x n]
]
- [REBOL] Round function Re:(3) bo
- [REBOL] Round function Re:(4) strejcek
- [REBOL] Round function Re:(5) rryost
- [REBOL] Round function Re:(6) strejcek
- [REBOL] Julian date mfontana
- [REBOL] Round function Re:(4) 70740 . 503
- [REBOL] Round function Re:(4) larry
- [REBOL] Round function Re:(4) ddalley
