Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site brl-vgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!harpo!seismo!brl-tgr!brl-vgr!gwyn From: gwyn@brl-vgr.ARPA (Doug Gwyn ) Newsgroups: net.lang.c Subject: Re: Numerical C Message-ID: <1206@brl-vgr.ARPA> Date: Tue, 1-May-84 18:18:49 EDT Article-I.D.: brl-vgr.1206 Posted: Tue May 1 18:18:49 1984 Date-Received: Wed, 2-May-84 06:34:01 EDT References: <3000022@uokvax.UUCP>, <882@elsie.UUCP> Organization: Ballistics Research Lab Lines: 18 I think all three answers (as to why floats are promoted to doubles in C) are applicable, with the amendment that the PDP-11 floating-point processors (FP11s) do not necessarily work in double-precision, but one has to change their mode back and forth to change from double- precision to single-precision arithmetic, so it was simpler to just leave the mode in double-precision all the time (code starts with a SETD instruction to do this). PDP-11 floating-point has never been really satisfactory anyway. It is very hard (but not impossible) to share the FP11 coprocessor among multiple processes; early UNIXes did not properly save & restore the FP11 status upon context switch due to the ansynchronism of the beast. Whoever first introduced 32-bit integers along with the FP11 really botched the job, and these weren't straightened out until the VAX (which is otherwise binary data compatible with the PDP-11). I rather like having all my arithmetic done in double-precision, though. VAX & PDP-11 single-precision isn't good for much serious computation.