Re: I'm not the only one who values interval-arithmetic
RobertMaas_at_YahooGroups.Com
Date: 04/20/04
- Next message: Gareth McCaughan: "Re: LISPPA"
- Previous message: Edi Weitz: "Re: Vertical bars & alphanumeric strings"
- Maybe in reply to: RobertMaas_at_YahooGroups.Com: "Re: I'm not the only one who values interval-arithmetic"
- Next in thread: Raymond Toy: "Re: I'm not the only one who values interval-arithmetic"
- Reply: Raymond Toy: "Re: I'm not the only one who values interval-arithmetic"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 19 Apr 2004 18:07:54 -0800
> From: Raymond Toy <toy@rtp.ericsson.se>
> > Hmm, when I was browsing the online HTML-format CMUCL manual
> > http://cvs2.cons.org/ftp-area/cmucl/doc/cmu-user/
> > I didn't happen to see anything about interval arithmetic. Looking
> > carefully just now, I see rounding mode discussed in regard to floating
> Because it's not exposed to the user. It's only used by the compiler
> for type derivation.
But is it written in LISP, composed of regular functions in some
package? Or is it only assembly-language code not interfaced in any way
that LISP software can use it without special knowledge? If it's
written in LISP, is there some internal documentation that says the
name of the package and something about how it works?
> You are correct---it does not compute worst-case bounds at all.
Yuk. Does the compiler ever compile wrong code, or fail to or
spuriously issue a warning or error signal, because it slops the end of
an interval past a threshold for a decision?
> And it doesn't do worse-case bounds because I was basically lazy.
But there's a feeling of major dissatisfaction doing that, or at least
IMO there should be such a feeling. Like why bother to write the code
at all if the boundaries are wrong? Doing boundaries correctly
shouldn't be really difficult, should it? Using rational numbers, I
didn't have any problem doing boundaries correctly. (But see below
about open/closed intervals.)
> It's also complicated by the fact that I didn't want to handle the
> mixed float type issues.
Hmm, when I wrote an interval arithmetic package recently I avoid
floats totally, using rational numbers throughout, for basically the
same reason, not wanting to deal with different kinds of numbers as
special cases.
> If you can make the interval arithmetic package look somewhat like
> what's in CMUCL and SBCL, I'm sure they'd be grateful.
"they? ??
Would they be grateful enough to pay me real money for my work so I
won't become homeless in a few months when I max out my credit cards
paying the rent?
If what they did for compiler-use only isn't documented anywhere I can
read and isn't accessible from me for experimenting with it to get a
feel for how it really works, how could I know whether I'm doing
something that looks similar or not?
> These routines operate on an interval type containing the low and
> high bounds.
Yes, that's how I do it too. That makes a lot more sense (for internal
representation) than center and tolerance, because bounds of a result
can be computed directly from bounds of arguments to function.
> And it's complicated by supporting open and closed intervals too,
For my purpose, actual numeric results, I have no need for that. I use
closed intervals only. But I can see for type declarations, such as
saying a number is non-negative, you have to have an open bound at
infinity, so once you start down that path ...
If I get in the mood someday, I might generalize my software to include
both open and closed endpoints, just to see if it makes the software
seriously more complicated. (And of course if anybody ever agrees to
pay me for my time I can be motivated to do what my boss wants.)
> and mixing operations of many different operand types.
Yeah. I avoided that by using rational numbers exclusively.
The only type-special case in my code is for integers which must be
coerced to an interval by mapping NUM -> (NUM NUM) before some
operations that look at the individual bounds. If I have data in
floating point format, I know whether it's intended to be an exact
binary fraction or an interval between two binary fractions, and so I
manually coerce it to the appropriate single-number or range before
passing to my interval arithmetic code.
> Date: Sun, 14 Sep 2003 21:02:10 GMT
(I didn't see your article when it first appeared, because I didn't
have any efficient method for finding all followups (to stuff I had
posted) until just a few nights ago when I finally found your article
and put it in the queue to compose a followup myself. Sorry for very
belated response.)
- Next message: Gareth McCaughan: "Re: LISPPA"
- Previous message: Edi Weitz: "Re: Vertical bars & alphanumeric strings"
- Maybe in reply to: RobertMaas_at_YahooGroups.Com: "Re: I'm not the only one who values interval-arithmetic"
- Next in thread: Raymond Toy: "Re: I'm not the only one who values interval-arithmetic"
- Reply: Raymond Toy: "Re: I'm not the only one who values interval-arithmetic"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|