Firmware 2021: Problem with exact polar form - 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: Firmware 2021: Problem with exact polar form (/thread-16824.html) |
Firmware 2021: Problem with exact polar form - compsystems - 04-27-2021 09:01 PM Hello Flags: HOME view & RAD MODE (HAngle:=0) & (HComplex:=01). HAngle:=0; HComplex:=01; [ENTER] Example 1: ok input: approx polar form rectangular_coordinates( 4 ∡ 0.523598775598 ) [ENTER] [ 3.46410161514, 2 ] // OK. a+b*i > 3.46410161514 + 2*i input: exact polar form rectangular_coordinates( (4 ∡ (π/6)) ) [ENTER] [ 3.46410161514, 2 ] // OK input: exact list form rectangular_coordinates( [ 4, π/6 ] ) [ENTER] [ 3.46410161514, 2 ] // OK input: approx list form rectangular_coordinates( [ 4, 0.523598775598 ] ) [ENTER] [ 3.46410161514, 2 ] // OK polar_coordinates( [ 3.46410161514, 2 ] ) [ENTER] [ 4, 0.523598775598 ] // OK example 2: Problem input: exact polar form rectangular_coordinates( (√(2) ∡ (3*(π/4))) ) [ENTER] Error: Syntax Error Why? input: approx polar form rectangular_coordinates( 1.41421356237 ∡ 2.35619449019 ) [ENTER] [ −0.999999999995, 1 ] // OK a+b*i > −0.999999999995 + i input: exact list form rectangular_coordinates( [ √(2) , (3*(π/4)) ] ) [ENTER] [ −0.999999999995, 1 ] // OK input: approx list form rectangular_coordinates( [ 1.41421356237, 2.35619449019 ] ) [ENTER] [ −0.999999999995, 1 ] // OK polar_coordinates( [ −0.999999999995, 1 ] ) [ENTER] [1.41421356237,2.35619449019] // OK RE: Firmware 2021: Problem with exact polar form - cyrille de brébisson - 04-28-2021 09:22 AM Hello, Honestly, I am not 100% sure of the why. This is code I created so long ago... With a cursory look, it seems that the problem comes from the fact that my parser is not able to recognize "expression"angle"expression" as a complex number. only number angle "expression" will work. Unfortunately, this is not an easy fix. sorry Cyrille RE: Firmware 2021: Problem with exact polar form - compsystems - 04-30-2021 04:43 AM In Home mode, I found the solution: you must put a comma before the Unicode angle symbol (√ (2), ∡ (3 * (π / 4))) For those of us who work in the field of teaching circuits in electrical and electronic engineering, we use the option of complex numbers in polar form a lot, is also difficult to remember to place the comma before the angle symbol, for this reason it is very useful to have a template for this purpose. Who else has to enter complex numbers in polar format? Another useful template is CEILING ⌈▣⌉ AND FLOOR ⌊▣⌋, widely used in algorithmic |