# HP Forums

Full Version: android free app anomaly
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The android free app changes CAS variable names and deletes variables when I exit using the back key. Taping shift off first doesn't seem to help.

Screen shot of variables as originally created:

[attachment=4903]

Screen shot of variables after anomaly:

[attachment=4904]

another after anomaly:

[attachment=4905]

Is this because it's the free version and I'm doing something that is not allowed?

I didn't know about free HP Prime app in Android. Strange bugs here.
Please put here, some files to reproduce the problem
CLIST is quite large, but here they are:

Code:
``` fCAS(z):= BEGIN LOCAL a,b,c,d; a:=1; b:=1; c:=1; d:=1; FOR K FROM 3 TO 105 STEP 3 DO   a:=a*(K-2);   b:=b*z^3;   c:=c*(K-2)*(K-1)*K;   d:=d+a*b/c; END; RETURN d; END; gCAS(z):= BEGIN LOCAL a,b,c,d; a:=1; b:=z; c:=1; d:=z; FOR K FROM 3 TO 105 STEP 3 DO   a:=a*(K-1);   b:=b*z^3;   c:=c*(K-1)*(K)*(K+1);   d:=d+a*b/c; END; RETURN d; END; aismallzCAS(z):= BEGIN RETURN(0.355028053887817*fCAS(z)-0.258819403792807*gCAS(z)); END; aibigzCAS(z):= BEGIN LOCAL a,c,s; IF z ≥ 0 THEN   s:=2/3*z^(3/2);   a:=1;   FOR K FROM 1 TO 48 DO    a:=a+(−1)^K*CLIST(K)*s^(−K);   END;   RETURN(0.282094791774/z^(0.25)/exp(s)*a); END; z:=−z; s:=2/3*z^(3/2); a:=1; c:=5/(72*s); FOR K FROM 1 TO 24 DO   a:=a+(−1)^K*CLIST(2*K)*s^(−2*K);   c:=c+(−1)^K*CLIST(2*K+1)*s^(−2*K-1); END; s:=s+π/4; RETURN((0.564189583547/z^(0.25))*(sin(s)*a-cos(s)*c)); END; bismallzCAS(z):= BEGIN RETURN((0.355028053887817*fCAS(z)+0.258819403792807*gCAS(z))*√3); END; bibigzCAS(z):= BEGIN LOCAL a,c,s; if z ≥ 0 then   s:=2/3*z^(3/2);   a:=1;   FOR K FROM 1 TO 48 DO    a:=a+CLIST(K)/s^K;   END;   RETURN(0.564189583548/z^(0.25)*exp(s)*a); END; z:=−z; s:=2/3*z^(3/2); a:=1; c:=5/(72*s); FOR K FROM 1 TO 24 DO   a:=a+(−1)^K*CLIST(2*K)*s^(−2*K);   c:=c+(−1)^K*CLIST(2*K+1)*s^(−2*K-1); END; s:=s+π/4; RETURN((0.564189583548/z^(0.25))*(cos(s)*a+sin(s)*c)); END; AiryCAS_Ai(z):= BEGIN HAngle:=0; IF (z < 6.389) AND (z > -7.189) THEN   RETURN aismallzCAS(z); END;  RETURN aibigzCAS(z); END; AiryCAS_Bi(z):= BEGIN HAngle:=0; IF (z < 10.172) AND (z > -7.123) THEN   RETURN bismallzCAS(z); END;  RETURN bibigzCAS(z); END;```

