src/pylib/builtins/private/ncomplex_pow

Source   Edit  

why this module doesn't use pow in std/complex (we call it ncomplex.pow below):

  • For integer 2nd arg, we'll use c_powi or c_powu,

which produce more precious result than ncomplex.pow

  • ncomplex.pow doesn't raise any exception

Procs

func c_powi[T](x: Complex[T]; i: SomeInteger): Complex[T] {....raises: [], inline.}
Source   Edit  
func c_powu[T](x: Complex[T]; n: Natural): Complex[T] {....raises: [], inline.}
Source   Edit  
func pow[T](a, b: Complex[T]): Complex[T]
Source   Edit  
func pow[T](self: Complex[T]; i: SomeInteger): Complex[T]
Source   Edit  
func pow[T](self: Complex[T]; n: static Natural): Complex[T] {.compileTime.}
Source   Edit  
func powu[T](self: Complex[T]; n: Natural): Complex[T]
Source   Edit