HP Forums
Syntax error... or am I doing something wrong? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Syntax error... or am I doing something wrong? (/thread-6297.html)



Syntax error... or am I doing something wrong? - farefernandez - 05-24-2016 06:04 AM

I don't seem to be able to enter a number containing fractions in polar coordinates.

Something as simple as

1/2v50 (v would be the angle symbol).

raises a syntax error.

I've tried with different combination of parenthesis... but it still get a syntax error.

Am I doing something wrong?

Thanks!


RE: Syntax error... or am I doing something wrong? - Aries - 05-24-2016 07:56 AM

I suppose this happens in the HOME, in the CAS mode does work fine.
Best,

Aries ;-)


RE: Syntax error... or am I doing something wrong? - DrD - 05-24-2016 09:44 AM

Have you tried using the [Shift][X] (the multiply key), for the angle symbol?


1/(2∡50) ==> Result(angle mode).

-Dale-


RE: Syntax error... or am I doing something wrong? - farefernandez - 05-24-2016 12:27 PM

(05-24-2016 09:44 AM)DrD Wrote:  Have you tried using the [Shift][X] (the multiply key), for the angle symbol?


1/(2∡50) ==> Result(angle mode).

-Dale-

The problem is not the angle symbol. Basically I can enter:

1∡90

but not:

1/2∡90

Or even:

10^2∡90


In Cas mode it seems to work but i wonder why it doesn't in Home...

Thanks!


RE: Syntax error... or am I doing something wrong? - DrD - 05-24-2016 01:43 PM

When the polar value is completely represented, in the two examples you provided, they did work in [Home] r10077. Copy/paste separates the angle parameter, and makes it look like:

1/2 ∡90, and 10^2 ∡90; instead of 1/(2∡90), and 10^(2∡90).

That's probably not the issue, but the examples paste into the command line separating the angle, which, coincidentally, DOES cause a syntax error. If the polar value is enclosed in parentheses, (not strictly required), there should be no issue (I hope!).


RE: Syntax error... or am I doing something wrong? - Tim Wessman - 05-24-2016 02:33 PM

(05-24-2016 06:04 AM)farefernandez Wrote:  Something as simple as

1/2v50 (v would be the angle symbol).

How is that simple? Is that (1/2)<90? 1/(2<90)? (1/2)*1<90?

When you start getting even more complicated things, how does the angle symbol behave in terms of order of operations?


RE: Syntax error... or am I doing something wrong? - informach - 05-24-2016 03:22 PM

Hi!:

See, the attached images.
You needed configure, in HOME ...

Degrees
a+bi or (a,b) ... is same

Then, write ...
(1/2,50) ...
With Shift and * X (angle symbol), then ...


RE: Syntax error... or am I doing something wrong? - leprechaun - 05-25-2016 05:10 AM

In cas something like
1<pi returns -1+1.0780...E-14.
1<(pi/2) returns 5.3903...E-15+i

I am surprised to see these results in the cas. I always thought that the cas would treat everything symbolically so that pi would be recognized.
Is there an explanation for these results and/or would it be a problem to catch such special cases?


RE: Syntax error... or am I doing something wrong? - informach - 05-25-2016 01:56 PM

Hi!, leprechaum:

With complex (a+bi), or (a,b) and in, degrees (but, not CAS) ...
(1,PI) = 1+PI*i
(1,PI/2) = 1+PI/2*i
See, the left image ...

In Polar, CAS and degrees.
See, the other image ...

Note: This is checked with Wolfram Alpha, too.

Kind Regards.
informach