English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2007-02-10 (02:31)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] Multiplication of matrix in C and OCaml
On Saturday 10 February 2007 01:41, ls-ocaml-developer-2006@m-e-leypold.de 
> Sorry, I wanted to say "optimize (a * b) *c == a * (b * c) to true",
> i.e. 1. Would the compiler be wrong/incorrect in doing so?


> I don't think so.

Provided you only specify -O* optimisation flags, I believe that reducing that 
expression to "true" in the general case would be a compiler bug. If you 
specify flags like -ffast-math then anything can happen, but it will happen 
very quickly! ;-)

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