# Thread: Developing a naive matrix multiplication algorithm for 53 bits

1. ## Developing a naive matrix multiplication algorithm for 53 bits

Hi all,

I am actually working on IEEE Arithmetic especially the IEEE 754 specification where the IEEE double only have 53 bits of precision. I am working on Z/nZ matrix multiplication that works on 53 bits specs. I just wish someone could give me a pointer on how to write a matrix multiplication algorithm that works well on 53 bits IEEE precision standard.

Thanks,
Tchoubis 2. How about initialising a double variable to the value 1.0, then copy over your 53 bits (which will give you a value in the range [1..2) ), then you can do your maths as regular floating point operations. 3. Originally Posted by Salem How about initialising a double variable to the value 1.0, then copy over your 53 bits (which will give you a value in the range [1..2) ), then you can do your maths as regular floating point operations.
Good idea. In some implementations of the C standard library I've seen they use unsigned constants for doubles (i.e. their bit representation) where precision is absolutely necessary (or desired) 4. Originally Posted by Salem How about initialising a double variable to the value 1.0, then copy over your 53 bits (which will give you a value in the range [1..2) ), then you can do your maths as regular floating point operations.
The most significant bit is not stored and assumed to be 1, so the copied bits would be the 52 bit fractional part (xxxxx ...) of a binary fixed point number (1.xxxxx ...). Zero is a special case. Wiki article:

Double-precision floating-point format - Wikipedia, the free encyclopedia

It's not clear to me what the goal of the matrix multiplication is. Is the goal to reproduce how a processor does floating point math using custom math functions, or is the goal to optimize matrix multiplication using the processor's double precision math? 5. The primary aim is to write a matrix multiplication algorithm in 53 bits then incorporate this into a 64 bits program 6. Why not just implement this using 64 bit integers? You can check for a result greater than 2^52 afterwards. Popular pages Recent additions 