Post Reply 
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
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
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Integer part and other little tricks (CASIO fx-50F) - xerxes - 03-16-2017 04:11 PM



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