Post Reply 
newRPL - build 1255 released! [updated to 1299]
10-12-2018, 02:26 PM
Post: #302
RE: newRPL - build 1089 released! [update:build 1111]
(10-11-2018 03:36 PM)okkama Wrote:  
Code:
(0,-1)
-1
^
(-4,855790.E-32,1)
Must be (0,1).

The result is not wrong considering is numeric, not symbolic. Unless the case i,-i is treated as a special case, you won't get an exact result.
If you want Z^-1 it's best to use INV(Z) which uses multiplication by the conjugate, and can give you an exact result for exact arguments.
The general case Z^a is used when you use ^, which has no choice but to use transcendental functions:

Z^a = exp(ln(Z^a)) = exp(a * ln(Z)) = exp( a * (1-i*π/2) )
** I replaced already Z=(0,-1) above as r*exp(i*Arg) = 1*exp(i*-π/2)
= exp( a - a*π/2 i ) = exp(a) * exp(i*(-a*π/2))
= exp(a) * [ cos(-a*π/2) + i * sin(-a*π/2) ]

Now we can see the problem: cos(π/2) can't ever be zero unless you can exactly represent π/2, which is numerically impossible, so it returns what you saw: a tiny number in the order of 10^-32 (because you used the default 32 digits, the result will vary at different precisions).

Unlike many other calculators, newRPL will "by design" NEVER try to cheat or manipulate results in any way.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: newRPL - build 1001 released! - pier4r - 12-16-2017, 08:03 AM
newRPL - on Hp 39gs - Martin Hepperle - 06-05-2019, 06:51 AM
RE: newRPL - build 1001 released! - pier4r - 12-23-2017, 10:16 AM
RE: newRPL - build 1001 released! - pier4r - 01-01-2018, 09:42 AM
t - Claudio L. - 01-01-2018, 03:06 PM
RE: newRPL - build 1001 released! - pier4r - 01-01-2018, 03:41 PM
RE: newRPL - build 1001 released! - pier4r - 01-02-2018, 04:54 PM
RE: newRPL - build 1001 released! - pier4r - 01-02-2018, 06:58 PM
newRPL - brickviking - 10-05-2018, 06:01 AM
RE: newRPL - build 1089 released! [update:build 1111] - Claudio L. - 10-12-2018 02:26 PM
How to participate? - erazor - 12-13-2019, 07:12 AM



User(s) browsing this thread: 27 Guest(s)