osd7@homxa.UUCP (Orlando Sotomayor-Diaz) (01/05/85)
ANSI Draft of Proposed C Language Std. Mail your replies to the author(s) below or to cbosgd!std-c. Cbosgd is reachable via most of the USENET nodes, including ihnp4, ucbvax, decvax, hou3c.... Administrivia should be mailed to cbosgd!std-c-request. ARPA -> mail to cbosgd!std-c@BERKELEY.ARPA (NOT INFO-C) **************** mod.std.c Vol. 2 No. 1 1/4/85 ******************** Today's Topics: Scientific notation (2) Union initialization (1) ---------------------------------------------------------------------- Date: Tue, 18 Dec 84 06:40:07 est From: Robert Scott Lenoil <cbosgd!ihnp4!mit-eddie!lenoil> To: ihnp4!seismo!elsie!ado Subject: scientific notation > * In section B.3.4.1 (page 10) appears: > > * maximum exponent power of ten that floating point can > represent 38 > > On our 4.1bsd system, the program: > main() { printf("%f\n", 10.0e37);printf("%f\n", 10.0e38); } > produces this output: > 100000000000000000000000000000000000000.000000 > 170141183460469230000000000000000000000.000000 > which means (to me) that 37 is the maximum "power of ten" that floating > point can represent. Either I or the description can stand being made > clearer. You could stand to be made clearer. 10.0e38 means 10.0 x 10^38, i.e. 10^39. If you used 1.0e38 your program would have worked. ---------------------------------------------------------------------- Date: Tue, 18 Dec 84 08:44:26 EST From: cbosgd!seismo!elsie!ado To: mit-eddie!lenoil Subject: Re: scientific notation Thanks for the correction. Mea culpa. --ado ---------------------------------------------------------------------- Date: Fri 4 Jan 85 10:22:02-PST From: Joseph I. Pallas <cbosgd!ucbvax!PALLAS@SU-SCORE.ARPA> Subject: Standard for union initialization? Perhaps I'm out of touch.... An article I read about the draft standard said the standard would allow initialization of unions, but the first union field would be the type used for the initialization. Instead of insisting on union { <type1> foo; <type2> bar; <type3> mumble; } baz = <type1 initializer>; why not use a more general scheme like union { <type1> foo; <type2> bar; <type3> mumble; } baz.mumble = <type3 initializer>; Since no existing compiler that I know of lets you initialize unions at all currently, there's nothing to be lost by going with the more flexible system. joe -------------------------------------- End of Vol. 2, No. 1. Std-C (Jan. 4, 1985 21:40:00) -- Orlando Sotomayor-Diaz/AT&T Bell Laboratories/201-870-7249 /Crawfords Crnr. Rd., Holmdel WB 3D109, NJ, 07733 UUCP: {ihnp4, houxm, akgua, mhuxd, ...}!homxa!osd7