What is the best BASIC Pocket Computer
04-18-2014, 09:12 PM
Post: #86
 Guenter Schink Senior Member Posts: 469 Joined: Dec 2013
RE: What is the best BASIC Pocket Computer
(04-16-2014 08:23 PM)Guenter Schink Wrote:  Your example of 167699497 is calculated in about 2.4 seconds

Günter

Now I have transformed the code into a structured form, no "GOTOs" any more . Then I use some special operations of UBASIC. But the algorithm is the same still.
Code:
 100   input "X=";X   110   clr time   120   M=int(sqrt(X))   130   F=0   140   data 2,1,2,2   145    ' take care of divisors 2-7   150   for I=1 to 4   160   read S:gosub *Divide   170   next I   180   data 4,2,4,2,4,6,2,6   185    'Now calculate with numbers >7 omitting all that can be divided by 2,3 and 5   190   while X>1   200    for I=1 to 8   210    read S   220    gosub *Divide   230    next I   240    restore 180   250    if F>M then   260    :    F=X   270    :    S=0   280    :    gosub *Divide   290    endif   300   wend   310   ET=time1000/1000     'time1000 gives milliseconds after last "clr time"   320   print:print "Execution Time: "   330   print ET;   340   end   345   'Now start factoring   350   *Divide   360   F+=S                'this is shorter and faster for F=F+S   370   while not X@F        'while there is no remainder   380       X\=F            'this is short for x=x\f where "\" denotes integer division   390        M=int(sqrt(X))   400        print F;   410   wend   420   return

This program needs 1.53 sec for 167699497 on the 200LX.

