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 !