Board index » delphi » Fixed Point Math

Fixed Point Math

Anyone knows links about fixed point math and delphi. Maybe some tutorials
or so...

Thanks Andreas

 

Re:Fixed Point Math


Any problems with fixed point math ?

Rene
--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com

Re:Fixed Point Math


Yes I need some fast functions. I think I can convert double to longints but
then i have to calculate with them. I do not want to write extra function
like multiply or so because executing them takes too much time so I need an
idea of realising a fast calculation.

Re:Fixed Point Math


On 486+ machines floating point is faster than fixed point.  If you still want
to use fixed point there are routines both on Torry's and the SuperPage.
Quote
Andreas Nickel wrote:
> Yes I need some fast functions. I think I can convert double to longints but
> then i have to calculate with them. I do not want to write extra function
> like multiply or so because executing them takes too much time so I need an
> idea of realising a fast calculation.

Re:Fixed Point Math


1.  what platform and what functions?  Most PentiumII fp instructions are as
fast as integer arithmetic.  The MMX instruction sets allow parallel integer
arithmetic, for instance vector arithmetic, if you want to mess with the
optimization required and 16 bit integers.
2.  there are some commonly used fast integer approximations for sqrt, dist,
sin, cos, etc. listed in Graphic Gems.
(http://www.acm.org/tog/GraphicsGems/).
3. because Delphi does not have in-line macros, the overhead of calling very
small, fast functions is often more costly than the actual code.
4.  keeping in mind that "premature optimization is the root of all evil",
you should visit High Performance Delphi at
http://www.optimalcode.com/basics.htm
5.  I have a complete 2-D integer geometry library.  email me at the
following address if you are interested.
6.

--

Jim Hargis
j...@har-gis.com
GIS Engineering

Quote
"Andreas Nickel" <andreas.nic...@ngi.de> wrote in message

news:8es8vn$jpk7@bornews.borland.com...
Quote
> Yes I need some fast functions. I think I can convert double to longints
but
> then i have to calculate with them. I do not want to write extra function
> like multiply or so because executing them takes too much time so I need
an
> idea of realising a fast calculation.

Other Threads