Version française
Home     About     Download     Resources     Contact us    
Browse thread
Typing problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: jean-marc alliot <alliot@r...>
Subject: Some questions about floatting point issues
Hi,

We have developped an interval programming library in ML. We use it
mainly for branch and bound optimization.

The problem is that, to write a correct interval library, you have to
use some processor specific features regarding rounding mode (you have
to turn it to rounding towards minus infinity when computing lower
bounds, towards plus infinity when computing upper bound, etc).

I wrote the assembly language routines to do the trick, but I have a few
questions:
1) What is the default mode turned on by ocaml (I suppose it is rounding
towards nearest?)
2) Is this mode often reinforced (before each floatting point operation)
or is it only set once?
3) Is it possible to tell ocamlopt to inline a few lines of assembly
code? Changing the FPU mode is very fast (two "mov", one "and" and one
"or") and it is a pity to suffer the overhead of one function call each
time.

Thanks

Jean-Marc Alliot