Added missing lib-55.nrpl file

This commit is contained in:
claudiol 2019-02-19 17:17:08 -05:00
parent ff6f07abca
commit 9bfc65049b
4 changed files with 84 additions and 16 deletions

View file

@ -231,7 +231,7 @@ WORD libComputeHash2(WORDPTR start,BINT nwords);
#define IDATTR_mMASK 0xf0 #define IDATTR_mMASK 0xf0
#define IDATTR_pMASK 0xf00 #define IDATTR_pMASK 0xf00
#define IDATTR_ALLTYPES 0xe

View file

@ -0,0 +1,66 @@
@ Typical RPL symbols to copy/paste:
@ « » → ₀₁₂₃₄₅₆₇₈₉
@ Stack diagram symbols:
@ I = Integer number
@ R = Real number
@ Z = Complex number
@ S = String
@ L = List
@ U = Unit object
@ V = Vector
@ M = Matrix
@ N = Variable name
@ O = Any object
@ P = Program
@ A = Algebraic object (symbolic)
@#name lib55_menu
{
π
е
і
ј
}
@#name lib55_msgtable
{
##1,ERR_CONSTANTEXPECTED "Expected a constant"
##1,ERR_UNDEFINEDCONSTANT "Undefined constant"
}
@#name lib55_cmdhelp
{
π
"Constant π
π → π "
е
"Constant е base of
natural logarithm
ее "
і
"Constant і unit imaginary
vector
іі "
ј
"Constant і unit imaginary
vector
іі "
}
@#name lib55_pi
3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632788659361533818279682303019520353018529689957736225994138912497217752834791315155748572424541506959508295331168617278558890750983817546374649393192550604009277016711390098488240128583616035637076601047101819429555961989467678374494482553797747268471040475346462080466842590694912933136770289891521047521620569660240580381501935112533824300355876402474964732639141992726042699227967823547816360093417216412199245863150302861829745557067498385054945885869269956909272107975093029553211653449872027559602364806654991198818347977535663698074265425278625518184175746728909777727938000816470600161452491921732172147723501414419735685481613611573525521334757418494684385233239073941433345477624168625189835694855620992192221842725502542568876717904946016534668049886272327917860857843838279679766814541009538837863609506800642251252051173929848960841284886269456042419652850222106611863067442786220391949450471237137869609563643719172874677646575739624138908658326459958133904780275901.
@#name lib55_e
2.7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274274663919320030599218174135966290435729003342952605956307381323286279434907632338298807531952510190115738341879307021540891499348841675092447614606680822648001684774118537423454424371075390777449920695517027618386062613313845830007520449338265602976067371132007093287091274437470472306969772093101416928368190255151086574637721112523897844250569536967707854499699679468644549059879316368892300987931277361782154249992295763514822082698951936680331825288693984964651058209392398294887933203625094431173012381970684161403970198376793206832823764648042953118023287825098194558153017567173613320698112509961818815930416903515988885193458072738667385894228792284998920868058257492796104841984443634632449684875602336248270419786232090021609902353043699418491463140934317381436405462531520961836908887070167683964243781405927145635490613031072085103837505101157477041718986106873969655212671546889570350354021234078498193343210681701210056278802351930332247450158539047304199577770935036604169973297250886876966403555707162268447162560798826517871341951246652010305921236677194325278675398558944896970964097545918569563802363701621120477427228364896134225164450781824423529486363721417402388934412479635743702637552944483379980161254922785092577825620926226483262779333865664816277251640191059004916449982893150566047258027786318641551956532442586982946959308019152987211725563475463964479101459040905862984967912874068705048958586717479854667757573205681288459205413340539220001137863009455606881667400169842055804033637953764520304024322566135278369511778838638744396625322498506549958862342818997077332761717839280349465014345588970719425863987727547109629537415211151368350627526023264847287039207643100595841166120545297030236472549296669381151373227536450988890313602057248176585118063036442812314965507047510254465011727211555194866850800368532281831521960037356252794495158284188294787610852639814.
@#name lib55_i
(0,1)
@#name lib55_j
(0,1)

View file

