home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.misc
- Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!gmd.de!Germany.EU.net!ifado!wb
- From: wb@arb-phys.uni-dortmund.de (Wilhelm B. Kloke)
- Subject: Re: languages which allow the introduction of new operators
- Message-ID: <1992Nov13.073809.11835@arb-phys.uni-dortmund.de>
- Organization: Institut f. Arbeitsphysiologie a.d. Uni Dortmund
- References: <TB06.92Nov11165010@CS1.CC.Lehigh.EDU> <1992Nov12.082643.8415@arb-phys.uni-dortmund.de> <BxLxqu.96C@mentor.cc.purdue.edu>
- Date: Fri, 13 Nov 92 07:38:09 GMT
- Lines: 25
-
- In article <BxLxqu.96C@mentor.cc.purdue.edu> hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
- >In article <1992Nov12.082643.8415@arb-phys.uni-dortmund.de> wb@arb-phys.uni-dortmund.de (Wilhelm B. Kloke) writes:
- >>Add Ada, Algol68, TeX as well.
- >
- >Some of these allow some flexibility in expression syntax. But how
- >many of these could conveniently unpack a floating point number into
- >its exponent and mantissa? In particular, could you write
- >
- > exponent, mantissa =.U float
- If this is the point, there is some clarification needed. You want to
- have a result which is really *2* values. Most languages don't allow
- this. You need a (possibly implicitly constructed) structure to make
- this sort of assignment possible. Defining an unary operator which
- returns a struct is possible at least in C++ and Algol68. As we know
- Herman is interested in *very* efficient solutions, one could trie C++
- with embedded asm code (conditionalised for the machines on which it can
- be used) in the operator definition. If GNU C++ is this operator may be
- even onlined. The syntax has to be changed to something like
- struct {int exponent; double mantissa} e_m;
- e_m Isplittedfrom floatvalue;
- if the operator is called Isplittedfrom.
- --
- Dipl.-Math. Wilhelm Bernhard Kloke,
- Institut fuer Arbeitsphysiologie an der Universitaet Dortmund
- Ardeystrasse 67, D-4600 Dortmund 1, Tel. 0231-1084-257
-