diff --git a/README.md b/README.md index 417bce0..05b3700 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,28 @@ pub fn main() { Further documentation can be found at . +## Limitations + +Erlang does have [a limit for big integers at around 4 megabits](https://elixirforum.com/t/is-there-an-integer-size-limit/65647/8?u=nicd), +as demonstrated below: + +```gleam +import bigi + +pub fn main() { + // Works + bigi.power(bigi.from_int(2), bigi.from_int(4_194_239)) + + // Blows up + bigi.power(bigi.from_int(2), bigi.from_int(4_194_240)) +} +``` + +For Node.js, the limit is somewhere higher. + +`bigi` has no facilities to warn about or handle errors due to these system limits. It is up to the developer +to be mindful of them. + ## Development ```sh