Code:
``` CLIST:={5/72,385/10368,85085/2239488,37182145/644972544,5391411025/46438023168,5849680962125/20061226008576,1267709431363375/1444408272617472,2562040760785380875/831979165027663872,6653619855759634132375/539122498937926189056,4318199286388002551911375/77633639847061371224064,1556514560957130010757145625/5589622068988418728132608,7404339766473067461171741738125/4829433467605993781106573312,3201522602103470169172796946923125/347719209667631552239673278464,2998911957427493414180861368710704375/50071566192138943522512952098816,4537353791587797535655643250859295719375/10815458297502011800862797653344256,39225423528276509695743035903678611493996875​/12459407958722317594593942896652582912,22605380841560292087599677808725844518040​434375/897077373028006866810763888558985969664,2491339022548359790974360491299675324333​23627246875/1162612275444296899386749999572445816684544,161504330214358671291743148270200531​420065637726303125/83708083831989376755845999969216098801287168,44203735179669968332550099681553885​4496719650456891653125/24107928143612940505683647991134236454770704384,95511642084644038718545751097643​2167751840673308640893359375/5207312479020395149227667966084995074230472146944,144457017214747533832767787364​6809270444306661985078049347265625/749852996978936901488784187116239290689187989159936,1144413613334745571289939936​335587465946335290783917701615501171875/53989415782483456907192461472369228929621535219515392,22747509392254737720530136​114542472060615306574911932155011316793359375/93293710472131413535628573424254027590386012859322597376,19658397616786544338082​143630187604354783747942038891768360779972821171875/6717147153993461774565257286546289986507792925871227011072,353926766323760823256​00967051118529224901047737186173987575696558759963671875/967269190175058495537397049262665758057122181325456689594368,8946206872365702329​44215644151123063217823783652854919883950881915775601733984375/1880371305700313715324699863766622233663045520496687804571451392,347892424675238​2615853499149919674414836054459259194824880146708089903950685826953125/541546936041690350013513560764787203294957109903046087716578000896,3507355455251​703811714094987800052443674542214667623417069684458773259372627638711328125/38991379395001705200972976375064678637236911913019318315593616064512,21973581927​15192438038880509856732855962100697489266070794157313421446996951215652647070312​5/16844275898640736646820325794027941171286345946424345512336442139869184,23735012​60744136089926835931372667731673901350175099173565882504513456538481014713835069​3359375/1212787864702133038571063457170011764332616908142552876888223834070581248,847743​44529998308723916798960837573372196734524204017182252625413707127184926402534047​1714716796875/2794263240273714520867730205319707105022349356360441828350467713698619195392,293​01866848864233599927641939000048883493564030406917611694791553223260751800788643​15461369567939453125/603560859899122336507429724349056734684827460973855434923701026158901746204672,6​96298538290334379256633500829285279262640885962557794564490879044447096817939093​4220687820378591181640625/86912763825473616457069880306264169794615154380235182629012947766881851453472768​,8523688820871250422642989240865922225716528216875939630890174775045524532332742​987905296276117735405068359375/62577189954341003849090313820510202252122911153769331492889322392154933046500392​96,38667714335882427542319920691188256176963030255857700135533277866994022040927​4885646323765566081066650926123046875/16220007636165188197684209342276244423750258571057010722956912364046558645652901​855232,5011858314610577236883882261046797841834097410757210068648025423425492743​28853937592993211493312154415634164404296875/11678405498038935502332630726438895985100186171161047720528976902113522224870089​33576704,13352909460205370016226263365076313344814939212102143730791141839959045​69252679746047100492579102872035464054542626953125/16816903917176067123358988246072010218544268086471908717561726739043472003812928​6435045376,548054761590906098427526718746443731645608239646256986956786888580534​4623201171785371933921734091687938173504479303564453125/36324512461100304986455414611515542072055619066779322829933329756333899528235925​869969801216,6156299136950648203636407631678802437575117355946404734485587119425​1436152418762665082933742839051930609502975816016939501953125/20922919177593775672198318816232952233504036582464889950041597939648326128263893​301102605500416,8865821525396366419114919234450607071381044006874523598724426621​1331123112672337599020044459656873688849709834318456590070556640625/15064501807867518483982789547687725608122906339374720764029950516546794812350003​17679387596029952,78522048158571218412266806825462040943487226470599977078588325​3186270805659478130589492242337906742583945065799748764744943471435546875/65078647809987679850805650846010974627090955386098793700609386231482153589352013​7237495441484939264,118734467286475795171720931316241101492708905868485607200625​3837335453815227556454164171513698907774640713770310824754243743475725830078125/46856626423191129492580068609127901731505487877991131464438758086667150584333449​881099671786915627008,7352577916502610672465558798607631918526229582766940096077​27205797991886653231481711826099987531826229104544475113179862009766691057885742​1875/13494708409879045293863059759428835698673580508861445861758362328960139368288033​565756705474631700578304,1048257033555777203573414717917490082624284551615082649​49773667730619703280151212347655047075222412465483434905816886052926732437144122​770263671875/87445710496016213504232627241098855327404801697422169184194187891661703106506457​50610345147561341974740992,33965806706845346128829883414261281916336872264832188​89296470690271492776936203956612605384035195777821805646241740623084506406468767​71715386962890625/12592182311426334744609498322718235167146291444428792362523963056399285247336929​88087889701248833244362702848,56250989290228110779355992240762880862168364393143​46993322752959971535814433687390869263091003139016134380555032305635724015428942​75474042778192138671875/90663712642269610161188387923571293203453298399887305010172534006074853780825895​142328058489915993594114605056,4568761601141617385610073045787001946506176724375​50577144667318161848110384118523573792417514365954029450523060278896039140257154​15948277228487543695068359375/31333379089168377271706706866386238931113459927001052611515627752499469466653429​3611885770141149673861260075073536,789528624693609664002661541424706048621027605​08151980042610192857124107026522457593179633750742787529289350900357624652869958​275597474536140339586478924560546875/22560032944201231635628828943798092030401691147440757880291251981799618015990469​140055775450162776518010725405294592,2785614893643993616534190450454647880744709​59624861815986337282438505274410976534880256383799370702960838687846641771300255​786787963009658410346129014941634521484375/32486447439649773555305513679069252523778435252314691347619402853791449943026275​56168031664823439818593544458362421248,15043139724175696115642432606116996981868​70967550614059801511424368645689252923575569525724394189846195282102221232224365​881323886408476570021283904365689221014404296875/70170726469643510879459909546789585451361420144999733310857910164189531876936755​2132294839601863000816205603006282989568,110482603957317149079476349071864040064​45221489909998352897608174188091113292414171127046737537235688091303790290506852​752403935438663239805840163333624839211907098388671875/20209169223257331133284453949475400609992089001759923193527078127286585180557785​5014100913805336544235067213665809500995584,206833857495263487713485336438857017​34405685310384149935336860012285218648150691065535786874437397400152967044838007​178055590016569049156920288053700482833423483664324951171875/14550601840745278415964806843622288439194304081267144699339496251646341330001605​561015265793984231184924839383938284071682048,2131154017473946398353438861065051​04960795859732605165688730404508583207384950275531961087218140611591956126539897​3745605313828537225117981595720189136649707455486321049993896484375/56572739956817642481271169008003457451587454267966658591031961426400975091046242​421227353407010690846987775524752048470699802624,4143157151243667611708026367625​10151780601769125614678932136336401459262720651058386453440923630634444907433277​7913959069966929388050831639674952385880659453994143179604919952392578125/40732372768908702586515241685762489365142967072935994185543012227008702065553294​54328369445304769740983119837782147489890385788928,65630568673664869017749214824​87276882884575309927683381912848237410830049539913229883127113830968985774794391​2868427050210468995027716638052193870758339560508020080924355935560150146484375/23461846714891412689832779210999193874322349034011132650872775042757012389758697​65693140800495547370806277026562516954176862214422528,39695095054060767120593086​94752581039739193373110313637890940952097580825278832677044627992316386647043589​72138689527964686129763242111205002313844522953014468428612609695318250830230712​890625/50677588904165451410038803095758258768536273913464046525885194092355146761878786​9389718412907038232094155837737503662102202238315266048,162915514083771260808969​30350280929238993052912446987568807506312400212669155584277742367871499608797164​65835273067803720169236225891010956226910209964358301208511789704087809432140168​609619140625/72975728021998250030455876457891892626692234435388226997274679492991411337105453​192119451458613505421558440634200527342717122317398310912,3401813998064130172522​47309892128752450207989771988394493962433079452372915586528180512965197480899149​88040933582395629646388033105270318097336721548640516887116106263758390823493452​94105072021484375/52542524175838740021928231049682162691218408793479523438037769234953816162715926​29832600505020172390352207725662437968675632806852678385664,86708836996656613967​42531681840469771203351451298212187256608456762161533245385016793094969918590638​43130175356081682204056784575820235137983015695553298134935702432556937623700024​62201444180755615234375/45396740887924671378945991626925388565212705197566308250464632619000097164586560​32175366836337428945264307474972346404935746745120714125213696}```

