#

##
22.3.3.3 Tilde G: General Floating-Point

The next *arg* is printed as a *float* in either fixed-format or exponential notation as appropriate.

The full form is `~`*w*`,`*d*`,`*e*`,`*k*`,`*overflowchar*`,`*padchar*`,`*exponentchar*`G`. The format in which to print *arg* depends on the magnitude (absolute value) of the *arg*. Let *n* be an integer such that 10^*n*-1 <= |*arg*| < 10^*n*. Let *ee* equal *e*+2, or 4 if *e* is omitted. Let *ww* equal *w*-*ee*, or **nil** if *w* is omitted. If *d* is omitted, first let *q* be the number of digits needed to print *arg* with no loss of information and without leading or trailing zeros; then let *d* equal `(max `*q*` (min `*n*` 7))`. Let *dd* equal *d*-*n*.

If 0 <= *dd* <= *d*, then *arg* is printed as if by the format directives

`~`*ww*`,`*dd*`,,`*overflowchar*`,`*padchar*`F~`*ee*`@T`

Note that the scale factor *k* is not passed to the `~F` directive. For all other values of *dd*, *arg* is printed as if by the format directive

`~`*w*`,`*d*`,`*e*`,`*k*`,`*overflowchar*`,`*padchar*`,`*exponentchar*`E`

In either case, an `@` modifier is supplied to the `~F` or `~E` directive if and only if one was supplied to the `~G` directive.

`~G` binds ***print-escape*** to *false* and ***print-readably*** to *false*.

The following X3J13 cleanup issues, *not part of the specification*, apply to this section:

*Copyright 1996, The Harlequin Group Limited. All Rights Reserved.*