TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Rob Basler
from: Andreas Kaiser
date: 1994-12-07 11:12:22
subject: Need sqrt() algorithm

Hallo Rob!

Replying to a message of Rob Basler to Jonathan De Boyne Pollar:

 RB> Actually, I am doing a considerable amount of "floating point" math
 RB> using fixed point integer math to do 3-D projections.  The reason I
 RB> don't want to use floating point is that integer math is faster than
 RB> floating point EVEN WITH A COPROCESSOR especially for addition and
 RB> subtraction, 

Yes, additions are faster in integer math. However, at least on a pentium,
multiplication and (correct) division are faster using floating point math,
since integer mul/div are actually executed by the FPU with all the
necessary conversions before and after and no pipelining. Whereas with FPU
instructions, you can start a pipelined add/sub/mul operation every cycle
(successive muls every other cycle).

And pentium just follows the common trend. In case of a Power[PC] or other
RISC, you loose at least half of the processor performance and half of the
available registers, if you replace floating point ops by integer ops. All
thease beasts are designed to execute floating point in parallel with
integer, and multiplication is usually done much faster using floating
point.

  Gruss, Andreas

--- FleetStreet 0.97wb

* Origin: ak{at}ananke.s.bawue.de (2:246/8506.9)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1
@PATH: 246/2400 20 24/24 396/1 3615/50 229/2 12/2442 711/409 54/54 711/808
@PATH: 711/809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.