🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #12077

Re: Is double->int slow?

#12077
From: Dik T. Winter
Date: Fri, 14 Jun 1991 00:54
18 lines
1454 bytes
In article <1991Jun12.014037.26495@cl.cam.ac.uk> cet1@cl.cam.ac.uk (C.E. Thompson) writes:
 > In article <COGSWELL.91Jun11112827@MEAT.cs.cmu.edu> cogswell@MEAT.cs.cmu.edu (Bryce Cogswell) writes:
 > >Double to int conversion on the RS/6000 is done in software, and
 > >requires 17-39 instructions.
 > That's mind-bogglingly many. If it doesn't violate any legal nicety, could
 > you post the details?
I do not think it violates any legal nicety.
 > 
 > The tedious aspect of double->int conversion in software is usually the
 > range check. After that, with an IEEE754 implemnetation, adding a suitable
 > constant to move the integer part to the low-order bits of the mantissa and
 > simulataneously bias by 2**31 does the trick.
On the RS6000 the tedious aspect is not the range check, it is the correctly
setting of the FP status bits.  When running through the code, I do not think
it is done very efficiently.
--
dik t. winter, cwi, amsterdam, nederland
dik@cwi.nl
Technical Details
Message-ID: <3698@charon.cwi.nl>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!cwi.nl!dik
References: <1991Jun10.220533.19560@jetsun.weitek.COM> <COGSWELL.91Jun11112827@MEAT.cs.cmu.edu> <1991Jun12.014037.26495@cl.cam.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!cwi.nl!dik
From: dik@cwi.nl (Dik T. Winter)
Newsgroups: comp.arch
Subject: Re: Is double->int slow?
Message-ID: <3698@charon.cwi.nl>
Date: 14 Jun 91 00:54:22 GMT
References: <1991Jun10.220533.19560@jetsun.weitek.COM> <COGSWELL.91Jun11112827@MEAT.cs.cmu.edu> <1991Jun12.014037.26495@cl.cam.ac.uk>
Sender: news@cwi.nl
Distribution: comp
Organization: CWI, Amsterdam
Lines: 18