.-
help for ^doub2flt^
.-

Conversion of variable type 'double' to 'float'
------------------------------------------------

    ^doub2flt^  [varlist] [^, M^indiff(real)]


Description
------------

^doub2fit^ converts variables of type ^double^ to type ^float^ if the
absolute difference between the double and float values is less than
^Mindiff^. The default value for ^mindiff^ is 0.001. Doub2flt is
useful if a large number of variables are imported into Stata from
another database in the double format and the double precision is not
needed. Under this circumstance a large amount of memory or disk space
may be wasted. ^doub2flt^ allows this space/memory to be recovered.

^doub2fit^ requires the modified ^recast^ program called ^recast2^.

Options
--------

^mindiff(^real #^)^ specifies the difference between the float and double
variables that cannot be exceeded. Only if the difference is less than this
value will the conversion will take place. 0.001 is the default value for
^mindiff^.


Examples
---------


. gen double minus = -3.33

. gen double plus = 3.33

. gen double bignum =  1234567890

. describe

Contains data
   obs:             4
  vars:             3
  size:           112 (100.0% of memory free)
--------------------------------------------------------------------------------
    1. minus     double %10.0g
    2. plus      double %10.0g
    3. bignum    double %10.0g
--------------------------------------------------------------------------------
Sorted by:
      Note:  dataset has changed since last saved

. l

           minus        plus      bignum
   1.      -3.33        3.33   1.235e+09
   2.      -3.33        3.33   1.235e+09
   3.      -3.33        3.33   1.235e+09
   4.      -3.33        3.33   1.235e+09

. ^doub2flt^

Conversion of type double to type float

2 of 3 double variable(s) converted to float

. describe

Contains data
   obs:             4
  vars:             3
  size:            80 (100.0% of memory free)
--------------------------------------------------
    1. bignum    double %10.0g
    2. minus     float  %9.0g
    3. plus      float  %9.0g
--------------------------------------------------
Sorted by:
      Note:  dataset has changed since last saved

. l

          bignum      minus       plus
   1.  1.235e+09      -3.33       3.33
   2.  1.235e+09      -3.33       3.33
   3.  1.235e+09      -3.33       3.33
   4.  1.235e+09      -3.33       3.33

^doub2fit minus^
^doub2fit minus, M(.125)^


Author
--------

       Fred Wolfe
       National Data Bank for Rheumatic Diseases
       fwolfe@southwind.net


Also see
---------

      Recast, Recast2
      
