diff options
| author | Pierre Roux | 2019-04-04 00:14:47 +0200 |
|---|---|---|
| committer | Pierre Roux | 2019-11-01 10:21:03 +0100 |
| commit | dca0135a263717b3a1a1d7c4f054f039dc08109e (patch) | |
| tree | 3f2ab5ea79e084a9c72e1376d5399ad4a62cb771 /kernel/uint63.mli | |
| parent | 3e0db1b645a8653c62b8b5a4978e6d8fbbe9a9cc (diff) | |
Make primitive float work on x86_32
Flag -fexcess-precision=standard is not enough on x86_32
where -msse2 -mfpmath=sse is required (-msse is not enough)
to avoid double rounding issues in the VM.
Most floating-point operation are now implemented in C because OCaml
is suffering double rounding issues on x86_32 with 80 bits extended
precision registers used for floating-point values, causing double
rounding making floating-point arithmetic incorrect with respect to
its specification.
Add a runtime test for double roundings.
Diffstat (limited to 'kernel/uint63.mli')
| -rw-r--r-- | kernel/uint63.mli | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/uint63.mli b/kernel/uint63.mli index c7d1e36451..7ed3d415e4 100644 --- a/kernel/uint63.mli +++ b/kernel/uint63.mli @@ -20,6 +20,7 @@ val of_int64 : Int64.t -> t (* val of_uint : int -> t *) +val to_int_saturate : t -> int (* maxuint31 in case of overflow *) (* conversion to float *) val of_float : float -> t |
