Lines Matching refs:pi
48 pi
214 $theta = ($theta <= 0) ? $theta + pi() : $theta - pi();
249 # pi
251 # The number defined as pi = 180 degrees
253 sub pi () { 4 * CORE::atan2(1, 1) }
260 sub pit2 () { 2 * pi }
267 sub pip2 () { pi / 2 }
275 sub deg1 () { pi / 180 }
394 if ($t > pi()) { $t -= pit2 }
395 elsif ($t <= -pi()) { $t += pit2 }
448 if ($t > pi()) { $t -= pit2 }
449 elsif ($t <= -pi()) { $t += pit2 }
454 if ($t > pi()) { $t -= pit2 }
455 elsif ($t <= -pi()) { $t += pit2 }
541 $t = ($t <= 0) ? $t + pi : $t - pi;
590 if ($$theta > pi()) { $$theta -= pit2 }
591 elsif ($$theta <= -pi()) { $$theta += pit2 }
679 # z^(1/n) = r^(1/n) (cos ((t+2 k pi)/n) + i sin ((t+2 k pi)/n))
685 @{$z->polar} : (CORE::abs($z), $z >= 0 ? 0 : pi);
793 return $z > 0 ? CORE::log($z) : cplx(CORE::log(-$z), pi);
797 if ($t > pi()) { $t -= pit2 }
798 elsif ($t <= -pi()) { $t += pit2 }
1286 $u += pi if $re2 < 0;
1287 $u -= pit2 if $u > pi;
1435 } elsif ($t == pi) {
1436 $theta = "pi";
1444 # Try to identify pi/n and friends.
1452 $b = $t * $a / pi;
1455 $theta = "${b}pi/$a";
1486 $j = cplxe(1, 2*pi/3);
1571 axis, and therefore I<theta> is zero or I<pi>.
1594 Indeed, a negative real number can be noted C<[x,pi]> (the modulus
1595 I<x> is always non-negative, so C<[x,pi]> is really C<-x>, a negative
1598 sqrt([x,pi]) = sqrt(x) * exp(i*pi/2) = [sqrt(x),pi/2] = sqrt(x)*i
1727 (root(z, n))[k] = r**(1/n) * exp(i * (t + 2*k*pi)/n)
1748 $z = Math::Complex->emake(5, pi/3);
1749 $x = cplxe(5, pi/3);
1752 (in radians, the full circle is 2*pi). (Mnemonic: C<e> is used as a
1757 $x = cplxe(-3, pi/4);
1759 but that will be silently converted into C<[3,-3pi/4]>, since the
1804 print "j = $j\n"; # Prints "j = [1,2pi/3]"
1808 The polar style attempts to emphasize arguments like I<k*pi/n>
1860 $j = cplxe(1, 2*pi/3); # $j ** 3 == 1
1867 $k = exp(i * 2*pi/3);
1904 C<sec>, C<tanh>, the argument cannot be I<pi/2 + k * pi>, where I<k>