Integer part and other little tricks (CASIO fx-50F)
03-16-2017, 04:11 PM (This post was last modified: 03-17-2017 01:08 PM by xerxes.)
Post: #10
 xerxes Member Posts: 141 Joined: Jun 2014
RE: Integer part and other little tricks (CASIO fx-50F)
An interesting exercise from a french pocket and calculator forum is the Collatz conjecture, thats pretty simple to implement normally.
First I was not sure, if it's also possible on the very limited FX-180P, but it was. The real challenge however, was to reduce the steps
to 29 bytes or less, to fit in the FX-50F too:

Code:
 01  2  02  Kin/1  03  Kout1  04  -  05  1  06  Kin+3  07  =  08  1/x  09  Kout1  10  Kin2  11  FIX0  12  RND  13  NORM  14  Kin-2  15  .  16  5  17  Kin+2  18  Kout2  19  x>0  20  6  21  Kin*1  22  1  23  Kin+1  24  Kout1  25  x<=M  26  Min  27  RTN

Usage example:

KAC Min 13 Kin1 P1

program stops with error

Kout3 -> 9 (length)

MR -> 40 (maximum)

Calculator Benchmark
 « Next Oldest | Next Newest »

 Messages In This Thread Integer part and other little tricks (CASIO fx-50F) - Csaba Tizedes - 02-14-2017, 11:53 PM RE: Integer part and other little tricks (CASIO fx-50F) - xerxes - 02-15-2017, 02:52 PM RE: Integer part and other little tricks (CASIO fx-50F) - Csaba Tizedes - 02-15-2017, 08:45 PM RE: Integer part and other little tricks (CASIO fx-50F) - damaltor - 02-16-2017, 09:00 AM RE: Integer part and other little tricks (CASIO fx-50F) - xerxes - 02-16-2017, 02:46 PM RE: Integer part and other little tricks (CASIO fx-50F) - Csaba Tizedes - 02-19-2017, 04:20 PM RE: Integer part and other little tricks (CASIO fx-50F) - xerxes - 02-19-2017, 05:27 PM RE: Integer part and other little tricks (CASIO fx-50F) - Csaba Tizedes - 02-20-2017, 09:01 AM RE: Integer part and other little tricks (CASIO fx-50F) - xerxes - 02-20-2017, 01:47 PM RE: Integer part and other little tricks (CASIO fx-50F) - xerxes - 03-16-2017 04:11 PM RE: Integer part and other little tricks (CASIO fx-50F) - Csaba Tizedes - 03-17-2017, 11:36 AM RE: Integer part and other little tricks (CASIO fx-50F) - xerxes - 03-17-2017, 01:33 PM RE: Integer part and other little tricks (CASIO fx-50F) - Csaba Tizedes - 03-17-2017, 11:02 PM RE: Integer part and other little tricks (CASIO fx-50F) - xerxes - 03-18-2017, 12:50 PM RE: Integer part and other little tricks (CASIO fx-50F) - Csaba Tizedes - 03-20-2017, 09:43 PM RE: Integer part and other little tricks (CASIO fx-50F) - Csaba Tizedes - 03-23-2017, 09:22 AM RE: Integer part and other little tricks (CASIO fx-50F) - Csaba Tizedes - 03-06-2019, 10:22 PM

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