Post Reply 
Integer part and other little tricks (CASIO fx-50F)
02-16-2017, 02:46 PM
Post: #5
RE: Integer part and other little tricks (CASIO fx-50F)
(02-15-2017 08:45 PM)Csaba Tizedes Wrote:  Smile OK, the two solution is not comparable, because you don't check the IP of the square root=0, you check the FP>0. This is works on the 50F also, but you can feel that FIX0+RND is works but this is a cheating Wink

The logic in the FX-180P version is, if there is a difference between X and ROUND(X), that saves one step.
The combination of FIX0, RND und NORM is very useful and it can be seen as a programming trick, because it
is not mentioned in any CASIO manual. A more obvious trick is using x^2 and SQRT, due to the missing ABS.
A size optimized program for the greatest common divisor, that makes use of it:

Code:
 01  x<->y
 02  =
 03  x^2
 04  SQRT
 05  x>0
 06  x<->y

Usage example: 861 - - 615 P1


(02-15-2017 08:45 PM)Csaba Tizedes Wrote:  Have you got any other little code for these blind programmable calcs?!

Another one is Vi├Ęte's formula on the FX-180P:

Code:
 P1:

 01  Min
 02  KAC
 03  2
 04  Kin1

 P2:

 01  2
 02  Kin*1
 03  Kin+2
 04  Kout2
 05  SQRT
 06  Kin/1
 07  Kin2
 08  1
 09  M-
 10  MR
 11  x>0
 12  Kout1

Usage example: 10 P1 P2

or Fun with the Casio fx-180p / fx-3600p


(02-15-2017 08:45 PM)Csaba Tizedes Wrote:  If I collect my 50F codes into a short document can I share this version with your nick?!

Yes,of course. Nice to see that you like the programming on this very limited devices.

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 - 02-16-2017 02:46 PM



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