Perl Cd Bookshelf [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Perl Cd Bookshelf [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید

32.33. Math::Complex



use Math::Complex;
$z = Math::Complex->make(5, 6);
$z = cplx(5, 6); # same thing, but shorter
$t = 4 - 3*i + $z; # do standard complex math
print "$t\n"; # prints 9+3i
print sqrt(-9), "\n"; # prints 3i


The Math::Complex module provides complex number objects with
overloaded operators. These are numbers with both real and imaginary
portions, like those satisfying even-numbered integral roots of
negative numbers as shown above. Besides arithmetical operators,
many built-in math functions are also overridden by versions that
understand complex numbers, including abs, log, sqrt,
sin, cos, and atan2. Other functions provided are Re
and Im to provide the real and imaginary portions of their complex
arguments, plus a full battery of extended trigonometric functions,
such as tan, asin, acos, sinh, cosh, and tanh.
The module also exports the constant i, which, as you might imagine, holds the value of i; that is, the square root of -1.






/ 875