Post Reply 
Casio fx-3800P "Programming"
03-11-2020, 12:06 AM
Post: #16
RE: Casio fx-3800P "Programming"
(03-06-2020 02:42 PM)Dave Britten Wrote:  You wouldn't think it would be possible to write a prime factor finder on a calculator with no Int or Frac functions, and no flow control besides "once more from the top",

Well done! I love it to check the limits of this type of keystroke programming.

I use normally these steps for INT and FRAC:

Code:
Rounding:

01  FIX0
02  RND
03  NORM

Integer part:

01  -
02  .
03  5
04  =
05  FIX0
06  RND
07  NORM

Fractional part:

01  Kin1
02  -
03  .
04  5
05  =
06  FIX0
07  RND
08  NORM
09  Kin-1
10  Kout1

Round(x)-x to loop, if the fractional part is not zero:

01  Kin1
02  FIX0
03  RND
04  NORM
05  Kin-1
06  Kout1
07  x^2
08  x>0

Round(x)-x to stop, if the fractional part is zero:

01  Kin1
02  FIX0
03  RND
04  NORM
05  Kin-1
06  Kout1
07  1/x

Calculator Benchmark
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Casio fx-3800P "Programming" - xerxes - 03-11-2020 12:06 AM



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