[Date Index]
[Thread Index]
[Author Index]
Re: Different answers in mathematica and my calculator.
*To*: mathgroup at smc.vnet.net
*Subject*: [mg125647] Re: Different answers in mathematica and my calculator.
*From*: Dana DeLouis <dana01 at me.com>
*Date*: Sun, 25 Mar 2012 00:16:02 -0500 (EST)
*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com
> 4/(3Power[2(-2)+3, (3)^-1])
>
> I get -(4/3) (-1)^(2/3) in Mathematica but only -4/3 on my calculator.
Hi. Depending on the math one is doing, this general idea might be a possible solution.
fix = (x_)?Negative^
(Rational[a_, b_]) :>
Piecewise[{{(x^a)^(1/b),
EvenQ[a]}, {-((-x)^a)^(1/b),
OddQ[b]}, {x^(a/b), True}}];
Here are 3 numbers:
equ={
4/(3Power[2(-2)+3,(3)^-1]) ,
Power[-8,2/3],
Power[-27,1/3] }
{-(4/3) (-1)^(2/3), 4 (-1)^(2/3), 3 (-1)^(1/3)}
For something quick-n-dirty, this makes an attempt for what you want.
equ /. fix
{-(4/3), 4, -3}
For complex numbers, the magnitude is the value, but as you can see, the sign can be wrong.
For some things, that's all one might need thou.
Abs /@ equ
{4/3, 4, 3}
= = = = = = = = = = = =
HTH :>)
Dana DeLouis
Mac & Math 8
= = = = = = = = = = = =
On Mar 19, 6:04 am, Nile <thrasher... at gmail.com> wrote:
> 4/(3Power[2(-2)+3, (3)^-1])
>
> I get -(4/3) (-1)^(2/3) in Mathematica but only -4/3 on my calculator.
>
> N[Sec[8/(8 Sqrt[2])]]/Degree to get Cos^-1 of 8/(8 Sqrt[2]) and it gives me 75 deg instead of 45...
>
> I'm not sure what I'm doing wrong, I tried in Wolfram Alpha and it gives me the same thing.
>
> Thank you.
>
> -Francis
Prev by Date:
**Piecewise ColorFunction**
Next by Date:
** Re: calculation error in series**
Previous by thread:
**Re: Different answers in mathematica and my calculator.**
Next by thread:
**Re: Different answers in mathematica and my calculator.**
| |