FNUM(1)



NAME

     fnum - print a number in one or more formats


SYNOPSIS

     fnum number format1 [format2...]


DESCRIPTION

     The number can be an integer or a floating point number with
     or without an exponential.

     The formatting strings format1 etc.  follow the  conventions
     of  the  format  argument  in  ANSI C's printf command.  The
     number can be printed in more than one format, with adjacent
     output strings separated by a single space.


OPTIONS


EXAMPLES

     The following command lines produce the  corresponding  out-
     puts:

          command                         output
          fnum 1.23 %.3f                  1.230
          fnum 1.23 %6.1f                    1.2
          fnum -123 %d %.7d               -123 -0000123
          fnum 123 "set%04d.data"         set0123.data
          fnum 123e-5 %012f Hello         00000.001230 Hello
          fnum 123e-10 %e                 1.230000e-08
          fnum 1234e999 %e                inf
          fnum 123 %d %08o %08x           123 00000173 0000007b
          fnum 123.4999 %d %08x           123 42f6fff3
          fnum  -1  %.0f  "=  %u  unsigned"     -1  =  4294967295
     unsigned
          fnum -1.2375e12 %10.5s               -1.23




FILES

     none



SEE ALSO

     printf


DIAGNOSTICS


BUGS

     Hexadecimal and octal  formats  of  floating  point  numbers
     force the number to be interpreted as single-precision.

     There is no reasonable interpretation for %c character  for-
     mats



HISTORY

     SOI Version 0.8 1994-02-08 : output format must  match  type
     inferred  from  number  (depending on presence or absence of
     decimal point and/or exponential)

     SOI Version 4.2 1998-11-25 : made output usually  consistent
     with  requested  format  regardless of inferred number type;
     extended number of supported formats