From 0ec3ff5cc6b722d47f500140198bf9cfa33a8b66 Mon Sep 17 00:00:00 2001 From: jjgarcia Date: Fri, 19 Dec 2003 11:15:40 +0000 Subject: [PATCH] PHASE of 0 is zero by definition. --- src/lsp/numlib.lsp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lsp/numlib.lsp b/src/lsp/numlib.lsp index 0d970724f..fc3f59308 100644 --- a/src/lsp/numlib.lsp +++ b/src/lsp/numlib.lsp @@ -53,7 +53,9 @@ Returns the absolute value of NUMBER." "Args: (number) Returns the angle part (in radians) of the polar representation of NUMBER. Returns zero for non-complex numbers." - (atan (imagpart x) (realpart x))) + (if (zerop x) + (float 0 (realpart x)) + (atan (imagpart x) (realpart x)))) (defun signum (x) "Args: (number)