Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Multiplication of matrix in C and OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] Multiplication of matrix in C and OCaml
On Friday 09 February 2007 22:36, 
> Still I think the compiler (GCC) might take the license to
> optimize (a * b) *c == a * (b * c) to false with -O3.

The -O* flags try to be correct but you can supply flags like -ffast-math to 
opt for faster but possibly less correct code:

Many compilers and languages sacrifice strict double-precision for performance 
(by not rounding from 80-bit), which is a major headache when you're 
implementing algorithms that rely upon it, e.g. the exact arithmetic in 

Dr Jon D Harrop, Flying Frog Consultancy Ltd.
OCaml for Scientists