diff --git a/ocaml/otherlibs/alpha/dune b/ocaml/otherlibs/alpha/dune index 490abdf4afd..e57ad598451 100644 --- a/ocaml/otherlibs/alpha/dune +++ b/ocaml/otherlibs/alpha/dune @@ -17,7 +17,7 @@ (library (name alpha) - (wrapped false) + (public_name ocaml.alpha) (modes byte native) (flags (-strict-sequence @@ -56,9 +56,3 @@ (with-stdout-to to_install.sexp (run "%{first-dep}" "alpha")))) - -(install - (files - (include to_install.sexp)) - (section lib) - (package ocaml)) diff --git a/ocaml/otherlibs/beta/dune b/ocaml/otherlibs/beta/dune index 9f9e5905323..121170550c1 100644 --- a/ocaml/otherlibs/beta/dune +++ b/ocaml/otherlibs/beta/dune @@ -17,7 +17,7 @@ (library (name beta) - (wrapped false) + (public_name ocaml.beta) (modes byte native) (enabled_if (= %{architecture} "amd64")) @@ -58,11 +58,3 @@ (with-stdout-to to_install.sexp (run "%{first-dep}" "beta")))) - -(install - (enabled_if - (= %{architecture} "amd64")) - (files - (include to_install.sexp)) - (section lib) - (package ocaml)) diff --git a/ocaml/otherlibs/stable/dune b/ocaml/otherlibs/stable/dune index 725f29546d3..3494b3b69f9 100644 --- a/ocaml/otherlibs/stable/dune +++ b/ocaml/otherlibs/stable/dune @@ -17,7 +17,7 @@ (library (name stable) - (wrapped false) + (public_name ocaml.stable) (modes byte native) (flags (-strict-sequence @@ -46,6 +46,10 @@ (targets float_u.ml float_u.mli + iarray.ml + iarray.mli + iarrayLabels.ml + iarrayLabels.mli int32_u.ml int32_u.mli int64_u.ml @@ -66,9 +70,3 @@ (with-stdout-to to_install.sexp (run "%{first-dep}" "stable")))) - -(install - (files - (include to_install.sexp)) - (section lib) - (package ocaml)) diff --git a/ocaml/otherlibs/stdlib_alpha/dune b/ocaml/otherlibs/stdlib_alpha/dune index c5f709e0151..65793959671 100644 --- a/ocaml/otherlibs/stdlib_alpha/dune +++ b/ocaml/otherlibs/stdlib_alpha/dune @@ -14,7 +14,7 @@ (library (name stdlib_alpha) - (wrapped false) + (public_name ocaml.stdlib_alpha) (modes byte native) (flags (-strict-sequence @@ -42,9 +42,3 @@ (with-stdout-to to_install.sexp (run "%{first-dep}" "stdlib_alpha")))) - -(install - (files - (include to_install.sexp)) - (section lib) - (package ocaml)) diff --git a/ocaml/otherlibs/stdlib_beta/dune b/ocaml/otherlibs/stdlib_beta/dune index bb8ea8533ac..18c998e9be4 100644 --- a/ocaml/otherlibs/stdlib_beta/dune +++ b/ocaml/otherlibs/stdlib_beta/dune @@ -14,7 +14,7 @@ (library (name stdlib_beta) - (wrapped false) + (public_name ocaml.stdlib_beta) (modes byte native) (enabled_if (= %{architecture} "amd64")) @@ -44,11 +44,3 @@ (with-stdout-to to_install.sexp (run "%{first-dep}" "stdlib_beta")))) - -(install - (enabled_if - (= %{architecture} "amd64")) - (files - (include to_install.sexp)) - (section lib) - (package ocaml)) diff --git a/ocaml/otherlibs/stdlib_stable/dune b/ocaml/otherlibs/stdlib_stable/dune index 86d788a156e..f05872a3dd7 100644 --- a/ocaml/otherlibs/stdlib_stable/dune +++ b/ocaml/otherlibs/stdlib_stable/dune @@ -14,7 +14,7 @@ (library (name stdlib_stable) - (wrapped false) + (public_name ocaml.stdlib_stable) (modes byte native) (flags (-strict-sequence @@ -42,9 +42,3 @@ (with-stdout-to to_install.sexp (run "%{first-dep}" "stdlib_stable")))) - -(install - (files - (include to_install.sexp)) - (section lib) - (package ocaml)) diff --git a/ocaml/stdlib/iarray.ml b/ocaml/otherlibs/stdlib_stable/iarray.ml similarity index 100% rename from ocaml/stdlib/iarray.ml rename to ocaml/otherlibs/stdlib_stable/iarray.ml diff --git a/ocaml/stdlib/iarray.mli b/ocaml/otherlibs/stdlib_stable/iarray.mli similarity index 100% rename from ocaml/stdlib/iarray.mli rename to ocaml/otherlibs/stdlib_stable/iarray.mli diff --git a/ocaml/stdlib/iarrayLabels.ml b/ocaml/otherlibs/stdlib_stable/iarrayLabels.ml similarity index 100% rename from ocaml/stdlib/iarrayLabels.ml rename to ocaml/otherlibs/stdlib_stable/iarrayLabels.ml diff --git a/ocaml/stdlib/iarrayLabels.mli b/ocaml/otherlibs/stdlib_stable/iarrayLabels.mli similarity index 100% rename from ocaml/stdlib/iarrayLabels.mli rename to ocaml/otherlibs/stdlib_stable/iarrayLabels.mli diff --git a/ocaml/otherlibs/stdlib_stable/stdlib_stable.ml b/ocaml/otherlibs/stdlib_stable/stdlib_stable.ml index 1a09599a396..36054b37698 100644 --- a/ocaml/otherlibs/stdlib_stable/stdlib_stable.ml +++ b/ocaml/otherlibs/stdlib_stable/stdlib_stable.ml @@ -2,5 +2,5 @@ module Float_u = Float_u module Int32_u = Int32_u module Int64_u = Int64_u module Nativeint_u = Nativeint_u -module Iarray = Stdlib__Iarray -module IarrayLabels = Stdlib__IarrayLabels +module Iarray = Iarray +module IarrayLabels = IarrayLabels diff --git a/ocaml/otherlibs/stdlib_stable/stdlib_stable.mli b/ocaml/otherlibs/stdlib_stable/stdlib_stable.mli index 1a09599a396..36054b37698 100644 --- a/ocaml/otherlibs/stdlib_stable/stdlib_stable.mli +++ b/ocaml/otherlibs/stdlib_stable/stdlib_stable.mli @@ -2,5 +2,5 @@ module Float_u = Float_u module Int32_u = Int32_u module Int64_u = Int64_u module Nativeint_u = Nativeint_u -module Iarray = Stdlib__Iarray -module IarrayLabels = Stdlib__IarrayLabels +module Iarray = Iarray +module IarrayLabels = IarrayLabels diff --git a/ocaml/otherlibs/stdlib_upstream_compatible/dune b/ocaml/otherlibs/stdlib_upstream_compatible/dune index e9692162ac9..43e918653cc 100644 --- a/ocaml/otherlibs/stdlib_upstream_compatible/dune +++ b/ocaml/otherlibs/stdlib_upstream_compatible/dune @@ -14,7 +14,7 @@ (library (name stdlib_upstream_compatible) - (wrapped false) + (public_name ocaml.stdlib_upstream_compatible) (modes byte native) (flags (-strict-sequence @@ -42,9 +42,3 @@ (with-stdout-to to_install.sexp (run "%{first-dep}" "stdlib_upstream_compatible")))) - -(install - (files - (include to_install.sexp)) - (section lib) - (package ocaml)) diff --git a/ocaml/otherlibs/to_install.sh b/ocaml/otherlibs/to_install.sh deleted file mode 100755 index 18c89c3288a..00000000000 --- a/ocaml/otherlibs/to_install.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -set -eu - -libname=$1 - -echo '(' -echo " ($libname.cmxa as $libname/$libname.cmxa)" -echo " ($libname.a as $libname/$libname.a)" -echo " ($libname.cmxs as $libname/$libname.cmxs)" -echo " ($libname.cma as $libname/$libname.cma)" - -for file in ./*.mli ; do - module="${file%.*}" - echo " ($module.mli as $libname/$module.mli)" - echo " (.$libname.objs/byte/$module.cmi as $libname/$module.cmi)" - echo " (.$libname.objs/byte/$module.cmt as $libname/$module.cmt)" - echo " (.$libname.objs/byte/$module.cmti as $libname/$module.cmti)" - echo " (.$libname.objs/native/$module.cmx as $libname/$module.cmx)" -done - -echo ')' diff --git a/ocaml/otherlibs/upstream_compatible/dune b/ocaml/otherlibs/upstream_compatible/dune index 41ad3717b03..fc3926ee7c1 100644 --- a/ocaml/otherlibs/upstream_compatible/dune +++ b/ocaml/otherlibs/upstream_compatible/dune @@ -18,7 +18,7 @@ (library (name upstream_compatible) - (wrapped false) + (public_name ocaml.upstream_compatible) (modes byte native) (flags (-strict-sequence @@ -57,9 +57,3 @@ (with-stdout-to to_install.sexp (run "%{first-dep}" "upstream_compatible")))) - -(install - (files - (include to_install.sexp)) - (section lib) - (package ocaml)) diff --git a/ocaml/stdlib/.depend b/ocaml/stdlib/.depend index 233bf2b89f6..287eb923cec 100644 --- a/ocaml/stdlib/.depend +++ b/ocaml/stdlib/.depend @@ -454,32 +454,6 @@ stdlib__Hashtbl.cmx : hashtbl.ml \ stdlib__Hashtbl.cmi : hashtbl.mli \ stdlib.cmi \ stdlib__Seq.cmi -stdlib__Iarray.cmo : iarray.ml \ - stdlib.cmi \ - stdlib__Seq.cmi \ - stdlib__Array.cmi \ - stdlib__Iarray.cmi -stdlib__Iarray.cmx : iarray.ml \ - stdlib.cmx \ - stdlib__Seq.cmx \ - stdlib__Array.cmx \ - stdlib__Iarray.cmi -stdlib__Iarray.cmi : iarray.mli \ - stdlib.cmi \ - stdlib__Seq.cmi -stdlib__IarrayLabels.cmo : iarrayLabels.ml \ - stdlib.cmi \ - stdlib__Seq.cmi \ - stdlib__Array.cmi \ - stdlib__IarrayLabels.cmi -stdlib__IarrayLabels.cmx : iarrayLabels.ml \ - stdlib.cmx \ - stdlib__Seq.cmx \ - stdlib__Array.cmx \ - stdlib__IarrayLabels.cmi -stdlib__IarrayLabels.cmi : iarrayLabels.mli \ - stdlib.cmi \ - stdlib__Seq.cmi stdlib__In_channel.cmo : in_channel.ml \ stdlib__Sys.cmi \ stdlib.cmi \ diff --git a/ocaml/stdlib/StdlibModules b/ocaml/stdlib/StdlibModules index 8fbe9ee8128..3036edaca11 100644 --- a/ocaml/stdlib/StdlibModules +++ b/ocaml/stdlib/StdlibModules @@ -57,7 +57,6 @@ STDLIB_MODULE_BASENAMES = \ unit \ marshal \ array \ - iarray \ float \ int32 \ nativeint \ @@ -94,7 +93,6 @@ STDLIB_MODULE_BASENAMES = \ filename \ complex \ arrayLabels \ - iarrayLabels \ listLabels \ bytesLabels \ stringLabels \ diff --git a/ocaml/stdlib/dune b/ocaml/stdlib/dune index 85d922a2a4c..80e73541dfb 100644 --- a/ocaml/stdlib/dune +++ b/ocaml/stdlib/dune @@ -129,10 +129,6 @@ gc.mli hashtbl.ml hashtbl.mli - iarray.ml - iarray.mli - iarrayLabels.ml - iarrayLabels.mli in_channel.ml in_channel.mli int.ml @@ -280,12 +276,6 @@ .stdlib.objs/byte/stdlib__Hashtbl.cmi .stdlib.objs/byte/stdlib__Hashtbl.cmt .stdlib.objs/byte/stdlib__Hashtbl.cmti - .stdlib.objs/byte/stdlib__Iarray.cmi - .stdlib.objs/byte/stdlib__Iarray.cmt - .stdlib.objs/byte/stdlib__Iarray.cmti - .stdlib.objs/byte/stdlib__IarrayLabels.cmi - .stdlib.objs/byte/stdlib__IarrayLabels.cmt - .stdlib.objs/byte/stdlib__IarrayLabels.cmti .stdlib.objs/byte/stdlib__In_channel.cmi .stdlib.objs/byte/stdlib__In_channel.cmt .stdlib.objs/byte/stdlib__In_channel.cmti @@ -488,8 +478,6 @@ .stdlib.objs/native/stdlib__Either.cmx .stdlib.objs/native/stdlib__In_channel.cmx .stdlib.objs/native/stdlib__Out_channel.cmx - .stdlib.objs/native/stdlib__Iarray.cmx - .stdlib.objs/native/stdlib__IarrayLabels.cmx (META as stdlib/META)) (section lib) (package ocaml_runtime_stdlib)) diff --git a/ocaml/testsuite/tests/array-functions/test_iarray.ml b/ocaml/testsuite/tests/array-functions/test_iarray.ml index cb131292ecc..926f428fa46 100644 --- a/ocaml/testsuite/tests/array-functions/test_iarray.ml +++ b/ocaml/testsuite/tests/array-functions/test_iarray.ml @@ -1,6 +1,8 @@ -(* TEST *) +(* TEST + include stdlib_stable; +*) -module Iarray = Stdlib__Iarray +module Iarray = Stdlib_stable.Iarray external ( .:() ) : 'a iarray -> int -> 'a = "%array_safe_get" (* Copied from [test.ml], but with all the [Array.fill] tests deleted *) diff --git a/ocaml/testsuite/tests/comprehensions/iarray_comprehensions_pure.ml b/ocaml/testsuite/tests/comprehensions/iarray_comprehensions_pure.ml index 7c3e0a1bdc7..acb04b73727 100644 --- a/ocaml/testsuite/tests/comprehensions/iarray_comprehensions_pure.ml +++ b/ocaml/testsuite/tests/comprehensions/iarray_comprehensions_pure.ml @@ -1,11 +1,12 @@ (* TEST flags = "-extension comprehensions"; + include stdlib_stable; expect; *) -module Iarray = Stdlib__Iarray;; +module Iarray = Stdlib_stable.Iarray;; [%%expect{| -module Iarray = Stdlib__Iarray +module Iarray = Stdlib_stable.Iarray |}];; (****************************************************************************** diff --git a/ocaml/testsuite/tests/comprehensions/iarray_comprehensions_side_effects.ml b/ocaml/testsuite/tests/comprehensions/iarray_comprehensions_side_effects.ml index 844eca2c326..9078a6fe898 100644 --- a/ocaml/testsuite/tests/comprehensions/iarray_comprehensions_side_effects.ml +++ b/ocaml/testsuite/tests/comprehensions/iarray_comprehensions_side_effects.ml @@ -1,8 +1,9 @@ (* TEST flags = "-extension comprehensions"; + include stdlib_stable; *) -module Iarray = Stdlib__Iarray +module Iarray = Stdlib_stable.Iarray (****************************************************************************** * ******** ATTENTION! ******** * diff --git a/ocaml/testsuite/tests/lib-array/test_iarray.ml b/ocaml/testsuite/tests/lib-array/test_iarray.ml index f030edabbe1..2d7fe8e9612 100644 --- a/ocaml/testsuite/tests/lib-array/test_iarray.ml +++ b/ocaml/testsuite/tests/lib-array/test_iarray.ml @@ -1,8 +1,9 @@ (* TEST + include stdlib_stable; expect; *) -module Iarray = Stdlib__Iarray;; +module Iarray = Stdlib_stable.Iarray;; external ( .:() ) : 'a iarray -> int -> 'a = "%array_safe_get";; @@ -15,7 +16,7 @@ let marray : int array = [|1;2;3;4;5|];; let mfarray : float array = [|1.5;2.5;3.5;4.5;5.5|];; [%%expect{| -module Iarray = Stdlib__Iarray +module Iarray = Stdlib_stable.Iarray external ( .:() ) : 'a iarray -> int -> 'a = "%array_safe_get" val iarray : int iarray = [:1; 2; 3; 4; 5:] val ifarray : float iarray = [:1.5; 2.5; 3.5; 4.5; 5.5:] diff --git a/ocaml/testsuite/tests/mixed-blocks/constructor_args.ml b/ocaml/testsuite/tests/mixed-blocks/constructor_args.ml index bbfbbc1602d..b58ecd85ba8 100644 --- a/ocaml/testsuite/tests/mixed-blocks/constructor_args.ml +++ b/ocaml/testsuite/tests/mixed-blocks/constructor_args.ml @@ -14,6 +14,7 @@ (* Prelude: Functions on unboxed numbers *) module Float32_u = Beta.Float32_u +module Float32 = Beta.Float32 module Float_u = Stable.Float_u module Int32_u = Stable.Int32_u module Int64_u = Stable.Int64_u diff --git a/ocaml/testsuite/tests/typing-layouts-arrays/test_float32_u_array.ml b/ocaml/testsuite/tests/typing-layouts-arrays/test_float32_u_array.ml index 07977f3f172..6760ea7e05c 100644 --- a/ocaml/testsuite/tests/typing-layouts-arrays/test_float32_u_array.ml +++ b/ocaml/testsuite/tests/typing-layouts-arrays/test_float32_u_array.ml @@ -65,7 +65,7 @@ module Float32_u_array0 : Gen_u_array.S0 "caml_array_blit" "caml_unboxed_float32_vect_blit" let empty () = [||] external to_boxed : ('a : float32) -> (float32[@local_opt]) = "%box_float32" - let compare_element x y = Float32.compare (to_boxed (x ())) (to_boxed (y ())) + let compare_element x y = Beta.Float32.compare (to_boxed (x ())) (to_boxed (y ())) end module Float32_u_array = Gen_u_array.Make (Float32_u_array0) diff --git a/ocaml/testsuite/tests/typing-layouts-float32/alloc.ml b/ocaml/testsuite/tests/typing-layouts-float32/alloc.ml index 818c21edf77..7b03bf52bba 100644 --- a/ocaml/testsuite/tests/typing-layouts-float32/alloc.ml +++ b/ocaml/testsuite/tests/typing-layouts-float32/alloc.ml @@ -82,12 +82,12 @@ struct measure_alloc (fun () -> go #0.s #0.s) in Printf.printf "Unboxed:\n estimate: %f\n allocations: %s\n" - (Float32.to_float (to_float32 est) *. 4.) (get_allocations ()) + (Beta.Float32.to_float (to_float32 est) *. 4.) (get_allocations ()) end module Pi_boxed = struct - open Float32 + open Beta.Float32 open Operators let[@inline never] step n estimate = @@ -125,8 +125,8 @@ let print_record_and_allocs s r = Printf.printf "%s:\n allocated bytes: %.2f\n a: %.2f\n b: %.2f\n c: %.2f\n d: %.2f\n" s allocs - (Float32.to_float (Float32_u.to_float32 r.a)) (Float32.to_float (Float32_u.to_float32 r.b)) - (Float32.to_float (Float32_u.to_float32 r.c)) (Float32.to_float (Float32_u.to_float32 r.d)) + (Beta.Float32.to_float (Float32_u.to_float32 r.a)) (Beta.Float32.to_float (Float32_u.to_float32 r.b)) + (Beta.Float32.to_float (Float32_u.to_float32 r.c)) (Beta.Float32.to_float (Float32_u.to_float32 r.d)) (* Building a record should only allocate the box *) let[@inline never] build x = diff --git a/ocaml/testsuite/tests/typing-local/float_iarray.ml b/ocaml/testsuite/tests/typing-local/float_iarray.ml index 2af7da751ca..ae8ef935941 100644 --- a/ocaml/testsuite/tests/typing-local/float_iarray.ml +++ b/ocaml/testsuite/tests/typing-local/float_iarray.ml @@ -1,4 +1,5 @@ (* TEST + include stdlib_stable; { reference = "${test_source_directory}/float_iarray.heap.reference"; bytecode; @@ -16,7 +17,7 @@ (* Testing that local [float iarray]s don't allocate on access. This is a question because for flat float arrays, accesses have to box the float. *) -module Iarray = Stdlib__Iarray +module Iarray = Stdlib_stable.Iarray let ( .:() ) = Iarray.( .:() ) diff --git a/ocaml/testsuite/tests/typing-local/iarray.byte.reference b/ocaml/testsuite/tests/typing-local/test_iarray.byte.reference similarity index 100% rename from ocaml/testsuite/tests/typing-local/iarray.byte.reference rename to ocaml/testsuite/tests/typing-local/test_iarray.byte.reference diff --git a/ocaml/testsuite/tests/typing-local/iarray.heap.reference b/ocaml/testsuite/tests/typing-local/test_iarray.heap.reference similarity index 100% rename from ocaml/testsuite/tests/typing-local/iarray.heap.reference rename to ocaml/testsuite/tests/typing-local/test_iarray.heap.reference diff --git a/ocaml/testsuite/tests/typing-local/iarray.ml b/ocaml/testsuite/tests/typing-local/test_iarray.ml similarity index 93% rename from ocaml/testsuite/tests/typing-local/iarray.ml rename to ocaml/testsuite/tests/typing-local/test_iarray.ml index 17a195e10fb..e0a4b1085ea 100644 --- a/ocaml/testsuite/tests/typing-local/iarray.ml +++ b/ocaml/testsuite/tests/typing-local/test_iarray.ml @@ -1,14 +1,15 @@ (* TEST + include stdlib_stable; { - reference = "${test_source_directory}/iarray.byte.reference"; + reference = "${test_source_directory}/test_iarray.byte.reference"; bytecode; }{ stack-allocation; - reference = "${test_source_directory}/iarray.stack.reference"; + reference = "${test_source_directory}/test_iarray.stack.reference"; native; }{ no-stack-allocation; - reference = "${test_source_directory}/iarray.heap.reference"; + reference = "${test_source_directory}/test_iarray.heap.reference"; native; } *) @@ -21,7 +22,7 @@ 2. Correctness: They actually create arrays on the stack (by testing that no GCed allocation happens). *) -module Iarray = Stdlib__Iarray +module Iarray = Stdlib_stable.Iarray external opaque_local : local_ 'a -> local_ 'a = "%opaque" diff --git a/ocaml/testsuite/tests/typing-local/iarray.stack.reference b/ocaml/testsuite/tests/typing-local/test_iarray.stack.reference similarity index 100% rename from ocaml/testsuite/tests/typing-local/iarray.stack.reference rename to ocaml/testsuite/tests/typing-local/test_iarray.stack.reference diff --git a/tests/small_numbers/float32.ml b/tests/small_numbers/float32.ml index 588b714b066..96b1d012fc1 100644 --- a/tests/small_numbers/float32.ml +++ b/tests/small_numbers/float32.ml @@ -128,8 +128,8 @@ module CFloat32 = struct for i = 0 to 100_000 do let f0 = Random.int32 Int32.max_int in let f1 = Random.int32 Int32.max_int in - f ((if Random.bool () then f0 else Int32.neg f0) |> Int32.float_of_bits |> Float32.of_float) - ((if Random.bool () then f1 else Int32.neg f1) |> Int32.float_of_bits |> Float32.of_float) + f ((if Random.bool () then f0 else Int32.neg f0) |> Int32.float_of_bits |> Beta.Float32.of_float) + ((if Random.bool () then f1 else Int32.neg f1) |> Int32.float_of_bits |> Beta.Float32.of_float) done ;; end diff --git a/tests/small_numbers/float32_lib.ml b/tests/small_numbers/float32_lib.ml index ce5024162d5..7efacf61e90 100644 --- a/tests/small_numbers/float32_lib.ml +++ b/tests/small_numbers/float32_lib.ml @@ -136,8 +136,8 @@ module CF32 = struct for i = 0 to 100_000 do let f0 = Random.int32 Int32.max_int in let f1 = Random.int32 Int32.max_int in - f ((if Random.bool () then f0 else Int32.neg f0) |> Int32.float_of_bits |> Float32.of_float) - ((if Random.bool () then f1 else Int32.neg f1) |> Int32.float_of_bits |> Float32.of_float) + f ((if Random.bool () then f0 else Int32.neg f0) |> Int32.float_of_bits |> Beta.Float32.of_float) + ((if Random.bool () then f1 else Int32.neg f1) |> Int32.float_of_bits |> Beta.Float32.of_float) done ;; end diff --git a/tests/small_numbers/float32_u_lib.ml b/tests/small_numbers/float32_u_lib.ml index c2be5cfd1b3..a324c99d4fb 100644 --- a/tests/small_numbers/float32_u_lib.ml +++ b/tests/small_numbers/float32_u_lib.ml @@ -141,8 +141,8 @@ module CF32 = struct for i = 0 to 100_000 do let f0 = Random.int32 Int32.max_int in let f1 = Random.int32 Int32.max_int in - f ((if Random.bool () then f0 else Int32.neg f0) |> Int32.float_of_bits |> Float32.of_float) - ((if Random.bool () then f1 else Int32.neg f1) |> Int32.float_of_bits |> Float32.of_float) + f ((if Random.bool () then f0 else Int32.neg f0) |> Int32.float_of_bits |> Beta.Float32.of_float) + ((if Random.bool () then f1 else Int32.neg f1) |> Int32.float_of_bits |> Beta.Float32.of_float) done ;; end