OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Cube root of a negative number

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
rconan
Newbie
Newbie


Joined: 19 Sep 2005
Posts: 3

PostPosted: Mon Sep 19, 2005 1:16 pm    Post subject: Cube root of a negative number Reply with quote

Why can Openoffice.org Calc not work out the cube root of a negative power?

Is it just the syntax I am using or is it actually a missing feature?

My syntax:

=(-8)^(1/3)

should give -2 but instead shows #VALUE
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
richhill
OOo Advocate
OOo Advocate


Joined: 16 Jun 2004
Posts: 418
Location: Mesa, AZ

PostPosted: Mon Sep 19, 2005 1:37 pm    Post subject: Reply with quote

-8 has three cube roots.

What we are dealing with here are complex numbers and the maths associated with it.

There is an OOo add-in - XNumbers that handles complex arithmetic quite easily. I'll update this post later with an example of how it calculates cube root of 8

http://www.richhillsoftware.com/blog/archives/2005/06/xnumbers_011_no.html
_________________
OOo Calc tips: http://www.openofficetips.com
Back to top
View user's profile Send private message Visit poster's website
rconan
Newbie
Newbie


Joined: 19 Sep 2005
Posts: 3

PostPosted: Tue Sep 20, 2005 5:16 am    Post subject: Reply with quote

Does -8 have three cube roots?
I can only find one: -2

Does Xnumbers support cube rooting negative numbers?
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
9point9
Moderator
Moderator


Joined: 31 Aug 2004
Posts: 3875
Location: UK

PostPosted: Tue Sep 20, 2005 5:49 am    Post subject: Reply with quote

There is also 2i^(2/3). The other one I can't think of for the moment.
_________________
Arch Linux
OOo 3.2.0

OOoSVN, change control for OOo documents:
http://sourceforge.net/projects/ooosvn/
Back to top
View user's profile Send private message Visit poster's website
Ed
Super User
Super User


Joined: 28 May 2003
Posts: 1041

PostPosted: Tue Sep 20, 2005 5:54 am    Post subject: Reply with quote

rconan wrote:
Does -8 have three cube roots?
I can only find one: -2


-2 is the only real cube root of -8, but 1 + √3 i and 1 - √3 i are also cube roots of -8.
Back to top
View user's profile Send private message
rconan
Newbie
Newbie


Joined: 19 Sep 2005
Posts: 3

PostPosted: Tue Sep 20, 2005 7:13 am    Post subject: Reply with quote

Is there a way to find the REAL cube root of a negative number in Oo.o calc or do I have to convert my entire coursework to excel format and do it in windoze?
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Ed
Super User
Super User


Joined: 28 May 2003
Posts: 1041

PostPosted: Wed Sep 21, 2005 10:59 am    Post subject: Reply with quote

rconan wrote:
Is there a way to find the REAL cube root of a negative number in Oo.o calc or do I have to convert my entire coursework to excel format and do it in windoze?


If the cube root always works for a positive number, you could try
Code:
=sign(A1)*(abs(A1)^(1/3))
to get the real cube root of A1 whether is's positive or negative.

Why it would work for a positive number and not a negative one is a mystery. All numbers have three cube roots, so why it can give the real value for a positive number but not a negative one I don't know.
Back to top
View user's profile Send private message
Dale
Super User
Super User


Joined: 21 Feb 2005
Posts: 1440
Location: Australia

PostPosted: Wed Sep 21, 2005 4:25 pm    Post subject: Reply with quote

Ed wrote:
Why it would work for a positive number and not a negative one is a mystery.
Just a guess: Calc might use logarithms to compute (fractional) powers.
_________________
Dale
To err is human, but to destroy your slippers in the process takes a real son of a bitch: Me!

OOo documentation from the source
http://documentation.openoffice.org
Guides, FAQ, How Tos
Back to top
View user's profile Send private message
David
Super User
Super User


Joined: 24 Oct 2003
Posts: 5668
Location: Canada

PostPosted: Wed Sep 21, 2005 5:18 pm    Post subject: Reply with quote

rconan wrote:
Is there a way to find the REAL cube root of a negative number in Oo.o calc or do I have to convert my entire coursework to excel format and do it in windoze?


The real cube root of a negative number is always negative. Find the real positive root and append the - sign.

David.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group