Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #29791

Re: Exact integer-valued floats

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <timr@probo.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; '(at': 0.03; 'binary': 0.05; 'float': 0.05; '754': 0.09; 'assumed': 0.09; 'integers': 0.09; 'internally': 0.09; 'least)': 0.09; 'sep': 0.09; 'unpack': 0.09; 'zero.': 0.09; 'cc:addr:python-list': 0.10; 'advance': 0.10; 'ebcdic': 0.16; 'integer.': 0.16; 'oddity': 0.16; 'polling': 0.16; 'vectors': 0.16; 'wrote:': 0.17; 'integer': 0.17; 'tim': 0.18; '>>>': 0.18; 'bit': 0.21; 'cc:2**0': 0.23; "i've": 0.23; 'non': 0.24; 'machine': 0.24; 'cc:addr:python.org': 0.25; 'values': 0.26; 'first.': 0.27; 'ibm': 0.27; "d'aprano": 0.29; 'steven': 0.29; 'convert': 0.29; 'point': 0.31; 'could': 0.32; 'true.': 0.33; 'pm,': 0.35; 'there': 0.35; 'but': 0.36; 'wanted': 0.36; 'bad': 0.37; 'two': 0.37; 'systems,': 0.37; 'rather': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'subject:-': 0.40; 'telling': 0.61; 'back': 0.62; 'series': 0.63; 'different': 0.63; 'apologize': 0.67; 'computation,': 0.84; 'float,': 0.84; 'fortunately,': 0.84; 'interrupt': 0.84; 'multiply': 0.84; 'dennis': 0.91; 'angel': 0.93
From Tim Roberts <timr@probo.com>
To "d@davea.name" <d@davea.name>
Date Sat, 22 Sep 2012 22:27:25 -0700
Subject Re: Exact integer-valued floats
Thread-Topic Exact integer-valued floats
Thread-Index Ac2ZFt4Y8cNK8J9HQpKc/u0veSXWmAANT9TX
Accept-Language en-US
Content-Language en-US
X-MS-Has-Attach
X-MS-TNEF-Correlator
acceptlanguage en-US
Content-Type text/plain; charset="iso-8859-1"
Content-Transfer-Encoding quoted-printable
MIME-Version 1.0
Cc "python-list@python.org" <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1104.1348378075.27098.python-list@python.org> (permalink)
Lines 43
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1348378075 news.xs4all.nl 6856 [2001:888:2000:d::a6]:49500
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:29791

Show key headers only | View raw


True.  Seymour wanted all of the integer instructions to be combinatorial logic, rather than iterative.  Fortunately, since the floating point binary point was to the right, it was trivial to pack integers to float, do a floating computation, then unpack back to integer.

Apologize in advance for top-posting.  My Xoom makes bottom-posting awkward.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Dave Angel <d@davea.name> wrote:


On 09/22/2012 05:05 PM, Tim Roberts wrote:
> Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote:
>> On 22 Sep 2012 01:36:59 GMT, Steven D'Aprano wrote:
>>> For non IEEE 754 floating point systems, there is no telling how bad the
>>> implementation could be :(
>>      Let's see what can be found...
>>
>>      IBM 360: Same as Sigma-6 (no surprise; hearsay is the Sigma was
>> designed by renegade IBM folk; even down to using EBCDIC internally --
>> but with a much different interrupt system [224 individual interrupt
>> vectors as I recall, vs the IBM's 7 vectors and polling to find what
>> device]).
> The Control Data 6000/Cyber series had sign bit and 11-bit exponent, with
> either a 48-bit mantissa or a 96-bit mantissa, packed into one or two
> 60-bit words.  Values were not automatically normalized, so there was no
> assumed 1 bit, as in IEEE-754.

And it's been a long time (about 39 years), but as I recall the CDC 6400
(at least) had no integer multiply or divide.  You had to convert to
float first.  The other oddity about the CDC series is it's the last
machine I've encountered that used ones-complement for ints, with two
values for zero.


--

DaveA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Exact integer-valued floats Tim Roberts <timr@probo.com> - 2012-09-22 22:27 -0700

csiph-web