sci v0.0.2 Sci.Helpers.Sigils View Source

Link to this section Summary

Functions

Handles the sigil ~n

Link to this section Functions

Handles the sigil ~n

Parses the number into a ComplexNum.

Examples

iex> ~n{1}
ComplexNum.new(1)

iex> ~n{0.1+12i}
ComplexNum.new(0.1, 12)

iex> ~n{0.1-0.12e-12i}
ComplexNum.new(0.1, -0.12e-12)

iex> ~n{1.1+3.12e-12i}
ComplexNum.new(1.1, 3.12e-12)