1PMNUMBERSTR(3)             Library Functions Manual             PMNUMBERSTR(3)
2
3
4

NAME

6       pmNumberStr - fixed width output format for numbers
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10
11       const char *pmNumberStr(double value)
12
13       cc ... -lpcp
14

DESCRIPTION

16       pmNumberStr  returns the address of a static 8-byte buffer that holds a
17       null-byte terminated representation of value suitable for  output  with
18       fixed width fields.
19
20       The  value  is  scaled  using multipliers in powers of ``one thousand''
21       (the decimal ``kilo'') and has a bias that provides  greater  precision
22       for positive numbers as opposed to negative numbers.
23
24       The  format  depends  on  the sign and magnitude of value as follows (d
25       represents a decimal digit):
26
27                    ┌──────────────────────────────────┬─────────┐
28value range            │ format  │
29                    ├──────────────────────────────────┼─────────┤
30                    │        > 999995000000000         │  inf?   
31                    │999995000000000 - 999995000000    │ ddd.ddT 
32                    │   999995000000 - 999995000       │ ddd.ddG 
33                    │      999995000 - 999995          │ ddd.ddM 
34                    │         999995 - 999.995         │ ddd.ddK 
35                    │        999.995 - 0.005           │ ddd.dd  │
36                    │          0.005 - -0.005          │   0.00  
37                    │         -0.005 - -99.95          │ -dd.dd  │
38                    │        -99.995 - -99995          │ -dd.ddK 
39                    │         -99995 - -99995000       │ -dd.ddM 
40                    │      -99995000 - -99995000000    │ -dd.ddG 
41                    │   -99995000000 - -99995000000000 │ -dd.ddT 
42                    │       < -99995000000000          │ -inf?   
43                    └──────────────────────────────────┴─────────┘
44       At the boundary points of the ranges, the chosen format will retain the
45       maximum number of significant digits.
46

SEE ALSO

48       printf(3)
49
50
51
52Performance Co-Pilot                  SGI                       PMNUMBERSTR(3)
Impressum