Article View: comp.lang.prolog
Article #823Re: arithmetic overflow checking
From: Steve Knight
Date: Wed, 09 May 1990 17:14
Date: Wed, 09 May 1990 17:14
16 lines
1225 bytes
1225 bytes
Andrew Taylor writes: > Some (most?) Prolog implementations do not check for overflow on > (integer) arithemtic. This doesn't seem acceptable to me. I agree that it is unacceptable for an implementation to silently perform incorrectly. Even given Richard O'Keefe's comments on the difficulties of doing it, I would have expected the ability to turn on arithmetic-checking at the very least. Perhaps I am missing something .... ? There are a couple of Prologs that avoid this problem by providing arbitrary precision arithmetic. As an example, Poplog Prolog offers the Common Lisp model of arithmetic, which includes big integers, rationals, single and double precision floats, and complex numbers -- together with the usual mathematical functions (e.g. sin, cos, arcsin, sqrt, exp, log, ... ). Steve
Technical Details
Message-ID:
<1600022@otter.hpl.hp.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hplabs!otter.hpl.hp.com!otter!sfkReferences:
<870@cluster.cs.su.oz>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hplabs!otter.hpl.hp.com!otter!sfk From: sfk@otter.hpl.hp.com (Steve Knight) Newsgroups: comp.lang.prolog Subject: Re: arithmetic overflow checking Message-ID: <1600022@otter.hpl.hp.com> Date: 9 May 90 17:14:44 GMT References: <870@cluster.cs.su.oz> Organization: Hewlett-Packard Laboratories, Bristol, UK. Lines: 16