Caml1999I037yfV]TҠ-Stdlib__Float$zeroG%floatD@@@@)float.mliii/@@@@@#oneH@@@@m]]m]l@@A@@)minus_oneI@@@@qq@@+B@@#negJ@,@@@0@@@@@)%negfloatAA @@@3u4u @@CC@@#addK@D@@@@J@@@N@@@@@@@)%addfloatBA@@@@Qx " "Rx " V@@aD@@#subL@b@@@@h@@@l@@@@@@@)%subfloatBA<@@@@o{ x xp{ x @@E@@#mulM@@@@@@@@@@@@@ @@ )%mulfloatBAZ@@@@~  ~  @@F@@#divN@@@@ @@@@ @@@ @@@@)%divfloatBAx@@@@A - -A - a@@G@@#fmaO@@@@@@@@@@@@@@@@@@@@@.caml_fma_floatC@(caml_fmaAAA@AD  E  @'unboxedE  E  @@E  E  @'noallocE  E  @@E  @@H@@#remP@@@@@@@@@@@@@@@/caml_fmod_floatB@$fmodAA@AR  S 4 K@'unboxed S 4 7 S 4 >@@S 4 4S 4 ?@'noallocS 4 CS 4 J@@S 4 @@@*I@@$succQ@+@@@/@@@@@@-X.X@@=J@@$predR@>@@@B@@@ @@!@@^A^@@PK@@#absS@Q@@@"U@@@#@@$)%absfloatAA%@@@WdXd@@gL@@(infinityTf@@@%@dgeg@@tM@@,neg_infinityUs@@@&@qj!!rj!9@@N@@#nanV@@@'@~mUUmUd@@O@@-signaling_nanW@@@(@x[[x[t@@P@@)quiet_nanX@@@)@~~0@@Q@@"piY@@@*@TTTb@@R@@)max_floatZ@@@+@|||@@S@@)min_float[@@@,@@@T@@'epsilon\@@@-@444G@@U@@)is_finite]@@@@.$boolE@@@/@@0@@@V@@+is_infinite^@@@@1@@@2@@3@SSSr@@W@@&is_nan_@@@@4(@@@5@@6@@@X@@*is_integer`@@@@7;@@@8@@9@XXXv@@*Y@@&of_inta@#intA@@@:1@@@;@@<+%floatofintAA@@@34@@CZ@@&to_intb@D@@@=@@@>@@?+%intoffloatAA@@@J''K'U@@Z[@@)of_stringc@&stringQ@@@@a@@@A@@B4caml_float_of_stringAA1@@@cdD@@s\@@-of_string_optd@@@@C&optionL~@@@D@@@E@@F@}~@@]@@)to_stringe@@@@G7@@@H@@I@7@@^@@'fpclassf;@@)FP_normal2@@fjfs@@`@,FP_subnormal3@@@@a@'FP_zero4@@@@b@+FP_infinite5@@*,*9@@c@&FP_nan6@@qsq{@@d@@@A&Stdlib'fpclass@@@J@@@@FF @@A@_@A@.classify_floatg@@@@KK@@@L@@M3caml_classify_floatA@;caml_classify_float_unboxedA@@((b@'noallocbb@@b @@e@@#powh@@@@N@@@@O @@@P@@Q@@R0caml_power_floatB@#powAA@A   [ r@'unboxed [ ^ [ e@@ [ [ [ f@'noalloc" [ j# [ q@@& [ g@@5f@@$sqrti@6@@@S:@@@T@@U/caml_sqrt_floatA@$sqrtA@A=  >  @'unboxedD  E  @@H  I  @'noallocO  P  @@S  @@bg@@$cbrtj@c@@@Vg@@@W@@X/caml_cbrt_floatA@)caml_cbrtA@Aj  k!1!J@'unboxedq!1!6r!1!=@@u!1!3v!1!>@'noalloc|!1!B}!1!I@@!1!?@@h@@#expk@@@@Y@@@Z@@[.caml_exp_floatA@#expA@A!o!o!o!@'unboxed!o!!o!@@!o!!o!@'noalloc!o!!o!@@!o!@@i@@$exp2l@@@@\@@@]@@^/caml_exp2_floatA@)caml_exp2A@A!!""+@'unboxed""""@@""""@'noalloc""#""*@@"" @@j@@#logm@@@@_@@@`@@a.caml_log_floatA@#logA@A"b"b"b"@'unboxed"b""b"@@"b""b"@'noalloc"b""b"@@"b"@@k@@%log10n@@@@b@@@c@@d0caml_log10_floatA@%log10A@A""# # @'unboxed%# # &# #@@)# # *# #@'noalloc0# #1# #@@4# #@@Cl@@$log2o@D@@@eH@@@f@@g/caml_log2_floatA@)caml_log2A@AK#<#<L#{#@'unboxedR#{#S#{#@@V#{#}W#{#@'noalloc]#{#^#{#@@a#{#@@pm@@%expm1p@q@@@hu@@@i@@j0caml_expm1_floatA@*caml_expm1A@Ax##y$$@'unboxed$$$$ @@$$$$ @'noalloc$$$$@@$$@@n@@%log1pq@@@@k@@@l@@m0caml_log1p_floatA@*caml_log1pA@A$$$$@'unboxed$$$$@@$$$$@'noalloc$$$$@@$$@@o@@#cosr@@@@n@@@o@@p.caml_cos_floatA@#cosA@A %m%m %m%@'unboxed %m% %m%@@ %m% %m%@'noalloc %m% %m%@@ %m%@@p@@#sins@@@@q@@@r@@s.caml_sin_floatA@#sinA@A %% %&3@'unboxed %& %&&@@  %&  %&'@'noalloc %&+ %&2@@ %&(@@$q@@#tant@%@@@t)@@@u@@v.caml_tan_floatA@#tanA@A,&[&[-&[&@'unboxed3&[&4&[&@@7&[&8&[&@'noalloc>&[&?&[&@@B&[&@@Qr@@$acosu@R@@@wV@@@x@@y/caml_acos_floatA@$acosA@AY&&Z''%@'unboxed`''a''@@d''e''@'noallock''l''$@@o''@@~s@@$asinv@@@@z@@@{@@|/caml_asin_floatA@$asinA@A''''@'unboxed''''@@''''@'noalloc''''@@''@@t@@$atanw@@@@}@@@~@@/caml_atan_floatA@$atanA@A((((@'unboxed((((@@((((@'noalloc((((@@((@@u@@%atan2x@@@@@@@@@@@@@@@0caml_atan2_floatB@%atan2AA@A!)%)%")k)@'unboxed")k)n")k)u@@")k)k")k)v@'noalloc")k)z")k)@@")k)w@@ v@@%hypoty@ @@@@@@@@@@@@@@0caml_hypot_floatB@*caml_hypotAA@A'*D*D(**@'unboxed"(**#(**@@&(**'(**@'noalloc-(**.(**@@1(**@@@w@@$coshz@A@@@E@@@@@/caml_cosh_floatA@$coshA@AH/++I0,,2@'unboxedO0,,P0,,%@@S0,,T0,,&@'noallocZ0,,*[0,,1@@^0,,'@@mx@@$sinh{@n@@@r@@@@@/caml_sinh_floatA@$sinhA@Au3,g,gv4,,@'unboxed|4,,}4,,@@4,,4,,@'noalloc4,,4,,@@4,,@@y@@$tanh|@@@@@@@@@/caml_tanh_floatA@$tanhA@A7,,8-%-<@'unboxed8-%-(8-%-/@@8-%-%8-%-0@'noalloc8-%-48-%-;@@8-%-1@@z@@%acosh}@@@@@@@@@0caml_acosh_floatA@*caml_acoshA@A;-r-r<--@'unboxed<--<--@@<--<--@'noalloc<--<--@@<--@@{@@%asinh~@@@@@@@@@0caml_asinh_floatA@*caml_asinhA@AD.r.rE..@'unboxedE..E..@@E..E..@'noallocE..E..@@E..@@!|@@%atanh@"@@@&@@@@@0caml_atanh_floatA@*caml_atanhA@A)M/T/T*N//@'unboxed0N//1N//@@4N//5N//@'noalloc;N//<N//@@?N//@@N}@@#erf@O@@@S@@@@@.caml_erf_floatA@(caml_erfA@AVV0\0\WW00@'unboxed]W00^W00@@aW00bW00@'noallochW00iW00@@lW00@@{~@@$erfc@|@@@@@@@@/caml_erfc_floatA@)caml_erfcA@A^1:1:_1y1@'unboxed_1y1~_1y1@@_1y1{_1y1@'noalloc_1y1_1y1@@_1y1@@@@%trunc@@@@@@@@@0caml_trunc_floatA@*caml_truncA@Ag2B2Bh22@'unboxedh22h22@@h22h22@'noalloch22h22@@h22@@@@@%round@@@@@@@@@0caml_round_floatA@*caml_roundA@An3:3:o3|3@'unboxedo3|3o3|3@@o3|3o3|3@'noalloco3|3o3|3@@o3|3@@A@@$ceil@@@@@@@@@/caml_ceil_floatA@$ceilA@A z5;5; {5u5@'unboxed{5u5x{5u5@@{5u5u{5u5@'noalloc{5u5{5u5@@ {5u5@@/B@@%floor@0@@@4@@@@@0caml_floor_floatA@%floorA@A76(6(86e6|@'unboxed>6e6h?6e6o@@B6e6eC6e6p@'noallocI6e6tJ6e6{@@M6e6q@@\C@@*next_after@]@@@@c@@@g@@@@@@@4caml_nextafter_floatB@.caml_nextafterAA@Ak77l7K7@'unboxedr7K7zs7K7@@v7K7ww7K7@'noalloc}7K7~7K7@@7K7@@D@@)copy_sign@@@@@@@@@@@@@@@3caml_copysign_floatB@-caml_copysignAA@A99:G:^@'unboxed:G:J:G:Q@@:G:G:G:R@'noalloc:G:V:G:]@@:G:S@@E@@(sign_bit@@@@@@@@@2caml_signbit_floatA@,caml_signbitA@@;E;E;t;@'noalloc;t;;t;@@;t; @@F@@%frexp@@@@@@@@@@@@@@@@0caml_frexp_floatAAŠ@@@>I@'noalloc >>A >>H@@ !>>> @@ 0H@@$modf@ 1@@@@ 9@@@Ǡ@ ?@@@@@@@ɐ/caml_modf_floatAA @@@ A>u>u B>u>@@ QI@@!t;@@@A R@@@@@@@ P?? Q??@@@@ `J@A@'compare@@@@@@@@?@@@@@@@@ h?J?J i?J?d@@ xK@@%equal@@@@@@@@@@@@@@@@ @@ @@@@ L@@#min@/@@@@4@@@7@@@@@@@@ AA AA2@@ M@@#max@ @@@@ @@@ @@@@@@@@ AA AA@@ N@@'min_max@ @@@@ @@@@ @@@⠠@ @@@@@@@@@@ BB BB@@ O@@'min_num@@@@@@@@@@@@@@@@ CC CC@@ P@@'max_num@@@@@@@@@@@@@@@@ CC CD@@ Q@@+min_max_num@ @@@@ @@@@ @@@@ "@@@@@@@@@@ DD !DD@@ 0R@@+seeded_hash@@@@@@@@@@@@@@@@ 8EE 9EE@@ HS@@$hash@@@@!@@@@@@ JFF KFF@@ ZT@@Ӡ%Array@!t;@@@A*floatarrayS@@@@@@@ aGG bGG@@@@ qU@A@&length@@@@K@@@@@@ tHH uHH@@ V@@#get@@@@@_@@@ @@@@@@@@ HhHj HhH@@ W@@#set@+@@@@w@@@@ @@@$unitF@@@@@@@@@@ I#I% I#IH@@ X@@$make@@@@@ @@@U@@@@@@@@ JJ JJ#@@ Y@@&create@@@@g@@@@@@  JJ  JJ@@ Z@@$init@@@@@@@@@ @@@@@@@@@@@@@ KK KK@@ [@@+make_matrix@@@@@@@@@ @@@%arrayJ@@@@@@@@@@@@@ LL LM@@ )\@@+init_matrix@@@@@ @@@@@ @@@@ @@@ B@@@@@@@1@@@@@@@@@@@@@ H"NlNn I"NlN@@ X]@@&append@@@@@@@@@@@@@@@@ ^-PP _-PP2@@ n^@@&concat@$listK@@@@@@@@@@@@ v3QQ  w3QQ"@@ _@@#sub@@@@@ a@@@@ g@@@$@@@@@@@@@@ 6QhQj 6QhQ@@ `@@$copy@2@@@5@@@@@@ >RR >RR@@ a@@$fill@C@@@@ @@@@ @@@@ @@@@@@@@@@@@@@@ BSRST BSRS@@ b@@$blit@g@@@@ @@@@r@@@@ @@@@ @@@G@@@@@@@@@@@@@@ HTcTe HTcT@@ c@@'to_list@@@@ @@@@@@@@@ SVV SVV@@ d@@'of_list@ @@@@@@@@@@@@ VVV VVW@@ /e@@%equal@@ 2@@@@ 8@@@ [@@@@@ @@ @@@@ @@@@  i@@@ @@@@@@@ H^WW I^WX.@@ Xf@@'compare@@ [@@@@ a@@@ :@@@@@@@@@@@@@@@ H@@@@@@@@@@ qeXX reXY@@ g@@$iter@@ @@@@@@@@@@@@@@@ @@!@@"@ nZ#Z% nZ#ZL@@ h@@%iteri@@ w@@@#@ @@@$@@@%@@&@@'@@@@@( @@@)@@*@@+@ sZZ sZ[@@ i@@#map@@ @@@, @@@-@@.@^@@@/a@@@0@@1@@2@ x[[ x[[@@ j@@+map_inplace@@ @@@3 @@@4@@5@{@@@6D@@@7@@8@@9@ |\j\l |\j\@@ k@@$mapi@@ @@@:@ @@@; @@@<@@=@@>@@@@?@@@@@@A@@B@ ]]! ]]M@@ !l@@,mapi_inplace@@ @@@C@ *@@@D .@@@E@@F@@G@@@@H@@@I@@J@@K@ 5]] 6]^#@@ Em@@)fold_left@@#acc@P@ N@@@L @@M@@N@ @@@@O@@Q@@R@@S@ S^^ T^_@@ cn@@*fold_right@@ f@@@T@#acc@X@@U@@V@@@@W@  @@Y@@Z@@[@ q__ r__@@ o@@%iter2@@ @@@\@ @@@]@@@^@@_@@`@"@@@a@'@@@b@@@c@@d@@e@@f@ `` ``@@ p@@$map2@@ @@@g@ @@@h @@@i@@j@@k@K@@@l@P@@@mS@@@n@@o@@p@@q@ aa aa@@ q@@'for_all@@ @@@r @@@s@@t@m@@@u @@@v@@w@@x@ bb bc$@@ r@@&exists@@ @@@y @@@z@@{@@@@| @@@}@@~@@@ cc cc@@s@@#mem@@@@@@@@ 7@@@@@@@@dddd@@&t@@(mem_ieee@'@@@@@@@ O@@@@@@@@.ee/ee@@>u@@(find_opt@@A@@@ d@@@@@@@@@ ֠R@@@@@@@@@@@Qff RffS@@av@@*find_index@@d@@@ @@@@@@@@@  J@@@@@@@@@@@tgguggP@@w@@(find_map@@@@@ !a@@@@@@@$@@@ !@@@@@@@@hAhChAhx@@x@@)find_mapi@@ @@@@@@@ =!a@@@@@@@@@N@@@ K@@@@@@@@ii!ii^@@y@@$sort@@@@@@@@@ @@@@@@@@s@@@<@@@@@@@@j[j]j[j@@z@@+stable_sort@@@@@@@@@ @@@@@@@@@@@`@@@@@@@@ oo oo>@@{@@)fast_sort@@@@@@#@@@ @@@@@@@@@@@@@@@@@@@.pp/pq@@>|@@'shuffle$rand@ @@@ @@@@@@@@@@@@@@@@@NqpqrOqq@@^}@@&to_seq@@@@ #Seq!tj@@@@@@@@@issjss@@y~@@'to_seqi@@@@#Seq!t@ ]@@@Ԡ@@@@@@@@@@@@ t7t9 t7t_@@@@&of_seq@<#Seq!t@@@@@@8@@@@@@uuuu:@@@@,map_to_array@@@@@!a@@@@R@@@ @@@@@@@@ujuluju@@@@.map_from_array@@!a@@@@@@@Π@@@v@@@@@@@@vavcvav@@@@*unsafe_get@@@@@ @@@@@@@@@@6%floatarray_unsafe_getBAϠ@@@@mhjmh@@@@*unsafe_set@@@@@ @@@@@@@v@@@@@@@@@6%floatarray_unsafe_setCA@@@@@&n'n@@6@@@@*GG+p@:@@@Ӡ+ArrayLabels@!t;@@@A@@@R@@@@?tIK@tI^@@@@O@A@&length@@@@S)@@@T@@U@RySy@@b@@#get@@@@V@=@@@Wl@@@X@@Y@@Z@j|k|3@@z@@#set@+@@@[@U@@@\@@@@]@@@^@@_@@`@@a@@@@@$make@n@@@b@@@@cS@@@d@@e@@f@@@@@&create@@@@ge@@@h@@i@tvt@@@@$init@@@@j!f@@@@k@@@l@@m@@@n@@o@@p@797`@@@@+make_matrix$dimx@@@q$dimy@@@r@@@@s@@@t@@@u@@v@@w@@x@@@ @@+init_matrix$dimx@@@y$dimy@@@z!f@@@@{@@@@|(@@@}@@~@@@@@@@@@@@@@@@.*,/*x@@>@@&append@@@@@@@@@@@@@@@@DE@@T@@&concat@ @@@@@@ @@@@@@Z[@@j@@#sub@@@@#posG@@@#lenO@@@.@@@@@@@@@@{57|5]@@@@$copy@<@@@?@@@@@@@@@@$fill@M@@@#posy@@@#len@@@@@@@ @@@@@@@@@@@@)+)^@@@@$blit#srcw@@@'src_pos@@@#dst@@@'dst_pos@@@#len@@@=@@@@@@@@@@@@@@DFD@@@@'to_list@@@@@@@@@@@@@@@@@'of_list@@@@@@@@@@@@@@@%@@%equal"eq@*@@@@0@@@S@@@@@@@@@@@@@@@a@@@@@@@@@@@A3@@P@@'compare#cmp@U@@@@[@@@4@@@@@@@@@@@@@@@B@@@@@@@@@@kl#@@{@@$iter!f@@@@@@@@@@:@@@@@@@@@@@,.,W@@@@%iteri!f@u@@@@@@@@@@@@@@@`@@@@@@@@@@@,@@@@#map!f@@@@@@@@@@@@@@@@@@@@@@@@@+map_inplace!f@@@@@@@@@@@@@F@@@@@@@@{}{@@@@$mapi!f@@@@@ @@@@@@@@@@@@@@@@@@@@@@242b@@%@@,mapi_inplace!f@@@@@0@@@4@@@@@@@@@@@@@@@@@@@;<:@@K@@)fold_left!f@#acc@@V@@@ @@@@$init@@@@@@@@@@@] ^ /@@m@@*fold_right!f@r@@@@#acc@@@@@@.@@@$init  @@@@@@ @@@@@%iter2!f@@@@ @@@@ @@@ @@ @@@T@@@@Y@@@ @@@@@@@@@@ @@@@$map2!f@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'for_all!f@@@@  @@@!@@"@@@@#@@@$@@%@@&@#%'#%S@@@@&exists!f@ @@@',@@@(@@)@@@@*5@@@+@@,@@-@((1@@$@@#mem@%@@@.#set@@@/O@@@0@@1@@2@.-/- @@>@@(mem_ieee@?@@@3#set@@@4i@@@5@@6@@7@H2I2@@X@@(find_opt!f@]@@@8@@@9@@:@@@@;n@@@<@@@=@@>@@?@m7Y[n7Y@@}@@*find_index!f@@@@@@@@A@@B@<@@@Ch@@@D@@@E@@F@@G@=Z\=Z@@@@(find_map!f@@@@H3!a@L@@@I@@J@f@@@KA@@@M@@N@@O@EE@@@@)find_mapi!f@@@@P@@@@Q_!a@V@@@R@@S@@T@@@@Um@@@W@@X@@Y@JceJc@@@@$sort#cmp@@@@Z@@@@[@@@\@@]@@^@@@@_ `@@@`@@a@@b@ S S@@@@+stable_sort#cmp@@@@c@%@@@d@@@e@@f@@g@@@@h @@@i@@j@@k@0lPR1lP@@@@@)fast_sort#cmp@E@@@l@K@@@m$@@@n@@o@@p@@@@q @@@r@@s@@t@Vu.0Wu.h@@f@@'shuffle$rand@@@@@uD@@@v@@w@%@@@x @@@y@@z@@{@vywz@@@@&to_seq@7@@@|(#Seq!t@@@}@@@~@@@@@@@'to_seqi@Q@@@B#Seq!t@@@@@@@@@@@@@@@@@@@@&of_seq@c#Seq!t@@@@@@@@@@@@npn@@@@,map_to_array!f@@@@!a@@@@@@@ ۠ @@@@@@@@@@@@.map_from_array!f@!a@@@@@@@ @@@@@@@@@@@@@ @@*unsafe_get@@@@@@@@*@@@@@@@6%floatarray_unsafe_getBA@@@@-.@@=@@*unsafe_set@@@@@@@@@I@@@ @@@@@@@@@6%floatarray_unsafe_setCA@@@@@QRa@@a@@@@Us00Vcf@e@@@@_L-Stdlib__Float0iZKoDSe}}+Stdlib__Seq0nwzG&amg.Stdlib__Either0Vy`u~c à&Stdlib0Lku]8_٠8CamlinternalFormatBasics0%FU(Q/Tu@@@Caml1999T037XR^C-Stdlib__Float*ocaml.text&_none_@@A  Floating-point arithmetic. OCaml's floating-point numbers follow the IEEE 754 standard, using double precision (64 bits) numbers. Floating-point operations never raise an exception on overflow, underflow, division by zero, etc. Instead, special IEEE numbers are returned as appropriate, such as [infinity] for [1.0 /. 0.0], [neg_infinity] for [-1.0 /. 0.0], and [nan] ('not a number') for [0.0 /. 0.0]. These special numbers then propagate through floating-point computations as expected: for instance, [1.0 /. infinity] is [0.0], basic arithmetic operations ([+.], [-.], [*.], [/.]) with [nan] as an argument return [nan], ... @since 4.07 )float.mliYggg@@@@@@3@@@@@@#intA;@@@A@@@@@:@A@$charB;@@A@@@@@>@A@&stringQ;@@ A@@@@@B@@@%bytesC;@@ A@@@@@F@@@%floatD;@@A@@@@@J@@@$boolE;@@%falsec@@T@$trued@@Z@@@A@@@@@[@A@$unitF;@@"()e@@e@@@A@@@@@f@A@ #exnG;@@@A@@@@@j@@@#effH;@@O@A@A@@@@@@s@@@,continuationI;@@Q@@P@B@A@nY@@@@@@@@@%arrayJ;@@R@A@A@@@@@@@@@ $listK;@@S@A"[]f@@@"::g@@@T@@@ @@A@Y@@@@@@@@&optionL;@@V@A$Noneh@@@$Somei@@@@@A@Y@@@@@@@@)nativeintM;@@A@@@@@@@@%int32N;@@A@@@@@@@@%int64O;@@A@@@@@@@@&lazy_tP;@@X@AJA@Y@@@@@@@@5extension_constructorR;@@A@@@@@@@@*floatarrayS;@@A@@@@@@@@&iarrayT;@@Y@A[A@Y@@@@@@@@*atomic_locU;@@Z@AdA@@@@@@@@@.Assert_failure`#@@@@@J@@@@@@@@[@@A=ocaml.warn_on_literal_pattern @ @0Division_by_zero]#@@@A  @+End_of_file\#$@@@A@'FailureY#,@'@@A!$$@0Invalid_argumentX#5@0@@A*$-#-@-Match_failureV#>@@=@9@;@@a@@A;5>4>@)Not_foundZ#O@@@AC=F<F@-Out_of_memoryW#W@@@AKENDN@.Stack_overflow^#_@@@ASMVLV@.Sys_blocked_io_#g@@@A[U^T^@)Sys_error[#o@j@@Ad^g]g@:Undefined_recursive_modulea#x@@w@s@u@@h@@Auoxnx@:Continuation_already_takenb#@@@A}wv@&Stdlib@Ax$zeroi#i'@гJ%floati*i/@@ @@@@@@i@)ocaml.doc & The floating point 0. @since 4.08 j00kJ[@@@@@@@@@@@@@@@@@#onem]am]d@г%floatm]gm]l@@ @@@3@K8@A@@@m]] @9 & The floating-point 1. @since 4.08 nmmo@@@@@@@A@@@Iꐠ@@@@@@!)minus_oneqq@г%floatqq@@ @@@3@8K6@A@@@q @p ' The floating-point -1. @since 4.08  rs@@@@@@@&B@@@!@@@@@@!#neg$u%u@б@г%float/u0u@@ @@@310011111@:M8@A@@г%float>u?u@@ @@@@@@@@@@)%negfloatAA @@@NuOu @1 Unary negation. \v  ]v  @@@@@@@uC@@@q@@@@@@8#addtx " +ux " .@б@гA%floatx " 1x " 6@@ @@@3@Qf?@A@@б@гR%floatx " :x " ?@@ @@@@@г_%floatx " Cx " H@@ @@@@@@@@!@@@'@@$* @@)%addfloatBAb@@@@x " "x " V@!: Floating-point addition. y W Wy W v@@@@@@@D@@@2Ӑ@@@@@@J#sub{ x { x @б@г%float{ x { x @@ @@@3@cx?@A@@б@г%float{ x { x @@ @@@@@г%float{ x { x @@ @@@@@@@@!@@@'@@$* @@)%subfloatBAĠ@@@@{ x x{ x @= Floating-point subtraction.  |  !|  @@@@@@@9E@@@5@@@@@@J#mul8~  9~  @б@г%floatC~  D~  @@ @@@3EDDEEEEE@cx?@A@@б@г%floatT~  U~  @@ @@@@@г#%floata~  b~  @@ @@@@@@@@!@@@'@@$* @@)%mulfloatBA&@@@@t~  u~  @吠 Floating-point multiplication.     +@@@@@@@F@@@@@@@@@J#divA - 6A - 9@б@гg%floatA - <A - A@@ @@@3@cx?@A@@б@гx%floatA - EA - J@@ @@@@@г%floatA - NA - S@@ @@@@@@@@!@@@'@@$* @@)%divfloatBA@@@@A - -A - a@G: Floating-point division. B b bB b @@@@@@@G@@@X@@@@@@J#fmaD  D  @б@гɠ%floatD  D  @@ @@@3      @cx?@A@@б@гڠ%floatD  D  @@ @@@@@б@г預%float'D  (D  @@ @@@ @@г%float4D  5D  @@ @@@-@@@@@0@@@%@@3( @@@9@@6<@@.caml_fma_floatC@(caml_fmaAAA@ALD  ME  @'unboxedSE  TE  @@WE  XE  @'noalloc^E  _E  @@bE  @Ґ  [fma x y z] returns [x * y + z], with a best effort for computing this expression with a single rounding, using either hardware instructions (providing full IEEE compliance) or a software emulation. On 64-bit Cygwin, 64-bit mingw-w64 and MSVC 2017 and earlier, this function may be emulated owing to known bugs on limitations on these platforms. Note: since software emulation of the fma is costly, make sure that you are using hardware fma support if performance matters. @since 4.08 oF  pP  @@@@@@@H@--@)(@'&@# @@@@@@@|=#remR  R  @б@г]%floatR  R  @@ @@@3@_@A@@б@гn%floatR  R  @@ @@@@@г{%floatR  R  @@ @@@@@@@@!@@@'@@$* @@/caml_fmod_floatB@$fmodAA@AR  S 4 K@'unboxedS 4 7S 4 >@@S 4 4S 4 ?@'noallocS 4 CS 4 J@@S 4 @@S [rem a b] returns the remainder of [a] with respect to [b]. The returned value is [a -. n *. b], where [n] is the quotient [a /. b] rounded towards zero to an integer. T L LV @@@@@@@ I@,,@)(@'&@# @m@@@@@@i=$succX X @б@гޠ%floatXX@@ @@@3@^@A@@г%float+X,X@@ @@@@@@@@@@@6X @ [succ x] returns the floating point number right after [x] i.e., the smallest floating-point number greater than [x]. See also {!next_after}. @since 4.08 CYD\@@@@@@@\J@@@W@@@@@@1$predZ^[^@б@г'%floate^f^@@ @@@3gffggggg@J_8@A@@г6%floatt^u^@@ @@@@@@@@@@@^ @ [pred x] returns the floating-point number right before [x] i.e., the greatest floating-point number smaller than [x]. See also {!next_after}. @since 4.08 _b@@@@@@@K@@@@@@@@@1#absdd@б@гp%floatdd@@ @@@3@J_8@A@@г%floatdd@@ @@@@@@@@@@)%absfloatAA@@@dd@= , [abs f] returns the absolute value of [f]. ee@@@@@@@L@@@N@@@@@@7(infinitygg@г%floatgg@@ @@@3@Nc<@A@@@g @u4 Positive infinity. hh@@@@@@@+M@@@&@@@@@@!,neg_infinity )j!%*j!1@г%float2j!43j!9@@ @@@343344444@8K6@A@@@<j!! @4 Negative infinity. Ik::Jk:S@@@@@@@bN@@@]@@@@@@!#nan!`mUYamU\@г+%floatimU_jmUd@@ @@@3kjjkkkkk@8K6@A@@@smUU @㐠  A special floating-point value denoting the result of an undefined operation such as [0.0 /. 0.0]. Stands for 'not a number'. Any floating-point operation with [nan] as argument returns [nan] as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, [=], [<], [<=], [>] and [>=] return [false] and [<>] returns [true] if one or both of their arguments is [nan]. [nan] is [quiet_nan] since 5.1; it was a signaling NaN before. neevY@@@@@@@O@@@@@@@@@!-signaling_nan"x[_x[l@гb%floatx[ox[t@@ @@@3@8K6@A@@@x[[ @ Signaling NaN. The corresponding signals do not raise OCaml exception, but the value can be useful for interoperability with C libraries. @since 5.1 yuu|@@@@@@@P@@@*ː@@@@@@!)quiet_nan#~~(@г%float~+~0@@ @@@3@8K6@A@@@~ @Q< Quiet NaN. @since 5.1 11AR@@@@@@@Q@@@a@@@@@@!"pi$TXTZ@гР%floatT]Tb@@ @@@3@8K6@A@@@TT @2 The constant pi. %cc&cz@@@@@@@>R@@@9@@@@@@!)max_float%<|=|@г%floatE|F|@@ @@@3GFFGGGGG@8K6@A@@@O|| @ 4 The largest positive finite value of type [float]. \]@@@@@@@uS@@@p@@@@@@!)min_float&st@г>%float|}@@ @@@3~}}~~~~~@8K6@A@@@ @ J The smallest positive, non-zero, non-denormalized value of type [float]. 2@@@@@@@T@@@@@@@@@!'epsilon'484?@гu%float4B4G@@ @@@3@8K6@A@@@44 @- s The difference between [1.0] and the smallest exactly representable floating-point number greater than [1.0]. HH@@@@@@@U@@@=ސ@@@@@@!)is_finite(@б@г%float@@ @@@3@:M8@A@@г$bool@@ @@@@@@@@@@@ @v l [is_finite x] is [true] if and only if [x] is finite i.e., not infinite and not {!nan}. @since 4.08 @Q@@@@@@@,V@@@'@@@@@@1+is_infinite)*SW+Sb@б@г%float5Se6Sj@@ @@@376677777@J_8@A@@г$boolDSnESr@@ @@@@@@@@@@@OSS @ e [is_infinite x] is [true] if and only if [x] is {!infinity} or {!neg_infinity}. @since 4.08 \ss]@@@@@@@uW@@@p@@@@@@1&is_nan*st@б@г@%float~@@ @@@3@J_8@A@@гK$bool@@ @@@@@@@@@@@ @ W [is_nan x] is [true] if and only if [x] is not a number (see {!nan}). @since 4.08 EV@@@@@@@X@@@@@@@@@1*is_integer+X\Xf@б@г%floatXiXn@@ @@@3@J_8@A@@г$boolXrXv@@ @@@@@@@@@@@XX @Q L [is_integer x] is [true] if and only if [x] is an integer. @since 4.08 ww@@@@@@@ Y@@@a @@@@@@1&of_int,  @б@г㠐#int  @@ @@@3        @J_8@A@@г᠐%float  @@ @@@@@@@@@@+%floatofintAA@@@ . /@ ' Convert an integer to floating-point.  < =%@@@@@@@ UZ@@@ Q@@@@@@7&to_int- T'0 U'6@б@г !%float _'9 `'>@@ @@@3 a ` ` a a a a a@Pe>@A@@г A#int n'B o'E@@ @@@@@@@@@@+%intoffloatAA0@@@ }'' ~'U@ Truncate the given floating-point number to an integer. The result is unspecified if the argument is [nan] or falls outside the range of representable integers.  VV @@@@@@@ [@@@ @@@@@@7)of_string.  @б@г x&string  "@@ @@@3        @Pe>@A@@г %float & +@@ @@@@@@@@@@4caml_float_of_stringAA@@@  D@= ^ Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by [0x] or [0X]). The format of decimal floating-point numbers is [ [-] dd.ddd (e|E) [+|-] dd ], where [d] stands for a decimal digit. The format of hexadecimal floating-point numbers is [ [-] 0(x|X) hh.hhh (p|P) [+|-] dd ], where [h] stands for an hexadecimal digit and [d] for a decimal digit. In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional. The [_] (underscore) character can appear anywhere in the string and is ignored. Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon. @raise Failure if the given string is not a valid representation of a float.  EE @@@@@@@ \@@@N @@@@@@7-of_string_opt/  @б@г Ǡ&string  @@ @@@3        @Pe>@A@@г k&option  @г ؠ%float  @@ @@@@@@@@@ @@@$@@!'@@@ &@ = Same as [of_string], but returns [None] instead of raising.  3 4@@@@@@@ L]@@*@ G@@@@@@@)to_string0 J K%@б@г %float U( V-@@ @@@3 W V V W W W W W@Yn8@A@@г .&string d1 e7@@ @@@@@@@@@@@ o @ߐ  Return a string representation of a floating-point number. This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see {!Printf}. This function is an alias for {!Stdlib.string_of_float}.  |88 }D@@@@@@@ ^@@@ @@@@@@1A+'fpclass1A FK FR@@;@@)FP_normal2@@ fj fs@  " Normal number, none of the below  f~ f@@@@@@@ `@,FP_subnormal3@@  @ & 1 Number very close to 0.0, has reduced precision   @@@@@@@ a@'FP_zero4@@  @ =7 Number is 0.0 or -0.0    )@@@@@@@ b@+FP_infinite5@@ *, *9@ T ) Number is positive or negative infinity  *B *p@@@@@@@ c@&FP_nan6@@ qs q{@ k 0 Not a number: result of an undefined operation  q q@@@@@@@ !d@@@A 'fpclass@@@@@@@ FF@ b The five classes of floating-point numbers, as determined by the {!classify_float} function.   !&@@@@@@@A@ 9_@@#@z@@@  9@@@@@@# 8@t@@@  J@@@@@@# I}@n@@@  [~}@}}@@@}@}@#yy Z*.w@h@@@z  lxw@ww@@@w@w@#ss kquq@b@@@t  }rq@qq@@@q@q@@Aгm&Stdlib FU F[@t F\ Fc@@@|3        @0E;@@@A@@@@@@@@@@r@A@@  @@@@@@@3        @@A@.classify_float7 (1 (?@б@г w%float (C (H@@ @@@3        @2,&@A@'unboxed (K (R@@ (I (S@@г;'fpclass (X (_@@ @@@@@@ @@ (B @@3caml_classify_floatA@;caml_classify_float_unboxedA@@ (( b@'noalloc b b@@ b @ [ n Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.    @@@@@@@ e@  @@@ q @@@@@@S.#pow8   "   %@б@г ⠐%float   ( !  -@@ @@@ 3 " ! ! " " " " "@lN@A@@б@г %float 1  1 2  6@@ @@@ @@г %float >  : ?  ?@@ @@@ @@@@@!@@@'@@$* @@0caml_power_floatB@#powAA@A R   S [ r@'unboxed Y [ ^ Z [ e@@ ] [ [ ^ [ f@'noalloc d [ j e [ q@@ h [ g@ ؐ1 Exponentiation.  u s s v s @@@@@@@ f@,,@)(@'&@# @  @@@@@@i=$sqrt9      @б@г c%float      @@ @@@3        @^@A@@г r%float      @@ @@@@@@@@@@/caml_sqrt_floatA@$sqrtA@A      @'unboxed      @@      @'noalloc      @@   @ F. Square root.       @@@@@@@ g@++@)(@'&@# @ ` @@@@@@V=$cbrt:      @б@г Ѡ%float  !  !@@ @@@3        @o]@A@@г ࠐ%float  !   !@@ @@@@@@@@@@/caml_cbrt_floatA@)caml_cbrtA@A .   /!1!J@'unboxed 5!1!6 6!1!=@@ 9!1!3 :!1!>@'noalloc @!1!B A!1!I@@ D!1!?@ = Cube root. @since 4.13  Q!K!K R!k!m@@@@@@@ jh@++@)(@'&@# @  o@@@@@@V=#exp; r!o!x s!o!{@б@г ?%float }!o!~ ~!o!@@ @@@3  ~ ~     @o]@A@@г N%float !o! !o!@@ @@@@@@@@@@.caml_exp_floatA@#expA@A !o!o !o!@'unboxed !o! !o!@@ !o! !o!@'noalloc !o! !o!@@ !o!@ ". Exponential.  !! !!@@@@@@@ i@++@)(@'&@# @ < ݐ@@@@@@V=$exp2< !! !!@б@г %float !! !!@@ @@@3        @o]@A@@г %float !! !!@@ @@@@@@@@@@/caml_exp2_floatA@)caml_exp2A@A !! ""+@'unboxed""""@@""""@'noalloc""#""*@@ "" @ / Base 2 exponential function. @since 4.13 -",",."^"`@@@@@@@Fj@++@)(@'&@# @ K@@@@@@V=#log=N"b"kO"b"n@б@г%floatY"b"qZ"b"v@@ @@@3[ZZ[[[[[@o]@A@@г*%floath"b"zi"b"@@ @@@@@@@@@@.caml_log_floatA@#logA@Ax"b"by"b"@'unboxed"b""b"@@"b""b"@'noalloc"b""b"@@"b"@ 4 Natural logarithm. """"@@@@@@@k@++@)(@'&@# @ @@@@@@V=%log10>""""@б@г%float""""@@ @@@3@o]@A@@г%float""""@@ @@@ @@@@@!@@0caml_log10_floatA@%log10A@A""# # @'unboxed# # # #@@# # # #@'noalloc# ## #@@# #@ l4 Base 10 logarithm.  #!#! #!#:@@@@@@@"l@++@)(@'&@# @ '@@@@@@V=$log2?*#<#E+#<#I@б@г%float5#<#L6#<#Q@@ @@@"376677777@o]@A@@г%floatD#<#UE#<#Z@@ @@@#@@@@@$@@/caml_log2_floatA@)caml_log2A@AT#<#<U#{#@'unboxed[#{#\#{#@@_#{#}`#{#@'noallocf#{#g#{#@@j#{#@ ڐ $ Base 2 logarithm. @since 4.13 w##x##@@@@@@@m@++@)(@'&@# @ @@@@@@V=%expm1@####@б@гe%float####@@ @@@%3@o]@A@@гt%float####@@ @@@&@@@@@'@@0caml_expm1_floatA@*caml_expm1A@A##$$@'unboxed$$$$ @@$$$$ @'noalloc$$$$@@$$@H k [expm1 x] computes [exp x -. 1.0], giving numerically-accurate results even if [x] is close to [0.0]. $$$e$@@@@@@@n@++@)(@'&@# @b@@@@@@V=%log1pA$$$$@б@гӠ%float$$$$@@ @@@(3@o]@A@@г⠐%float $$!$$@@ @@@)@@@@@*@@0caml_log1p_floatA@*caml_log1pA@A0$$1$$@'unboxed7$$8$$@@;$$<$$@'noallocB$$C$$@@F$$@ [log1p x] computes [log(1.0 +. x)] (natural logarithm), giving numerically-accurate results even if [x] is close to [0.0]. S$$T%"%k@@@@@@@lo@++@)(@'&@# @q@@@@@@V=#cosBt %m%vu %m%y@б@гA%float %m%| %m%@@ @@@+3@o]@A@@гP%float %m% %m%@@ @@@,@@@@@-@@.caml_cos_floatA@#cosA@A %m%m %m%@'unboxed %m% %m%@@ %m% %m%@'noalloc %m% %m%@@ %m%@$ " Cosine. Argument is in radians.  %% %%@@@@@@@p@++@)(@'&@# @>ߐ@@@@@@V=#sinC %% %%@б@г%float %% %%@@ @@@.3@o]@A@@г%float %% %&@@ @@@/@@@@@0@@.caml_sin_floatA@#sinA@A  %%  %&3@'unboxed %& %&&@@ %& %&'@'noalloc %&+ %&2@@" %&(@ Sine. Argument is in radians. / &4&40 &4&Y@@@@@@@Hq@++@)(@'&@# @M@@@@@@V=#tanDP&[&dQ&[&g@б@г%float[&[&j\&[&o@@ @@@13]\\]]]]]@o]@A@@г,%floatj&[&sk&[&x@@ @@@2@@@@@3@@.caml_tan_floatA@#tanA@Az&[&[{&[&@'unboxed&[&&[&@@&[&&[&@'noalloc&[&&[&@@&[&@ # Tangent. Argument is in radians. &&&&@@@@@@@r@++@)(@'&@# @@@@@@@V=$acosE&&&&@б@г%float&&&&@@ @@@43@o]@A@@г%float&&&&@@ @@@5@@@@@6@@/caml_acos_floatA@$acosA@A&&''%@'unboxed''''@@''''@'noalloc''''$@@''@n } Arc cosine. The argument must fall within the range [[-1.0, 1.0]]. Result is in radians and is between [0.0] and [pi].  '&'& 'n'@@@@@@@$s@++@)(@'&@# @)@@@@@@V=$asinF,''-''@б@г%float7''8''@@ @@@7398899999@o]@A@@г%floatF''G''@@ @@@8@@@@@9@@/caml_asin_floatA@$asinA@AV''W''@'unboxed]''^''@@a''b''@'noalloch''i''@@l''@ܐ  Arc sine. The argument must fall within the range [[-1.0, 1.0]]. Result is in radians and is between [-pi/2] and [pi/2]. y''z(B(@@@@@@@t@++@)(@'&@# @@@@@@@V=$atanG((((@б@гg%float((((@@ @@@:3@o]@A@@гv%float((((@@ @@@;@@@@@<@@/caml_atan_floatA@$atanA@A((((@'unboxed((((@@((((@'noalloc((((@@((@J J Arc tangent. Result is in radians and is between [-pi/2] and [pi/2]. ((()#@@@@@@@u@++@)(@'&@# @d@@@@@@V=%atan2H!)%). !)%)3@б@гՠ%float!)%)6!)%);@@ @@@=3@o]@A@@б@г栐%float$!)%)?%!)%)D@@ @@@>@@г%float1!)%)H2!)%)M@@ @@@?@@@@@@!@@@'@@A$* @@0caml_atan2_floatB@%atan2AA@AE!)%)%F")k)@'unboxedL")k)nM")k)u@@P")k)kQ")k)v@'noallocW")k)zX")k)@@[")k)w@ː [atan2 y x] returns the arc tangent of [y /. x]. The signs of [x] and [y] are used to determine the quadrant of the result. Result is in radians and is between [-pi] and [pi]. h#))i%**B@@@@@@@v@,,@)(@'&@# @@@@@@@i=%hypotI'*D*M'*D*R@б@гV%float'*D*U'*D*Z@@ @@@B3@^@A@@б@гg%float'*D*^'*D*c@@ @@@C@@гt%float'*D*g'*D*l@@ @@@D@@@@@E!@@@'@@F$* @@0caml_hypot_floatB@*caml_hypotAA@A'*D*D(**@'unboxed(**(**@@(**(**@'noalloc(**(**@@(**@L 3 [hypot x y] returns [sqrt(x *. x +. y *. y)], that is, the length of the hypotenuse of a right-angled triangle with sides of length [x] and [y], or, equivalently, the distance of the point [(x,y)] to origin. If one of [x] or [y] is infinite, returns [infinity] even if the other is [nan]. )**-++@@@@@@@w@,,@)(@'&@# @f@@@@@@i=$coshJ /++ /++@б@гנ%float/++/++@@ @@@G3@^@A@@г栐%float$/++%/++@@ @@@H@@@@@I@@/caml_cosh_floatA@$coshA@A4/++50,,2@'unboxed;0,,<0,,%@@?0,,@0,,&@'noallocF0,,*G0,,1@@J0,,'@ - Hyperbolic cosine. Argument is in radians. W1,3,3X1,3,e@@@@@@@px@++@)(@'&@# @u@@@@@@V=$sinhKx3,g,py3,g,t@б@гE%float3,g,w3,g,|@@ @@@J3@o]@A@@гT%float3,g,3,g,@@ @@@K@@@@@L@@/caml_sinh_floatA@$sinhA@A3,g,g4,,@'unboxed4,,4,,@@4,,4,,@'noalloc4,,4,,@@4,,@( + Hyperbolic sine. Argument is in radians. 5,,5,,@@@@@@@y@++@)(@'&@# @B㐠@@@@@@V=$tanhL7,,7,,@б@г%float7,,7,-@@ @@@M3@o]@A@@г %float7,-7,- @@ @@@N@@@@@O@@/caml_tanh_floatA@$tanhA@A7,,8-%-<@'unboxed8-%-(8-%-/@@8-%-%8-%-0@'noalloc"8-%-4#8-%-;@@&8-%-1@ . Hyperbolic tangent. Argument is in radians. 39-=-=49-=-p@@@@@@@Lz@++@)(@'&@# @Q@@@@@@V=%acoshMT;-r-{U;-r-@б@г!%float_;-r-`;-r-@@ @@@P3a``aaaaa@o]@A@@г0%floatn;-r-o;-r-@@ @@@Q@@@@@R@@0caml_acosh_floatA@*caml_acoshA@A~;-r-r<--@'unboxed<--<--@@<--<--@'noalloc<--<--@@<--@ Hyperbolic arc cosine. The argument must fall within the range [[1.0, inf]]. Result is in radians and is between [0.0] and [inf]. @since 4.13 =--B.n.p@@@@@@@{@++@)(@'&@# @@@@@@@V=%asinhND.r.{D.r.@б@г%floatD.r.D.r.@@ @@@S3@o]@A@@г%floatD.r.D.r.@@ @@@T@@@@@U@@0caml_asinh_floatA@*caml_asinhA@AD.r.rE..@'unboxedE..E..@@E..E..@'noallocE..E..@@E..@r  Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians. @since 4.13 F..K/P/R@@@@@@@(|@++@)(@'&@# @-@@@@@@V=%atanhO0M/T/]1M/T/b@б@г%float;M/T/e<M/T/j@@ @@@V3=<<=====@o]@A@@г %floatJM/T/nKM/T/s@@ @@@W@@@@@X@@0caml_atanh_floatA@*caml_atanhA@AZM/T/T[N//@'unboxedaN//bN//@@eN//fN//@'noalloclN//mN//@@pN//@ Hyperbolic arc tangent. The argument must fall within the range [[-1.0, 1.0]]. Result is in radians and ranges over the entire real line. @since 4.13 }O//~T0X0Z@@@@@@@}@++@)(@'&@# @@@@@@@V=#erfPV0\0eV0\0h@б@гk%floatV0\0kV0\0p@@ @@@Y3@o]@A@@гz%floatV0\0tV0\0y@@ @@@Z@@@@@[@@.caml_erf_floatA@(caml_erfA@AV0\0\W00@'unboxedW00W00@@W00W00@'noallocW00W00@@W00@N Error function. The argument ranges over the entire real line. The result is always within [[-1.0, 1.0]]. @since 4.13 X00\1618@@@@@@@~@++@)(@'&@# @h @@@@@@V=$erfcQ ^1:1C ^1:1G@б@г٠%float^1:1J^1:1O@@ @@@\3@o]@A@@г蠐%float&^1:1S'^1:1X@@ @@@]@@@@@^@@/caml_erfc_floatA@)caml_erfcA@A6^1:1:7_1y1@'unboxed=_1y1~>_1y1@@A_1y1{B_1y1@'noallocH_1y1I_1y1@@L_1y1@ Complementary error function ([erfc x = 1 - erf x]). The argument ranges over the entire real line. The result is always within [[0.0, 2.0]]. @since 4.13 Y`11Ze2>2@@@@@@@@r@++@)(@'&@# @w@@@@@@V=%truncRzg2B2K{g2B2P@б@гG%floatg2B2Sg2B2X@@ @@@_3@o]@A@@гV%floatg2B2\g2B2a@@ @@@`@@@@@a@@0caml_trunc_floatA@*caml_truncA@Ag2B2Bh22@'unboxedh22h22@@h22h22@'noalloch22h22@@h22@* s [trunc x] rounds [x] to the nearest integer whose absolute value is less than or equal to [x]. @since 4.08 i22l3'38@@@@@@@@@++@)(@'&@# @D吠@@@@@@V=%roundSn3:3Cn3:3H@б@г%floatn3:3Kn3:3P@@ @@@b3@o]@A@@гĠ%floatn3:3Tn3:3Y@@ @@@c@@@@@d@@0caml_round_floatA@*caml_roundA@An3:3:o3|3@'unboxedo3|3o3|3@@o3|3o3|3@'noalloc$o3|3%o3|3@@(o3|3@ | [round x] rounds [x] to the nearest integer with ties (fractional values of 0.5) rounded away from zero, regardless of the current rounding direction. If [x] is an integer, [+0.], [-0.], [nan], or infinite, [x] itself is returned. On 64-bit mingw-w64, this function may be emulated owing to a bug in the C runtime library (CRT) on this platform. @since 4.08 5p336x5(59@@@@@@@NA@++@)(@'&@# @S@@@@@@V=$ceilTVz5;5DWz5;5H@б@г#%floataz5;5Kbz5;5P@@ @@@e3cbbccccc@o]@A@@г2%floatpz5;5Tqz5;5Y@@ @@@f@@@@@g@@/caml_ceil_floatA@$ceilA@Az5;5;{5u5@'unboxed{5u5x{5u5@@{5u5u{5u5@'noalloc{5u5{5u5@@{5u5@ Round above to an integer value. [ceil f] returns the least integer value greater than or equal to [f]. The result is returned as a float. |55~56&@@@@@@@B@++@)(@'&@# @ @@@@@@V=%floorU6(616(66@б@г%float6(696(6>@@ @@@h3@o]@A@@г%float6(6B6(6G@@ @@@i@@@@@j@@0caml_floor_floatA@%floorA@A6(6(6e6|@'unboxed6e6h6e6o@@6e6e6e6p@'noalloc6e6t6e6{@@6e6q@t Round below to an integer value. [floor f] returns the greatest integer value less than or equal to [f]. The result is returned as a float. 6}6}67@@@@@@@*C@++@)(@'&@# @/@@@@@@V=*next_afterV277&3770@б@г%float=773>778@@ @@@k3?>>?????@o]@A@@б@г%floatN77<O77A@@ @@@l@@г%float[77E\77J@@ @@@m@@@@@n!@@@'@@o$* @@4caml_nextafter_floatB@.caml_nextafterAA@Ao77p7K7@'unboxedv7K7zw7K7@@z7K7w{7K7@'noalloc7K77K7@@7K7@ Z [next_after x y] returns the next representable floating-point value following [x] in the direction of [y]. More precisely, if [y] is greater (resp. less) than [x], it returns the smallest (resp. largest) representable number greater (resp. less) than [x]. If [x] equals [y], the function returns [y]. If [x] or [y] is [nan], a [nan] is returned. Note that [next_after max_float infinity = infinity] and that [next_after 0. infinity] is the smallest denormalized positive number. If [x] is the smallest denormalized positive number, [next_after x 0. = 0.] @since 4.08 7799@@@@@@@D@,,@)(@'&@# @@@@@@@i=)copy_signW999:@б@г%float9:9: @@ @@@p3@^@A@@б@г%float9:9:@@ @@@q@@г%float9:9:@@ @@@r@@@@@s!@@@'@@t$* @@3caml_copysign_floatB@-caml_copysignAA@A99:G:^@'unboxed:G:J:G:Q@@:G:G:G:R@'noalloc:G:V:G:]@@:G:S@v [copy_sign x y] returns a float whose absolute value is that of [x] and whose sign is that of [y]. If [x] is [nan], returns [nan]. If [y] is [nan], returns either [x] or [-. x], but it is not specified which. :_:_;,;C@@@@@@@,E@,,@)(@'&@# @1@@@@@@i=(sign_bitX4;E;N5;E;V@б@г%float?;E;Z@;E;_@@ @@@u3A@@AAAAA@^@A@'unboxedL;E;bM;E;i@@P;E;`Q;E;j@@г$boolY;E;oZ;E;s@@ @@@v@@@ @@wb;E;Y @@2caml_signbit_floatA@,caml_signbitA@@j;E;Ek;t;@'noallocq;t;r;t;@@u;t; @吠 [sign_bit x] is [true] if and only if the sign bit of [x] is set. For example [sign_bit 1.] and [signbit 0.] are [false] while [sign_bit (-1.)] and [sign_bit (-0.)] are [true]. @since 4.08 ;;@A@'unboxed ==!==@@$==%==@@б@г#int/==0==@@ @@@~@(untagged:==;==@@>==?==@@г %floatG==H==@@ @@@4@'unboxedR=>S=> @@V=>W=> @@@)@@B[==\=> @@@J@@G`==@@0caml_ldexp_floatB@8caml_ldexp_float_unboxedAB@Ai==j>>I@'noallocp>>Aq>>H@@t>>> @䐠 $ [ldexp x n] returns [x *. 2 ** n]. >J>J>J>s@@@@@@@H@!!@@@@@@@@@~.$modf[>u>~>u>@б@гk%float>u>>u>@@ @@@3@O@A@@В@г~%float>u>>u>@@ @@@@@@г%float>u>>u>@@ @@@"@@@@@ @@) @@@/ @@,2@@/caml_modf_floatAA@@@>u>u>u>@R K [modf f] returns the pair of the fractional and integral part of [f]. >>>?@@@@@@@I@@@c@@@@@@QA+!t\B?? ??@@;@@@A@@@@@@@????@ 2 An alias for the type of floating-point numbers.  ??!??H@@@@@@@@@9J@@@Aг%float*?? @@3(''(((((@S*;@@@A2@@@@@@@@&#@@@A%@@'H%$@$$@@@$@$@@3@??@@@@@@@A32@'compare]M?J?NN?J?U@б@гP!tX?J?WY?J?X@@ @@@3ZYYZZZZZ@2[U@A@@б@гa!ti?J?\j?J?]@@ @@@@@гI#intv?J?aw?J?d@@ @@@@@@@@!@@@'@@$* @@@?J?J@ E [compare x y] returns [0] if [x] is equal to [y], a negative integer if [x] is less than [y], and a positive integer if [x] is greater than [y]. [compare] treats [nan] as equal to itself and less than any other float value. This treatment of [nan] ensures that [compare] defines a total ordering relation. ?e?e@@@@@@@@@K@@@@@@@@@C%equal^@@@@@б@г!t@@@@@@ @@@3@\q8@A@@б@г!t@@@@@@ @@@@@г$bool@@@@@@ @@@@@@@@!@@@'@@$* @@@@@@O K The equal function for floating-point numbers, compared using {!compare}. @@@A@@@@@@@L@@@_@@@@@@C#min_AA!AA$@б@г!tAA'AA(@@ @@@3@\q8@A@@б@г!tAA, AA-@@ @@@@@г$!t,AA1-AA2@@ @@@@@@@@!@@@'@@$* @@@:AA@ [min x y] returns the minimum of [x] and [y]. It returns [nan] when [x] or [y] is [nan]. Moreover [min (-0.) (+0.) = -0.] @since 4.08 GA3A3HAA@@@@@@@`M@@@[@@@@@@C#max`^AA_AA@б@г+%floatiAAjAA@@ @@@3kjjkkkkk@\q8@A@@б@г<%floatzAA{AA@@ @@@@@гI%floatAAAA@@ @@@@@@@@!@@@'@@$* @@@AA@ [max x y] returns the maximum of [x] and [y]. It returns [nan] when [x] or [y] is [nan]. Moreover [max (-0.) (+0.) = +0.] @since 4.08 AABpB@@@@@@@N@@@@@@@@@C'min_maxaBBBB@б@г%floatBBBB@@ @@@3@\q8@A@@б@г%floatBBBB@@ @@@@@В@г%floatBBBB@@ @@@"@@@г%floatBBBB@@ @@@1@@@@@ @@8 @@@- @@;0@@@A@@>D@@@ BB@z M [min_max x y] is [(min x y, max x y)], just more efficient. @since 4.08 BBBC@@@@@@@0O@@%@+@@@@@@]'min_numb.CC /CC@б@г1!t9CC:CC@@ @@@3;::;;;;;@v8@A@@б@гB!tJCCKCC@@ @@@@@гO!tWCCXCC@@ @@@@@@@@!@@@'@@$* @@@eCC@Ր [min_num x y] returns the minimum of [x] and [y] treating [nan] as missing values. If both [x] and [y] are [nan], [nan] is returned. Moreover [min_num (-0.) (+0.) = -0.] @since 4.08 rCCsCC@@@@@@@P@@@@@@@@@C'max_numcCCCC@б@г!tCCCC@@ @@@3@\q8@A@@б@г!tCCCC@@ @@@@@г!tCDCD@@ @@@@@@@@!@@@'@@$* @@@CC@0 [max_num x y] returns the maximum of [x] and [y] treating [nan] as missing values. If both [x] and [y] are [nan] [nan] is returned. Moreover [max_num (-0.) (+0.) = +0.] @since 4.08 DDDD@@@@@@@Q@@@@ᐠ@@@@@@C+min_max_numdDDDD@б@г%floatDDDD@@ @@@3@\q8@A@@б@г %floatDDDD@@ @@@@@В@гӠ%floatDDDD@@ @@@"@@@г⠐%float DD!DD@@ @@@1@@@@@ @@8 @@@- @@;0@@@A@@>D@@@5DD@ [min_max_num x y] is [(min_num x y, max_num x y)], just more efficient. Note that in particular [min_max_num x nan = (x, x)] and [min_max_num nan y = (y, y)]. @since 4.08 BDDCEE@@@@@@@[R@@%@V@@@@@@]+seeded_hasheYEEZEE@б@г7#intdEEeEE@@ @@@3feefffff@v8@A@@б@гm!tuEEvEE@@ @@@@@гU#intEEEE@@ @@@@@@@@!@@@'@@$* @@@EE@ A seeded hash function for floats, with the same output value as {!Hashtbl.seeded_hash}. This function allows this module to be passed as argument to the functor {!Hashtbl.MakeSeeded}. @since 5.1 EEFF@@@@@@@S@@@@@@@@@C$hashfFFFF@б@г!tFFFF@@ @@@3@\q8@A@@г#intFFFF@@ @@@@@@@@@@@FF @I An unseeded hash function for floats, with the same output value as {!Hashtbl.hash}. This function allows this module to be passed as argument to the functor {!Hashtbl.Make}. FFG`G@@@@@@@T@@@Y@@@@@@1%ArrayCGG GG@ @@БA+!tgD GG GG@@;@@AH@@@@@@@ GG GG@ L The type of float arrays with packed representation. @since 4.08  %GG &GH@@@@@@@@@ >U@@@Aг*floatarray /GG@@3 - , , - - - - -@n\);@@@A1@@@@@@@@&#@@@A%@@' M%$@$$@@@$@$@@3 E D D E E E E E@@A32@&lengthh RHH  SHH@б@гO!t ]HH ^HH@@ @@@3 _ ^ ^ _ _ _ _ _@2ZT@A@@г ?#int lHH mHH@@ @@@@@@@@@@@ wHH @琠 A Return the length (number of elements) of the given floatarray.  HH  HHf@@@@@@@ V@@@ @@@@@@1#geti HhHn HhHq@б@г!t HhHt HhHu@@ @@@3        @J_8@A@@б@г #int HhHy HhH|@@ @@@@@г %float HhH HhH@@ @@@@@@@@!@@@'@@$* @@@ HhHj@B [get a n] returns the element number [n] of floatarray [a]. @raise Invalid_argument if [n] is outside the range 0 to [(length a - 1)].  HH II!@@@@@@@ W@@@R 󐠠@@@@@@C#setj I#I) I#I,@б@г!t!I#I/!I#I0@@ @@@3!!!!!!!!@\q8@A@@б@г 堐#int!I#I4!I#I7@@ @@@@@б@г 㠐%float!!I#I;!"I#I@@@ @@@ @@г ۠$unit!.I#ID!/I#IH@@ @@@-@@@@@0@@@%@@3( @@@9@@6<@@@!?I#I%@ [set a n x] modifies floatarray [a] in place, replacing element number [n] with [x]. @raise Invalid_argument if [n] is outside the range 0 to [(length a - 1)]. !LIIIK!MIJ@@@@@@@!eX@@!@!`@@@@@@U$makek!cJJ !dJJ@б@г!A#int!nJJ!oJJ@@ @@@3!p!o!o!p!p!p!p!p@n8@A@@б@г!A%float!JJ!JJ@@ @@@@@г~!t!JJ"!JJ#@@ @@@@@@@@!@@@'@@$* @@@!JJ@ [make n x] returns a fresh floatarray of length [n], initialized with [x]. @raise Invalid_argument if [n < 0] or [n > Sys.max_floatarray_length]. ! J$J&! JuJ@@@@@@@!Y@@@ !@@@@@@C&createl! JJ! JJ@б@г!#int! JJ! JJ@@ @@@3!!!!!!!!@\q8@A@@гʠ!t! JJ! JJ@@ @@@@@@@@@@@! JJ @ S [create n] returns a fresh floatarray of length [n], with uninitialized data. @raise Invalid_argument if [n < 0] or [n > Sys.max_floatarray_length]. ! JJ!K8K@@@@@@@" Z@@@ c"@@@@@@1$initm"KK"KK@б@г!堐#int"KK"KK@@ @@@3""""""""@J_8@A@@б@б@г!#int"%KK"&KK@@ @@@@@г!%float"2KK"3KK@@ @@@ @@@@@#@@г4!t"BKK"CKK@@ @@@0@@@@@3"KKK @@@:@@7= @@@"QKK@ / [init n f] returns a fresh floatarray of length [n], with element number [i] initialized to the result of [f i]. In other terms, [init n f] tabulates the results of [f] applied to the integers [0] to [n-1]. @raise Invalid_argument if [n < 0] or [n > Sys.max_floatarray_length]. "^KK"_LL@@@@@@@"w[@@@ "r@@@@@@V+make_matrixn"uLL"vLL@б@г"S#int"LL"LM@@ @@@3""""""""@o8@A@@б@г"d#int"LM"LM@@ @@@@@б@г"b%float"LM "LM@@ @@@ @@г"3%array"LM"LM@г!t"LM"LM@@ @@@7@@@@@@< @@@"@@?%@@@4@@B7@@@H@@EK@@@"LL @!= G [make_matrix dimx dimy e] returns a two-dimensional array (an array of arrays) with first dimension [dimx] and second dimension [dimy], where all elements are initialized with [e]. @raise Invalid_argument if [dimx] or [dimy] is negative or greater than {!Sys.max_floatarray_length}. @since 5.2 "MM" NWNj@@@@@@@"\@@0@!M"@@@@@@d+init_matrixo""NlNr""NlN}@б@г"Ϡ#int""NlN""NlN@@ @@@3""""""""@}8@A@@б@г"ࠐ#int# "NlN#"NlN@@ @@@@@б@б@г"#int#"NlN#"NlN@@ @@@"@@б@г##int#-"NlN#."NlN@@ @@@1@@г"%float#:"NlN#;"NlN@@ @@@>@@@@@A@@@%@@D( @@г"Ӡ%array#M"NlN#N"NlN@гI!t#W"NlN#X"NlN@@ @@@[@@@@@@` @@@!@@c#e"NlN@@@Y@@g\@@@m@@jp@@@#n"NlNn!@!ސ ` [init_matrix dimx dimy f] returns a two-dimensional array (an array of arrays) with first dimension [dimx] and second dimension [dimy], where the element at index ([x,y]) is initialized with [f x y]. @raise Invalid_argument if [dimx] or [dimy] is negative or greater than {!Sys.max_floatarray_length}. @since 5.2 #{#NN#|+PP@@@@@@@#]@@1@!#@@@@@@&appendp#-PP#-PP$@б@г!t#-PP'#-PP(@@ @@@3########@8@A@@б@г!t#-PP,#-PP-@@ @@@@@г!t#-PP1#-PP2@@ @@@@@@@@!@@@'@@$* @@@#-PP@"9 [append v1 v2] returns a fresh floatarray containing the concatenation of the floatarrays [v1] and [v2]. @raise Invalid_argument if [length v1 + length v2 > Sys.max_floatarray_length]. #.P3P5#1PQ@@@@@@@#^@@@"I#ꐠ@@@@@@C&concatq#3QQ#3QQ@б@г#t$list#3QQ#3QQ@г!t$3QQ$3QQ@@ @@@3$$$$$$$$@f{B@A@@@ @@@ @@г!t$3QQ!$3QQ"@@ @@@@@@@@@@@$!3QQ  @" < Same as {!append}, but concatenates a list of floatarrays. $.4Q#Q%$/4Q#Qf@@@@@@@$G_@@@"$B@@@@@@6#subr$E6QhQn$F6QhQq@б@гB!t$P6QhQt$Q6QhQu@@ @@@ 3$R$Q$Q$R$R$R$R$R@On8@A@@б@г$4#int$a6QhQy$b6QhQ|@@ @@@ @@б@г$C#int$p6QhQ$q6QhQ@@ @@@  @@гo!t$}6QhQ$~6QhQ@@ @@@ -@@@@@ 0@@@%@@3( @@@9@@6<@@@$6QhQj@" ; [sub a pos len] returns a fresh floatarray of length [len], containing the elements number [pos] to [pos + len - 1] of floatarray [a]. @raise Invalid_argument if [pos] and [len] do not designate a valid subarray of [a]; that is, if [pos < 0], or [len < 0], or [pos + len > length a]. $7QQ$<RR@@@@@@@$`@@!@#$@@@@@@U$copys$>RR$>RR@б@г!t$>RR$>RR@@ @@@3$$$$$$$$@n8@A@@г!t$>RR$>RR@@ @@@@@@@@@@@$>RR @#G h [copy a] returns a copy of [a], that is, a fresh floatarray containing the same elements as [a]. $?RR$@S#SP@@@@@@@$a@@@#W$@@@@@@1$fillt$BSRSX$BSRS\@б@г!t%BSRS_%BSRS`@@ @@@3%%%%%%%%@J_8@A@@б@г$ꠐ#int%BSRSd%BSRSg@@ @@@@@б@г$#int%&BSRSk%'BSRSn@@ @@@ @@б@г$%float%5BSRSr%6BSRSw@@ @@@/@@г$$unit%BBSRS{%CBSRS@@ @@@<@@@@@?@@@%@@B( @@@7@@E:@@@K@@HN@@@%VBSRST@#Ɛ [fill a pos len x] modifies the floatarray [a] in place, storing [x] in elements number [pos] to [pos + len - 1]. @raise Invalid_argument if [pos] and [len] do not designate a valid subarray of [a]. %cCSS%dFT6Ta@@@@@@@%|b@@$@#%w@@@@@@g$blitu%zHTcTi%{HTcTm@б@гw!t%HTcTp%HTcTq@@ @@@3%%%%%%%%@8@A@@б@г%i#int%HTcTu%HTcTx@@ @@@@@б@г!t%HTcT|%HTcT}@@ @@@ @@б@г%#int%HTcT%HTcT@@ @@@/@@б@г%#int%HTcT%HTcT@@ @@@ >@@г%}$unit%HTcT%HTcT@@ @@@!K@@@@@"N@@@%@@#Q( @@@7@@$T:@@@I@@%WL@@@]@@&Z`@@@%HTcTe@$W  [blit src src_pos dst dst_pos len] copies [len] elements from floatarray [src], starting at element number [src_pos], to floatarray [dst], starting at element number [dst_pos]. It works correctly even if [src] and [dst] are the same floatarray, and the source and destination chunks overlap. @raise Invalid_argument if [src_pos] and [len] do not designate a valid subarray of [src], or if [dst_pos] and [len] do not designate a valid subarray of [dst]. %ITT%QVdV@@@@@@@& c@@'@$g&@@@@@@y'to_listv& SVV& SVV@б@г!t&SVV&SVV@@ @@@'3&&&&&&&&@8@A@@г%$list&%SVV&&SVV@г%%float&/SVV&0SVV@@ @@@(@@@@@@* @@@$@@+!'@@@&?SVV@$ : [to_list a] returns the list of all the elements of [a]. &LTVV&MTVV@@@@@@@&ed@@*@$&`@@@@@@@'of_listw&cVVV&dVVW@б@г%ꠐ$list&nVVW &oVVW@г&:%float&xVVW&yVVW @@ @@@,3&z&y&y&z&z&z&z&z@cxB@A@@@ @@@. @@г~!t&VVW&VVW@@ @@@/@@@@@0@@@&VVV @% [of_list l] returns a fresh floatarray containing the elements of [l]. @raise Invalid_argument if the length of [l] is greater than [Sys.max_floatarray_length].&WWW&ZWW@@@@@@@&e@@@%&@@@@@@6&&Ő; {1:comparison Comparison} &\WW&\WW@@@@@@3&&&&&&&&@Hg1@A%equalx&^WW&^WX@б@б@г&%float&^WX&^WX @@ @@@1@@б@г&%float&^WX&^WX@@ @@@2+@@г&$bool&^WX&^WX@@ @@@38@@@@@4;@@@%@@5>( @@б@г!t' ^WX ' ^WX!@@ @@@6M@@б@г !t'^WX%'^WX&@@ @@@7\@@г&栐$bool'(^WX*')^WX.@@ @@@8i@@@@@9l@@@%@@:o( @@@6@@;r'7^WX@@@':^WW@% [equal eq a b] is [true] if and only if [a] and [b] have the same length [n] and for all [i] in \[[0];[n-1]\], [eq a.(i) b.(i)] is [true]. @since 5.4 'G_X/X1'HcXX@@@@@@@'`f@@"@%'[@@@@@@'comparey'^eXX'_eXX@б@б@г'-%float'keXX'leXX@@ @@@<3'm'l'l'm'm'm'm'm@:@A@@б@г'>%float'|eXX'}eXY@@ @@@=@@г'\#int'eXY'eXY@@ @@@>@@@@@?!@@@'@@@$* @@б@г!t'eXY 'eXY@@ @@@A3@@б@г!t'eXY'eXY@@ @@@BB@@г'#int'eXY'eXY@@ @@@CO@@@@@DR@@@%@@EU( @@@6@@FX'eXX@@@'eXX@&< [compare cmp a b] compares [a] and [b] according to the shortlex order, that is, shorter arrays are smaller and equal-sized arrays are compared in lexicographic order using [cmp] to compare elements. @since 5.4 'fYY'jYZ @@@@@@@'g@@"@&L'퐠@@@@@@x''/ {1 Iterators} 'lZ Z 'lZ Z!@@@@@@3''''''''@1@A$iterz(nZ#Z)(nZ#Z-@б@б@г'Ҡ%float(nZ#Z1(nZ#Z6@@ @@@G@@г'ʠ$unit(nZ#Z:(nZ#Z>@@ @@@H)@@@@@I,@@б@г!!t(/nZ#ZC(0nZ#ZD@@ @@@J;@@г'預$unit(<nZ#ZH(=nZ#ZL@@ @@@KH@@@@@LK@@@$@@MN(HnZ#Z0 @@@(KnZ#Z%@& [iter f a] applies function [f] in turn to all the elements of [a]. It is equivalent to [f a.(0); f a.(1); ...; f a.(length a - 1); ()]. (XoZMZO(YqZZ@@@@@@@(qh@@@&(l@@@@@@n%iteri{(osZZ(psZZ@б@б@г(O#int(|sZZ(}sZZ@@ @@@N3(~(}(}(~(~(~(~(~@:@A@@б@г(O%float(sZ[(sZ[@@ @@@O@@г(G$unit(sZ[ (sZ[@@ @@@P@@@@@Q!@@@'@@R$* @@б@г!t(sZ[(sZ[@@ @@@S3@@г(i$unit(sZ[(sZ[@@ @@@T@@@@@@UC@@@$@@VF(sZZ @@@(sZZ@'; Same as {!iter}, but the function is applied with the index of the element as first argument, and the element itself as second argument. (t[[!(v[[@@@@@@@(i@@@'K(쐠@@@@@@f#map|(x[[(x[[@б@б@г(%float(x[[(x[[@@ @@@W3((((((((@:@A@@г(͠%float) x[[) x[[@@ @@@X@@@@@Y@@б@г !t)x[[)x[[@@ @@@Z!@@г !t)*x[[)+x[[@@ @@@[.@@@@@\1@@@$@@]4)6x[[ @@@)9x[[@' | [map f a] applies function [f] to all the elements of [a], and builds a floatarray with the results returned by [f]. )Fy[[)Gz\&\h@@@@@@@)_j@@@')Z@@@@@@T+map_inplace})]|\j\p)^|\j\{@б@б@г),%float)j|\j\)k|\j\@@ @@@^3)l)k)k)l)l)l)l)l@o:@A@@г);%float)y|\j\)z|\j\@@ @@@_@@@@@`@@б@г }!t)|\j\)|\j\@@ @@@a!@@г)E$unit)|\j\)|\j\@@ @@@b.@@@@@c1@@@$@@d4)|\j\~ @@@)|\j\l@( z [map_inplace f a] applies function [f] to all elements of [a], and updates their values in place. @since 5.1 )}\\)] ]@@@@@@@)k@@@(')Ȑ@@@@@@T$mapi~)]]%)]])@б@б@г)#int)]]-)]]0@@ @@@e3))))))))@o:@A@@б@г)%float)]]4)]]9@@ @@@f@@г)%float)]]=)]]B@@ @@@g@@@@@h!@@@'@@i$* @@б@г !t* ]]G* ]]H@@ @@@j3@@г !t*]]L*]]M@@ @@@k@@@@@@lC@@@$@@mF*$]], @@@*']]!@( Same as {!map}, but the function is applied to the index of the element as first argument, and the element itself as second argument. *4]N]P*5]]@@@@@@@*Ml@@@(*H@@@@@@f,mapi_inplace*K]]*L]]@б@б@г*+#int*X]^*Y]^@@ @@@n3*Z*Y*Y*Z*Z*Z*Z*Z@:@A@@б@г*+%float*i]^*j]^ @@ @@@o@@г*8%float*v]^*w]^@@ @@@p@@@@@q!@@@'@@r$* @@б@г }!t*]^*]^@@ @@@s3@@г*E$unit*]^*]^#@@ @@@t@@@@@@uC@@@$@@vF*]] @@@*]]@) Same as {!map_inplace}, but the function is applied to the index of the element as first argument, and the element itself as second argument. @since 5.1 *^$^&*^^@@@@@@@*m@@@)'*Ȑ@@@@@@f)fold_left*^^*^^@б@б@А#acc@E@w3********@}6@A*^^*^^@@б@г*%float*^^*^^@@ @@@x@@А#acc*^^*^^@@@ !@@y@@@$@@z@@б@А#acc*%*^_+^_@@б@г !t+ ^_+ ^_ @@ @@@{6@@А#acc?:+^_ +^_@@@ D@@|?@@@G@@}B@@@(@@~E+^^ @@@+"^^@) [fold_left f x init] computes [f (... (f (f x init.(0)) init.(1)) ...) init.(n-1)], where [n] is the length of the floatarray [init]. +/__+0_r_@@@@@@@+Hn@@@)+C@@@@@@e*fold_right+F__+G__@б@б@г+%float+S__+T__@@ @@@3+U+T+T+U+U+U+U+U@:@A@@б@А#acc@E@ +f__+g__@@А#acc +l__+m__@@@@@ @@@@@!@@б@г o!t+}__+~__@@ @@@*@@б@А#acc(0+__+__@@А#acc.6+__+__@@@33@@; @@@@@>@@@(@@A+__ @@@+__@* [fold_right f a init] computes [f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...))], where [n] is the length of the floatarray [a]. +__+`J`@@@@@@@+o@@@*+@@@@@@a++ː= {1 Iterators on two arrays} +``+``@@@@@@3++++++++@s1@A%iter2+``+``@б@б@г+%float+``+``@@ @@@@@б@г+%float+``+``@@ @@@+@@г+$unit+``+``@@ @@@8@@@@@;@@@%@@>( @@б@г !t,``,``@@ @@@M@@б@г !t,!``,"``@@ @@@\@@г+۠$unit,.``,/``@@ @@@i@@@@@l@@@%@@o( @@@6@@r,=``@@@,@``@* [Array.iter2 f a b] applies function [f] to all the elements of [a] and [b]. @raise Invalid_argument if the floatarrays are not the same size. ,M``,Na;a@@@@@@@,fp@@"@*,a@@@@@@$map2,daa,eaa@б@б@г,3%float,qaa,raa@@ @@@3,s,r,r,s,s,s,s,s@:@A@@б@г,D%float,aa,aa@@ @@@@@г,Q%float,aa,aa@@ @@@@@@@@!@@@'@@$* @@б@г !t,aa,aa@@ @@@3@@б@г !t,aa,aa@@ @@@B@@г !t,aa,aa@@ @@@O@@@@@R@@@%@@U( @@@6@@X,aa@@@,aa@+B  [map2 f a b] applies function [f] to all the elements of [a] and [b], and builds a floatarray with the results returned by [f]: [[| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|]]. @raise Invalid_argument if the floatarrays are not the same size. ,aa,bb@@@@@@@,q@@"@+R,󐠠@@@@@@x--4 {1 Array scanning} ,bb,bb@@@@@@3,,,,,,,,@1@A'for_all- bb- bc@б@б@г,ؠ%float-bc -bc@@ @@@@@г,᠐$bool-#bc-$bc@@ @@@)@@@@@,@@б@г '!t-5bc-6bc@@ @@@;@@г-$bool-Bbc -Cbc$@@ @@@H@@@@@K@@@$@@N-Nbc @@@-Qbb@+ [for_all f [|a1; ...; an|]] checks if all elements of the floatarray satisfy the predicate [f]. That is, it returns [(f a1) && (f a2) && ... && (f an)]. -^c%c'-_cc@@@@@@@-wr@@@+-r@@@@@@n&exists-ucc-vcc@б@б@г-D%float-cc-cc@@ @@@3--------@:@A@@г-O$bool-cc-cc@@ @@@@@@@@@@б@г !t-cc-cc@@ @@@!@@г-n$bool-cc-cc@@ @@@.@@@@@1@@@$@@4-cc @@@-cc@,/ [exists f [|a1; ...; an|]] checks if at least one element of the floatarray satisfies the predicate [f]. That is, it returns [(f a1) || (f a2) || ... || (f an)]. -dd-dd@@@@@@@-s@@@,?-@@@@@@T#mem-dd-dd@б@г-%float-dd-dd@@ @@@3--------@m8@A@@б@г !t-dd.dd@@ @@@@@г-ʠ$bool. dd. dd@@ @@@@@@@@!@@@'@@$* @@@.dd@, [mem a set] is true if and only if there is an element of [set] that is structurally equal to [a], i.e. there is an [x] in [set] such that [compare a x = 0]. .'dd.(eie@@@@@@@.@t@@@,.;@@@@@@C(mem_ieee.>ee.?ee@б@г. %float.Iee.Jee@@ @@@3.K.J.J.K.K.K.K.K@\q8@A@@б@гL!t.Zee.[ee@@ @@@@@г.%$bool.gee.hee@@ @@@@@@@@!@@@'@@$* @@@.uee@,吠 H Same as {!mem}, but uses IEEE equality instead of structural equality. .ee.ee@@@@@@@.u@@@,.@@@@@@C..5 {1 Array searching} .ff.ff@@@@@@3........@Uj1@A(find_opt.ff$.ff,@б@б@г.{%float.ff0.ff5@@ @@@@@г.$bool.ff9.ff=@@ @@@)@@@@@,@@б@гʠ!t.ffB.ffC@@ @@@;@@г.D&option.ffM.ffS@г.%float.ffG.ffL@@ @@@R@@@@@@W @@@"@@Z%@@@3@@]/ff/@@@/ff @@/v@@ @@d*find_index/gg"/gg,@б@б@г.ݠ%float/gg0/gg5@@ @@@3////////@z!@A@@г.蠐$bool/*gg8/+gg<@@ @@@@@@@@@@б@г.!t/<ggA/=ggB@@ @@@!@@г.&option/IggJ/JggP@г/&#int/SggF/TggI@@ @@@8@@@@@@= @@@"@@@%@@@3@@C/dgg/@@@/ggg@-א [find_index f a] returns [Some i], where [i] is the index of the first element of the array [a] that satisfies [f x], if there is such an element. It returns [None] if there is no such element. @since 5.1 /tgQgS/uh,h?@@@@@@@/w@@.@-/@@@@@@c(find_map/hAhG/hAhO@б@б@г/Z%float/hAhS/hAhX@@ @@@3////////@~:@A@@г/&option/hAh_/hAhe@А!a@E@/hAh\/hAh^@@@ @@@@@@"@@%@@б@г!t/hAhj/hAhk@@ @@@.@@г/2&option/hAhr/hAhx@А!a,</hAho/hAhq@@@2@@@C @@@@@F@@@,@@I/hAhR@@@/hAhC@@0x@@@@P)find_mapi/ii%/ii.@б@б@г/ՠ#int0ii20ii5@@ @@@300000000@k!@A@@б@г/ՠ%float0ii90ii>@@ @@@@@г/&option0 iiE0!iiK@А!a@E@$0,iiB0-iiD@@@ @@@+@@@ @@.#@@@4@@17@@б@г4!t0BiiP0CiiQ@@ @@@@@@г/&option0OiiX0Pii^@А!a/N0ViiU0WiiW@@@5@@@U @@@@@X@@@,@@[0cii1@@@0fii!@.֐ Same as [find_map], but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument. @since 5.1 0si_ia0tj j@@@@@@@0y@@'@.0@@@@@@{00 1 {1:sorting_and_shuffling Sorting and shuffling} 0j!j#0j!jY@@@@@@300000000@1@A$sort0j[ja0j[je@б@б@г0l%float0j[ji0j[jn@@ @@@@@б@г0{%float0j[jr0j[jw@@ @@@+@@г0#int0j[j{0j[j~@@ @@@8@@@@@;@@@%@@>( @@б@г͠!t0j[j0j[j@@ @@@M@@г0$unit0j[j0j[j@@ @@@Z@@@@@]@@@$@@`0j[jh @@@0j[j]@/g p Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, {!Stdlib.compare} is a suitable comparison function. After calling [sort], the array is sorted in place in increasing order. [sort] is guaranteed to run in constant heap space and (at most) logarithmic stack space. The current implementation uses Heap Sort. It runs in constant stack space. Specification of the comparison function: Let [a] be the floatarray and [cmp] the comparison function. The following must be true for all [x], [y], [z] in [a] : - [cmp x y] > 0 if and only if [cmp y x] < 0 - if [cmp x y] >= 0 and [cmp y z] >= 0 then [cmp x z] >= 0 When [sort] returns, [a] contains the same elements as before, reordered in such a way that for all i and j valid indices of [a] : - [cmp a.(i) a.(j)] >= 0 if i >= j 1jj1oo@@@@@@@1z@@@/w1@@@@@@+stable_sort1oo 1oo@б@б@г0ꠐ%float1(oo1)oo @@ @@@31*1)1)1*1*1*1*1*@:@A@@б@г0%float19oo$1:oo)@@ @@@@@г1#int1Foo-1Goo0@@ @@@@@@@@!@@@'@@$* @@б@гM!t1[oo51\oo6@@ @@@3@@г1$unit1hoo:1ioo>@@ @@@@@@@@@C@@@$@@F1too @@@1woo@/琠  Same as {!sort}, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space. The current implementation uses Merge Sort. It uses a temporary floatarray of length [n/2], where [n] is the length of the floatarray. It is usually faster than the current implementation of {!sort}. 1o?oA1pp@@@@@@@1{@@@/1@@@@@@f)fast_sort1pp1pp@б@б@г1j%float1pp1pp@@ @@@311111111@:@A@@б@г1{%float1pp1pq@@ @@@@@г1#int1pq1pq@@ @@@@@@@@!@@@'@@$* @@б@г͠!t1pq 1pq@@ @@@3@@г1$unit1pq1pq@@ @@@@@@@@@C@@@$@@F1pp @@@1pp@0g P Same as {!sort} or {!stable_sort}, whichever is faster on typical input. 2qq2qTqn@@@@@@@2|@@@0w2@@@@@@f'shuffle2qpqv2qpq}@б$randб@г1#int2*qq2+qq@@ @@@32,2+2+2,2,2,2,2,@<@A@@г2 #int29qq2:qq@@ @@@@@@@@@@б@г=!t2Kqq2Lqq@@ @@@!@@г2$unit2Xqq2Yqq@@ @@@.@@@@@1@@D$@@42dqq @@@2gqpqr@0א  [shuffle rand a] randomly permutes [a]'s elements using [rand] for randomness. The distribution of permutations is uniform. [rand] must be such that a call to [rand n] returns a uniformly distributed random number in the range \[[0];[n-1]\]. {!Random.int} can be used for this (do not forget to {{!Random.self_init}initialize} the generator). @since 5.2 2tqq2usEsX@@@@@@@2}@@@02@@@@@@T22 {1 Float arrays and Sequences} 2sZs\2sZs@@@@@@322222222@f1@A&to_seqϠ2ss2ss@б@г!t2ss2ss@@ @@@@@г1?#Seq!t2ss2ss@ 2ss2ss@@г2%float2ss2ss@@ @@@ +:@@@ @@@ -? @@@+@@ .B.@@@2ss@1I Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence. 2 ss2 st5@@@@@@@2~@@+@1Y2@@@@@@a'to_seqiР2 t7t=2 t7tD@б@г!t3 t7tG3  t7tH@@ @@@ /33 3 3 3 3 3 3 3 @zu8@A@@г1#Seq!t3 t7tZ3 t7t]@ 3 t7t^3  t7t_@@В@г3#int3. t7tM3/ t7tP@@ @@@ 0&@@@г2%float3= t7tS3> t7tX@@ @@@ 15@@@@@ @@ 2< @@@: @@@ 4A3O t7tL0@@@H@@ 5EK3@@@3U t7t96@1Ő Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence. 3b t`tb3ctu@@@@@@@3{@@F@13v@@@@@@d&of_seqѠ3yuu!3zuu'@б@г2 #Seq!t3uu03uu3@ 3uu43uu5@@г3Y%float3uu*3uu/@@ @@@ 6333333333@K@A@@@" @@@ 8 @@г!t3uu93uu:@@ @@@ 9@@@@@ :@@@3uu @2& % Create an array from the generator. 3u;u=3u;ug@@@@@@@3@@@263א@@@@@@6,map_to_arrayҠ3ujup3uju|@б@б@г3%float3uju3uju@@ @@@ ;333333333@Qy:@A@@А!a@ DE@ < 3uju3uju@@@ @@ =@@б@г!t4uju4uju@@ @@@ >@@г3%array4uju4uju@А!a'-4uju4uju@@@-@@@ @4 @@@@@ A7@@@,@@ B:4'uju@@@4*ujul@2 [map_to_array f a] applies function [f] to all the elements of [a], and builds an array with the results returned by [f]: [[| f a.(0); f a.(1); ...; f a.(length a - 1) |]]. 47uu48v$v_@@@@@@@4P@@'@24K@@@@@@Z.map_from_arrayӠ4Nvavg4Ovavu@б@б@А!a@ NE@ E34Y4X4X4Y4Y4Y4Y4Y@q6@A4_vavy4`vav{@@г4*%float4hvav4ivav@@ @@@ F@@@@@ G@@б@г4%array4zvav4{vav@А!a)$4vav4vav@@@/@@@ I+ @@г!t4vav4vav@@ @@@ J8@@@@@ K;@@@,@@ L>4vavx @@@4vavc@3 [map_from_array f a] applies function [f] to all the elements of [a], and builds a floatarray with the results returned by [f]. 4vv4vw%@@@@@@@4@@@34@@@@@@^44̐ {1:floatarray_concurrency Arrays and concurrency safety} Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results. {2:floatarray_atomicity Atomicity} Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays. For example, consider the following program: {[let size = 100_000_000 let a = Float.Array.make size 1. let update a f () = Float.Array.iteri (fun i x -> Float.Array.set a i (f x)) a let d1 = Domain.spawn (update a (fun x -> x +. 1.)) let d2 = Domain.spawn (update a (fun x -> 2. *. x +. 1.)) let () = Domain.join d1; Domain.join d2 ]} After executing this code, each field of the float array [a] is either [2.], [3.], [4.] or [5.]. If atomicity is required, then the user must implement their own synchronization (for example, using {!Mutex.t}). {2:floatarray_data_race Data races} If two domains only access disjoint parts of the array, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains. A data race is said to occur when two domains access the same array element without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains. Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the array elements. Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location with a few exceptions. {2:floatarray_datarace_tearing Tearing } Float arrays have two supplementary caveats in the presence of data races. First, the blit operation might copy an array byte-by-byte. Data races between such a blit operation and another operation might produce surprising values due to tearing: partial writes interleaved with other operations can create float values that would not exist with a sequential execution. For instance, at the end of {[let zeros = Float.Array.make size 0. let max_floats = Float.Array.make size Float.max_float let res = Float.Array.copy zeros let d1 = Domain.spawn (fun () -> Float.Array.blit zeros 0 res 0 size) let d2 = Domain.spawn (fun () -> Float.Array.blit max_floats 0 res 0 size) let () = Domain.join d1; Domain.join d2 ]} the [res] float array might contain values that are neither [0.] nor [max_float]. Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation. 4w'w)4f@@@@@@344444444@p1@A44ߐ"/*4h4h@@@@@@44𐠠< {1 Undocumented functions} 4j4j@@@@@@$*unsafe_getԠ4mhs4mh}@б@г!t5mh5mh@@ @@@ O<@@б@г4䠐#int5mh5mh@@ @@@ PK@@г4ࠐ%float5mh5mh@@ @@@ QX@@@@@ R[@@@%@@ S^( @@6%floatarray_unsafe_getBA2@@@@51mhj52mh@@5J@@@@k*unsafe_setՠ5>n5?n@б@г;!t5In5Jn@@ @@@ V35K5J5J5K5K5K5K5K@]&@A@@б@г5-#int5Zn5[n@@ @@@ W@@б@г5+%float5in5jn@@ @@@ X @@г5#$unit5vn5wn@@ @@@ Y-@@@@@ Z0@@@%@@ [3( @@@9@@ \6<@@6%floatarray_unsafe_setCA3>@@@@@5n5n@@5@ @@@D@A@H!@@]@=@@Q@1@8@@@i@@Z@:@u@U@~@^ @  q@ Q @  @ g @  @ } @  @  -@  @ l@@_@@a@.@s@S@x@E@k@K@@L@@u6@@R@@m@@355555555@o@Ac355555555@@A5GG5p@@4h6 * Float arrays with packed representation. 6q6q.@@@@@@@6 GG@@+ArrayLabelsE6s076s0B@6.@@БA+!tF6$tIP6%tIQ@@;@@A5^@@@ `@@@@6-tIK6.tI^@4 L The type of float arrays with packed representation. @since 4.08 6;u_a6<w@@@@@@@@@6T@@@Aг*floatarray6EtIT@@36C6B6B6C6C6C6C6C@O@C=A@@@a@@v@V @@p@@xB@"@@p@@d.@@7@@t*@  @  @@  @  V@ 6 @  _@ ? @  E@ % @  8@ @s@S@@,@ @1@@$@@8@@N@.@}@] @@q&@@5@@@@@@;@@@A@@@ e@ _@@@@@@@Az@@5.6ϐ@@@@@@@366666666@@A@&lengthؠ6y6y@б@г!t6y6y@@ @@@ g366666666@@A@@г6#int6y6y@@ @@@ h@@@@@ i@@@6y @5i A Return the length (number of elements) of the given floatarray. 7z7z@@@@@@@7@@@5y7@@@@@@1#get٠7|7|@б@г!t7(|"7)|#@@ @@@ j37*7)7)7*7*7*7*7*@J_8@A@@б@г7 #int79|'7:|*@@ @@@ k@@г7%float7F|.7G|3@@ @@@ l@@@@@ m!@@@'@@ n$* @@@7T|@5Đ [get a n] returns the element number [n] of floatarray [a]. @raise Invalid_argument if [n] is outside the range 0 to [(length a - 1)]. 7a}467b@@@@@@@7z@@@57u@@@@@@C#setڠ7x7y@б@г_!t77@@ @@@ o377777777@\q8@A@@б@г7g#int77@@ @@@ p@@б@г7e%float77@@ @@@ q @@г7]$unit77@@ @@@ r-@@@@@ s0@@@%@@ t3( @@@9@@ u6<@@@7@61 [set a n x] modifies floatarray [a] in place, replacing element number [n] with [x]. @raise Invalid_argument if [n] is outside the range 0 to [(length a - 1)]. 77@@@@@@@7@@!@6A7␠@@@@@@U$make۠77@б@г7à#int77@@ @@@ v377777777@n8@A@@б@г7à%float88@@ @@@ w@@гꠐ!t88@@ @@@ x@@@@@ y!@@@'@@ z$* @@@8@6 [make n x] returns a fresh floatarray of length [n], initialized with [x]. @raise Invalid_argument if [n < 0] or [n > Sys.max_floatarray_length]. 8)8*#r@@@@@@@8B@@@68=@@@@@@C&createܠ8@tz8At@б@г8#int8Kt8Lt@@ @@@ {38M8L8L8M8M8M8M8M@\q8@A@@г6!t8Zt8[t@@ @@@ |@@@@@ }@@@8etv @6Ր [create n] returns a fresh floatarray of length [n], with uninitialized data. @raise Invalid_argument if [n < 0] or [n > Sys.max_floatarray_length]. 8r8s5@@@@@@@8@@@68@@@@@@1$initݠ87=87A@б@г8g#int87D87G@@ @@@ ~388888888@J_8@A@@б!fб@г8|#int87N87Q@@ @@@ @@г8x%float87U87Z@@ @@@ "@@@@@ %@@г!t87_87`@@ @@@ 2@@0@@ 587K @@@<@@ 9? @@@879@7E 1 [init n ~f] returns a fresh floatarray of length [n], with element number [i] initialized to the result of [f i]. In other terms, [init n ~f] tabulates the results of [f] applied to the integers [0] to [n-1]. @raise Invalid_argument if [n < 0] or [n > Sys.max_floatarray_length]. 8ac8J@@@@@@@8@@@7U8@@@@@@X+make_matrixޠ88@б$dimxг8٠#int99@@ @@@ 399999999@s:@A@@б$dimyг8점#int99@@ @@@ @@б@г8ꠐ%float9(9)@@ @@@ "@@г8%array9596@г!t9?9@@@ @@@ 9@@@@@@ > @@@"@@ A%@@?4@@ D9P@@VK@@ H9T@@@9W"@7ǐ I [make_matrix ~dimx ~dimy e] returns a two-dimensional array (an array of arrays) with first dimension [dimx] and second dimension [dimy], where all elements are initialized with [e]. @raise Invalid_argument if [dimx] or [dimy] is negative or greater than {!Sys.max_floatarray_length}. @since 5.2 9d9e(@@@@@@@9}@@2@79x@@@@@@h+init_matrixߠ9{*09|*;@б$dimxг9[#int9*C9*F@@ @@@ 399999999@:@A@@б$dimyг9n#int9*O9*R@@ @@@ @@б!fб@г9#int9*Y9*\@@ @@@ &@@б@г9#int9*`9*c@@ @@@ 5@@г9%float9*g9*l@@ @@@ B@@@@@ E@@@%@@ H( @@г9c%array9*s9*x@гà!t9*q9*r@@ @@@ _@@@@@@ d @@Q!@@ g9*V@@f[@@ k9*J@@}r@@ o9*> @@@:*,#@8p c [init_matrix ~dimx ~dimy ~f] returns a two-dimensional array (an array of arrays) with first dimension [dimx] and second dimension [dimy], where the element at index ([x,y]) is initialized with [f x y]. @raise Invalid_argument if [dimx] or [dimy] is negative or greater than {!Sys.max_floatarray_length}. @since 5.2 : y{:@@@@@@@:&@@3@8:!@@@@@@&append:$:%@б@г !t:/:0@@ @@@ 3:1:0:0:1:1:1:1:1@8@A@@б@г!t:@:A@@ @@@ @@г)!t:M:N@@ @@@ @@@@@ !@@@'@@ $* @@@:[@8ː [append v1 v2] returns a fresh floatarray containing the concatenation of the floatarrays [v1] and [v2]. @raise Invalid_argument if [length v1 + length v2 > Sys.max_floatarray_length]. :h:i@@@@@@@:@@@8:|@@@@@@C&concat::@б@г:$list::@гp!t::@@ @@@ 3::::::::@f{B@A@@@ @@@  @@г!t::@@ @@@ @@@@@ @@@: @9# < Same as {!append}, but concatenates a list of floatarrays. ::3@@@@@@@:@@@93:Ԑ@@@@@@6#sub:5;:5>@б@г!t:5A:5B@@ @@@ 3::::::::@On8@A@@б#posг:Ƞ#int:5J:5M@@ @@@ @@б#lenг:٠#int;5U;5X@@ @@@ $@@г!t;5\;5]@@ @@@ 1@@@@ 4;5Q @@3(@@ 8; 5F @@@?@@ <B@@@;&57@9 = [sub a ~pos ~len] returns a fresh floatarray of length [len], containing the elements number [pos] to [pos + len - 1] of floatarray [a]. @raise Invalid_argument if [pos] and [len] do not designate a valid subarray of [a]; that is, if [pos < 0], or [len < 0], or [pos + len > length a]. ;3^`;4f@@@@@@@;L@@#@9;G@@@@@@[$copy;J;K@б@г1!t;U;V@@ @@@ 3;W;V;V;W;W;W;W;W@t8@A@@г@!t;d;e@@ @@@ @@@@@ @@@;o @9ߐ h [copy a] returns a copy of [a], that is, a fresh floatarray containing the same elements as [a]. ;|;}'@@@@@@@;@@@9;@@@@@@1$fill;)/;)3@б@гz!t;)6;)7@@ @@@ 3;;;;;;;;@J_8@A@@б#posг;#int;)?;)B@@ @@@ @@б#lenг;#int;)J;)M@@ @@@ $@@б@г;%float;)Q;)V@@ @@@ 3@@г;$unit;)Z;)^@@ @@@ @@@@@@ C@@0%@@ F;)F @@E:@@ J;);@@@Q@@ NT@@@;)+@:d [fill a ~pos ~len x] modifies the floatarray [a] in place, storing [x] in elements number [pos] to [pos + len - 1]. @raise Invalid_argument if [pos] and [len] do not designate a valid subarray of [a]. <_a<B@@@@@@@<@@&@:t<@@@@@@m$blit<DJ<DN@б#srcг!t<%DU<&DV@@ @@@ 3<'<&<&<'<'<'<'<'@:@A@@б'src_posг< #int<8Db<9De@@ @@@ @@б#dstг%!t#int@@"@ @@@@@@'compare> >@б#cmpб@г=ޠ%float>>@@ @@@ 3>>>>>>>>@<@A@@б@г=%float>->. @@ @@@ @@г> #int>:>;@@ @@@ @@@@@ !@@@'@@ $* @@б@г+!t>O>P@@ @@@ 3@@б@г:!t>^>_@@ @@@ B@@г>>#int>k >l#@@ @@@ O@@@@@ R@@@%@@ U( @@h6@@ X>z@@@>}@<퐠 [compare cmp a b] compares [a] and [b] according to the shortlex order, that is, shorter arrays are smaller and equal-sized arrays are compared in lexicographic order using [cmp] to compare elements. @since 5.4 >$&>@@@@@@@>@@"@<>@@@@@@x>>/ {1 Iterators} >>*@@@@@@3>>>>>>>>@1@A$iter>,2>,6@б!fб@г>%float>,<>,A@@ @@@ @@г>}$unit>,E>,I@@ @@@ +@@@@@ .@@б@г!t>,N>,O@@ @@@ =@@г>$unit>,S>,W@@ @@@ J@@@@@ M@@B$@@ P>,9 @@@>,.@=n [iter ~f a] applies function [f] in turn to all the elements of [a]. It is equivalent to [f a.(0); f a.(1); ...; f a.(length a - 1); ()]. ? XZ? @@@@@@@?$@@@=~?@@@@@@p%iteri?"?#@б!fб@г?#int?1 ?2 @@ @@@ 3?3?2?2?3?3?3?3?3@<@A@@б@г?%float?B?C@@ @@@ @@г>$unit?O?P@@ @@@ @@@@@ !@@@'@@ $* @@б@г @!t?d#?e$@@ @@@ 3@@г?$unit?q(?r,@@ @@@ @@@@@@ C@@V$@@ F?} @@@?@=𐠠 Same as {!iter}, but the function is applied with the index of the element as first argument, and the element itself as second argument. ?-/?@@@@@@@?@@@>?@@@@@@f#map??@б!fб@г?u%float??@@ @@@ 3????????@<@A@@г?%float??@@ @@@ @@@@@ @@б@г !t??@@ @@@ !@@г !t??@@ @@@ .@@@@@ 1@@D$@@ 4? @@@?@>` } [map ~f a] applies function [f] to all the elements of [a], and builds a floatarray with the results returned by [f]. ??7y@@@@@@@@@@@>p@@@@@@@T+map_inplace@{@{@б!fб@г?堐%float@#{@${@@ @@@ 3@%@$@$@%@%@%@%@%@q<@A@@г?%float@2{@3{@@ @@@ @@@@@ @@б@г !t@D{@E{@@ @@@ !@@г?$unit@Q{@R{@@ @@@ .@@@@@ 1@@D$@@ 4@]{ @@@@`{}@>А z [map_inplace f a] applies function [f] to all elements of [a], and updates their values in place. @since 5.1 @m@n0@@@@@@@@@@@>@@@@@@@T$mapi@28@2<@б!fб@г@f#int@2B@2E@@ @@@ 3@@@@@@@@@q<@A@@б@г@f%float@2I@2N@@ @@@ @@г@s%float@2R@2W@@ @@@ @@@@@ !@@@'@@ $* @@б@г !t@2\@2]@@ @@@ 3@@г !t@2a@2b@@ @@@ @@@@@@ C@@V$@@ F@2? @@@@24@?R Same as {!map}, but the function is applied to the index of the element as first argument, and the element itself as second argument. @ce@@@@@@@@A@@@?bA@@@@@@f,mapi_inplaceAA@б!fб@г@蠐#intAA@@ @@@ 3AAAAAAAA@<@A@@б@г@蠐%floatA&A'#@@ @@@ @@г@%floatA3'A4,@@ @@@ @@@@@ !@@@'@@ $* @@б@г $!tAH1AI2@@ @@@ 3@@гA$unitAU6AV:@@ @@@ @@@@@@ C@@V$@@ FAa @@@Ad@?Ԑ Same as {!map_inplace}, but the function is applied to the index of the element as first argument, and the element itself as second argument. @since 5.1 Aq;=Ar@@@@@@@A@@@?A@@@@@@f)fold_leftA A @б!fб@А#acc@ G@ 3AAAAAAAA@8@AA A @@б@гAh%floatA A  @@ @@@ @@А#accA A @@@ !@@ @@@$@@ @@б$initА#acc,'A A "@@б@г !tA &A '@@ @@@ 8@@А#accA<A +A /@@@ F@@ A@@"I@@ DA @@T+@@ HA  @@@A @@T [fold_left ~f x ~init] computes [f (... (f (f x init.(0)) init.(1)) ...) init.(n-1)], where [n] is the length of the floatarray [init]. A 02A @@@@@@@B @@@@dB@@@@@@h*fold_rightBB @б!fб@гA٠%floatBB@@ @@@ 3BBBBBBBB@<@A@@б@А#acc@ &G@  B*B+@@А#acc B0B1@@@@@  @@@@@ !@@б@г !tBABB@@ @@@ !*@@б$initА#acc*2BOBP @@А#acc08BUBV@@55@@ "=BZ@@@@@ #A@@T+@@ $DBa @@@Bd@@Ԑ [fold_right f a init] computes [f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...))], where [n] is the length of the floatarray [a]. BqBrq@@@@@@@B@@@@B@@@@@@dBB= {1 Iterators on two arrays} BB@@@@@@3BBBBBBBB@v1@A%iter2BB@б!fб@гBl%floatBB@@ @@@ '@@б@гB{%floatBB@@ @@@ (-@@гBs$unitBB@@ @@@ ):@@@@@ *=@@@%@@ +@( @@б@г !tBB@@ @@@ ,O@@б@г Ơ!tBB@@ @@@ -^@@гB$unitBB @@ @@@ .k@@@@@ /n@@@%@@ 0q( @@f6@@ 1tC@@@C @Ay [Array.iter2 ~f a b] applies function [f] to all the elements of [a] and [b]. @raise Invalid_argument if the floatarrays are not the same size. C  Ce@@@@@@@C/@@"@AC*@@@@@@$map2C-C.@б!fб@гB%floatC<C=@@ @@@ 23C>C=C=C>C>C>C>C>@<@A@@б@гC%floatCMCN@@ @@@ 3@@гC%floatCZC[@@ @@@ 4@@@@@ 5!@@@'@@ 6$* @@б@г K!tCoCp@@ @@@ 73@@б@г Z!tC~C@@ @@@ 8B@@г g!tCC@@ @@@ 9O@@@@@ :R@@@%@@ ;U( @@h6@@ <XC@@@C@B  [map2 ~f a b] applies function [f] to all the elements of [a] and [b], and builds a floatarray with the results returned by [f]: [[| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|]]. @raise Invalid_argument if the floatarrays are not the same size. CC@@@@@@@C@@"@BC@@@@@@xCCː4 {1 Array scanning} C! C!#@@@@@@3CCCCCCCC@1@A'for_allC#%+C#%2@б!fб@гC%floatC#%8C#%=@@ @@@ =@@гC$boolC#%AC#%E@@ @@@ >+@@@@@ ?.@@б@г ޠ!tD#%JD#%K@@ @@@ @=@@гC͠$boolD#%OD#%S@@ @@@ AJ@@@@@ BM@@B$@@ CPD#%5 @@@D#%'@B [for_all ~f [|a1; ...; an|]] checks if all elements of the floatarray satisfy the predicate [f]. That is, it returns [(f a1) && (f a2) && ... && (f an)]. D+$TVD,&@@@@@@@DD@@@BD?@@@@@@p&existsDB( DC(@б!fб@гD%floatDQ(DR(@@ @@@ D3DSDRDRDSDSDSDSDS@<@A@@гD$boolD`(Da(#@@ @@@ E@@@@@ F@@б@гN!tDr((Ds()@@ @@@ G!@@гD=$boolD(-D(1@@ @@@ H.@@@@@ I1@@D$@@ J4D( @@@D(@B [exists f [|a1; ...; an|]] checks if at least one element of the floatarray satisfies the predicate [f]. That is, it returns [(f a1) || (f a2) || ... || (f an)]. D)24D+@@@@@@@D@@@CD@@@@@@T#memD-D-@б@гD%floatD-D-@@ @@@ K3DDDDDDDD@m8@A@@б#setг!tD-D-@@ @@@ L@@гD$boolD-D- @@ @@@ M @@@@ N#D- @@@*@@ O'- @@@D-@C\ [mem a ~set] is true if and only if there is an element of [set] that is structurally equal to [a], i.e. there is an [x] in [set] such that [compare a x = 0]. D. D0@@@@@@@E@@@ClE @@@@@@F(mem_ieeeE2E2@б@гDݠ%floatE2E2@@ @@@ P3EEEEEEEE@_t8@A@@б#setг !tE.2E/2@@ @@@ Q@@гD$boolE;2E<2@@ @@@ R @@@@ S#ED2 @@@*@@ T'- @@@EJ2@C H Same as {!mem}, but uses IEEE equality instead of structural equality. EW3EX39@@@@@@@Ep@@@CEk@@@@@@FEyEx5 {1 Array searching} Eu5;=Ev5;W@@@@@@3EtEsEsEtEtEtEtEt@Xm1@A(find_optE7Y_E7Yg@б!fб@гER%floatE7YmE7Yr@@ @@@ U@@гE[$boolE7YvE7Yz@@ @@@ V+@@@@@ W.@@б@г!tE7YE7Y@@ @@@ X=@@гE&optionE7YE7Y@гE%floatE7YE7Y@@ @@@ YT@@@@@@ [Y @@@"@@ \\%@@Q3@@ ]_E7Yj@@@E7Y[@@E@@ @@f*find_indexE=Z`E=Zj@б!fб@гE%floatE=ZpE=Zu@@ @@@ ^3EEEEEEEE@~#@A@@гE$boolF=ZxF=Z|@@ @@@ _@@@@@ `@@б@г!tF=ZF=Z@@ @@@ a!@@гE&optionF"=ZF#=Z@гE#intF,=ZF-=Z@@ @@@ b8@@@@@@ d= @@@"@@ e@%@@S3@@ fCF==Zm@@@F@=Z\@D [find_index ~f a] returns [Some i], where [i] is the index of the first element of the array [a] that satisfies [f x], if there is such an element. It returns [None] if there is no such element. @since 5.1 FM>FNCm@@@@@@@Ff@@.@DFa@@@@@@c(find_mapFdEFeE@б!fб@гF5%floatFsEFtE@@ @@@ g3FuFtFtFuFuFuFuFu@<@A@@гE᠐&optionFEFE@А!a@ rG@ hFEFE@@@ @@@ j@@@"@@ k%@@б@г}!tFEFE@@ @@@ l.@@гF &optionFEFE@А!a,<FEFE@@@2@@@ nC @@@@@ oF@@Y,@@ pIFE@@@FE@@F@@@@P)find_mapiFJciFJcr@б!fб@гF#intFJcxFJc{@@ @@@ s3FFFFFFFF@m#@A@@б@гF%floatFJcFJc@@ @@@ t@@гF\&optionFJcFJc@А!a@ G@ u$G JcG Jc@@@ @@@ w+@@@ @@ x.#@@@4@@ y17@@б@г!tGJcG Jc@@ @@@ z@@@гF&optionG,JcG-Jc@А!a/NG3JcG4Jc@@@5@@@ |U @@@@@ }X@@k,@@ ~[G@Jcu@@@GCJce@E Same as [find_map], but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument. @since 5.1 GPKGQOSe@@@@@@@Gi@@'@EGd@@@@@@{GrGq 1 {1:sorting_and_shuffling Sorting and shuffling} GnQgiGoQg@@@@@@3GmGlGlGmGmGmGmGm@1@A$sortGzSG{S@б#cmpб@гGK%floatGSGS@@ @@@ @@б@гGZ%floatGSGS@@ @@@ -@@гGx#intGSGS@@ @@@ :@@@@@ =@@@%@@ @( @@б@г!tGSGS@@ @@@ O@@гGt$unitGSGS@@ @@@ \@@@@@ _@@T$@@ bGS @@@GS@FF p Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, {!Stdlib.compare} is a suitable comparison function. After calling [sort], the array is sorted in place in increasing order. [sort] is guaranteed to run in constant heap space and (at most) logarithmic stack space. The current implementation uses Heap Sort. It runs in constant stack space. Specification of the comparison function: Let [a] be the floatarray and [cmp] the comparison function. The following must be true for all [x], [y], [z] in [a] : - [cmp x y] > 0 if and only if [cmp y x] < 0 - if [cmp x y] >= 0 and [cmp y z] >= 0 then [cmp x z] >= 0 When [sort] returns, [a] contains the same elements as before, reordered in such a way that for all i and j valid indices of [a] : - [cmp a.(i) a.(j)] >= 0 if i >= j GTGjJN@@@@@@@G@@@FVG@@@@@@+stable_sortGlPVGlPa@б#cmpб@гGˠ%floatH lPiH lPn@@ @@@ 3H H H H H H H H @<@A@@б@гGܠ%floatHlPrHlPw@@ @@@ @@гG#intH'lP{H(lP~@@ @@@ @@@@@ !@@@'@@ $* @@б@г!tH<lPH=lP@@ @@@ 3@@гG$unitHIlPHJlP@@ @@@ @@@@@@ C@@V$@@ FHUlPd @@@HXlPR@FȐ  Same as {!sort}, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space. The current implementation uses Merge Sort. It uses a temporary floatarray of length [n/2], where [n] is the length of the floatarray. It is usually faster than the current implementation of {!sort}. HemHfs,@@@@@@@H~@@@FHy@@@@@@f)fast_sortH|u.4H}u.=@б#cmpб@гHM%floatHu.EHu.J@@ @@@ 3HHHHHHHH@<@A@@б@гH^%floatHu.NHu.S@@ @@@ @@гH|#intHu.WHu.Z@@ @@@ @@@@@ !@@@'@@ $* @@б@г!tHu._Hu.`@@ @@@ 3@@гHx$unitHu.dHu.h@@ @@@ @@@@@@ C@@V$@@ FHu.@ @@@Hu.0@GJ P Same as {!sort} or {!stable_sort}, whichever is faster on typical input. HvikHw@@@@@@@I@@@GZH@@@@@@f'shuffleHyHy@б$randб@гHࠐ#intI zIz@@ @@@ 3IIIIIIII@<@A@@гH#intIzIz @@ @@@ @@@@@ @@б@г !tI.zI/z@@ @@@ !@@гH蠐$unitI;zI<z@@ @@@ .@@@@@ 1@@D$@@ 4IGz @@@IJy@G  [shuffle ~rand a] randomly permutes [a]'s elements using [rand] for randomness. The distribution of permutations is uniform. [rand] must be such that a call to [rand n] returns a uniformly distributed random number in the range \[[0];[n-1]\]. {!Random.int} can be used for this (do not forget to {{!Random.self_init}initialize} the generator). @since 5.2 IW{IX@@@@@@@Ip@@@GIk@@@@@@TIyIx {1 Float arrays and Sequences} IuIv@@@@@@3ItIsIsItItItItIt@f1@A&to_seqII@б@гh!tII@@ @@@ @@гH"#Seq!tII@ II@@гIn%floatII@@ @@@ :@@@ @@@ ? @@@+@@ B.@@@I@H, Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence. IIA@@@@@@@I@@+@H<Iݐ@@@@@@a'to_seqiII@б@гǠ!tII@@ @@@ 3IIIIIIII@zu8@A@@гH#Seq!tII@ JJ@@В@гI䠐#intJJ@@ @@@ &@@@гI⠐%floatJ J!@@ @@@ 5@@@@@ @@ < @@@: @@@ AJ20@@@H@@ EK3@@@J86@H Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence. JEJFIl@@@@@@@J^@@F@HJY@@@@@@d&of_seqJ\ntJ]nz@б@гH#Seq!tJknJln@ JonJpn@@гJ<%floatJzn}J{n@@ @@@ 3J|J{J{J|J|J|J|J|@K@A@@@" @@@  @@гj!tJnJn@@ @@@ @@@@@ @@@Jnp @I % Create an array from the generator. JJ@@@@@@@J@@@IJ@@@@@@6,map_to_arrayJJ@б!fб@гJ%floatJJ@@ @@@ 3JJJJJJJJ@S{<@A@@А!a@ G@  JJ@@@ @@ @@б@гǠ!tJJ@@ @@@ @@гJ~%arrayJJ@А!a'-JK@@@-@@@ 4 @@@@@ 7@@J,@@ :K @@@K@I [map_to_array ~f a] applies function [f] to all the elements of [a], and builds an array with the results returned by [f]: [[| f a.(0); f a.(1); ...; f a.(length a - 1) |]]. KKz@@@@@@@K5@@'@IK0@@@@@@Z.map_from_arrayK3K4@б!fб@А!a@ G@ 3K@K?K?K@K@K@K@K@@s8@AKFKG@@гK%floatKOKP@@ @@@ @@@@@ @@б@гJ砐%arrayKaKb@А!a)$KhKi@@@/@@@ + @@гR!tKvKw@@ @@@ 8@@@@@ ;@@J,@@ >K @@@K@I [map_from_array ~f a] applies function [f] to all the elements of [a], and builds a floatarray with the results returned by [f]. KK<~@@@@@@@K@@@JK@@@@@@^KK {1:floatarray_concurrency Arrays and concurrency safety} Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results. {2:floatarray_atomicity Atomicity} Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays. For example, consider the following program: {[let size = 100_000_000 let a = Float.ArrayLabels.make size 1. let update a f () = Float.ArrayLabels.iteri ~f:(fun i x -> Float.Array.set a i (f x)) a let d1 = Domain.spawn (update a (fun x -> x +. 1.)) let d2 = Domain.spawn (update a (fun x -> 2. *. x +. 1.)) let () = Domain.join d1; Domain.join d2 ]} After executing this code, each field of the float array [a] is either [2.], [3.], [4.] or [5.]. If atomicity is required, then the user must implement their own synchronization (for example, using {!Mutex.t}). {2:floatarray_data_race Data races} If two domains only access disjoint parts of the array, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains. A data race is said to occur when two domains access the same array element without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains. Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the array elements. Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location with a few exceptions. {2:floatarray_datarace_tearing Tearing } Float arrays have two supplementary caveats in the presence of data races. First, the blit operation might copy an array byte-by-byte. Data races between such a blit operation and another operation might produce surprising values due to tearing: partial writes interleaved with other operations can create float values that would not exist with a sequential execution. For instance, at the end of {[let zeros = Float.Array.make size 0. let max_floats = Float.Array.make size Float.max_float let res = Float.Array.copy zeros let d1 = Domain.spawn (fun () -> Float.Array.blit zeros 0 res 0 size) let d2 = Domain.spawn (fun () -> Float.Array.blit max_floats 0 res 0 size) let () = Domain.join d1; Domain.join d2 ]} the [res] float array might contain values that are neither [0.] nor [max_float]. Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation. KKSW@@@@@@3KKKKKKKK@p1@AKKƐ"/*KY[KYb@@@@@@KKא< {1 Undocumented functions} KdfKd‡@@@@@@$*unsafe_getKK@б@гŠ!tKK@@ @@@ <@@б@гKˠ#intKK@@ @@@ K@@гKǠ%floatLL@@ @@@ X@@@@@ [@@@%@@ ^( @@6%floatarray_unsafe_getBAIʠ@@@@LL@@L1@@@@k*unsafe_setL% L&*@б@г !tL0-L1.@@ @@@ 3L2L1L1L2L2L2L2L2@]&@A@@б@гL#intLA2LB5@@ @@@ @@б@гL%floatLP9LQ>@@ @@@  @@гL $unitL]BL^F@@ @@@ -@@@@@ 0@@@%@@ 3( @@@9@@ 6<@@6%floatarray_unsafe_setCAJ%@@@@@LtLua@@L@ @@@D@[UA@@f-@ @i@I"@@4@@m4@@m@M&@@@@Y@&@$@  @  %@  @  I@ ) @  I@ ) @  M@  @  @@y+@ @s@@@@a@@O@q@Q@@P@@y:@@R@@m@@3LLLLLLLL@o@Ac3LLLLLLLL@@ALs0ELcf@@KOL𐠠 > Float arrays with packed representation (labeled functions). LggLgê@@@@@@@Ls00@@@KyKf@KDK/@KJ@JJ@JJS@J,I@II@IlI3@I H@HzHA@GG@GG@GmGF@G G @FF@FF@FFl@FLF7@FF@EE@EE@ExEc@ECE@DD@DD@DnDG@D'D@CC@CCf@C@C @BB@BBA@AA[@A%@@@@@@:@@??@?b?;@>>@>>c@>=@==@=F=@<<@* Floating-point subtraction. K\ !* Floating-point multiplication. J;* Floating-point division. J * [fma x y z] returns [x * y + z], with a best effort for computing this expression with a single rounding, using either hardware instructions (providing full IEEE compliance) or a software emulation. On 64-bit Cygwin, 64-bit mingw-w64 and MSVC 2017 and earlier, this function may be emulated owing to known bugs on limitations on these platforms. Note: since software emulation of the fma is costly, make sure that you are using hardware fma support if performance matters. @since 4.08 J * [rem a b] returns the remainder of [a] with respect to [b]. The returned value is [a -. n *. b], where [n] is the quotient [a /. b] rounded towards zero to an integer. I * [succ x] returns the floating point number right after [x] i.e., the smallest floating-point number greater than [x]. See also {!next_after}. @since 4.08 IH * [pred x] returns the floating-point number right before [x] i.e., the greatest floating-point number smaller than [x]. See also {!next_after}. @since 4.08 I -* [abs f] returns the absolute value of [f]. H5* Positive infinity. H5* Negative infinity. HN * A special floating-point value denoting the result of an undefined operation such as [0.0 /. 0.0]. Stands for 'not a number'. Any floating-point operation with [nan] as argument returns [nan] as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, [=], [<], [<=], [>] and [>=] return [false] and [<>] returns [true] if one or both of their arguments is [nan]. [nan] is [quiet_nan] since 5.1; it was a signaling NaN before. H * Signaling NaN. The corresponding signals do not raise OCaml exception, but the value can be useful for interoperability with C libraries. @since 5.1 G栠=* Quiet NaN. @since 5.1 G3* The constant pi. G~ 5* The largest positive finite value of type [float]. GJ K* The smallest positive, non-zero, non-denormalized value of type [float]. G t* The difference between [1.0] and the smallest exactly representable floating-point number greater than [1.0]. F⠠ m* [is_finite x] is [true] if and only if [x] is finite i.e., not infinite and not {!nan}. @since 4.08 F f* [is_infinite x] is [true] if and only if [x] is {!infinity} or {!neg_infinity}. @since 4.08 FV X* [is_nan x] is [true] if and only if [x] is not a number (see {!nan}). @since 4.08 F M* [is_integer x] is [true] if and only if [x] is an integer. @since 4.08 Eʠ (* Convert an integer to floating-point. E * Truncate the given floating-point number to an integer. The result is unspecified if the argument is [nan] or falls outside the range of representable integers. E3 _* Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by [0x] or [0X]). The format of decimal floating-point numbers is [ [-] dd.ddd (e|E) [+|-] dd ], where [d] stands for a decimal digit. The format of hexadecimal floating-point numbers is [ [-] 0(x|X) hh.hhh (p|P) [+|-] dd ], where [h] stands for an hexadecimal digit and [d] for a decimal digit. In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional. The [_] (underscore) character can appear anywhere in the string and is ignored. Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon. @raise Failure if the given string is not a valid representation of a float. D砠 >* Same as [of_string], but returns [None] instead of raising. D * Return a string representation of a floating-point number. This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see {!Printf}. This function is an alias for {!Stdlib.string_of_float}. DK #* Normal number, none of the below D 2* Number very close to 0.0, has reduced precision D 8* Number is 0.0 or -0.0 C ** Number is positive or negative infinity C⠠ 1* Not a number: result of an undefined operation CΠ c* The five classes of floating-point numbers, as determined by the {!classify_float} function. C o* Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number. B䠠2* Exponentiation. Bj/* Square root. A>* Cube root. @since 4.13 A/* Exponential. A) 0* Base 2 exponential function. @since 4.13 @5* Natural logarithm. @S5* Base 10 logarithm. ?蠠 %* Base 2 logarithm. @since 4.13 ?} l* [expm1 x] computes [exp x -. 1.0], giving numerically-accurate results even if [x] is close to [0.0]. ? * [log1p x] computes [log(1.0 +. x)] (natural logarithm), giving numerically-accurate results even if [x] is close to [0.0]. > #* Cosine. Argument is in radians. >< !* Sine. Argument is in radians. =Ѡ $* Tangent. Argument is in radians. =f ~* Arc cosine. The argument must fall within the range [[-1.0, 1.0]]. Result is in radians and is between [0.0] and [pi]. < * Arc sine. The argument must fall within the range [[-1.0, 1.0]]. Result is in radians and is between [-pi/2] and [pi/2]. < K* Arc tangent. Result is in radians and is between [-pi/2] and [pi/2]. <% * [atan2 y x] returns the arc tangent of [y /. x]. The signs of [x] and [y] are used to determine the quadrant of the result. Result is in radians and is between [-pi] and [pi]. ; 4* [hypot x y] returns [sqrt(x *. x +. y *. y)], that is, the length of the hypotenuse of a right-angled triangle with sides of length [x] and [y], or, equivalently, the distance of the point [(x,y)] to origin. If one of [x] or [y] is infinite, returns [infinity] even if the other is [nan]. ;) .* Hyperbolic cosine. Argument is in radians. : ,* Hyperbolic sine. Argument is in radians. :S /* Hyperbolic tangent. Argument is in radians. 9蠠 * Hyperbolic arc cosine. The argument must fall within the range [[1.0, inf]]. Result is in radians and is between [0.0] and [inf]. @since 4.13 9} * Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians. @since 4.13 9 * Hyperbolic arc tangent. The argument must fall within the range [[-1.0, 1.0]]. Result is in radians and ranges over the entire real line. @since 4.13 8 * Error function. The argument ranges over the entire real line. The result is always within [[-1.0, 1.0]]. @since 4.13 8< * Complementary error function ([erfc x = 1 - erf x]). The argument ranges over the entire real line. The result is always within [[0.0, 2.0]]. @since 4.13 7Ѡ t* [trunc x] rounds [x] to the nearest integer whose absolute value is less than or equal to [x]. @since 4.08 7f }* [round x] rounds [x] to the nearest integer with ties (fractional values of 0.5) rounded away from zero, regardless of the current rounding direction. If [x] is an integer, [+0.], [-0.], [nan], or infinite, [x] itself is returned. On 64-bit mingw-w64, this function may be emulated owing to a bug in the C runtime library (CRT) on this platform. @since 4.08 6 * Round above to an integer value. [ceil f] returns the least integer value greater than or equal to [f]. The result is returned as a float. 6 * Round below to an integer value. [floor f] returns the greatest integer value less than or equal to [f]. The result is returned as a float. 6% [* [next_after x y] returns the next representable floating-point value following [x] in the direction of [y]. More precisely, if [y] is greater (resp. less) than [x], it returns the smallest (resp. largest) representable number greater (resp. less) than [x]. If [x] equals [y], the function returns [y]. If [x] or [y] is [nan], a [nan] is returned. Note that [next_after max_float infinity = infinity] and that [next_after 0. infinity] is the smallest denormalized positive number. If [x] is the smallest denormalized positive number, [next_after x 0. = 0.] @since 4.08 5 * [copy_sign x y] returns a float whose absolute value is that of [x] and whose sign is that of [y]. If [x] is [nan], returns [nan]. If [y] is [nan], returns either [x] or [-. x], but it is not specified which. 5) * [sign_bit x] is [true] if and only if the sign bit of [x] is set. For example [sign_bit 1.] and [signbit 0.] are [false] while [sign_bit (-1.)] and [sign_bit (-0.)] are [true]. @since 4.08 4 * [frexp f] returns the pair of the significant and the exponent of [f]. When [f] is zero, the significant [x] and the exponent [n] of [f] are equal to zero. When [f] is non-zero, they are defined by [f = x *. 2 ** n] and [0.5 <= x < 1.0]. 4R %* [ldexp x n] returns [x *. 2 ** n]. 3Ġ L* [modf f] returns the pair of the fractional and integral part of [f]. 3Y 3* An alias for the type of floating-point numbers. 3+ F* [compare x y] returns [0] if [x] is equal to [y], a negative integer if [x] is less than [y], and a positive integer if [x] is greater than [y]. [compare] treats [nan] as equal to itself and less than any other float value. This treatment of [nan] ensures that [compare] defines a total ordering relation. 2 L* The equal function for floating-point numbers, compared using {!compare}. 2e * [min x y] returns the minimum of [x] and [y]. It returns [nan] when [x] or [y] is [nan]. Moreover [min (-0.) (+0.) = -0.] @since 4.08 2 * [max x y] returns the maximum of [x] and [y]. It returns [nan] when [x] or [y] is [nan]. Moreover [max (-0.) (+0.) = +0.] @since 4.08 1 N* [min_max x y] is [(min x y, max x y)], just more efficient. @since 4.08 1C * [min_num x y] returns the minimum of [x] and [y] treating [nan] as missing values. If both [x] and [y] are [nan], [nan] is returned. Moreover [min_num (-0.) (+0.) = -0.] @since 4.08 0렠 * [max_num x y] returns the maximum of [x] and [y] treating [nan] as missing values. If both [x] and [y] are [nan] [nan] is returned. Moreover [max_num (-0.) (+0.) = +0.] @since 4.08 0 * [min_max_num x y] is [(min_num x y, max_num x y)], just more efficient. Note that in particular [min_max_num x nan = (x, x)] and [min_max_num nan y = (y, y)]. @since 4.08 0! * A seeded hash function for floats, with the same output value as {!Hashtbl.seeded_hash}. This function allows this module to be passed as argument to the functor {!Hashtbl.MakeSeeded}. @since 5.1 /ɠ * An unseeded hash function for floats, with the same output value as {!Hashtbl.hash}. This function allows this module to be passed as argument to the functor {!Hashtbl.Make}. / M* The type of float arrays with packed representation. @since 4.08 /G B* Return the length (number of elements) of the given floatarray. .렠 * [get a n] returns the element number [n] of floatarray [a]. @raise Invalid_argument if [n] is outside the range 0 to [(length a - 1)]. . * [set a n x] modifies floatarray [a] in place, replacing element number [n] with [x]. @raise Invalid_argument if [n] is outside the range 0 to [(length a - 1)]. .) * [make n x] returns a fresh floatarray of length [n], initialized with [x]. @raise Invalid_argument if [n < 0] or [n > Sys.max_floatarray_length]. -Ѡ * [create n] returns a fresh floatarray of length [n], with uninitialized data. @raise Invalid_argument if [n < 0] or [n > Sys.max_floatarray_length]. - 0* [init n f] returns a fresh floatarray of length [n], with element number [i] initialized to the result of [f i]. In other terms, [init n f] tabulates the results of [f] applied to the integers [0] to [n-1]. @raise Invalid_argument if [n < 0] or [n > Sys.max_floatarray_length]. - H* [make_matrix dimx dimy e] returns a two-dimensional array (an array of arrays) with first dimension [dimx] and second dimension [dimy], where all elements are initialized with [e]. @raise Invalid_argument if [dimx] or [dimy] is negative or greater than {!Sys.max_floatarray_length}. @since 5.2 , a* [init_matrix dimx dimy f] returns a two-dimensional array (an array of arrays) with first dimension [dimx] and second dimension [dimy], where the element at index ([x,y]) is initialized with [f x y]. @raise Invalid_argument if [dimx] or [dimy] is negative or greater than {!Sys.max_floatarray_length}. @since 5.2 , * [append v1 v2] returns a fresh floatarray containing the concatenation of the floatarrays [v1] and [v2]. @raise Invalid_argument if [length v1 + length v2 > Sys.max_floatarray_length]. + =* Same as {!append}, but concatenates a list of floatarrays. +\ <* [sub a pos len] returns a fresh floatarray of length [len], containing the elements number [pos] to [pos + len - 1] of floatarray [a]. @raise Invalid_argument if [pos] and [len] do not designate a valid subarray of [a]; that is, if [pos < 0], or [len < 0], or [pos + len > length a]. * i* [copy a] returns a copy of [a], that is, a fresh floatarray containing the same elements as [a]. * * [fill a pos len x] modifies the floatarray [a] in place, storing [x] in elements number [pos] to [pos + len - 1]. @raise Invalid_argument if [pos] and [len] do not designate a valid subarray of [a]. *0 * [blit src src_pos dst dst_pos len] copies [len] elements from floatarray [src], starting at element number [src_pos], to floatarray [dst], starting at element number [dst_pos]. It works correctly even if [src] and [dst] are the same floatarray, and the source and destination chunks overlap. @raise Invalid_argument if [src_pos] and [len] do not designate a valid subarray of [src], or if [dst_pos] and [len] do not designate a valid subarray of [dst]. ) ;* [to_list a] returns the list of all the elements of [a]. )M * [of_list l] returns a fresh floatarray containing the elements of [l]. @raise Invalid_argument if the length of [l] is greater than [Sys.max_floatarray_length].(<* {1:comparison Comparison} (ݠ * [equal eq a b] is [true] if and only if [a] and [b] have the same length [n] and for all [i] in \[[0];[n-1]\], [eq a.(i) b.(i)] is [true]. @since 5.4 ([ * [compare cmp a b] compares [a] and [b] according to the shortlex order, that is, shorter arrays are smaller and equal-sized arrays are compared in lexicographic order using [cmp] to compare elements. @since 5.4 '̠0* {1 Iterators} ' * [iter f a] applies function [f] in turn to all the elements of [a]. It is equivalent to [f a.(0); f a.(1); ...; f a.(length a - 1); ()]. 'S * Same as {!iter}, but the function is applied with the index of the element as first argument, and the element itself as second argument. &֠ }* [map f a] applies function [f] to all the elements of [a], and builds a floatarray with the results returned by [f]. &k {* [map_inplace f a] applies function [f] to all elements of [a], and updates their values in place. @since 5.1 & * Same as {!map}, but the function is applied to the index of the element as first argument, and the element itself as second argument. % * Same as {!map_inplace}, but the function is applied to the index of the element as first argument, and the element itself as second argument. @since 5.1 % * [fold_left f x init] computes [f (... (f (f x init.(0)) init.(1)) ...) init.(n-1)], where [n] is the length of the floatarray [init]. $ * [fold_right f a init] computes [f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...))], where [n] is the length of the floatarray [a]. $>* {1 Iterators on two arrays} # * [Array.iter2 f a b] applies function [f] to all the elements of [a] and [b]. @raise Invalid_argument if the floatarrays are not the same size. #y * [map2 f a b] applies function [f] to all the elements of [a] and [b], and builds a floatarray with the results returned by [f]: [[| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|]]. @raise Invalid_argument if the floatarrays are not the same size. "ꠠ5* {1 Array scanning} "Ϡ * [for_all f [|a1; ...; an|]] checks if all elements of the floatarray satisfy the predicate [f]. That is, it returns [(f a1) && (f a2) && ... && (f an)]. "q * [exists f [|a1; ...; an|]] checks if at least one element of the floatarray satisfies the predicate [f]. That is, it returns [(f a1) || (f a2) || ... || (f an)]. " * [mem a set] is true if and only if there is an element of [set] that is structurally equal to [a], i.e. there is an [x] in [set] such that [compare a x = 0]. ! I* Same as {!mem}, but uses IEEE equality instead of structural equality. !V6* {1 Array searching} !; [find_opt f a] returns the first element of the array [a] that satisfies the predicate [f]. Returns [None] if there is no value that satisfies [f] in the array [a]. @since 5.1 OfTfVOgg@ * [find_index f a] returns [Some i], where [i] is the index of the first element of the array [a] that satisfies [f x], if there is such an element. It returns [None] if there is no such element. @since 5.1  p [find_map f a] applies [f] to the elements of [a] in order, and returns the first result of the form [Some v], or [None] if none exist. @since 5.1 Ohyh{Oi i@ * Same as [find_map], but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument. @since 5.1 z 2* {1:sorting_and_shuffling Sorting and shuffling} _ q* Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, {!Stdlib.compare} is a suitable comparison function. After calling [sort], the array is sorted in place in increasing order. [sort] is guaranteed to run in constant heap space and (at most) logarithmic stack space. The current implementation uses Heap Sort. It runs in constant stack space. Specification of the comparison function: Let [a] be the floatarray and [cmp] the comparison function. The following must be true for all [x], [y], [z] in [a] : - [cmp x y] > 0 if and only if [cmp y x] < 0 - if [cmp x y] >= 0 and [cmp y z] >= 0 then [cmp x z] >= 0 When [sort] returns, [a] contains the same elements as before, reordered in such a way that for all i and j valid indices of [a] : - [cmp a.(i) a.(j)] >= 0 if i >= j  * Same as {!sort}, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space. The current implementation uses Merge Sort. It uses a temporary floatarray of length [n/2], where [n] is the length of the floatarray. It is usually faster than the current implementation of {!sort}. r Q* Same as {!sort} or {!stable_sort}, whichever is faster on typical input. ? thwart tools/sync_stdlib_docs OqqOqq@ * [shuffle rand a] randomly permutes [a]'s elements using [rand] for randomness. The distribution of permutations is uniform. [rand] must be such that a call to [rand n] returns a uniformly distributed random number in the range \[[0];[n-1]\]. {!Random.int} can be used for this (do not forget to {{!Random.self_init}initialize} the generator). @since 5.2  !* {1 Float arrays and Sequences} s * Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence. " * Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.  &* Create an array from the generator. K * [map_to_array f a] applies function [f] to all the elements of [a], and builds an array with the results returned by [f]: [[| f a.(0); f a.(1); ...; f a.(length a - 1) |]]. ڠ * [map_from_array f a] applies function [f] to all the elements of [a], and builds a floatarray with the results returned by [f]. i * {1:floatarray_concurrency Arrays and concurrency safety} Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results. {2:floatarray_atomicity Atomicity} Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays. For example, consider the following program: {[let size = 100_000_000 let a = Float.Array.make size 1. let update a f () = Float.Array.iteri (fun i x -> Float.Array.set a i (f x)) a let d1 = Domain.spawn (update a (fun x -> x +. 1.)) let d2 = Domain.spawn (update a (fun x -> 2. *. x +. 1.)) let () = Domain.join d1; Domain.join d2 ]} After executing this code, each field of the float array [a] is either [2.], [3.], [4.] or [5.]. If atomicity is required, then the user must implement their own synchronization (for example, using {!Mutex.t}). {2:floatarray_data_race Data races} If two domains only access disjoint parts of the array, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains. A data race is said to occur when two domains access the same array element without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains. Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the array elements. Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location with a few exceptions. {2:floatarray_datarace_tearing Tearing } Float arrays have two supplementary caveats in the presence of data races. First, the blit operation might copy an array byte-by-byte. Data races between such a blit operation and another operation might produce surprising values due to tearing: partial writes interleaved with other operations can create float values that would not exist with a sequential execution. For instance, at the end of {[let zeros = Float.Array.make size 0. let max_floats = Float.Array.make size Float.max_float let res = Float.Array.copy zeros let d1 = Domain.spawn (fun () -> Float.Array.blit zeros 0 res 0 size) let d2 = Domain.spawn (fun () -> Float.Array.blit max_floats 0 res 0 size) let () = Domain.join d1; Domain.join d2 ]} the [res] float array might contain values that are neither [0.] nor [max_float]. Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation. N#*/*>=* {1 Undocumented functions} 0 @ These functions are for system use only. Do not call directly. P l!#P!l!g@ +* Float arrays with packed representation.  M* The type of float arrays with packed representation. @since 4.08  B* Return the length (number of elements) of the given floatarray. & * [get a n] returns the element number [n] of floatarray [a]. @raise Invalid_argument if [n] is outside the range 0 to [(length a - 1)]. Π * [set a n x] modifies floatarray [a] in place, replacing element number [n] with [x]. @raise Invalid_argument if [n] is outside the range 0 to [(length a - 1)]. d * [make n x] returns a fresh floatarray of length [n], initialized with [x]. @raise Invalid_argument if [n < 0] or [n > Sys.max_floatarray_length].  * [create n] returns a fresh floatarray of length [n], with uninitialized data. @raise Invalid_argument if [n < 0] or [n > Sys.max_floatarray_length]. Ơ 2* [init n ~f] returns a fresh floatarray of length [n], with element number [i] initialized to the result of [f i]. In other terms, [init n ~f] tabulates the results of [f] applied to the integers [0] to [n-1]. @raise Invalid_argument if [n < 0] or [n > Sys.max_floatarray_length]. Y J* [make_matrix ~dimx ~dimy e] returns a two-dimensional array (an array of arrays) with first dimension [dimx] and second dimension [dimy], where all elements are initialized with [e]. @raise Invalid_argument if [dimx] or [dimy] is negative or greater than {!Sys.max_floatarray_length}. @since 5.2 ڠ d* [init_matrix ~dimx ~dimy ~f] returns a two-dimensional array (an array of arrays) with first dimension [dimx] and second dimension [dimy], where the element at index ([x,y]) is initialized with [f x y]. @raise Invalid_argument if [dimx] or [dimy] is negative or greater than {!Sys.max_floatarray_length}. @since 5.2 4 * [append v1 v2] returns a fresh floatarray containing the concatenation of the floatarrays [v1] and [v2]. @raise Invalid_argument if [length v1 + length v2 > Sys.max_floatarray_length]. ܠ =* Same as {!append}, but concatenates a list of floatarrays.  >* [sub a ~pos ~len] returns a fresh floatarray of length [len], containing the elements number [pos] to [pos + len - 1] of floatarray [a]. @raise Invalid_argument if [pos] and [len] do not designate a valid subarray of [a]; that is, if [pos < 0], or [len < 0], or [pos + len > length a].  i* [copy a] returns a copy of [a], that is, a fresh floatarray containing the same elements as [a]. Ѡ * [fill a ~pos ~len x] modifies the floatarray [a] in place, storing [x] in elements number [pos] to [pos + len - 1]. @raise Invalid_argument if [pos] and [len] do not designate a valid subarray of [a]. O * [blit ~src ~src_pos ~dst ~dst_pos ~len] copies [len] elements from floatarray [src], starting at element number [src_pos], to floatarray [dst], starting at element number [dst_pos]. It works correctly even if [src] and [dst] are the same floatarray, and the source and destination chunks overlap. @raise Invalid_argument if [src_pos] and [len] do not designate a valid subarray of [src], or if [dst_pos] and [len] do not designate a valid subarray of [dst].  ;* [to_list a] returns the list of all the elements of [a]. ] * [of_list l] returns a fresh floatarray containing the elements of [l]. @raise Invalid_argument if the length of [l] is greater than [Sys.max_floatarray_length].<* {1:comparison Comparison}  * [equal eq a b] is [true] if and only if [a] and [b] have the same length [n] and for all [i] in \[[0];[n-1]\], [eq a.(i) b.(i)] is [true]. @since 5.4 i * [compare cmp a b] compares [a] and [b] according to the shortlex order, that is, shorter arrays are smaller and equal-sized arrays are compared in lexicographic order using [cmp] to compare elements. @since 5.4 ؠ0* {1 Iterators}  * [iter ~f a] applies function [f] in turn to all the elements of [a]. It is equivalent to [f a.(0); f a.(1); ...; f a.(length a - 1); ()]. ] * Same as {!iter}, but the function is applied with the index of the element as first argument, and the element itself as second argument. ޠ ~* [map ~f a] applies function [f] to all the elements of [a], and builds a floatarray with the results returned by [f]. q {* [map_inplace f a] applies function [f] to all elements of [a], and updates their values in place. @since 5.1  * Same as {!map}, but the function is applied to the index of the element as first argument, and the element itself as second argument.  * Same as {!map_inplace}, but the function is applied to the index of the element as first argument, and the element itself as second argument. @since 5.1  * [fold_left ~f x ~init] computes [f (... (f (f x init.(0)) init.(1)) ...) init.(n-1)], where [n] is the length of the floatarray [init].  * [fold_right f a init] computes [f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...))], where [n] is the length of the floatarray [a].  >* {1 Iterators on two arrays}  * [Array.iter2 ~f a b] applies function [f] to all the elements of [a] and [b]. @raise Invalid_argument if the floatarrays are not the same size.  m * [map2 ~f a b] applies function [f] to all the elements of [a] and [b], and builds a floatarray with the results returned by [f]: [[| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|]]. @raise Invalid_argument if the floatarrays are not the same size.  ܠ5* {1 Array scanning}  * [for_all ~f [|a1; ...; an|]] checks if all elements of the floatarray satisfy the predicate [f]. That is, it returns [(f a1) && (f a2) && ... && (f an)].  a * [exists f [|a1; ...; an|]] checks if at least one element of the floatarray satisfies the predicate [f]. That is, it returns [(f a1) || (f a2) || ... || (f an)].  * [mem a ~set] is true if and only if there is an element of [set] that is structurally equal to [a], i.e. there is an [x] in [set] such that [compare a x = 0].  I* Same as {!mem}, but uses IEEE equality instead of structural equality.  >6* {1 Array searching}  # [find_opt ~f a] returns the first element of the array [a] that satisfies the predicate [f]. Returns [None] if there is no value that satisfies [f] in the array [a]. @since 5.1 P8P;FX@ * [find_index ~f a] returns [Some i], where [i] is the index of the first element of the array [a] that satisfies [f x], if there is such an element. It returns [None] if there is no such element. @since 5.1  T [find_map ~f a] applies [f] to the elements of [a] in order, and returns the first result of the form [Some v], or [None] if none exist. @since 5.1 PFPHOa@ * Same as [find_map], but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument. @since 5.1  Z 2* {1:sorting_and_shuffling Sorting and shuffling}  ? q* Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, {!Stdlib.compare} is a suitable comparison function. After calling [sort], the array is sorted in place in increasing order. [sort] is guaranteed to run in constant heap space and (at most) logarithmic stack space. The current implementation uses Heap Sort. It runs in constant stack space. Specification of the comparison function: Let [a] be the floatarray and [cmp] the comparison function. The following must be true for all [x], [y], [z] in [a] : - [cmp x y] > 0 if and only if [cmp y x] < 0 - if [cmp x y] >= 0 and [cmp y z] >= 0 then [cmp x z] >= 0 When [sort] returns, [a] contains the same elements as before, reordered in such a way that for all i and j valid indices of [a] : - [cmp a.(i) a.(j)] >= 0 if i >= j ͠ * Same as {!sort}, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space. The current implementation uses Merge Sort. It uses a temporary floatarray of length [n/2], where [n] is the length of the floatarray. It is usually faster than the current implementation of {!sort}. N Q* Same as {!sort} or {!stable_sort}, whichever is faster on typical input. Ϡ? thwart tools/sync_stdlib_docs PzPz@ * [shuffle ~rand a] randomly permutes [a]'s elements using [rand] for randomness. The distribution of permutations is uniform. [rand] must be such that a call to [rand n] returns a uniformly distributed random number in the range \[[0];[n-1]\]. {!Random.int} can be used for this (do not forget to {{!Random.self_init}initialize} the generator). @since 5.2 h !* {1 Float arrays and Sequences} M * Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.  * Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.  &* Create an array from the generator. % * [map_to_array ~f a] applies function [f] to all the elements of [a], and builds an array with the results returned by [f]: [[| f a.(0); f a.(1); ...; f a.(length a - 1) |]].  * [map_from_array ~f a] applies function [f] to all the elements of [a], and builds a floatarray with the results returned by [f]. ? * {1:floatarray_concurrency Arrays and concurrency safety} Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results. {2:floatarray_atomicity Atomicity} Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays. For example, consider the following program: {[let size = 100_000_000 let a = Float.ArrayLabels.make size 1. let update a f () = Float.ArrayLabels.iteri ~f:(fun i x -> Float.Array.set a i (f x)) a let d1 = Domain.spawn (update a (fun x -> x +. 1.)) let d2 = Domain.spawn (update a (fun x -> 2. *. x +. 1.)) let () = Domain.join d1; Domain.join d2 ]} After executing this code, each field of the float array [a] is either [2.], [3.], [4.] or [5.]. If atomicity is required, then the user must implement their own synchronization (for example, using {!Mutex.t}). {2:floatarray_data_race Data races} If two domains only access disjoint parts of the array, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains. A data race is said to occur when two domains access the same array element without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains. Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the array elements. Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location with a few exceptions. {2:floatarray_datarace_tearing Tearing } Float arrays have two supplementary caveats in the presence of data races. First, the blit operation might copy an array byte-by-byte. Data races between such a blit operation and another operation might produce surprising values due to tearing: partial writes interleaved with other operations can create float values that would not exist with a sequential execution. For instance, at the end of {[let zeros = Float.Array.make size 0. let max_floats = Float.Array.make size Float.max_float let res = Float.Array.copy zeros let d1 = Domain.spawn (fun () -> Float.Array.blit zeros 0 res 0 size) let d2 = Domain.spawn (fun () -> Float.Array.blit max_floats 0 res 0 size) let () = Domain.join d1; Domain.join d2 ]} the [res] float array might contain values that are neither [0.] nor [max_float]. Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation. $#*/*=* {1 Undocumented functions}  @ These functions are for system use only. Do not call directly. P‰‹P‰@ ?* Float arrays with packed representation (labeled functions). @?)../ocamlc0-strict-sequence(-absname"-w5+a-4-9-41-42-44-45-48"-g+-warn-error"+A*-bin-annot)-nostdlib*-principal"-o1stdlib__Float.cmi"-cPP D/builds/workspace/precheck/flambda/false/label/ocaml-linux-32/stdlib @@0rXՐ.̏X3PPPPPPPP@P@@8CamlinternalFormatBasics0%FU(Q/Tu&Stdlib0Lku]8_٠.Stdlib__Either0Vy`u~c àQ 0iZKoDSe}}+Stdlib__Seq0nwzG&amg@0iZKoDSe}}A.~EEt@$ː%L1ؐ2>@P45@@NfN@===@ACA@@@*FF@`)*jOO@$U$ذ*+3F^E@:O:@,,I+Ie@@./AAːB @CClOpO@99h@@H\H@;<>Ր?*JJ@ y ٰ1n18E8MtM@i@@7ʐ82@@`!"ZJK @G@/@/x/@t9-.1Ӑ2JMJu@@@@FnF@1y1@v@ Q @#$@A@ ؐ]3|@GGJ,JTJJ@@@D;D@$0$@},,@@k@@BB@ϐAGADE@ Q &']-t-@77KK@@@eҰ@@0ϐ1>H>@@@@616KkK@!͐"3@.ސ/K@#8#((g-.411GG@@ǐ(U D D D`FG@OO@@G$F@ ِ (ɐ(5ưJJ6@@@LMR@EgE@}@LL@̐Oc;9E9@,,44@  z@;s;Ȱ;<8@CYC@LL[@@+T+@T   c İ=;=@4`4:;@!"NO:@:C:MN@3A3@`)*5(5tHH@ T ##zLL@@<=F@@0ܐ1:@u@ K @@ ِ (@@@I֐J@@&&@G@3*a*@GKF@  v4)4@@,N,@S@@II@ R6[67ʐ8 @56 @1̐2OP6@'%'@340@i@e@Q@@))A1A@)){JѐJ@!b!Ѱ$A$@͐A"NO<@m@77ٰ??I8Iw@i=\@@(F(0Ր1!>'>|GGN@@P@@