Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!ames!oliveb!sun!gorodish!guy From: guy@gorodish.Sun.COM (Guy Harris) Newsgroups: comp.arch Subject: Re: Performance increase - a suggestion Message-ID: <40627@sun.uucp> Date: 1 Feb 88 21:19:01 GMT References: <235@unicom.UUCP> <28200089@ccvaxa> <3127@phri.UUCP> <408@micropen> Sender: news@sun.uucp Lines: 17 > Alternately, perhaps hardware/arch. people can convince C compiler writers > that (as I often find) single precision is more than sufficient for all but > the most numerically nasty problems and should be used for float arithmetic > unless code directed otherwise. They already have: see the latest ANSI C draft standard. The reason why double precision was specified in K&R was, in part (as was, I think, stated here earlier) that it was easier to implement on the PDP-11 that way, as the PDP-11's floating point instructions (FP11-style) didn't come in single-precision and double-precision flavors; instead, there was a mode bit that you had to set to single-precision or double-precision mode with special instructions. (It was certainly *possible* to support both single-precision and double-precision arithmetic in compiled code - FORTRAN-IV Plus offers an existence proof - but I suspect it was deemed unnecessary in the context of C.) Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com