From 5de5eaaa14662bb774f061cf66a27b8ea85dd229 Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Fri, 18 Oct 2013 15:20:37 -0400 Subject: [PATCH] fixed docs for atan --- .../htdp-lib/lang/private/beginner-funs.rkt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/htdp-pkgs/htdp-lib/lang/private/beginner-funs.rkt b/pkgs/htdp-pkgs/htdp-lib/lang/private/beginner-funs.rkt index fb702f8040..e65a6841e7 100644 --- a/pkgs/htdp-pkgs/htdp-lib/lang/private/beginner-funs.rkt +++ b/pkgs/htdp-pkgs/htdp-lib/lang/private/beginner-funs.rkt @@ -227,9 +227,15 @@ Computes the arccosine (inverse of cos) of a number. @interaction[#:eval (bsl) (acos 0)] } - @defproc[(atan [x number] [y number]) number]{ - Computes the arctan of the given number or the ratio of the two given numbers. - @interaction[#:eval (bsl) (atan 0) (atan 3 4)] + @defproc[(atan [x number]) number]{ + Computes the arctangent of the given number: + @interaction[#:eval (bsl) (atan 0) (atan 0.5)] + + Also comes in a two-argument version where @racket[(atan x y)] computes + @racket[(atan (/ x y))] but the signs of @racket[x] and @racket[y] + determine the quadrant of the result and the result tends to be more + accurate than that of the 1-argument version in borderline cases: + @interaction[#:eval (bsl) (atan 3 4) (atan -2 -1)] } @defproc[(sinh [x number]) number]{ Computes the hyperbolic sine of a number.