June 2022
Intermediate to advanced
130 pages
2h 45m
English
Elixir supports a couple of important numeric types, most prominently floats and integers. Elixir doesn’t support small and big ints out of the box, opting to convert integers to use more bytes as needed:
| | iex(7)> big = 256 * 256 * 256 * 256 |
| | 4294967296 |
| | iex(9)> huge = big * big * big * big |
| | 340282366920938463463374607431768211456 |
| | iex(10)> huge * huge * huge * huge |
| | 1340780792994259709957402499820584612747936582059239337772356144372176 |
| | 4030073546976801874298166903427690031858186486050853753882811946569946 |
| | 433649006084096 |
| | iex(11)> i |
| | Term |
| | 1340780792994259709957402499820584612747936582059239337772356144372176 |
| | 4030073546976801874298166903427690031858186486050853753882811946569946 |
| | 433649006084096 ... |
Read now
Unlock full access