challenge HP50G RPL
|
09-25-2016, 03:40 PM
(This post was last modified: 09-26-2016 12:57 AM by compsystems.)
Post: #7
|
|||
|
|||
RE: challenge HP50G RPL
PROOT It is a very primitive command (HP48 series) only accepts real an complex coefficients, does not allow symbolic coefficients, the code « →V3 PROOT » fails with symbolic and complex coefficients
Code: « →V3 PROOT » 'QUADRATIC1' STO 1. -3. 2. QUADRATIC1 returns [1, 2] // ok 1. 2. 3. QUADRATIC1 returns [(-1.,1.41421356238) (-1., -1.41421356238)] // ok 'A' 'B' 'C' QUADRATIC1 returns "→V3 ERROR Bad Argument Type" =( (1,0) (-1,-1) (0,1) QUADRATIC1 returns "→V3 ERROR Bad Argument Type" =( Now are 4 instructions or objects with PROOT Code:
1. -3. 2. QUADRATIC4 returns [1, 2] // ok 1. 2. 3. QUADRATIC4 returns [(-1.,1.41421356238) (-1., -1.41421356238)] // ok (1,0) (-1,-1) (0,1) QUADRATIC4 returns [(1, 0) (0, 1)] // OK Using a more powerful predefined function SOLVE CAS, real/complex and/or symbolic entry 12 instructions or objects Code: « or only 6 instructions or objects, perhaps the minimal instructions for full function (HP50) to get the roots of a quadratic equation, from the coefficients in stack Code: « 1. -3. 2. QUADRATIC6 returns { 'X=1' 'X=2' }// ok 1. 2. 3. QUADRATIC6 returns { 'X=(-1, -1.41421356237)' 'X=(-1, 1.41421356237)' } // ok 'A' 'B' 'C' QUADRATIC6 returns { 'X=-(b+√-(4*c*a-b^2.))/(2*a)' 'X=-(b-√-(4*c*a-b^2.))/(2*a)' } // ok (1,0) (-1,-1) (0,1) QUADRATIC6 { 'X=(7.5E-15,1.)' 'X=(1.,-1.E-14)' } ~ 'X=(0,1)' 'X=(1,0)' // ok |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
challenge HP50G RPL - compsystems - 09-24-2016, 04:02 AM
RE: challenge HP50G RPL - Joe Horn - 09-24-2016, 07:36 AM
RE: challenge HP50G RPL - compsystems - 09-24-2016, 01:04 PM
RE: challenge HP50G RPL - Gerson W. Barbosa - 09-24-2016, 05:15 PM
RE: challenge HP50G RPL - Juan14 - 09-26-2016, 12:46 AM
RE: challenge HP50G RPL - Gerson W. Barbosa - 09-26-2016, 01:51 AM
RE: challenge HP50G RPL - Juan14 - 09-26-2016, 11:56 PM
RE: challenge HP50G RPL - compsystems - 09-24-2016, 10:20 PM
RE: challenge HP50G RPL - peacecalc - 09-25-2016, 08:14 AM
RE: challenge HP50G RPL - compsystems - 09-25-2016 03:40 PM
RE: challenge HP50G RPL - Gerson W. Barbosa - 09-25-2016, 05:03 PM
RE: challenge HP50G RPL - compsystems - 09-25-2016, 10:41 PM
RE: challenge HP50G RPL - compsystems - 10-05-2016, 12:28 AM
RE: challenge HP50G RPL - Gerson W. Barbosa - 10-05-2016, 04:13 PM
|
User(s) browsing this thread: 2 Guest(s)