  help with C floating syntax 
 The Question is:
 
Floating-point in DEC C(V5.0) &amp; Pascal(V5.6-59)
Following code will not produce the result as I expected:
 
float vl_float;
double vl_double;
 
vl_float = 100.09;
vl_double = 1.0009D2;
 
if (vl_float &lt; 100.09) printf("vl_float by assignment is
less than 100.09\n");
 
if (vl_double &lt; 1.0009D2) printf("vl_double by assignment
is less than 1.0009D2\n");
 
Run this program on OpenVMS6.1/AXP and the comparison
result will not be the equal, e.g. vl_float != 100.09
and vl_double != 1.0009D2.
 
This is a very basic problem. Can anybody there explain?
Please reply ASAP. Thanks in advance.
 
Rgds,
HD Wang
 
 
 The Answer is:
 
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
main()
  {
  float vl_float;
  double vl_double;
 
  vl_float = 100.09;
  vl_double = 1.0009e2;
 
  if (vl_float &lt; (float) 100.09)
    printf("vl_float by assignment is less than 100.09\n");
 
  if (vl_double &lt; (double) 1.0009e2)
    printf("vl_double by assignment is less than 1.0009D2\n");
 
  return 1;
  }
