package randii
A pure OCaml port of the Random123 counter based random number generator from DEShaw Research
Install
Dune Dependency
Authors
Maintainers
Sources
1.0.0.tar.gz
md5=1f8f3a98495497cece0131f11c0297e7
sha512=4377b604e5debe94ba98e980ffdbb92e936306460b7db65eee2d1d5493f0abc12f54982527d49351b8461e3208ac158aed79a932575872956e849a432d058e85
doc/src/randii.cbrn/num_uint64_2.ml.html
Source file num_uint64_2.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
open Types module U = Unsigned.UInt64 type (_,_) t = U.t type digits = digits_two type word = word_64 let digits = 2 let of_int = U.of_int let of_string = U.of_string let to_int = U.to_int let to_string = U.to_string let zero = of_int 0 let one = of_int 1 let max_int = U.max_int let equal = U.equal let succ = U.succ let pred = U.pred let add = U.add let sub = U.sub let rem = U.rem let logxor = U.logxor (* #define SKEIN_MK_64(hi32,lo32) ((lo32) + (((uint64_t) (hi32)) << 32)) * #define SKEIN_KS_PARITY64 SKEIN_MK_64(0x1BD11BDA,0xA9FC1A22) *) let skein_ks_parity = let hi = "0x1BD11BDA" |> of_string in let lo = "0xA9FC1A22" |> of_string in add lo (U.shift_left hi 32) let rotations_0 = Rotations.make ~to_num:of_int 16 42 12 31 16 32 24 21 let rotations_1 = Rotations.zeros ~to_num:of_int let _63 = 63 |> of_int let _64 = 64 |> of_int let rotL x n = let l = U.logand n _63 |> to_int in let left = U.shift_left x l in let r = (U.logand (U.sub _64 n) _63) |> to_int in let right = U.shift_right x r in U.logor left right
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>