Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #9221
| From | Dana DeLouis <dana01@me.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Different answers in mathematica and my calculator. |
| Date | 2012-03-25 05:16 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jkm9nv$buk$1@smc.vnet.net> (permalink) |
> 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...@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
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Different answers in mathematica and my calculator. Dana DeLouis <dana01@me.com> - 2012-03-25 05:16 +0000
csiph-web