From 2180ae15defd1485364a8d8934e141af70c037f0 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 17 Mar 2021 19:34:06 -0500 Subject: [PATCH] mention that expt does like sqrt when it gets 1/2 as a second argument --- pkgs/racket-doc/scribblings/reference/numbers.scrbl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/racket-doc/scribblings/reference/numbers.scrbl b/pkgs/racket-doc/scribblings/reference/numbers.scrbl index 93479e6881..a4cb6976c3 100644 --- a/pkgs/racket-doc/scribblings/reference/numbers.scrbl +++ b/pkgs/racket-doc/scribblings/reference/numbers.scrbl @@ -602,6 +602,10 @@ If @racket[z] is exact @racket[0], the result is as follows: @item{otherwise --- result is @racket[0]} ] +If @racket[w] is exact @racket[1/2], the result is the same as @racket[(sqrt z)], +which can be exact. Other fractional powers are not treated specially in this manner: +@mz-examples[(expt 9 1/2) (expt 9 0.5) (expt 16 1/4) (expt 16 0.25)] + Further special cases when @racket[w] is a @tech{real number}: @margin-note*{These special cases correspond to @tt{pow} in C99 @cite["C99"], except when @racket[z] is negative and @racket[w] is a not an