Hello, I discovered because sometimes, variables with corrupt values appear in memory.

In the coding process (first code) without the #cas #end header, the memory is corrupted, but not when I copy and paste the code on the program editor and within (#cas #end)

ie if the algorithm contains logical CAS, and not numerical and if I do not put the heading #cas #end, the memory is corrupted, of course this happens when the compiler omits the errors, So it is very difficult to reproduce the error

Now if I copy from this forum the variable CLIST to HP connkit editor, and then put in the input line CLIST [ENTER] appears in certain elements the symbol "[]"
I tried bracketing with #cas / #end and got this error message:

[attachment=4913]

Without #cas / #end I can create the functions, but then the anomaly occurs.

In the input line, it is not yet fully compatible with the function definition, please use the HPconnKit program editor or write directly to the program editor.

HOME MODE VERSUS MODE CAS

A significant difference is that in HOME mode, expressions on the right side of a variable can not contain symbols that do not contain a predefined value, or use system variables as F1 X L1 M1, another way is define subfunctions to transfer values.

Example
PHP Code:
`// file euler1.hppprgm// CAS MODE#cas  euler1():=  begin    local g,c,m,t;    local vi,ti,vf,tf,iteration;    local v;    purge(g,c,m,t,vi,ti,vf,tf);    v(t):= vi+(g-(c/m)*vi)*(t-ti);    g:=9.81; c:=12.5; m:=68.1;    vi:=0;    ti:=0;    iteration:=1;    PRINT(); // clear terminal view (output)    print("euler1");    print("press [↓] for next iteration" );    print("press [on] for exit" );    wait(1);          for tf from 0 to 10 step 2 do      PRINT(); // clear terminal view (output)      print("iteration = "+iteration);      vf:=v(tf);      print("vi = "+vi+" m/s");      print("ti = "+ti+" s");      print("tf = "+tf+" s");      print("vf("+tf+") = "+vf+" m/s");      print("");      vi:=vf;      ti:=tf;      iteration:=iteration+1;       wait();    end;    print("iterations finished" );    return("done");  end;#end `

