Existing CAS commands --> Prime discussion
11-29-2018, 07:59 PM
Post: #43
 CyberAngel Member Posts: 299 Joined: Jul 2018
RE: Existing CAS commands --> Prime discussion
(11-29-2018 07:25 PM)compsystems Wrote:  The problem with QPI is that I can not control the output, so it does not always throw the output in rational format.

I propose to add to QPIRLNE

QPIRLNE( EXPR, FORMAT) where FORMAT = 0/1/.../6

case 0: (Default):
qpirlne( expr, 0) -> Expression as pi or root or ln or e

case 1: output only as a expression of QUOTIENT 1:
qpirlne( expr, 1) if it does not find the equivalent to quotient (1), but without
pi, root, ln, e, it returns the same value

case 2: output only as a expression of QUOTIENT 2:
qpirlne( expr, 2) if it does not find the equivalent to quotient (2), but without
pi, root, ln, e, it returns the same value

case 3: output only as a expression of PI:
qpirlne( expr, 3) if it does not find the equivalent to PI, it returns the same value

case 4: output only as a expression of ROOT
qpirlne( expr, 4) if it does not find the equivalent to ROOT, it returns the same value

case 5: output only as a expression of LN
qpirlne( expr, 5) if it does not find the equivalent to LN, it returns the same value

case 6: output only as a expression of EXPR
qpirlne( expr, 6) if it does not find the equivalent to EXP, it returns the same value

