Browse thread
testers wanted for experimental SSE2 back-end
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2010-03-23 (09:22) |
From: | Dmitry Bely <dmitry.bely@g...> |
Subject: | Re: [Caml-list] testers wanted for experimental SSE2 back-end |
On Tue, Mar 23, 2010 at 12:07 PM, Daniel Bünzli <daniel.buenzli@erratique.ch> wrote: >> let round x = truncate (x +. 0.5) > > Side note, if you are also interested in negative numbers Sure, it was just an code generation example. Probably I should use round_positive name. > that's not what you want. You want : > >> let round x = floor (x +. 0.5) ...and you get a floor() C call. I would better use let round x = truncate (x +. (if x > 0. then 0.5 else -0.5)) - Dmitry Bely