Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!uakari.primate.wisc.edu!abcfd20.larc.nasa.gov!eagle.larc.nasa.gov!u714092 From: u714092@eagle.larc.nasa.gov (prichard devon ) Newsgroups: comp.lang.fortran Subject: rounding a real to a whole number Message-ID: Date: 1 Nov 90 16:16:29 GMT Sender: news@abcfd20.larc.nasa.gov (USENET File Owner) Organization: Lockheed Engineering & Sciences Co. Lines: 17 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. optionally, picking a 10-multiple of whole numbers ought to be included; for -1.45567 -> 3.34112 , it should return -1.4 and 3.4 ... while this seems so simple, I don't see a way to do this reasonably with Fortran intrinsics. I just can't get it to work correctly with truncations. anyone done this sort of thing listening out there? -- |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| | Devon Prichard making the world safe for helicopters ... | | u714092@eagle.larc.nasa.gov, prichard@ias.larc.nasa.gov | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||