Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.fortran Subject: Re: rounding a real to a whole number Summary: check a statistics book Message-ID: <4190@goanna.cs.rmit.oz.au> Date: 2 Nov 90 08:42:35 GMT References: Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 21 In article , u714092@eagle.larc.nasa.gov (prichard devon ) writes: > what I want to do is to have a subroutine which, given a range of real > numbers, for example -123.445 -> 1033.02 , and choose whole numbers > outside that range. obviously the first application is axis values for > x-y plots. Have you tried the ACM algorithms collection? I'm sure there's something there. Look through old issues of Computer Journal. There's a sampling of algorithms from the journal Applied Statistics has been published as a book. Most of my library is in another city, but there's a subroutine for finding "nice numbers" in Applications, Basics, and Computing of Exploratory Data Analysis; Velleman & Hoaglin Duxbury Press The subroutine NPOSW on page 316 is good for picking axis intervals. Many books providing statistical algorithms will offer something similar. -- The problem about real life is that moving one's knight to QB3 may always be replied to with a lob across the net. --Alasdair Macintyre.