@ -123,6 +123,9 @@ R → A<fraction>"
@#name lib56_autosimplify_group3 @#name lib56_autosimplify_group3
{ {
'.mX₂*INV(.mX₂):→1' @ CANCEL OUT TERMS WITHOUT ANY EXPONENTS (COMMUTATIVE, REALS ONLY)
'.mX₄*INV(.mX₄):→1' @ CANCEL OUT TERMS WITHOUT ANY EXPONENTS (COMMUTATIVE, COMPLEX ONLY)
'.mX^.xN*INV(.mX^.xM):→.mX^(.xN-.xM)' @ CANCEL OUT TERMS WITH EXPONENTS (NON-COMMUTATIVE) '.mX^.xN*INV(.mX^.xM):→.mX^(.xN-.xM)' @ CANCEL OUT TERMS WITH EXPONENTS (NON-COMMUTATIVE)
'.xX₂^.xN*INV(.xX₂^.xM):→.xX^(.xN-.xM)' @ CANCEL OUT TERMS WITH EXPONENTS (COMMUTATIVE, ONLY ACCEPT REAL VARIABLES) '.xX₂^.xN*INV(.xX₂^.xM):→.xX^(.xN-.xM)' @ CANCEL OUT TERMS WITH EXPONENTS (COMMUTATIVE, ONLY ACCEPT REAL VARIABLES)
'.xX₄^.xN*INV(.xX₄^.xM):→.xX^(.xN-.xM)' @ CANCEL OUT TERMS WITH EXPONENTS (COMMUTATIVE, ONLY ACCEPT COMPLEX VARIABLES) '.xX₄^.xN*INV(.xX₄^.xM):→.xX^(.xN-.xM)' @ CANCEL OUT TERMS WITH EXPONENTS (COMMUTATIVE, ONLY ACCEPT COMPLEX VARIABLES)

View file

@ -3200,8 +3200,7 @@ do {
else if(p.leftidx==-1) otherattr=rplSymbGetAttr(*p.left); else if(p.leftidx==-1) otherattr=rplSymbGetAttr(*p.left);
else otherattr=0; else otherattr=0;
if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; } if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; }
if(((attr|IDATTR_ALLTYPES)&otherattr)!=attr) {
if((attr&otherattr)!=attr) {
// DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS // DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS
matchtype=BACKTRACK; matchtype=BACKTRACK;
break; break;
@ -3228,7 +3227,7 @@ do {
otherattr=rplSymbGetAttr(*s.left); otherattr=rplSymbGetAttr(*s.left);
if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; } if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; }
if((attr&otherattr)!=attr) { if(((attr|IDATTR_ALLTYPES)&otherattr)!=attr) {
// DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS // DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS
matchtype=BACKTRACK; matchtype=BACKTRACK;
break; break;
@ -3278,7 +3277,7 @@ do {
otherattr=rplSymbGetAttr(*s.left); otherattr=rplSymbGetAttr(*s.left);
if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; } if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; }
if((attr&otherattr)!=attr) { if(((attr|IDATTR_ALLTYPES)&otherattr)!=attr) {
// DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS // DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS
matchtype=BACKTRACK; matchtype=BACKTRACK;
break; break;
@ -3346,7 +3345,7 @@ do {
otherattr=rplSymbGetAttr(rplPeekData(1)); otherattr=rplSymbGetAttr(rplPeekData(1));
if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; } if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; }
if((attr&otherattr)!=attr) { if(((attr|IDATTR_ALLTYPES)&otherattr)!=attr) {
// DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS // DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS
rplPopData(1); rplPopData(1);
matchtype=BACKTRACK; matchtype=BACKTRACK;
@ -3409,7 +3408,7 @@ do {
else if(p.leftidx==-1) otherattr=rplSymbGetAttr(*p.left); else if(p.leftidx==-1) otherattr=rplSymbGetAttr(*p.left);
else otherattr=0; else otherattr=0;
if((attr&otherattr)!=attr) { if(((attr|IDATTR_ALLTYPES)&otherattr)!=attr) {
// DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS // DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS
matchtype=BACKTRACK; matchtype=BACKTRACK;
break; break;
@ -3436,7 +3435,7 @@ do {
otherattr=rplSymbGetAttr(*s.left); otherattr=rplSymbGetAttr(*s.left);
if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; } if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; }
if((attr&otherattr)!=attr) { if(((attr|IDATTR_ALLTYPES)&otherattr)!=attr) {
// DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS // DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS
matchtype=BACKTRACK; matchtype=BACKTRACK;
break; break;
@ -3487,7 +3486,7 @@ do {
else otherattr=0; else otherattr=0;
if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; } if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; }
if((attr&otherattr)!=attr) { if(((attr|IDATTR_ALLTYPES)&otherattr)!=attr) {
// DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS // DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS
matchtype=BACKTRACK; matchtype=BACKTRACK;
break; break;
@ -3642,7 +3641,7 @@ do {
otherattr=rplSymbGetAttr(rplPeekData(1)); otherattr=rplSymbGetAttr(rplPeekData(1));
if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; } if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; }
if((attr&otherattr)!=attr) { if(((attr|IDATTR_ALLTYPES)&otherattr)!=attr) {
// DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS // DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS
rplDropData(1); rplDropData(1);
matchtype=BACKTRACK; matchtype=BACKTRACK;
@ -3702,7 +3701,7 @@ do {
if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; } if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; }
if((attr&otherattr)!=attr) { if(((attr|IDATTR_ALLTYPES)&otherattr)!=attr) {
// DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS // DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS
matchtype=BACKTRACK; matchtype=BACKTRACK;
break; break;
@ -3731,7 +3730,7 @@ do {
if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; } if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; }
if((attr&otherattr)!=attr) { if(((attr|IDATTR_ALLTYPES)&otherattr)!=attr) {
// DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS // DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS
matchtype=BACKTRACK; matchtype=BACKTRACK;
break; break;
@ -3818,7 +3817,7 @@ do {
if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; } if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; }
if((attr&otherattr)!=attr) { if(((attr|IDATTR_ALLTYPES)&otherattr)!=attr) {
// DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS // DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS
rplDropData(1); rplDropData(1);
matchtype=BACKTRACK; matchtype=BACKTRACK;
@ -3866,7 +3865,7 @@ do {
if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; } if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; }
if((attr&otherattr)!=attr) { if(((attr|IDATTR_ALLTYPES)&otherattr)!=attr) {
// DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS // DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS
matchtype=BACKTRACK; matchtype=BACKTRACK;
break; break;
@ -3894,7 +3893,7 @@ do {
if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; } if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; }
if((attr&otherattr)!=attr) { if(((attr|IDATTR_ALLTYPES)&otherattr)!=attr) {
// DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS // DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS
matchtype=BACKTRACK; matchtype=BACKTRACK;
break; break;
@ -3955,7 +3954,7 @@ do {
if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; } if(Exceptions) { rplCleanupSnapshots(stkbottom); DSTop=expression; LAMTop=lamsave; nLAMBase=lamcurrent; return 0; }
if((attr&otherattr)!=attr) { if(((attr|IDATTR_ALLTYPES)&otherattr)!=attr) {
// DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS // DO NOT ACCEPT ANY MATCH THAT HAS AT LEAST THE REQUIRED BITS
matchtype=BACKTRACK; matchtype=BACKTRACK;
break; break;