fixnum
fixnum copied to clipboard
Fixed-width integer library for Dart.
This PR adds another `Int64` implementation that is just a wrapper around `int`, to be used in targets where `int` is 64 bits. Becuase `dart doc` generates using the native...
In #117 we make `Int64` class a wrapper around `int` on platforms that support 64-bit `int`s (VM, AOT, Wasm). With extension classes we should also make the new wrapper class...
- Mention the result when the integer is 0. - Clarify that leading = most significant, trailing = least significant. - Remove the documentation from the implementation class.
There already are `toStringUnsigned()` and `shiftRightUnsigned()` methods, but no `toDoubleUnsigned()` method. ```dart Int64(-1).toDouble() // -1.0 Int64(-1).toDoubleUnsigned() // 1.8446744073709552E+19 ```
The current implementation of `Int64` stores the underlying integer as 3 integer fields: ```dart class Int64 implements IntX { // A 64-bit integer is represented internally as three non-negative //...
**Issue by [rakudrama](https://github.com/rakudrama)** _Originally opened as dart-lang/sdk#21915_ --- Int64.parseInt, Int64.parseRadix and Int64.parseHex should be marked as deprecated and replaced with a single Int64.parse method modeled after int.parse static Int64 parse(String...
The class `Int64` has a `parse` method, but no `tryParse` method. I suggest adding a `try` version of each of the `parse` methods (`parse`, `parseHex`, `parseRadix`), which returns `null` instead...
Since Dart conditional imports/exports are a thing, has there been much consideration to making `package:fixnum` offer different implementations of `Int32`/`Int64` for the Dart VM than for the web? For the...
I am wondering: if I know that I don't need more than 64-bit integers when running on web, should I go for `BigInt` or for `fixnum` for best performance? On...
The documentation for `Int32` and `Int64` state: > Arithmetic operations may overflow in order to maintain this range. but doesn't explain what the overflow behavior is. Does it wrap around?...