From 7b33785b0391fd35274b0e281c7250bfd6a234e9 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sat, 28 Jan 2006 18:41:45 +0000 Subject: [PATCH] fixed a stupid implementation of nth-root --- contrib/math/analysis.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/math/analysis.factor b/contrib/math/analysis.factor index 064f3f4088..75cc732565 100644 --- a/contrib/math/analysis.factor +++ b/contrib/math/analysis.factor @@ -56,7 +56,7 @@ IN: math-contrib ] if ; : nth-root ( n x -- ) - log >r recip r> * e swap ^ ; + over 0 = [ "0th root is undefined" throw ] when >r recip r> swap ^ ; ! Forth Scientific Library Algorithm #1 !