package server-reason-react
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=2d27cb4656208dde8d5eb0c452c590186d092618ac0a04f1ab0a095a3ca58498
sha512=26e16daf87f6b80eff86ccf7df29153527b24e3f4dbc7f13820d1507b0a2e7d6db40fd774bcaad6e6cccff0bf19d4a411b95a10a071f9ce92d52bf07eb08f75f
doc/server-reason-react.js/Js/Bigint/index.html
Module Js.BigintSource
Provide utilities for bigint
The BigInt type, representing arbitrary precision integers
Constructors
of_string s creates a BigInt from a string representation. Supports decimal, hexadecimal (0x prefix), binary (0b prefix), and octal (0o prefix) formats. Whitespace is trimmed. Empty string returns 0. Invalid strings return 0.
of_string_exn s creates a BigInt from a string representation. Like of_string but raises Failure on invalid input.
Conversions
to_string ?radix bigint returns a string representation. radix can be 2-36 (default 10).
to_float bigint converts to float. May lose precision for large values.
Arithmetic operations
div x y returns x / y, truncated toward zero. Raises Division_by_zero if y is zero.
rem x y returns the remainder of x / y. The sign follows the dividend (JavaScript semantics). Raises Division_by_zero if y is zero.
pow base exp returns base raised to the power exp. Raises Invalid_argument if exp is negative.
Bitwise operations
shift_right x n returns x arithmetically shifted right by n bits. Sign-extending for negative numbers.
Comparison operations
Bit width conversion
as_int_n bits x wraps x to a signed integer of bits bits. Equivalent to JavaScript's BigInt.asIntN.