Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003526OCaml~DO NOT USE (was: OCaml general)public2005-03-10 08:092016-12-07 14:35
Assigned To 
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0003526: wish: control of the floating point rounding mode
DescriptionFull_Name: Sebastian Egner
Version: Ocaml
OS: Linux/FreeBDS/Windows
Submission from: (

For implementing efficient interval arithmetics it is important to have control
of the rounding mode of floating point operations. While this could be done with
calls to a C-function, the overhead would be significant---and floating point
ops would become dependent on global state. Implementing the entire interval
arithmetics as an external module in C, and linking against it, is also not a
very attractive option as the Ocalm compiler cannot fully be deployed for

TagsNo tags attached.
Attached Files

- Relationships
duplicate of 0001743closed Wish: Controle du mode d'arrondi 

-  Notes
Christophe Troestler (reporter)
2007-11-22 19:37

Merge with 0001743
thelema (reporter)
2007-11-26 23:09

Could the semantics of FP math in OCaml be further standardized so that each arch just needs some code to set the right flags and everyone gets the same behavior? This feature sounds like an excuse to build more incompatibilities between different architectures.
xleroy (administrator)
2007-12-02 09:43

> Could the semantics of FP math in OCaml be further standardized
> so that each arch just needs some code to set the right flags
> and everyone gets the same behavior?

This is exactly what we aim for, but actually all modern platforms that we know of set the FPU to the mode we want (no exceptions, round to nearest, etc).
The last know platform that needed additional code to get this mode was FreeBSD pre 2002. So, basically, if you have examples of modern platforms where the default floating-point mode isn't the "standard" one, please report it and we'll see what we can do.
shinwell (developer)
2016-12-07 14:34

I don't think OCaml is going to itself provide a means of changing the rounding mode for the reason that xleroy gives above. (It does however have the -no-float-const-prop option for code doing this in C stubs.) Since there has been no further feedback on this issue for nine years, I'm closing this issue.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue
2007-11-22 19:37 Christophe Troestler Note Added: 0004343
2007-11-22 19:39 Christophe Troestler Note Added: 0004345
2007-11-22 19:39 Christophe Troestler Note Deleted: 0004345
2007-11-22 23:27 doligez Relationship added duplicate of 0001743
2007-11-26 23:09 thelema Note Added: 0004356
2007-12-02 09:43 xleroy Note Added: 0004374
2007-12-02 09:43 xleroy Description Updated
2016-12-07 14:34 shinwell Note Added: 0016708
2016-12-07 14:34 shinwell Status acknowledged => closed
2016-12-07 14:35 shinwell Resolution open => won't fix
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker