PGPLOT Module: PGRND -- find the smallest `round' number greater than x


REAL FUNCTION PGRND (X, NSUB)
REAL X
INTEGER NSUB

Routine to find the smallest "round" number larger than x, a
"round" number being 1, 2 or 5 times a power of 10. If X is negative,
PGRND(X) = -PGRND(ABS(X)). eg PGRND(8.7) = 10.0,
PGRND(-0.4) = -0.5. If X is zero, the value returned is zero.
This routine is used by PGBOX for choosing tick intervals.


Returns
PGRND : the "round" number.

Arguments
X (input) : the number to be rounded.
NSUB (output) : a suitable number of subdivisions for
subdividing the "nice" number: 2 or 5.