Günter
 « Next Oldest | Next Newest »

 Messages In This Thread What is the best BASIC Pocket Computer - Namir - 03-30-2014, 03:31 AM RE: What is the best BASIC Pocket Computer - Raymond Del Tondo - 03-30-2014, 04:08 AM RE: What is the best BASIC Pocket Computer - HP67 - 03-30-2014, 07:01 AM RE: What is the best BASIC Pocket Computer - Namir - 03-30-2014, 11:38 AM RE: What is the best BASIC Pocket Computer - HP67 - 03-30-2014, 11:59 AM RE: What is the best BASIC Pocket Computer - Bill (Smithville NJ) - 03-30-2014, 12:57 PM RE: What is the best BASIC Pocket Computer - Thomas Radtke - 03-30-2014, 01:17 PM RE: What is the best BASIC Pocket Computer - Bill (Smithville NJ) - 03-30-2014, 01:46 PM RE: What is the best BASIC Pocket Computer - Erwin - 01-09-2019, 05:24 PM RE: What is the best BASIC Pocket Computer - Sylvain Cote - 03-30-2014, 12:58 PM RE: What is the best BASIC Pocket Computer - Bill (Smithville NJ) - 03-30-2014, 01:11 PM RE: What is the best BASIC Pocket Computer - JurgenRo - 01-04-2019, 10:32 PM RE: What is the best BASIC Pocket Computer - Dave Britten - 03-30-2014, 02:11 PM RE: What is the best BASIC Pocket Computer - W_Max - 03-30-2014, 03:39 PM RE: What is the best BASIC Pocket Computer - Csaba Tizedes - 11-22-2019, 05:27 PM RE: What is the best BASIC Pocket Computer - Dieter - 03-30-2014, 06:34 PM RE: What is the best BASIC Pocket Computer - Garth Wilson - 03-30-2014, 07:29 PM RE: What is the best BASIC Pocket Computer - Howard Owen - 03-31-2014, 09:34 PM RE: What is the best BASIC Pocket Computer - Garth Wilson - 03-31-2014, 10:03 PM RE: What is the best BASIC Pocket Computer - Francois Lanciault - 03-31-2014, 08:59 PM RE: What is the best BASIC Pocket Computer - Raymond Del Tondo - 03-31-2014, 09:16 PM RE: What is the best BASIC Pocket Computer - Marcus von Cube - 04-01-2014, 08:42 AM RE: What is the best BASIC Pocket Computer - Namir - 04-01-2014, 05:25 PM RE: What is the best BASIC Pocket Computer - W_Max - 04-01-2014, 09:55 AM RE: What is the best BASIC Pocket Computer - robert rozee - 04-05-2014, 01:18 PM RE: What is the best BASIC Pocket Computer - Dave Britten - 04-05-2014, 06:42 PM RE: What is the best BASIC Pocket Computer - robert rozee - 04-11-2014, 02:02 PM RE: What is the best BASIC Pocket Computer - Thomas Radtke - 04-12-2014, 06:56 AM RE: What is the best BASIC Pocket Computer - robert rozee - 04-12-2014, 07:51 PM RE: What is the best BASIC Pocket Computer - Thomas Radtke - 04-17-2014, 07:06 AM RE: What is the best BASIC Pocket Computer - Bill (Smithville NJ) - 04-17-2014, 01:19 PM RE: What is the best BASIC Pocket Computer - Johnny Shek - 04-06-2014, 04:20 AM RE: What is the best BASIC Pocket Computer - Guenter Schink - 04-08-2014, 04:30 PM RE: What is the best BASIC Pocket Computer - Johnny Shek - 04-09-2014, 07:54 AM RE: What is the best BASIC Pocket Computer - Alvaro - 04-09-2014, 02:27 PM RE: What is the best BASIC Pocket Computer - Alvaro - 04-09-2014, 02:29 PM RE: What is the best BASIC Pocket Computer - Katie Wasserman - 04-06-2014, 06:20 AM RE: What is the best BASIC Pocket Computer - Johnny Shek - 04-06-2014, 07:52 AM RE: What is the best BASIC Pocket Computer - Katie Wasserman - 04-06-2014, 07:07 AM RE: What is the best BASIC Pocket Computer - rprosperi - 04-06-2014, 06:13 PM RE: What is the best BASIC Pocket Computer - Joe Horn - 04-08-2014, 02:53 AM RE: What is the best BASIC Pocket Computer - toml_12953 - 01-07-2019, 08:40 PM RE: What is the best BASIC Pocket Computer - rprosperi - 01-08-2019, 02:45 AM RE: What is the best BASIC Pocket Computer - toml_12953 - 01-11-2019, 03:32 AM RE: What is the best BASIC Pocket Computer - ckreling - 05-07-2014, 01:36 AM RE: What is the best BASIC Pocket Computer - Dave Britten - 04-07-2014, 01:25 AM RE: What is the best BASIC Pocket Computer - Katie Wasserman - 04-07-2014, 08:24 AM RE: What is the best BASIC Pocket Computer - rprosperi - 04-07-2014, 05:49 PM RE: What is the best BASIC Pocket Computer - Dave Britten - 04-07-2014, 06:12 PM RE: What is the best BASIC Pocket Computer - Alvaro - 04-06-2014, 08:26 PM RE: What is the best BASIC Pocket Computer - Csaba Tizedes - 01-04-2019, 07:56 PM RE: What is the best BASIC Pocket Computer - Katie Wasserman - 04-07-2014, 12:19 AM RE: What is the best BASIC Pocket Computer - Johnny_Bjoern - 04-07-2014, 08:23 PM RE: What is the best BASIC Pocket Computer - Katie Wasserman - 04-07-2014, 11:55 PM RE: What is the best BASIC Pocket Computer - Katie Wasserman - 04-08-2014, 01:44 AM RE: What is the best BASIC Pocket Computer - Dave Britten - 04-08-2014, 11:06 AM RE: What is the best BASIC Pocket Computer - rprosperi - 04-08-2014, 01:02 PM RE: What is the best BASIC Pocket Computer - david sanz - 04-08-2014, 09:05 AM RE: What is the best BASIC Pocket Computer - rprosperi - 04-08-2014, 01:12 PM RE: What is the best BASIC Pocket Computer - Guenter Schink - 04-08-2014, 03:49 PM RE: What is the best BASIC Pocket Computer - rprosperi - 04-08-2014, 06:59 PM RE: What is the best BASIC Pocket Computer - Katie Wasserman - 04-08-2014, 08:40 PM RE: What is the best BASIC Pocket Computer - rprosperi - 04-09-2014, 01:51 AM RE: What is the best BASIC Pocket Computer - Bill (Smithville NJ) - 04-08-2014, 09:53 PM RE: What is the best BASIC Pocket Computer - Dave Britten - 04-08-2014, 10:03 PM RE: What is the best BASIC Pocket Computer - Bill (Smithville NJ) - 04-08-2014, 11:23 PM RE: What is the best BASIC Pocket Computer - Katie Wasserman - 04-08-2014, 11:50 PM RE: What is the best BASIC Pocket Computer - Bill (Smithville NJ) - 04-09-2014, 02:09 AM RE: What is the best BASIC Pocket Computer - Bill (Smithville NJ) - 04-09-2014, 11:54 AM RE: What is the best BASIC Pocket Computer - Johnny Shek - 04-09-2014, 03:16 PM RE: What is the best BASIC Pocket Computer - Bill (Smithville NJ) - 04-09-2014, 06:28 PM RE: What is the best BASIC Pocket Computer - Bill (Smithville NJ) - 04-09-2014, 11:59 AM RE: What is the best BASIC Pocket Computer - Dave Britten - 04-10-2014, 03:32 PM RE: What is the best BASIC Pocket Computer - Bill (Smithville NJ) - 04-10-2014, 06:44 PM RE: What is the best BASIC Pocket Computer - Nick_S - 04-12-2014, 06:55 AM RE: What is the best BASIC Pocket Computer - Bill (Smithville NJ) - 04-12-2014, 12:29 PM RE: What is the best BASIC Pocket Computer - Waon Shinyoe - 04-13-2014, 05:26 AM RE: What is the best BASIC Pocket Computer - Sukiari - 01-07-2019, 08:14 AM RE: What is the best BASIC Pocket Computer - Dave Britten - 04-15-2014, 04:19 PM RE: What is the best BASIC Pocket Computer - Guenter Schink - 04-15-2014, 10:03 PM RE: What is the best BASIC Pocket Computer - Dave Britten - 04-16-2014, 12:47 AM RE: What is the best BASIC Pocket Computer - Guenter Schink - 04-16-2014, 08:23 PM RE: What is the best BASIC Pocket Computer - Dave Britten - 04-16-2014, 08:45 PM RE: What is the best BASIC Pocket Computer - Guenter Schink - 04-16-2014, 09:16 PM RE: What is the best BASIC Pocket Computer - Bill (Smithville NJ) - 04-16-2014, 09:41 PM RE: What is the best BASIC Pocket Computer - Guenter Schink - 04-18-2014 09:12 PM RE: What is the best BASIC Pocket Computer - Dave Britten - 04-18-2014, 09:51 PM RE: What is the best BASIC Pocket Computer - Nick_S - 04-16-2014, 06:32 AM RE: What is the best BASIC Pocket Computer - Don Shepherd - 04-16-2014, 12:57 AM RE: What is the best BASIC Pocket Computer - Dave Britten - 04-16-2014, 03:45 AM RE: What is the best BASIC Pocket Computer - Dave Britten - 04-17-2014, 02:13 PM RE: What is the best BASIC Pocket Computer - Katie Wasserman - 04-17-2014, 04:07 PM RE: What is the best BASIC Pocket Computer - Bill (Smithville NJ) - 04-17-2014, 07:33 PM RE: What is the best BASIC Pocket Computer - Sylvain Cote - 04-17-2014, 10:18 PM RE: What is the best BASIC Pocket Computer - hp41cx - 04-17-2014, 10:36 PM RE: What is the best BASIC Pocket Computer - Guenter Schink - 04-18-2014, 06:19 PM RE: What is the best BASIC Pocket Computer - Paul Berger (Canada) - 05-07-2014, 02:44 AM RE: What is the best BASIC Pocket Computer - Csaba Tizedes - 01-04-2019, 04:52 PM RE: What is the best BASIC Pocket Computer - xerxes - 01-05-2019, 06:31 PM RE: What is the best BASIC Pocket Computer - Csaba Tizedes - 01-06-2019, 02:28 PM RE: What is the best BASIC Pocket Computer - damaltor - 01-09-2019, 01:04 PM RE: What is the best BASIC Pocket Computer - Jlouis - 02-25-2019, 12:05 AM RE: What is the best BASIC Pocket Computer - cdmackay - 02-25-2019, 12:06 AM RE: What is the best BASIC Pocket Computer - Jlouis - 02-25-2019, 12:26 AM RE: What is the best BASIC Pocket Computer - Sylvain Cote - 02-25-2019, 01:36 AM RE: What is the best BASIC Pocket Computer - Jlouis - 02-25-2019, 01:53 AM RE: What is the best BASIC Pocket Computer - Csaba Tizedes - 02-25-2019, 09:42 AM RE: What is the best BASIC Pocket Computer - Csaba Tizedes - 02-24-2019, 08:22 PM RE: What is the best BASIC Pocket Computer - xerxes - 02-26-2019, 02:08 PM RE: What is the best BASIC Pocket Computer - rprosperi - 02-26-2019, 03:37 PM RE: What is the best BASIC Pocket Computer - xerxes - 02-27-2019, 01:25 PM RE: What is the best BASIC Pocket Computer - rprosperi - 02-27-2019, 02:17 PM RE: What is the best BASIC Pocket Computer - Didier Lachieze - 02-24-2019, 08:41 PM RE: What is the best BASIC Pocket Computer - Csaba Tizedes - 02-25-2019, 09:24 AM RE: What is the best BASIC Pocket Computer - rprosperi - 02-24-2019, 11:13 PM RE: What is the best BASIC Pocket Computer - toml_12953 - 02-24-2019, 11:38 PM RE: What is the best BASIC Pocket Computer - foroplus - 04-03-2019, 10:45 AM RE: What is the best BASIC Pocket Computer - rprosperi - 04-03-2019, 01:28 PM RE: What is the best BASIC Pocket Computer - foroplus - 04-03-2019, 08:45 PM RE: What is the best BASIC Pocket Computer - Jlouis - 02-25-2019, 03:48 PM RE: What is the best BASIC Pocket Computer - Valentin Albillo - 02-27-2019, 12:12 AM RE: What is the best BASIC Pocket Computer - Csaba Tizedes - 02-27-2019, 09:21 AM RE: What is the best BASIC Pocket Computer - Valentin Albillo - 02-28-2019, 12:33 AM RE: What is the best BASIC Pocket Computer - xerxes - 02-27-2019, 07:26 PM RE: What is the best BASIC Pocket Computer - rprosperi - 02-27-2019, 10:37 PM RE: What is the best BASIC Pocket Computer - EugeneNine - 04-03-2019, 05:36 PM RE: What is the best BASIC Pocket Computer - Androsynth - 05-07-2019, 08:24 PM RE: What is the best BASIC Pocket Computer - Dave Britten - 06-13-2019, 06:56 PM RE: What is the best BASIC Pocket Computer - cdmackay - 06-13-2019, 09:18 PM RE: What is the best BASIC Pocket Computer - Dave Britten - 06-13-2019, 09:26 PM RE: What is the best BASIC Pocket Computer - cdmackay - 06-14-2019, 12:12 AM RE: What is the best BASIC Pocket Computer - Dave Britten - 06-14-2019, 12:54 AM RE: What is the best BASIC Pocket Computer - thenozone - 06-13-2019, 10:10 PM RE: What is the best BASIC Pocket Computer - Dave Britten - 06-13-2019, 11:17 PM RE: What is the best BASIC Pocket Computer - Dave Britten - 06-14-2019, 12:29 PM RE: What is the best BASIC Pocket Computer - cdmackay - 07-05-2019, 04:16 PM RE: What is the best BASIC Pocket Computer - Leviset - 07-06-2019, 02:59 PM RE: What is the best BASIC Pocket Computer - Dave Britten - 07-06-2019, 03:50 PM RE: What is the best BASIC Pocket Computer - ijabbott - 11-23-2019, 07:22 PM RE: What is the best BASIC Pocket Computer - Dave Britten - 11-23-2019, 07:43 PM RE: What is the best BASIC Pocket Computer - ijabbott - 11-26-2019, 09:17 PM RE: What is the best BASIC Pocket Computer - ZQ8000_dude - 07-07-2020, 10:03 AM RE: What is the best BASIC Pocket Computer - Dave Britten - 07-07-2020, 01:51 PM RE: What is the best BASIC Pocket Computer - ZQ8000_dude - 07-07-2020, 02:01 PM RE: What is the best BASIC Pocket Computer - ZQ8000_dude - 07-07-2020, 07:16 PM RE: What is the best BASIC Pocket Computer - rprosperi - 07-07-2020, 08:22 PM RE: What is the best BASIC Pocket Computer - Dave Britten - 07-07-2020, 09:00 PM RE: What is the best BASIC Pocket Computer - ZQ8000_dude - 07-08-2020, 11:52 AM RE: What is the best BASIC Pocket Computer - Dave Britten - 07-08-2020, 12:05 PM RE: What is the best BASIC Pocket Computer - ZQ8000_dude - 07-08-2020, 12:16 PM RE: What is the best BASIC Pocket Computer - Dave Britten - 07-08-2020, 12:44 PM RE: What is the best BASIC Pocket Computer - rprosperi - 07-07-2020, 05:58 PM RE: What is the best BASIC Pocket Computer - xerxes - 07-07-2020, 06:16 PM RE: What is the best BASIC Pocket Computer - rprosperi - 07-07-2020, 08:16 PM RE: What is the best BASIC Pocket Computer - rprosperi - 07-08-2020, 12:47 PM RE: What is the best BASIC Pocket Computer - ZQ8000_dude - 07-09-2020, 08:14 AM RE: What is the best BASIC Pocket Computer - rprosperi - 07-09-2020, 12:42 PM RE: What is the best BASIC Pocket Computer - ZQ8000_dude - 07-10-2020, 09:45 PM RE: What is the best BASIC Pocket Computer - Dave Britten - 07-10-2020, 10:05 PM RE: What is the best BASIC Pocket Computer - ZQ8000_dude - 07-10-2020, 10:26 PM RE: What is the best BASIC Pocket Computer - Dave Britten - 07-10-2020, 10:41 PM RE: What is the best BASIC Pocket Computer - ZQ8000_dude - 07-13-2020, 06:25 PM RE: What is the best BASIC Pocket Computer - rprosperi - 07-13-2020, 09:41 PM RE: What is the best BASIC Pocket Computer - ZQ8000_dude - 07-14-2020, 09:41 AM RE: What is the best BASIC Pocket Computer - rprosperi - 07-14-2020, 12:19 PM RE: What is the best BASIC Pocket Computer - ZQ8000_dude - 07-14-2020, 05:29 PM RE: What is the best BASIC Pocket Computer - Dave Britten - 07-13-2020, 03:29 PM RE: What is the best BASIC Pocket Computer - ZQ8000_dude - 07-13-2020, 06:23 PM

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