Logo

Programming-Idioms

History of Idiom 77 > diff from v7 to v8

Edit summary for version 8 by :

Version 7

2015-09-05, 16:57:59

Version 8

2015-09-30, 11:47:07

Idiom #77 Complex number

Declare a complex x and initialize it with value (3i - 2). Then multiply it by i.

Idiom #77 Complex number

Declare a complex x and initialize it with value (3i - 2). Then multiply it by i.

Imports
use Math::Complex;
Code
my $x = cplx(-2, 3);
$x *= i;
Comments bubble
This version is efficient (fast)