To generate random numbers in Elixir, you primarily use the :rand module which provides several functions for this purpose.
:rand
In Elixir, you can use Float.round/2 to round a floating-point number.
Float.round/2
Elixir doesn’t have built-in complex numbers, so we roll our own or use a library, like ComplexNum.
ComplexNum