PHP Code:
`// file euler2.hppprgm // HOME MODElocal g;c;m;t;local vi;ti;vf;tf;iteration;local v(t)begin    return vi+(g-(c/m)*vi)*(t-ti);end;export euler2()begin  purge(g,c,m,t,vi,ti,vf,tf);  g:=9.81; c:=12.5; m:=68.1;  vi:=0;  ti:=0;  iteration:=1;  print; // clear terminal view (output)  print("press [↓] for next iteration" );  print("euler2");  print("press [on] for exit" );  wait(1);     for tf from 0 to 10 step 2 do    print; // clear terminal view (output)    print("iteration = "+iteration);    vf:=v(tf);    print("vi = "+vi+" m/s");    print("ti = "+ti+" s");    print("tf = "+tf+" s");    print("vf("+tf+") = "+vf+" m/s");    print("");    vi:=vf;    ti:=tf;    iteration:=iteration+1;     wait();  end;  print("iterations finished" );  return("done");end; `
(06-07-2017 05:30 PM)compsystems Wrote: [ -> ]please use the HPconnKit program editor or write directly to the program editor.
I can't, the free version doesn't allow it. I guess I'll have to get the pro version and see if that works any better.

This looks suspiciously like a (for lack of a better description) "cas memory corruption" issue that we were never able to reliably reproduce, but seems to be resolved with the last CAS drop when it was integrated. At least we've never been able to see it again.

I'm guessing you'll just have to wait for the next update and it isn't anything in particular you are doing.
(06-07-2017 07:19 PM)Tim Wessman Wrote: [ -> ]"cas memory corruption" issue that we were never able to reliably reproduce

It's very consistent on my phone. Get yourself a 3 year old Droid Razr M, it'll do it almost every time.