Floating Point vs Fixed Point 
Author Message
 Floating Point vs Fixed Point

I know that fixed point is faster than floating point emulation. I also know
that fixed point is faster than 'real' floating point on pre-pentium computers
(probably on pentiums also).

I would like to know if Fixed point as a C++ class(without inline assembly, 16
bit code) would be faster than Floating point emulation.

C Prgm Software Employee, Rank 1 (The Founder)
http://www.*-*-*.com/
Remove .not from my e-mail address.
Nobody is perfect, so no flames. Corrections/Additions are very welcome.



Thu, 01 Nov 2001 03:00:00 GMT  
 Floating Point vs Fixed Point

in comp.lang.asm.x86:

Quote:
> I know that fixed point is faster than floating point emulation. I also know
> that fixed point is faster than 'real' floating point on pre-pentium computers
> (probably on pentiums also).

> I would like to know if Fixed point as a C++ class(without inline assembly, 16
> bit code) would be faster than Floating point emulation.

> C Prgm Software Employee, Rank 1 (The Founder)
> http://cprgmsw.hypermart.net
> Remove .not from my e-mail address.
> Nobody is perfect, so no flames. Corrections/Additions are very welcome.

<Jack>

That depends on too many factors to give a complete answer.  When you
say emulation do you mean true emulation, on a processor without a
math coprocessor or FPU?  Are you seriously coding for such an
environment?  Floating point on the Pentium and up is not nearly so
slow as the 486 and earlier.

Why not write some test code and try it both ways.

</Jack>
--
Do not email me with questions about programming.
Post them to the appropriate newsgroup.
Followups to my posts are welcome.



Fri, 02 Nov 2001 03:00:00 GMT  
 Floating Point vs Fixed Point

Quote:

> I know that fixed point is faster than floating point emulation. I also know
> that fixed point is faster than 'real' floating point on pre-pentium computers
> (probably on pentiums also).

> I would like to know if Fixed point as a C++ class(without inline assembly, 16
> bit code) would be faster than Floating point emulation.

I think fixpoint will be almost always slower that floating point, because for
a single multiplication you have to code some extra shifting and perhaps
some limiting.

Someone has just posted to comp.dsp that he has mad a public available
fixpoint C++ package, I have not checked it but here is the URL:
http://www.netwood.net/~edwin/svmt/

--
http://Stefan.Stenzel.com



Fri, 02 Nov 2001 03:00:00 GMT  
 Floating Point vs Fixed Point
Hi!

I once tested fixed point and floating point on a P166 (well,
it was a AMD K6 166 actually), and I found out that fixed
point adding, subtracting, and multiplication was 4 times
faster as fixed point, but fixed point division was 4 times
SLOWER (thus 1/4 faster) than floating point.

By the way, all my code was pure 32 bits C++ (DJGPP),
except for the fixed point division, which I wrote in assembler.
And I used classes.

So if you don't use divisions very often, it's advisable to work
with fixed point if the program is supposed to run on computers
slower than a PII
I never tested it on a PII, but I think on a PII you're better of
using floating point

XtReMe



Fri, 02 Nov 2001 03:00:00 GMT  
 Floating Point vs Fixed Point

Quote:

> I know that fixed point is faster than floating point emulation. I also know
> that fixed point is faster than 'real' floating point on pre-pentium computers
> (probably on pentiums also).

Not true on Pentiums, possible on 486.

Quote:
> I would like to know if Fixed point as a C++ class(without inline assembly, 16
> bit code) would be faster than Floating point emulation.

Definitely not on anything like a Pentium+

Terje
--

Using self-discipline, see http://www.eiffel.com/discipline
"almost all programming can be viewed as an exercise in caching"



Tue, 06 Nov 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. fixed point vs floating point

2. fixed point vs floating point

3. fixed point vs floating point

4. code with fixed-point or floating-point

5. floating vs. fixed point

6. An alternative to floating point (was Re: Floating point non-exactness)

7. IBM 370 Floating point to IEEE floating point

8. fixed point vs fixed decimal

9. Bug fix to floating point emulation.

10. Fixed or Floating point for MP3 algorithim?

11. Fixed or floating point?

12. Diplaying a floating point or fixed number

 

 
Powered by phpBB® Forum Software