floating point constants
Ari Halberstadt
ari at eleazar.dartmouth.edu
Thu Jul 27 06:29:05 AEST 1989
In article <1925 at arisia.Xerox.COM> leisner at arisia.Xerox.COM (Marty Leisner) writes:
>Is this a valid C program? gcc 1.35 handles it fine on a sun386i --
>main()
>{
> printf("%f\n", 1.0/0.0);
> printf("%f\n", -1.0/0.0);
> printf("%f\n", 0.0/0.0);
>}
Why on earth would anyone want to compile that :-)?
I think it's quite legal C, but it's total giberish, since if the compiler
compiled it, it would simply result in a divide by zero, which any normal
maching would have a fit over.
-- Ari Halberstadt '91, "Long live succinct signatures"
E-mail: ari at eleazar.dartmouth.edu Telephone: (603)640-5687
Mailing address: HB1128, Dartmouth College, Hanover NH 03755
More information about the Comp.lang.c
mailing list