Initial revision
[LeanCalc.git] / help / polar
1 NAME
2     polar - specify a complex number by modulus (radius) and argument (angle)
3
4 SYNOPSIS
5     polar(r, t [, eps])
6
7 TYPES
8     r           real
9     t           real
10     eps         nonzero real, defaults to epsilon()
11
12     return      number (real or complex)
13
14 DESCRIPTION
15     Returns the real or complex number with real and imaginary parts
16     multiples of epps nearest or next to nearest to r * cos(t) and
17     r * sin(t) respectively.  The error for each part will be less
18     than 0.75 * abs(eps), but usually less than 0.5 * abs(eps).
19
20 EXAMPLE
21     > print polar(2, 0), polar(1, 2, 1e-5), polar(1, 2, 1e-10)
22     2 -.41615+.9093i -.4161468365+.9092974268i
23
24     > pi = pi(1e-10); eps = 1e-5
25     > print polar(2, pi/4, eps), polar(2, pi/2, eps), polar(2, 3*pi/4, eps)
26     1.41421+1.41421i 2i -1.414215+1.41421i
27
28 LIMITS
29     none
30
31 LINK LIBRARY
32     COMPLEX * cpolar(NUMBER *r, NUMBER *t, NUMBER *eps);
33
34 SEE ALSO
35     abs, arg, re, im
36