Fixpoint Atithmetic / Fractal Calculation Speedup

Torbjorn Granlund tg at
Mon May 16 11:19:14 CEST 2011

Jürgen Hochwald <jh at> writes:

  I've a self written fractal programm to calculate a zoom animation. Currently 
  all calculations are done with the mpf_t types.
  Mpf_t means (I think) that the numers are normaisized to some internally 
  format after each calculation and before each addition/subtraction (like IEEE 
  754 for normal floating point numbers).
  My thougths are to speed up the calculation when I have a fixpoint arithmeic, 
  where all normalisation steps are omitted.
  My question: How is a fixpoint arithmetic possible (by using low level 
  functions) or planned?
  How many speedup will this bring?

I don't think this has an easy answer.

In mpf, normalisation is usually very cheap, I believe it is O(1) for
every operation.

There is some bookkeeping needed, but I am not sure it will be easier
with fixed point.

My guess is that fixed-point will be no faster, except if you hardwire
some asm routines for some fixed number of bits.


More information about the gmp-discuss mailing list