(Reals and Rationals): Use tex for sqrt2 and pi.
authorKevin Ryde <user42@zip.com.au>
Thu, 17 Feb 2005 21:18:31 +0000 (21:18 +0000)
committerKevin Ryde <user42@zip.com.au>
Thu, 17 Feb 2005 21:18:31 +0000 (21:18 +0000)
(Complex Numbers): Add polar form read syntax.

doc/ref/api-data.texi

index 5d29415..e622697 100755 (executable)
@@ -494,7 +494,8 @@ all possible points along a continuous, infinite, one-dimensional line.
 The rational numbers are the set of all numbers that can be written as
 fractions @var{p}/@var{q}, where @var{p} and @var{q} are integers.
 All rational numbers are also real, but there are real numbers that
-are not rational, for example the square root of 2, and pi.
+are not rational, for example @m{\sqrt2, the square root of 2}, and
+@m{\pi,pi}.
 
 Guile can represent both exact and inexact rational numbers, but it
 can not represent irrational numbers.  Exact rationals are represented
@@ -665,6 +666,16 @@ the imaginary part.
 9.3-17.5i
 @end lisp
 
+@cindex polar form
+@noindent
+Polar form can also be used, with an @samp{@@} between magnitude and
+angle,
+
+@lisp
+1@@3.141592 @result{} -1.0      (approx)
+-1@@1.57079 @result{} 0.0-1.0i  (approx)
+@end lisp
+
 Guile represents a complex number with a non-zero imaginary part as a
 pair of inexact rationals, so the real and imaginary parts of a
 complex number have the same properties of inexactness and limited
@@ -1038,6 +1049,7 @@ Return a complex number constructed of the given @var{real} and
 
 @deffn {Scheme Procedure} make-polar x y
 @deffnx {C Function} scm_make_polar (x, y)
+@cindex polar form
 Return the complex number @var{x} * e^(i * @var{y}).
 @end deffn