From 34942993e6adcea49b059c434fb2f72cf06efb0d Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Thu, 17 Feb 2005 21:18:31 +0000 Subject: [PATCH] (Reals and Rationals): Use tex for sqrt2 and pi. (Complex Numbers): Add polar form read syntax. --- doc/ref/api-data.texi | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/ref/api-data.texi b/doc/ref/api-data.texi index 5d2941517..e6226973f 100755 --- a/doc/ref/api-data.texi +++ b/doc/ref/api-data.texi @@ -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