home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases
- Path: sparky!uunet!comp.vuw.ac.nz!cc-server4.massey.ac.nz!pnv.palm.cri.nz!cfpdea
- From: news@massey.ac.nz (USENET News System)
- Subject: Significant digits & rounding
- Message-ID: <cfpdea.14@pnv.palm.cri.nz>
- Organization: DSIR, Palmerston North, New Zealand
- Date: Fri, 13 Nov 92 01:46:51 GMT
- Lines: 19
-
- This post is primarily for those who understand ARev. This is because ARev
- allows naughty manipulations of numbers such as treating them as strings.
-
- I need to take a value and set it to some number of significant digits.
-
- e.g. 123450 -> 120000 for 2 sigdig
- 0.0230 -> 0.023 "
-
- Has something done or know of an algorithm for performing this type of
- function? I could probably nut it out eventually, but would appreciate it if
- someone else has done all the hard work!
-
- I have already got a general rounding function in plcae, but again, if
- someone knows a nice little alorithm for rounding, then I'd love to know
- it...
-
- Thanks in advance
-
- David Apimerika
-