Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!bin From: bin@primate.wisc.edu (Brain in Neutral) Newsgroups: comp.sys.mips Subject: Re: MAX_FLT isn't? Message-ID: <907@uakari.primate.wisc.edu> Date: 18 Oct 89 00:23:42 GMT References: <29655@wright.mips.COM> Sender: bin@primate.wisc.edu Reply-To: bin@primate.wisc.edu Lines: 23 From article <29655@wright.mips.COM>, by earl@wright (Earl Killian): | In article <898@uakari.primate.wisc.edu>, bin@primate (Brain in Neutral) writes: |>So what am I doing wrong here? | | You're assuming that all computations are done in single precision, | which is not the case in most C implementations. K&R C said that | "f - FLT_MAX" would be done by converting f to double, FLT_MAX to | double, and then subtracting. | ... | You could argue that float.h should have put "(float)" into the | definition of FLT_MAX. Then you wouldn't have seen the pecularities | of floating point arithmetic in this case. I think it was AT&T that | omitted the "(float)". Hm, well, it works under Ultrix on my VAX (with or w/o the (float) stuff). Thus my disappointment. Oh, well. Paul DuBois dubois@primate.wisc.edu