%wg - Display Real

%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

0.0126

0.0126

 

%10wg

1.26e-4

ÑÑ0.000126

exponent is -4

%.3wg

126.7

126.7

exponent is less than the precision

%9.2wg

1.267e-5

Ñ1.27e-05

exponent is less than -4

%7.2wg

100.0

ÑÑ1e+02

exponent is equal to the precision

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited