ocaml-stdint icon indicating copy to clipboard operation
ocaml-stdint copied to clipboard

Various signed and unsigned integers for OCaml

Results 21 ocaml-stdint issues
Sort by recently updated
recently updated
newest added

Attaching the simple test project and Dockerfile with Alpine 3.15 for easy reproducer. [ocaml-static-problem.zip](https://github.com/andrenth/ocaml-stdint/files/7795739/ocaml-static-problem.zip) ``` STEP 16/16: RUN eval "$(opam env)" && dune build ocamlopt test.exe (exit 2) (cd _build/default...

All `[u,]intXX.h` files should use `extern "C" { ... }` to allow linking with a C++ binding. I ran into this issue and worked it around by doing ```extern "C"...

https://github.com/andrenth/ocaml-stdint/blob/e3cc9318354d3d195b34e362e631222d284899a5/lib/stdint.ml#L696 Test case: ``` Int128.(compare (shift_right_logical (of_int (-1)) 1) zero);; (* actual: -1 *) (* expected: 1 *) ```

It would be nice to have a ppx extension which would provide a way to use literals. It is clumsy to write things like `Int32.of_string "0xffffffff"`

I'm trying to build version 0.7.0 for Fedora. I'm seeing multiple test failures building on an x86_64 Fedora Rawhide machine, with OCaml 4.11.1 and gcc 10.2.1. In `tests/stdint_test.ml`, `pos_int` can...

It would be nice if `stdint` had a fall-back on pure OCaml code for targets that don't support C bindings, e.g. Js_of_ocaml. I just open-sourced my pure OCaml integer implementation,...

With my colleague @msprotz, we observed segfaults related to 128-bit integers in some Windows OCaml programs using ocaml-stdint. It turns out that even the test executable produced by `make test/stdint_test`...

**Actual behavior** Here is a toplevel session: ```shell μ> #require "stdint";; μ> "-1" |> Stdint.Uint128.of_string |> Stdint.Uint128.to_string;; - : string = "340282366920938463463374607431768211455" ``` Basically, this is the maximum 128-bit unsigned...

(Sorry, I accidentally hit enter) I'd like to propose some API for things like getting the most/least significant bit index, along with getting the number of set bits in an...