PHP Code:
ex#0: qpirlne( (2*π/3)+(3*π/4) , 0)  -> 17/12*π  qpirlne( (2*π/3)+(3*π/4) , 1)  -> 1137949/255685 // Q1 qpirlne( (2*π/3)+(3*π/4) , 2)  -> 4+(115209/255685) // Q2 qpirlne( (2*π/3)+(3*π/4) , 3)  ->  17/12*π // PI qpirlne( (2*π/3)+(3*π/4) , 4)  ->  (2*π/3)+(3*π/4) // ROOT qpirlne( (2*π/3)+(3*π/4) , 5)  ->  (2*π/3)+(3*π/4) // LN qpirlne( (2*π/3)+(3*π/4) , 6)  ->  (2*π/3)+(3*π/4) // eex#1: qpirlne( LN(3*π)-LN(√(5)), 0)  -> LN( (3*π*√(5)/5) )  qpirlne( LN(3*π)-LN(√(5)), 1)  -> 55715/38728 // Q1 qpirlne( LN(3*π)-LN(√(5)), 2)  -> 1+(16987/38728) // Q2 qpirlne( LN(3*π)-LN(√(5)), 3)  -> LN( (3*π*√(5)/5) )  // PI qpirlne( LN(3*π)-LN(√(5)), 4)  -> LN( (3*π*√(5)/5) )  // ROOT qpirlne( LN(3*π)-LN(√(5)), 5)  -> LN( (3*π*√(5)/5) ) // LN qpirlne( LN(3*π)-LN(√(5)), 6)  -> LN(3*π)-LN(√(5)) // eex#2: qpirlne( LN((2/5))-LN(√(2)), 0)  -> -LN((25/2))/2 qpirlne( LN((2/5))-LN(√(2)), 1)  -> -116599/92329 // Q1 qpirlne( LN((2/5))-LN(√(2)), 2)  -> -1+(-24270/92329) // Q2 qpirlne( LN((2/5))-LN(√(2)), 3)  -> LN((2/5))-LN(√(2)) // PI qpirlne( LN((2/5))-LN(√(2)), 4)  -> LN((2/5))-LN(√(2)) // ROOT qpirlne( LN((2/5))-LN(√(2)), 5) -> -LN((25/2))/2 // LN qpirlne( LN((2/5))-LN(√(2)), 6)  -> LN((2/5))-LN(√(2)) // eex#3: qpirlne( e^(2*π/(3*√(7))), 0)  -> e^((2*π*√(7)/21)) qpirlne( e^(2*π/(3*√(7))), 1)  -> 224192/101585 // Q1 qpirlne( e^(2*π/(3*√(7))), 2)  -> 1+(21022/101585) // Q2 qpirlne( e^(2*π/(3*√(7))), 3)  -> e^(2*π/(3*√(7))) // PI qpirlne( e^(2*π/(3*√(7))), 4)  -> e^(2*π/(3*√(7))) // ROOT qpirlne( e^(2*π/(3*√(7))), 5)  -> e^(2*π/(3*√(7))) // LN qpirlne( e^(2*π/(3*√(7))), 6)  -> e^(2*π/(3*√(7))) // eex#4: qpirlne( 7*π/√(90), 0)  -> 7*π*√(10)/30  qpirlne( 7*π/√(90), 1)  -> 171470/73971  qpirlne( 7*π/√(90), 2)  -> 260521/112387 qpirlne( 7*π/√(90), 3)  -> 7*π/√(90)ex#5: qpirlne( 1/(3+i*√(3)), 0)  -> (1/4)-i*((√(3)/12)) qpirlne( 1/(3+i*√(3)), 1)  -> (1/4)-(1/4)*i*√(1/3) // Q1 qpirlne( 1/(3+i*√(3)), 2)  -> (1/4)-(i*37829/262087) // Q1 qpirlne( 1/(3+i*√(3)), 3)  -> 1/(3+i*√(3)) // PI qpirlne( 1/(3+i*√(3)), 4)  -> (1/4)-i*((√(3)/12)) // ROOT qpirlne( 1/(3+i*√(3)), 5)  -> 1/(3+i*√(3)) // LN qpirlne( 1/(3+i*√(3)), 6)  -> 1/(3+i*√(3)) // eex#6: qpirlne( ACOS((-1/2)), 0)  -> 2/3*PI qpirlne( ACOS((-1/2)), 1)  -> 138894/66317 // Q1 qpirlne( ACOS((-1/2)), 2)  -> 2*(6260/66317) // Q2 qpirlne( ACOS((-1/2)), 3)  -> 2/3*PI // PI qpirlne( ACOS((-1/2)), 4)  -> ACOS((-1/2) // ROOT qpirlne( ACOS((-1/2)), 5)  -> ACOS((-1/2) // LN qpirlne( ACOS((-1/2)), 6)  -> ACOS((-1/2) // eex#7: qpirlne( COS((3*π/4)), 0)  -> -√(-2)/2 qpirlne( COS((3*π/4)), 1)  -> -195025/275807 // Q1 qpirlne( COS((3*π/4)), 2)  -> -195025/275807  // Q2 qpirlne( COS((3*π/4)), 3)  -> COS((3*π/4)) // PI qpirlne( COS((3*π/4)), 4)  -> -√(1/2) // ROOT qpirlne( COS((3*π/4)), 5)  -> COS((3*π/4)) // LN qpirlne( COS((3*π/4)), 6)  -> COS((3*π/4)) // eex#8: qpirlne( COS(π/12), 0)  -> (√(3)+1)*(√(2)/4) qpirlne( COS(π/12), 1)  -> 129209/133767 // Q1 qpirlne( COS(π/12), 2)  -> 272847/282472  // Q2 qpirlne( COS(π/12), 3)  -> COS((3*π/4)) // PI qpirlne( COS(π/12), 4)  -> (√(3)+1)*(√(2)/4) // ROOT qpirlne( COS(π/12), 5)  -> COS(π/12) // LN qpirlne( COS(π/12), 6)  -> COS(π/12) // eex#9: qpirlne( SIN(π/10), 0)  -> (-1+√((5)))/4 qpirlne( SIN(π/10), 1)  -> 98209/317811 // Q1 qpirlne( SIN(π/10), 2)  -> 98209/317811  // Q2 qpirlne( SIN(π/10), 3)  -> SIN(π/10) // PI qpirlne( SIN(π/10), 4)  -> (-1+√((5)))/4 // ROOT qpirlne( SIN(π/10), 5)  -> SIN(π/10) // LN qpirlne( SIN(π/10), 6)  -> SIN(π/10) // eex#10: qpirlne( SIN(π/8), 0)  -> √(2-√(2))/2 qpirlne( SIN(π/8), 1)  -> 69237/180925 // Q1 qpirlne( SIN(π/8), 2)  -> 69237/180925  // Q2 qpirlne( SIN(π/8), 3)  -> SIN(π/8) // PI qpirlne( SIN(π/8), 4)  -> √(2-√(2))/2 // ROOT qpirlne( SIN(π/8), 5)  -> SIN(π/8) // LN qpirlne( SIN(π/8), 6)  -> SIN(π/8) // eex#11: qpirlne( COS(π/5), 0)  -> (1+(√(5)))/4 qpirlne( COS(π/5), 1)  -> 98209/121393 // Q1 qpirlne( COS(π/5), 2)  -> 317811/392836  // Q2 qpirlne( COS(π/5), 3)  -> COS(π/5) // PI qpirlne( COS(π/5), 4)  ->  (1+(√(5)))/4 // ROOT qpirlne( COS(π/5), 5)  -> COS(π/5) // LN qpirlne( COS(π/5),, 6)  -> COS(π/5) // e

