Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!munnari.oz.au!cs.mu.oz.au!ok From: ok@cs.mu.oz.au (Richard O'Keefe) Newsgroups: comp.lang.prolog Subject: Re: Floating Point Message-ID: <2592@munnari.oz.au> Date: 31 Oct 89 01:52:27 GMT References: <2491@munnari.oz.au> <36169@srcsip.UUCP> <2524@munnari.oz.au> <19272@brunix.UUCP> Sender: news@cs.mu.oz.au Lines: 33 In article <19272@brunix.UUCP>, mj@brunix (Mark Johnson) writes: > On the other hand, I don't think that "customer demand" should be the > sole determinant of language design. For example, even if "customer > demand" called for destructive assignment in Prolog I don't think > that that would convince me to support its inclusion in the language. I've got some bad news for you. C Prolog has destructive assignment (one branch anyway; look for $SET$) SICStus Prolog has destructive assignment (setarg/3) NU Prolog has destructive assignment ($replacn/3) Arity/Prolog has "embedded C" Poplog lets you call Pop updaters (i.e. has destructive assignment) Even DEC-10 Prolog and Quintus Prolog have Pascal-style destructive assignment internally, though it's not available to users. I don't like it, but them's the facts. > But as far as I can see, neither floating point nor interval arithmetic > can offer soundness when interpreted over the reals because of > truncation error, as Richard himself pointed out AAAAARG! Floating-point arithmetic can offer soundness when it is interpreted as bl---y FLOATING-POINT arithmetic. In order to write useful numeric calculations, *you* have to understand floating-point arithmetic ***AS*** floating-point arithmetic. Of *course* floating point arithmetic doesn't offer soundness "when interpreted over the reals", but if you try "interpret" this posting "over" Dutch it isn't going to make a whole lot of sense either. (English and Dutch are about as closely related as floats and reals.) If you want soundness over the reals, implement the constructive reals. If you want floating-point, put up with soundness with respect to floating- point. (Warning to people writing theorem provers in Prolog: DON'T try using floating-point numbers in models for theorems about reals.)