s-news
[Top] [All Lists]

roots of negative numbers

To: s-news@wubios.wustl.edu
Subject: roots of negative numbers
From: P.J.Wells@open.ac.uk
Date: Wed, 19 Sep 2001 18:56:10 +0100
How can I get S-Plus to do (something like) the following?

#take a negative number

>test_ -x

#take its square root

>root.test_test^(1/n)

#get positive root

>root.test
>-[x^(1/n)]

#e.g.

>test_ -9
>root.test_test^(1/2)
>root.test
>-3

Julian Wells
OU Business School
The Open University
Walton Hall
Milton Keynes
MK7 6AA
United Kingdom
+44 1908 654658




<Prev in Thread] Current Thread [Next in Thread>