From ca82978311908c30227e1c5c2436bde49445a18a Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sun, 30 Jun 2019 19:06:04 +0000 Subject: [PATCH] Document copysign. --- doc/ref-manual/numbers.texi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/ref-manual/numbers.texi b/doc/ref-manual/numbers.texi index 6cf04083c..1b592d274 100644 --- a/doc/ref-manual/numbers.texi +++ b/doc/ref-manual/numbers.texi @@ -1298,6 +1298,20 @@ inexact numbers are representable as exact numbers. The procedure @code{inexact->exact} has been deprecated by @urseven{}. @end deffn +@deffn procedure copysign x1 x2 +Returns a real number with the magnitude of @var{x1} and the sign of +@var{x2}. + +@example +@group +(copysign 123 -1) @result{} -123 +(copysign 0. -1) @result{} -0. +(copysign -0. 0.) @result{} 0. +(copysign -nan.123 0.) @result{} +nan.123 +@end group +@end example +@end deffn + @node Numerical input and output, Fixnum and Flonum Operations, Numerical operations, Numbers @section Numerical input and output @cindex numerical input and output -- 2.25.1