I suggest a modification: pi, root, e, ln
should each have a value of 1,2,4,8 or zero
and the combination includes the selected separatable operations or values accordingly .
Testing binaries in a progran is easy.
It's also an easy syntax for humans to learn and memorize.
What do you say?
 « Next Oldest | Next Newest »

 Messages In This Thread Existing CAS commands --> Prime discussion - Tim Wessman - 06-26-2017, 06:40 PM RE: Existing CAS commands --> Prime discussion - Joe Horn - 06-26-2017, 09:53 PM RE: Existing CAS commands --> Prime discussion - Anders - 06-27-2017, 02:30 AM RE: Existing CAS commands --> Prime discussion - parisse - 06-27-2017, 05:04 AM RE: Existing CAS commands --> Prime discussion - Anders - 06-27-2017, 09:00 PM RE: Existing CAS commands --> Prime discussion - toml_12953 - 06-27-2017, 02:24 PM RE: Existing CAS commands --> Prime discussion - parisse - 06-28-2017, 08:40 AM RE: Existing CAS commands --> Prime discussion - Anders - 07-10-2017, 08:46 AM RE: Existing CAS commands --> Prime discussion - jtm - 07-01-2017, 07:27 PM RE: Existing CAS commands --> Prime discussion - parisse - 07-02-2017, 05:10 AM RE: Existing CAS commands --> Prime discussion - Eddie W. Shore - 08-02-2017, 01:57 PM RE: Existing CAS commands --> Prime discussion - Anders - 08-02-2017, 05:35 PM RE: Existing CAS commands --> Prime discussion - salvomic - 10-30-2017, 02:19 PM RE: Existing CAS commands --> Prime discussion - math7 - 08-05-2017, 06:40 AM RE: Existing CAS commands --> Prime discussion - Wes Loewer - 08-07-2017, 08:28 PM RE: Existing CAS commands --> Prime discussion - Tim Wessman - 08-07-2017, 08:58 PM RE: Existing CAS commands --> Prime discussion - bobager - 09-25-2018, 12:27 AM RE: Existing CAS commands --> Prime discussion - Joe Horn - 09-25-2018, 03:34 AM RE: Existing CAS commands --> Prime discussion - Anders - 08-27-2017, 04:24 PM RE: Existing CAS commands --> Prime discussion - Helge Gabert - 09-07-2017, 02:11 PM RE: Existing CAS commands --> Prime discussion - Nigel (UK) - 09-08-2017, 09:57 AM RE: Existing CAS commands --> Prime discussion - Tim Wessman - 09-08-2017, 02:53 PM RE: Existing CAS commands --> Prime discussion - compsystems - 09-08-2017, 03:38 PM RE: Existing CAS commands --> Prime discussion - Tim Wessman - 09-08-2017, 03:47 PM RE: Existing CAS commands --> Prime discussion - CyberAngel - 09-24-2018, 12:08 AM RE: Existing xCAS commands --> Prime discussion - compsystems - 01-21-2018, 03:49 PM RE: Existing CAS commands --> Prime discussion - harryp - 01-21-2018, 07:46 PM RE: Existing CAS commands --> Prime discussion - toml_12953 - 11-28-2018, 10:28 PM RE: Existing CAS commands --> Prime discussion - compsystems - 11-28-2018, 11:35 PM RE: Existing CAS commands --> Prime discussion - rprosperi - 11-29-2018, 01:47 AM RE: Existing CAS commands --> Prime discussion - compsystems - 11-29-2018, 12:30 PM RE: Existing CAS commands --> Prime discussion - compsystems - 08-03-2018, 10:29 PM RE: Existing CAS commands --> Prime discussion - compsystems - 09-23-2018, 01:24 AM RE: Existing CAS commands --> Prime discussion - CyberAngel - 10-27-2018, 01:05 AM RE: Existing CAS commands --> Prime discussion - John Keith - 10-27-2018, 03:25 PM RE: Existing CAS commands --> Prime discussion - compsystems - 10-27-2018, 01:36 AM RE: Existing CAS commands --> Prime discussion - compsystems - 11-27-2018, 06:01 PM RE: Existing CAS commands --> Prime discussion - Joe Horn - 11-27-2018, 06:43 PM RE: Existing CAS commands --> Prime discussion - ijabbott - 11-29-2018, 05:18 PM RE: Existing CAS commands --> Prime discussion - Joe Horn - 11-29-2018, 05:51 PM RE: Existing CAS commands --> Prime discussion - ijabbott - 11-29-2018, 08:56 PM RE: Existing CAS commands --> Prime discussion - compsystems - 11-29-2018, 07:25 PM RE: Existing CAS commands --> Prime discussion - CyberAngel - 11-29-2018 07:59 PM RE: Existing CAS commands --> Prime discussion - compsystems - 12-06-2018, 05:27 PM RE: Existing CAS commands --> Prime discussion - compsystems - 12-08-2018, 01:31 PM RE: Existing CAS commands --> Prime discussion - compsystems - 12-09-2018, 05:07 PM RE: Existing CAS commands --> Prime discussion - compsystems - 12-09-2018, 05:19 PM RE: Existing CAS commands --> Prime discussion - John P - 12-09-2018, 11:47 PM RE: Existing CAS commands --> Prime discussion - Joe Horn - 12-10-2018, 01:43 AM RE: Existing CAS commands --> Prime discussion - John P - 12-10-2018, 05:45 AM RE: Existing CAS commands --> Prime discussion - CyberAngel - 12-10-2018, 08:26 AM RE: Existing CAS commands --> Prime discussion - Joe Horn - 12-11-2018, 03:49 AM RE: Existing CAS commands --> Prime discussion - John P - 12-11-2018, 04:56 AM RE: Existing CAS commands --> Prime discussion - Joe Horn - 12-11-2018, 06:07 AM RE: Existing CAS commands --> Prime discussion - compsystems - 12-11-2018, 03:28 PM RE: Existing CAS commands --> Prime discussion - compsystems - 12-14-2018, 02:16 AM RE: Existing CAS commands --> Prime discussion - compsystems - 12-14-2018, 02:30 AM RE: Existing CAS commands --> Prime discussion - compsystems - 12-15-2018, 02:58 PM RE: Existing CAS commands --> Prime discussion - compsystems - 12-17-2018, 02:22 PM RE: Existing CAS commands --> Prime discussion - compsystems - 12-24-2018, 03:15 AM RE: Existing CAS commands --> Prime discussion - compsystems - 02-19-2019, 02:52 AM RE: Existing CAS commands --> Prime discussion - toml_12953 - 11-06-2019, 10:40 PM RE: Existing CAS commands --> Prime discussion - compsystems - 02-22-2019, 08:36 PM RE: Existing CAS commands --> Prime discussion - compsystems - 04-25-2019, 08:35 PM RE: Existing CAS commands --> Prime discussion - compsystems - 11-06-2019, 04:50 PM RE: Existing CAS commands --> Prime discussion - compsystems - 11-07-2019, 01:41 AM RE: Existing CAS commands --> Prime discussion - toml_12953 - 11-07-2019, 02:41 AM RE: Existing CAS commands --> Prime discussion - compsystems - 11-08-2019, 12:57 AM RE: Existing CAS commands --> Prime discussion - toml_12953 - 11-08-2019, 01:00 AM RE: Existing CAS commands --> Prime discussion - ijabbott - 11-08-2019, 08:12 AM RE: Existing CAS commands --> Prime discussion - toml_12953 - 11-08-2019, 10:59 AM RE: Existing CAS commands --> Prime discussion - Joe Horn - 11-08-2019, 03:00 PM RE: Existing CAS commands --> Prime discussion - Eddie W. Shore - 11-09-2019, 03:28 PM RE: Existing CAS commands --> Prime discussion - compsystems - 11-09-2019, 03:51 PM

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