Debian Codegraph @

packages/seacas/libraries/suplib/iengrx.f

raw
1 C Copyright(C) 1999-2020 National Technology & Engineering Solutions
2 C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 C NTESS, the U.S. Government retains certain rights in this software.
4 C
5 C See packages/seacas/LICENSE for details
6
7 C=======================================================================
8 INTEGER FUNCTION IENGRX (IMAXE, IMINE)
9 C=======================================================================
10
11 C --*** IENGX *** (STRLIB) Internal to NUMSTR
12 C -- Written by Amy Gilkey - revised 02/14/86
13 C --
14 C --IENGRX returns the "best" engineering notation exponent for a
15 C --minimum and maximum exponent.
16 C --
17 C --Parameters:
18 C -- IMAXE - IN - the maximum exponent
19 C -- IMINE - IN - the minimum exponent
20
21 INTEGER IMAXE, IMINE
22
23 IF (IMAXE .GT. 0) THEN
24 IENGRX = INT ((IMAXE - 1) / 3) * 3
25 ELSE
26 IENGRX = INT ((IMAXE - 2) / 3) * 3
27 END IF
28
29 RETURN
30 END