Re: Rounding numbers
- To: mathgroup at smc.vnet.net
- Subject: [mg37037] Re: [mg37002] Rounding numbers
- From: BobHanlon at aol.com
- Date: Mon, 7 Oct 2002 05:24:12 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 10/6/2002 7:39:38 AM, delouis at bellsouth.net writes: >Could somebody please inform me how to Round numbers to a >certain Accuracy using Mathematica 4.2. This is not as easy as it >sounds. >Every function that I have read Rounds the Display, and not the actual >number. myRound[x_, n_] := Round[10^n*x]/10.^n; Table[myRound[Random[], 3], {10}] {0.044, 0.019, 0.738, 0.298, 0.917, 0.171, 0.021, 0.314, 0.658, 0.153} Bob Hanlon