%wg is used for floating point values and has essentially the same effect as %wf (Display Real) unless the supplied value cannot adequately be represented in %wf form; in which case %wg has the same effect as %we (Display Real). To be specific, the %we form is only used if the exponent is less than -4 or greater than or equal the precision value. Note, however, that with %wg, trailing zeros after a decimal point are removed. Where appropriate, the decimal point is also removed.
format |
value |
output |
comment |
%wg |
|
|
|
%10wg |
|
ÑÑ |
exponent is -4 |
%.3wg |
|
|
exponent is less than the precision |
%9.2wg |
|
Ñ |
exponent is less than -4 |
%7.2wg |
|
ÑÑ |
exponent is equal to the precision |