Article View: comp.lang.misc
Article #2542Re: Lisp vs APL for numeric work (was Re: Fortran vs. C for numerical work)
From: Barry Margolin
Date: Fri, 21 Dec 1990 19:49
Date: Fri, 21 Dec 1990 19:49
35 lines
2469 bytes
2469 bytes
In article <634@saxony.pa.reuter.COM> dgil@pa.reuter.COM (Dave Gillett) writes:
>In <1990Dec20.050320.23027@Think.COM> barmar@think.com (Barry Margolin) writes:
>
>>It's been a long time since I've used APL, but I don't recall it having a
>>way to specify single- vs. double-precision.
> That's because it's a high-level language! In APL, "numeric" means "in
>the minimum available precision sufficient to represent the value in question.
...
> One way to look at it is that APL hides numeric representation from all but
>the nosiest programmers. Resort to an extended or arbitrary precision
>representation is left as an implementation issue rather than a language
>issue, and the fact that implementors have not provided this is no reflection
>on the design of the language.
Unfortunately, for numerical applications it is often important to be able
to have more precise control over floating point representation, because
you need control over the precision vs performance properties. Someone
mentioned quadCT and )FUZZ, but I think these are global parameters,
whereas the control is generally wanted on a per-variable basis; in fact,
I'm not even sure that these are supposed to affect representation, but
only the behavior of comparison builtins, because I can change these
parameters after creating objects. Some variables contain values where the
required precision is known to be low, and it is preferable that operations
on these values be fast, while other variables contain values whose
precision is more important than the speed.
I'm not a numerical analyst, so don't ask me for specific examples. But
Fortran has had REAL*<n> for decades for a reason, and it's not only to
allow space saving (although I'm sure that's part of it).
--
Barry Margolin, Thinking Machines Corp.
barmar@think.com
{uunet,harvard}!think!barmar
Technical Details
Message-ID:
<1990Dec21.194943.4666@Think.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!telly!lethe!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!barmarReferences:
<1990Dec19.201059.16458@bernina.ethz.ch> <1990Dec20.050320.23027@Think.COM> <634@saxony.pa.reuter.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!telly!lethe!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!barmar From: barmar@think.com (Barry Margolin) Newsgroups: comp.lang.misc Subject: Re: Lisp vs APL for numeric work (was Re: Fortran vs. C for numerical work) Message-ID: <1990Dec21.194943.4666@Think.COM> Date: 21 Dec 90 19:49:43 GMT References: <1990Dec19.201059.16458@bernina.ethz.ch> <1990Dec20.050320.23027@Think.COM> <634@saxony.pa.reuter.COM> Sender: news@Think.COM Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 35