s-news
[Top] [All Lists]

roots of negative numbers (amended)

To: s-news@wubios.wustl.edu
Subject: roots of negative numbers (amended)
From: P.J.Wells@open.ac.uk
Date: Wed, 19 Sep 2001 18:58:47 +0100
Actually, I want to extract the negative root, but I take it the issues are
the same.

> -----Original Message-----
>From:  P.J.Wells  
>Sent:  19 September 2001 18:56
>To:    'S-plus list'
>Subject:       roots of negative numbers
>
>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>
  • roots of negative numbers (amended), P . J . Wells <=