home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / database / 7803 < prev    next >
Encoding:
Text File  |  1992-11-12  |  1003 b   |  29 lines

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