The following warnings occurred:
Warning [2] Undefined array key 154298 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 154308 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 154322 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 154326 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 154352 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 154390 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 154397 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 154406 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 154432 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $thread - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $fid - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 154322 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 154397 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 154432 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $lang - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Attempt to read property "messages_in_thread" on null - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks





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



#10

Recently, I shot a Casio 9850GB+ on a "different" aucion site for cheap. After playing with it for some _minutes_, I decided to put it up on eBay and asked myself, when was the last time I've been amazed by a Casio calculator. Well, it probably was when the fx-180p came out. Since then I wrote a lot of programs for it.

Today, I pulled a 3600p (one brother of the 180p) out of my drawer and found it still kept a program in memory that does something interesting. Took me quite some time to find the flow chart to this program. My question is, how would you solve the following problem on either the 180p or the 3600p (probably the programming model on the rare 190p is the same, so you can use it, too):

For any x >= 0, find the smallest y >= x that is the square of an integer.

E.g., for 0, the calculator should return 0. For 5, it should find 9

You likely have to use both P1 and P2.

Hope some of you are owning one of these wonderfull calculators and enjoy programming as mch as I do!


#11

Unfortunately I don't have one of those calculators, but I did get an FX-9860G slim yesterday; first casio I've ever had. On this, I created the function Y1=(Intg(-sqrt(x))^2. The "Intg" is the greatest integer function, and so should work on any calculator that has this function. Just not sure how to impliment it on the aforementioned calculators. :(

CHUCK


#12

Thank you for your interesting answer, Chuck! It's a nice idea to use the floor function on a negative number. Unfortunately, the old Casios don't have any of those integer functions, so a loop has to be considered. The problem is to keep it inside the 38 steps limit of these calculators. In addition, they offer very limited branching capabilities. And of course, you're typing in programs blindly.

Edited: 13 Aug 2009, 2:53 p.m.

#13

A solution in 9 steps on the FX-3900Pv with the same programming model but with an editor
and 300 steps in four areas:

P1: Min 1 +/- M+ +
P2: 1 + x^2 x<=M

#14

Quote:
A solution in 9 steps on the FX-3900Pv with the same programming model but with an editor and 300 steps in four areas:
I have a 180p Plus, which must be a close relative to your 3900Pv. Unfortunately, none of these "late successors" seem to be able to handle fractions.

Quote:
P1: Min 1 +/- M+ +
P2: 1 + x^2 x<=M

Much shorter than my program, thank you, Xerxes!

But there's a way to calculate it faster. For x = 1000001, my solution appears within a second, while your program takes about 30 seconds on the 180p Plus.

Any other solutions? :-)

Edited: 14 Aug 2009, 9:32 a.m.


#15

An even shorter version with 8 steps:

P1: Min 1 M- -
P2: 1 + x^2 x<=M

or 7 steps only, if x=0 is excluded:

P1: Min 1 M-
P2: 1 + x^2 x<=M

and a very fast solution with 14 steps excluding x=0:

P1: Kin1 Min 1 M- Kout1 SQR FIX0 RND NORM -
P2: 1 + x^2 x<=M

#16

Quote:
and a very fast solution with 14 steps excluding x=0:

P1: Kin1 Min 1 M- Kout1 SQR FIX0 RND NORM -
P2: 1 + x^2 x<=M


Excellent :-)

This is my solution, not optimized in any way but fast and includes 0:


P1: kin1 sqrt - .5 = kin2 fix0

P2: kout2 + .5 = kin2
kout1 - kout2 rnd x^2 = x>0
kout2 rnd x^2 nrm

#17

Quote:
(probably the programming model on the rare 190p is the same, so you can use it, too)

Due to the lack of the K vars, only the short solutions are usable on the FX-190/191.

The FX-180P was my first programmable bought in 1980, so thank you for
the fun with the powerful keystroke dialect of this calculator. ;-)


#18

Quote:
The FX-180P was my first programmable bought in 1980, so thank you for
the fun with the powerful keystroke dialect of this calculator. ;-)

It was also my first programmable :-). Thanks for participating!

Possibly Related Threads…
Thread Author Replies Views Last Post
  ENG button (like Casio calculators) on HP Prime uklo 3 1,960 11-04-2013, 09:45 PM
Last Post: LHH
  Fun graphs on HP Prime Mic 9 2,799 09-15-2013, 08:30 AM
Last Post: Eddie W. Shore
  [HP Prime] Request: re-execute history like CASIO classPAD serie 300/400 CompSystems 1 1,309 09-03-2013, 02:47 PM
Last Post: CompSystems
  OT: Does anyone have the new Casio Classpad fx-CP400? Eddie W. Shore 4 1,770 08-20-2013, 08:42 AM
Last Post: Eddie W. Shore
  Classpad II fx-CP400 emulator Namir 0 1,050 07-07-2013, 08:07 AM
Last Post: Namir
  Casio fx-CP400 emulator (90 days trial) Mic 2 1,725 05-16-2013, 01:07 PM
Last Post: critor
  Fun things found by running strings on the 39gII emulator bhtooefr 11 3,673 05-16-2013, 12:40 AM
Last Post: Mic
  OT: RPN port to Casio fx-cg10/20? Matt Kernal 4 1,911 04-30-2013, 12:16 PM
Last Post: hugh steers
  Casio fx-CP400 preorder for Europe ! Mic 3 1,435 12-08-2012, 01:02 PM
Last Post: Mic
  OMG : NEW Casio calculator with color !! Mic 23 5,259 11-29-2012, 01:27 PM
Last Post: Eddie W. Shore

Forum Jump: