From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bcdd81f11a99e024 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn14feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail From: Dave Thompson Newsgroups: comp.lang.ada Subject: Re: C to JVM, time to revive JGNAT? Message-ID: References: <20060809124902.O84175@docenti.ing.unipi.it> <1155178411.944408.186560@i3g2000cwc.googlegroups.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 21 Aug 2006 06:04:53 GMT NNTP-Posting-Host: 12.76.14.81 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1156140293 12.76.14.81 (Mon, 21 Aug 2006 06:04:53 GMT) NNTP-Posting-Date: Mon, 21 Aug 2006 06:04:53 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:6286 Date: 2006-08-21T06:04:53+00:00 List-Id: On 9 Aug 2006 19:53:32 -0700, napi@axiomsol.com wrote: > Hi: > > Colin Paul Gloster wrote: > > AMPC covers a very large subset of ANSI C (1989). A notable difference is > > that "double" in AMPC is 32 bits long. In order to utilize 64-bit > > floating point you can use "DOUBLE". > > > > [..]" > > > > So though AMPC is described as standard in one part of the documentation, > > it is not standard and someone's interpretation of what the C standard > > even is seems to be amiss. > > The ANSI C standard does not specify the size of scalar variables since > there are various CPU architectures out there from 8 bits to 64 bits, Doesn't specify size, except that all objects (other than bitfields in structs) are an integral number of bytes (where byte is the smallest addressing unit supported by the C implementation, possibly larger than the actual machine byte in rare cases) and all flavors of char types are exactly one byte (ditto). But DOES specify required minimum range and for floating point precision, which imply requirements on representation. > etc. So, making "double" to be 32 bits or even 16 bits is still > conformant to the ANSI C standard, although abnormal. AMPC actually > supports 64 bit floating point by means of the type DOUBLE. > With base 2 as is now essentially universal it isn't possible to meet the requirements for 'float' with with less than 1+14 'mantissa' bits and 8 exponent bits = 23, and 'double' (and 'long double') with less than 1+30+8 = 39. Even with base 256 (and variation in precision much worse than S/360's base 16) you need 5 exponent bits = 20 and 36. (Yes, mathematically this isn't the correct meaning of 'mantissa' but that's now the common usage.) Re the other reply: ANSI does not require standards to be replaced after 10 years, only to be reviewed for _possible_ revision. Looking through their catalog, I have noted standards 15 or 20 or more years old still 'reaffirmed'. Actually since 1990 their C standard has just been an adoption of the ISO (actually JTC1) standard, which was indeed revised late in 1999, although due to procedural delays the ANSI date on it is May 2000. - David.Thompson1 at worldnet.att.net