Cannot do odd roots of negative numbers.
Affects  Status  Importance  Assigned to  Milestone  

 GCalctool 
Fix Released

Low


 gcalctool (Ubuntu) 
Low

Unassigned 
Bug Description
Binary package hint: gcalctool
It says something like (4)^(1/7) is a "Math operation error". My TI83 says otherwise. This almost cost me a homework assignment _.
Related branches
StatusWoe (brentsmithis) wrote :  #1 
StatusWoe (brentsmithis) wrote :  #2 
Not a bug, this would require complex numbers which are outside the scope of gcalctool.
Changed in gcalctool:  
status:  New → Invalid 
Richard Eames (naddiseo) wrote :  #3 
It doesn't require imaginary numbers for odd roots, only even roots, is a bug. The cube root of a negative number is defined, as is the 5th root of a negative number, etc, so no need to implement complex numbers.
StatusWoe (brentsmithis) wrote :  #4 
While you are correct in saying that the odd roots will give a single, noncomplex answer I'm not sure how one would go about identifying the odd roots in a reasonable, consistent fashion.
I would assume that the bracketed exponent is evaluated initially to a decimal. For the most part you could invert the decimal and get the base of the fraction and using that determine if the root will be even or odd. However for irrational (currently the check is against nonintegers so these are caught) and repeating fractions this number is only approximate, which, when used to evaluate the parity of root could introduce errors.
I think that dealing with noninteger exponents of negative bases is beyond the scope of gcalctool and more in line with something like Rascal, Genius, Qalculate, or even Octave. However, I understand that since this is the default shipping calculator with many Gnome desktops there may be a desire to see it's functionality increased.
This bug is rather severe in my opinion and I can confirm this behavior. In addition, this could be fixed rather easily if one would introduce an extra button/function to take the nth root of a number and if the argument should be negative it just checks whether the root is odd or not.
That button was missing anyway since it exists on any scientific calculator. For these two reasons I am reopening the bug.
Changed in gcalctool:  
status:  Invalid → New 
Robert Ancell (robertancell) wrote :  #6 
Thank you for your bug report. This bug has been reported to the developers of the software. You can track it and make comments at:
http://
Changed in gcalctool:  
importance:  Undecided → Low 
status:  New → Triaged 
Changed in gcalctool:  
status:  Unknown → Confirmed 
Robert Ancell (robertancell) wrote :  #7 
Fixed upstream
Changed in gcalctool (Ubuntu):  
status:  Triaged → Fix Committed 
Changed in gcalctool:  
status:  Confirmed → Fix Released 
Launchpad Janitor (janitor) wrote :  #8 
This bug was fixed in the package gcalctool  5.27.20ubuntu1

gcalctool (5.27.20ubuntu1) karmic; urgency=low
* New upstream release (LP: #380248)
 Add 1's and 2's complement to programming mode (Robin Sonefors, Bug #581253)
 Add variable word size for bitwise functions (Robin Sonefors, Bug #581253)
 Remove negative sign from numbers rounded to zero. This is only a partial
fix as the error value is still visible in scientific notation
(Robert Ancell, Bug #560802)
 Support odd roots of negative numbers (Robert Ancell, Bug #576973) (LP: #288446)
 Keep settings (show zeroes, thousands separator etc) when changing modes
(Robert Ancell, Bug #580398) (LP: #366904)
 Add a solve commandline argument (Robert Ancell)
 Really fix the license text in the about dialog (Robert Ancell, Bug #579174) (LP: #359893)
 Made parser reentrant and part of MP code (Robert Ancell)
 Remove references to arithmetic/
(Robert Ancell, Bug #559734) (LP: #294903)
 Fix grammatical errors in manual (Bruce Cowan, Bug #569275)
 Remove untranslated figures in documentation  they are automatically
copied from the C documentation (Robert Ancell, Bug #566680)
 Updated translations: si (K.P.Gayan Tharaka)
* debian/
debian/
 Robert Ancell <email address hidden> Thu, 28 May 2009 09:30:49 +0200
Changed in gcalctool (Ubuntu):  
status:  Fix Committed → Fix Released 
Changed in gcalctool:  
importance:  Unknown → Low 
This isn't a bug so much as what would likely be a significant enhancement request.
This would require the implementation of complex numbers in gcalctool.
A brief explaination:
fractional exponents are the same as exponentiated roots, (not sure if I have the terminology right there). for example "x to the 1/2" is the same as saying "the square root of x". This isn't a problem until we allow negative bases, which requires the roots of negative numbers and can often force the usage of complex numbers. There are certainly better explanations of this on the web, but in any case, this is beyond the scope of gcalctool since it doesn't allow complex numbers to the best of my knowledge.