Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!seismo!rochester!pt.cs.cmu.edu!andrew.cmu.edu!bader# From: bader#@andrew.cmu.edu.UUCP Newsgroups: comp.lang.c Subject: Re: C and Floating Point (really parentheses) Message-ID: Date: Wed, 8-Apr-87 20:47:22 EST Article-I.D.: andrew.kUSjqey00WABcJA0Nr Posted: Wed Apr 8 20:47:22 1987 Date-Received: Sat, 18-Apr-87 02:30:23 EST Organization: Carnegie-Mellon University Lines: 39 ReSent-Date: Wed, 8 Apr 87 21:48:20 edt ReSent-From: postman#@andrew.cmu.edu ReSent-To: nntp-xmit#@andrew.cmu.edu Return-path: X-Andrew-Authenticated-as: 420 X-Trace: MS Version 3.22 on sun3 host mansfield, by bader (420). To: outnews#ext.nn.comp.lang.c@andrew.cmu.edu In-Reply-To: <6748@brl-adm.ARPA> Since no one using C these days depends on parentheses forcing order of evaluation, and lots of people use parentheses loving macros, why not introduce another set of parentheses that *does* force order of evaluation. That way, order-of-evaluation weenies (:-) will have their way and their code won't look like C (since they obviously want to be programming in fortran), and no-one else will know the difference (and existing code will still run as fast). I suggest for the new parentheses: @ and $ (BUT OH MY GOD! MAYBE THAT WOULD BREAK VMS SYSTEMS!!! :-O). So the expressions (as recently posted): x = ((one + x * a) - one) * 16.0; y = x / ((half + x * half) *((half - x) + half)); x = (x + eight) - eight; while (((b+one)-b)-one == zero); if ((a+betam1)-a != zero) if ((one - a) - one != zero) y2 = (y/two + y) - y; w = zz * xsq/(den*(den-one)); w = (x - zz) + w; w = ((half-zz) + half) * ((half + zz) + half); Would look like: x = @@one + x * a$ - one$ * 16.0; y = x / @@half + x * half$ *@@half - x$ + half$$; x = @x + eight$ - eight; while (@@b+one$-b)-one == zero$; if (@a+betam1)-a != zero$ if (@one - a) - one != zero$ y2 = @y/two + y$ - y; w = zz * xsq/@den*@den-one$$; w = @x - zz$ + w; w = @@half-zz$ + half$ * @@half + zz$ + half$; Sorry for the tone of this message, but I'm getting sick of hearing the cries of people who want to break the language to suit a community which is a small fraction of the whole. This is C, people, like it or not. If you want another language, use another language. -Miles