W3cubDocs

/Elixir 1.18

Source ArithmeticError exception

An exception raised on invalid arithmetic operations.

For example, this exception is raised if you divide by 0:

iex> 1 / 0
** (ArithmeticError) bad argument in arithmetic expression: 1 / 0

© 2012-2024 The Elixir Team
Licensed under the Apache License, Version 2.0.
https://hexdocs.pm/elixir/1.18.1/ArithmeticError.html