Post Reply 
fx-9860gii-2 brief introduction
11-20-2019, 10:21 PM
Post: #19
RE: fx-9860gii-2 brief introduction
(11-19-2019 10:27 PM)xerxes Wrote:  I've tested C.Basic 1.86 in combination with ftune on the FX-9860G SD. If I remember correctly, I've also tried the FX-6300G version, but the fastest was this one:

Code:
 0->A~Z
 8->R
 R->Dim List 1
 Do
   Isz X
   R->List 1[X]
   Do
     Isz S
     X->Y
     While Y>1
       Dsz Y
       List 1[X]-List 1[Y]->T
       If T=0 Or X-Y=Abs T Then
         0->Y
         Dsz List 1[X]
         Deg
         While List 1[X]=0
           Dsz X
           Dsz List 1[X]
         WhileEnd
       IfEnd
     WhileEnd
   LpWhile Y<>1
 LpWhile X<>R
 S
In 9860gii-2 this code gives the slowest result: t=1.03s(in integer mode).
The fastest result is provided by the following code (algorithm from fx-6300g and the like):
Code:

0->A~Z:8->R:{1,R}->Dim_Mat_A
Lbl_0:X=R=>Goto_4
Isz_X:R->A[1,X]
Lbl_1:Isz_S:X->Y
Lbl_2:Dsz_Y:Deg:Y=0=>Goto_0
A[1,X]-A[1,X]->T:T=0=>Goto_3
X-Y<>Abs_T=>Goto_2
Lbl_3:A[1,X]-1->A[1,X]
A[1,X]=>Goto_1
Dsz_X:Goto_3
Lbl_4:"S=":S
t=0.73s (in integer mode).
Deg: command performs here No Operation; instead of Mat_A[1,X] in C.BASIC we can write A[1,X];
A[1,X]=>Goto_1 in CASIO syntax means if_A[1,X]<>0_then_Goto_1.
(11-20-2019 02:10 AM)Mjim Wrote:  ....Would be interesting to see what kind of power usage you would get in C.Basic, considering how nicely optimized it seems to be....
Battery drain in C. BASIC is almost the same: in program execution mode it is 22 mA at 5.5V (0.12W). Also, this app can run without affecting the main 60K RAM memory of the calculator.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
fx-9860gii-2 brief introduction - Hlib - 09-29-2019, 08:47 PM
RE: fx-9860gii-2 brief introduction - Hlib - 10-10-2019, 09:26 PM
RE: fx-9860gii-2 brief introduction - Hlib - 10-12-2019, 05:19 PM
RE: fx-9860gii-2 brief introduction - Hlib - 10-27-2019, 05:46 PM
RE: fx-9860gii-2 brief introduction - Hlib - 11-17-2019, 03:22 PM
RE: fx-9860gii-2 brief introduction - Mjim - 11-20-2019, 02:10 AM
RE: fx-9860gii-2 brief introduction - Mjim - 11-20-2019, 12:57 PM
RE: fx-9860gii-2 brief introduction - Mjim - 11-20-2019, 01:43 PM
RE: fx-9860gii-2 brief introduction - Hlib - 11-20-2019 10:21 PM
RE: fx-9860gii-2 brief introduction - Mjim - 11-21-2019, 09:45 AM
RE: fx-9860gii-2 brief introduction - Hlib - 11-23-2019, 10:21 PM
RE: fx-9860gii-2 brief introduction - Mjim - 11-24-2019, 12:24 AM
RE: fx-9860gii-2 brief introduction - Hlib - 11-24-2019, 01:09 PM
RE: fx-9860gii-2 brief introduction - Mjim - 11-24-2019, 07:52 PM
RE: fx-9860gii-2 brief introduction - Hlib - 11-24-2019, 10:55 PM
RE: fx-9860gii-2 brief introduction - Mjim - 11-25-2019, 12:09 AM
RE: fx-9860gii-2 brief introduction - Mjim - 11-27-2019, 04:39 AM
RE: fx-9860gii-2 brief introduction - Hlib - 11-27-2019, 07:36 PM
RE: fx-9860gii-2 brief introduction - Mjim - 11-28-2019, 10:22 PM
RE: fx-9860gii-2 brief introduction - Mjim - 12-02-2019, 05:59 AM
RE: fx-9860gii-2 brief introduction - Mjim - 12-06-2019, 12:33 AM
RE: fx-9860gii-2 brief introduction - Mjim - 12-08-2019, 03:48 AM
RE: fx-9860gii-2 brief introduction - Mjim - 12-09-2019, 02:26 AM
RE: fx-9860gii-2 brief introduction - Mjim - 12-09-2019, 11:21 AM
RE: fx-9860gii-2 brief introduction - Hlib - 12-14-2019, 07:22 PM
RE: fx-9860gii-2 brief introduction - Mjim - 12-15-2019, 12:07 AM



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