Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site mmintl.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!gatech!seismo!cmcl2!philabs!pwa-b!mmintl!franka From: franka@mmintl.UUCP (Frank Adams) Newsgroups: net.lang.c Subject: Re: double vs single precision Message-ID: <1033@mmintl.UUCP> Date: Tue, 14-Jan-86 06:23:05 EST Article-I.D.: mmintl.1033 Posted: Tue Jan 14 06:23:05 1986 Date-Received: Sat, 18-Jan-86 00:40:10 EST References: <1333@brl-tgr.ARPA> <1020@turtlevax.UUCP> Reply-To: franka@mmintl.UUCP (Frank Adams) Organization: Multimate International, E. Hartford, CT Lines: 22 In article <1020@turtlevax.UUCP> ken@turtlevax.UUCP (Ken Turkowski) writes: >Just because it agrees with K&R doesn't make it right. Nearly every >other programming language states that if you want computations to be >done at higher precision than any of the operands, then you cast any >one of them to the higher precision. > >This should be done for chars and shorts as well as floats and longs. >(could cast a long to double for more precision, but not to float) > >What's that? You say it breaks existing code? The easy solution to >that is: > >#define char long >#define short long >#define int long >#define float double This will break a lot more existing code than eliminating the automatic extension of floats, chars, and shorts will. Frank Adams ihpn4!philabs!pwa-b!mmintl!franka Multimate International 52 Oakland Ave North E. Hartford, CT 06108