Previous: utrpsz Up: ../plot79_u.html Next: utrrni
SUBROUTINE UTRRD (VNEW,NDEC,NPOW10,V,MAXDEC)
C$ (Round)
C$ For axis labelling, it is necessary to determine how many
C$ decimal places are required for "nice" numbers. Because of
C$ the use of internal binary representations of external
C$ decimal numbers, it is a non-trivial exercise to do this,
C$ so this routine is provided. Its arguments are:
C$
C$ VNEW........Output rounded and scaled value of V in range
C$ 1.0 .LE. V .LT. 10.0
C$ NDEC........Output number of decimal places required to
C$ print VNEW (use at least an F(NDEC+3).NDEC
C$ FORMAT).
C$ NPOW10......Output power of 10 which must be multiplied by
C$ VNEW to obtain the original size of V.
C$ V...........Input number to be rounded. On output, the
C$ rounded V can be obtained from VNEW*10**NPOW10.
C$ The same results will be obtained for +V and
C$ -V, and the sign of VNEW is the same as that of
C$ V.
C$ MAXDEC......Input maximum number of decimal places
C$ permitted in VNEW. If too large, the largest
C$ possible value will be determined and used
C$ internally.
C$
C$ Lewart's ACM Algorithm 463 in routines UTRS1 and UTRS2
C$ should normally be used to ensure that reasonable axis
C$ extents and increments are chosen.
C$ (29-SEP-88)