Fixed point matrix representation considered harmful

Glynn Clements glynn at
Thu Mar 20 19:55:04 PDT 2008

Simon Thum wrote:

> >>> Except that it complicates decoding for non-IEEE platforms. Think VAX.
> >> Are we actually designing for VAX these days? There aren't many other
> >> non-IEEE platforms that I know of: even lame embedded/consumer chips are
> >> pretty much all IEEE now, TTBOMK.
> > 
> > Well, at least some of the RISC platforms have IEEE-like floating point,
> > but don't do the magic values. Think about Alpha. My point is to just
> > specify a simple binary format and leave out all the special magic
> > values.
> You'll have to do sanity checks independent of the platform. It's 
> actually quite hard to avoid special values by (re)specifying the binary 
> representation. How to make denorms unrepresentable?

With the IEEE representation, the fact that the most significant bit
is implied (i.e. not stored) means that denorms are only representable
because there's a special case (all-zeros exponent) for representing

If it wasn't for the special cases for the all-zeros and all-ones
exponents, you wouldn't have infinity, NaN, or denorms.

A corollary of the inability to represent denorms is that you wouldn't
be able to represent zero, as zero cannot be normalised.

If you just want "ordinary" floating-point values, you can use IEEE
formats with the restriction that the exponent cannot be all-ones
(eliminating infinity and NaN), and if it is all-zeros then the
mantissa must also be all-zeros (eliminating denorms other than zero).

Glynn Clements <glynn at>

More information about the xorg mailing list