using "cb" causes problems with floating-point numbers
Mike Nemeth
mike at vort.uucp
Tue Dec 11 13:23:00 AEST 1990
% cat a.c
#include <stdio.h>
main() { float a; a = 10e-3; printf("a = %f\n", a); }
% cc -o a a.c
% ./a
a = 0.010000
% cb -s < a.c > b.c
% cat b.c
#include <stdio.h>
main()
{
float a;
a = 10e - 3; /* <--- !!! */
printf("a = %f\n", a);
}
% cc -o b b.c
% ./b
a = 7.000000
%
--
On the advice of council, I must respectfully decline to confirm any
of the above. Perhaps it was a glitch. Perhaps you are hallucinating.
>-> Mike Nemeth Vort Computing ...calgary!vort!mike <-<
More information about the Comp.unix.sysv386
mailing list