B289 > There is no bug in the CAS when it refers to this matter. Enjoy! :) Oh, the HP40G is allowed to crash on you now? No, it is not okay for the calc to crash, but does he realize what he is integrating and whether or not the CAS has a bug is the question. -- > There is no bug in the CAS when it refers to this matter. Enjoy! :) Oh, the HP40G is allowed to crash on you now? > No, it is not okay for the calc to crash, but does he realize what he is > integrating and whether or not the CAS has a bug is the question. He COULD just be plain curious about what the calc might throw back at him for asking that interesting question - a crash is not acceptable in any way. The input is legal - what would you say if Mathematica erased the boot sector of your HDD if you asked it that question? That would SUCK if Mathematica erased my boot sector! I think it is great that he is curious. All the great mathematicians were curious and that how we are here today. -- > No, it is not okay for the calc to crash, but does he realize what he is > integrating and whether or not the CAS has a bug is the question. He COULD just be plain curious about what the calc might throw back at him > for asking that interesting question - a crash is not acceptable in any way. > The input is legal - what would you say if Mathematica erased the boot > sector of your HDD if you asked it that question? Note: Although each single function ( e.g. SIN) is evaluated to a precision > of +/- 1 in last digit, the resulting precision for e.g. 'SIN(X)*COS(X)*pi' > would generally have less precision. I guess there is no precision tracking? -- > I guess there is no precision tracking? There has to be, for it to be useful... > I guess there is no precision tracking? There has to be, for it to be useful... > When I was in military we had a simple rule: if it you didn't use enough eplosive the fist time then you double and try again. i.e You would have to repeat the calculation with more digits and compare the result. but seriously how would you do presision tracking even on something as simple as a-b where a is almost equal to b or EXP(1/SIN(x)) ,x ~2 pi Wouldn't you have to resort to something likeintervall aritmetic, real exact arithmetic, linear fractional transformations? I'm only using floating point representation. Gjermund One could do the algorithm analysis on a PC and then change the internal calculation accuracy of each algorithm to reflect the needed output accuracy. Ofcourse there are cases where certain input ranges require special attention and one much either switch to a different algorithm or change the internal accuracy based on the input value (or exponent). Just some thoughts. > I guess there is no precision tracking? There has to be, for it to be useful... your calc is in approximate mode. Just type 'CASCFG' and press Enter. CASCFG does a lot more than just set Exact mode, so I'd recommend avoiding it except when really needed. My favorite solution to the unwanted Approx mode prolem is to type XQ. This would convert your .5 into 1/2 *and* change the HP49G to Exact mode, all in one swell foop. The reverse operation, by the way, is XNUM. These only work if there's something on the stack. If you have a recent enough ROM version, you can easily toggle Exact/Approx mode by pressing the ENTER key while holding down the right-shift key; watch the annunciators in the top line and see = (Exact mode) or ~ (Approx mode). In any ROM version, you can also press MODE CAS and then check or uncheck Approx. You can programmatically turn on Exact mode by -105 CF, and turn on Approx mode by -105 SF. Hope this helps! I prefer having the Vectored ENTER flag on (as well as User flag) then having the following program at Home level in variable BetaENTER (Beta= the Greek letter Beta) << { -105. } CF DROP >> You may add more flags to the list in case something else that the CAS keeps on changing bothers you. It is also advisable now to set the CAS in silent mode switch flag. my .03_euro PS: one may also use CASCFG while trying some examples like the many in Urroz's books...(not always advisable) > your calc is in approximate mode. Just type 'CASCFG' and press Enter. CASCFG does a lot more than just set Exact mode, so I'd recommend avoiding > it except when really needed. My favorite solution to the unwanted Approx mode prolem is to type XQ. > This would convert your .5 into 1/2 *and* change the HP49G to Exact mode, > all in one swell foop. The reverse operation, by the way, is XNUM. These > only work if there's something on the stack. If you have a recent enough ROM version, you can easily toggle Exact/Approx > mode by pressing the ENTER key while holding down the right-shift key; watch > the annunciators in the top line and see = (Exact mode) or ~ (Approx mode). In any ROM version, you can also press MODE CAS and then check or uncheck > Approx. You can programmatically turn on Exact mode by -105 CF, and turn on Approx > mode by -105 SF. Hope this helps! X > FREE ERROR - Invalid Dimension > and, voila, you have found the easter-egg I thought all the errors come free or does HP charge the errors separately nowadays > X > FREE ERROR - Invalid Dimension > and, voila, you have found the easter-egg > I thought all the errors come free > or does HP charge the errors separately nowadays > ROTFL! Nick. And you are going to fix it in the 1.19-7 !!! :-D X > It means that it's an old bug that I've never fixed... Don't remember seeing > it previously either :( Veli-Pekka Nousiainen skrev i en meddelelse > And you are going to fix it in the 1.19-7 !!! > :-D Will there ever be a 1.19-7??? When can we expect that coming? Martin J. > X > It means that it's an old bug that I've never fixed... Don't remember > seeing > it previously either :( > Will there ever be a 1.19-7??? When can we expect that coming? Probably never. > I my self use a whole range of TI.. you kow what > As do I. I have several different doorstops from Ti, an 83, an 86 and an 89. All work flawlessly at helping me keep AN OPEN DOOR POLICY of fairness and objectivity when discussing which is best. Either a 48 or a 49! 8o) Ron Exactly! But seriously now TIs are not so bad (relatively speaking of course). My first programmable calc was a TI66 back in 1985 when I first went to the States to study EE. It was thin and cute and it had the language of the 58/59 but at a much lesser price. Of all the TI_pile_of_ I have I prefer the TI85 with its oblique and hazy screen, huge fonts, austere look and add to that the 28K available! It is really hard to compare calcs and be fair even when they offer similar or even the same functionality. Let alone different brands with different philosophies, such as the crapy TIs on one hand and the wonderful HPs on the other. Oh dear, enough objectivity for today, I feel content that I did justice to the subject. > V200 > QWERTY keyboard makes it a computer in some countries > in some test it is not allowed... Yes, that's true. Fortunately, no more tests for me In computer > science, I mean. I actually would look forward to physics tests. > To learn math I would recommend buying the Urroz books But they are too expensive. You buy the calculator and then you have > to spend so much extra money on what should have come with the > calculator in the first place? The books are worth every penny! They were more clear than my math books back in university when I studied mechanical engineering. > The [Urroz] books are worth every penny! > They were more clear than my math books back in university > when I studied mechanical engineering. I don't have them, but when I translated (*) part of the chapter on matrices I could clearly see that it was a piece of crap. Maybe it was not a randomly picked piece, though. But reading that book it was the first time that I understood vector calculus so easily.. PS: Was it a post card of my home town? You will receive it before the end of the year... > The [Urroz] books are worth every penny! > They were more clear than my math books back in university > when I studied mechanical engineering. I don't have them, but when I translated (*) part of the chapter on > matrices I could clearly see that it was a piece of crap. Maybe it was not a randomly picked piece, though. What I mean is this: When you say anything positive about a TI on a HP newsgroup surely someone will attack, just ignore. You may also try the other way around in a TI newsgroup and the result will be an insult - again! > You should say that in the TI newsgroup... I'm not sure you understand what I'm saying. It is that both claims > are false. As far as I can see, the two calculators complement each > other. And yes, the V200 is kind of big, but that is something that is > impossible to work around (if you want to be able to type easily). The > keys certainly cannot be made any smaller, and in my opinion, the > screen shouldn't be made smaller either. -- > the calculator from this experience. One more thing: Store the function in EQ and press GRAPH. Then enter in the FNC menu and > press the button F' in the second page. You'll see the graphic you are > looking for. > Exit, go to VARS menu, and check for EQ content... > A few days ago I tested the TABVAL command > with the IFTE involving the variable x > and it worked out OK. The table utility, > however,failed to produce the correct result! > A bug :-( I will have a look into this today and will keep you posted.. > I will have a look into this today and will keep you posted.. I've identified the bug, may take a while to fix, the problem is deep in the CAS > sharp is releasing the new zaurus models with xscale processors (400Mhz). in the mean time, if you want more info about this, you http://www.tomshardware.com/mobile/02q4/021107/index.html [...] > XScale's cache alogrithm are prone to heavy thrashing when memory data > is not spatially close, whereas other ARM implementations seem to > handle this much better. For instance, a pixel dissolving algorithm > than on a 200 MHz XScale, the only difference being that the TI has a > much more intelligent cacheing algorithm. [...] Imagine a HP handheld/calculator using TI OMAP processor :))) J.Manrique http://www.asturlinux.org/~jsmanrique Imagine a HP handheld/calculator using TI OMAP processor :))) > http://www.asturlinux.org/~jsmanrique I don't have to imagine! Power48 now runs on a Palm Tungsten T, and supports the HP48SX, HP48GX and HP49G. Emulation speed is roughly four times faster than the real thing on a Tungsten T using the OMAP (even better on a Sony NX60/70). It should be out in the public's hands by early December! Sorry, I couldn't resist the chance to toot my own horn! yes. MS has trouble with xcale processors. > http://zdnet.com.com/2100-1103-940329.html > There was a war between MS and Intel saying that it was the other fault's > According to intel docs, The XScale should be twice faster (at double > frequency) at executung ARM code than the SA1110, and could be even faster > if the software is corectly optimised. Not the other way around. > I wonder where the speed problems really comes from. the fact that the > multiplier between the core and the bus jumped from 2 to 4? higher latency > in case of cache mist? crappy new cache? or something more subtle? who are working putting LInux/Familiar on iPAQ 3900 and 1900 J.Manrique http://www.asturlinux.org/~jsmanrique Users Club from Gij.97n http://www.etsiig.uniovi.es/asociaciones/clubusu #1077 HPCC Member http://www.hpcc.org i wonder how many times (and how fast) they keep changing OSs. they > already have a new one for the PC (called long horn or something like > that)that works like linux! instead of fixing the old ones, they keep > making new ones so that they get free of any guilt and create revenew. > they have been circling around and now they are getting closer to > linux. it wouldn't surprise me if later on they claim that they > invented linux (under a different name). oh well ... > > I have got a Toshiba e310 with an ARM porcessor (200MHz) and 32MB > It looks good with this machine ! Now you can find PPC with 400MHz > processor > and 64Mb > You would actually be surprised. > I have a Jornada 568 (StrongArm at 206Mhz) and the machine seems to be faster than the latest XScale at 400Mhz. At least that how it *feels* (I've tried with two XScale machine). Display on these new pocket PC were slow as > hell, and not very responsive.. > XScale so far seems to be a joke really. Only thing I liked about the > XScale > unit (Siemens Loox) was the CF type 2 slot plus SD. On my Jornada I only > have CF type 1 so I can't use my microdrive with it. > Wolfgang, we're still waiting to see your version! Werner Excuse my bad english. I have a big problem with my hp49g. I try a sys-rpl program today(a part of MoonLight), and now is my hp49 not working. I see only the Try to recover memory screen, and I can do anything. The yes [F1]-key and the no [F6]-key doensn't work, and when I try to use the [ON]-key the calculator make a continuous bip. I try all: [ON][C], [ON][F1][F6], [ON][F3][backspace], RESET on the back of the calculator, take out the battery, NOTHING!! It's terrible. I don't kwon what I should do. Please if someone know how to fix this problem, help me. Dimitri. > Excuse my bad english. > I have a big problem with my hp49g. I try a sys-rpl program today(a > part of MoonLight), and now is my hp49 not working. I see only the > Try to recover memory screen, and I can do anything. The yes > [F1]-key and the no [F6]-key doensn't work, and when I try to use When you press YES it may take quite a while (I've seen cases with 30 minutes). If you don't want to wait, simply press NO, but you will loose all your data. Otherwise, Press [ON] and [F3] at the same time. If it fails again, then try pressing [ON]-[F3] and just when you release these two keys, press and hold the backspace key until you see the home screen. Then using the filer delete the corrupted object. If you do not get anything happening with your calculator, then using a paperclip press the reset button in the back of the calculator for about 5s. Then press the ON key and see what happens.. Forget what you've read in other messages like using P0ERASE this has to be used ONLY when the upgrade from rom 1.19-4 (and before) to 1.19-5 or 1.19-6 fails. In your case I doubt reflashing the calculator will be of any help as I've never seen a SysRPL program damaging the flash. Just pressing the right key will make it work for you > In your case I doubt reflashing the calculator will be of any help as I've > never seen a SysRPL program damaging the flash. > I might be the first... Yesterday I was running bzDIR and accidentally pressed ON during the operation. The calculator went dead, and I had to use the hardware reset to get the HOME screen to appear. No keys worked except ON-combinations. I tried ON-A-F and got TTRM, but it ignored Yes and No. I tried rebooting with the backspace pressed and it made no difference. So I ran the ON-D diags and it said that there was a CRC failure in Bank 1. I reflashed the ROM and everything is now fine. Including the SysRPL version of bzDIR that seemed to cause it. Bill I try all possible. The problem with my hp49g is: I can't use any key, I can't access any diagnostic mode, I also can't reboot, and I can't access download menu. I can't use any combination with [ON]. I just see the try to recover memory screen when I click [ON], and the only key that responds is the [ON]-key with a continuously bip bip bip ... as long as I press [ON]. I just see the small sablier, sand glass(that show that the calculator is doing something). I tried already to reset the HP49G on the back of the calculator(I thing more than 50 times). I try to remove the battery for more thant 12 hours(it's was a tip of the [ON]-key for more than 5 mn(Also a tip from Prof. Wolfgang Rautenberg), but I get nothing, only this bip. I really don't know what I should do. It's terrible that only because of a software problem I'm not more able to use my hp. I hope I will fix this problem(with any means necessary). I don't want to use my hp as a very cool paperweight(I read this joke in one of the answer). I am not able(it's a little bit expensiv for me) to get a brand new calculator. Regard. Excuse my bad english. > I have a big problem with my hp49g. I try a sys-rpl program today(a > part of MoonLight), and now is my hp49 not working. I see only the > Try to recover memory screen, and I can do anything. The yes > [F1]-key and the no [F6]-key doensn't work, and when I try to use When you press YES it may take quite a while (I've seen cases with 30 > minutes). > If you don't want to wait, simply press NO, but you will loose all your > data. Otherwise, Press [ON] and [F3] at the same time. > If it fails again, then try pressing [ON]-[F3] and just when you release > these two keys, press and hold the backspace key until you see the home > screen. > Then using the filer delete the corrupted object. If you do not get anything happening with your calculator, then using a > paperclip press the reset button in the back of the calculator for about 5s. > Then press the ON key and see what happens.. Forget what you've read in other messages like using P0ERASE this has to be > used ONLY when the upgrade from rom 1.19-4 (and before) to 1.19-5 or 1.19-6 fails. > In your case I doubt reflashing the calculator will be of any help as I've never seen a SysRPL program damaging the flash. Just pressing the right key will make it work for you hi Dimitri ! I have the same problem ! nothing works... BUT, i have TWO calcs in the same situation. Both death ! IÇve opened one of them, i need some information of how erase the flash manualy, and i mean, over the chip ! hi, Did you try to reboot with [ON]+[F4],[Q]+[BACKSPACE]? The right timing of pressing the backspace is important. If you still should have acces to diagnostic mode ([ON]+[F4]) you can try to reinstall the OS. I assume you have the connectivity kit. If this still doesnt work you can manually format your flash-rom (port 2). I had to do this once to make my calc work again. There is also a program at www.hpcalc.org you could try. The name of the program is P0erase. Hope this helps Good luck Dimitri Missoh schrieb im Newsbeitrag > Excuse my bad english. > I have a big problem with my hp49g. I try a sys-rpl program today(a > part of MoonLight), and now is my hp49 not working. I see only the > Try to recover memory screen, and I can do anything. The yes > [F1]-key and the no [F6]-key doensn't work, and when I try to use > the [ON]-key the calculator make a continuous bip. > I try all: [ON][C], [ON][F1][F6], [ON][F3][backspace], RESET on the > back of the calculator, take out the battery, NOTHING!! > It's terrible. I don't kwon what I should do. > Please if someone know how to fix this problem, help me. > Dimitri. I just remembered that he program P0erase makes only sense in case your upgrade process went wrong and you don't have acces to the download menu anymore. The other post above helped me to remember about some other post covering similar problems with hp49g in unusable states. Here is a more detailed guide to bring your calc back to life. Most of this things mentioned you have allready tried. But as an example pressing the backspace at the exactly right time while rebooting the calc is not that easy but important, so you have to try maybe a few times till it works. (make sure you're using new batteries before trying this!!) 1) Press [ON]&[F3] to reboot the calc and while rebooting the backspace key (try this several times as the right timing to press the backspace key is important) if it fails ... 2) Reset your calc with a paperclip (there is a hole on the back of thecalc) if it fails ... 3) try to reset with [ON]&[F4] -Q and press the backspace-key while rebooting (this way an eventually broken lib won't be attached, Don't forgetto delete the broken libs) if it fails ... 4) Reset your calc with [ON]&[F1]&[F6] if it fails ... 5) Download the OS again if it fails ... 6) If you don't have acces to the download menu anymore use P0erase (makes only sense if your upgrade process failed before) 7) Install the OS again if it fails ... 8) Erase bank 8-15 (Port 2) manually, do this in the download-menu. if it fails ... 9) Take the batteries out for some days if it fails ... you have now a very cool paperweight If the unit is still under warranty get a replacement. I am just reposting a fix someone else posted about a similar problem, try what is suggested below, hope it works. Stan. --------- try to reboot with [ON]&[F4] - Q and press while rebooting the backspace-key (The broken lib won't be attached this way). If the library is causing the problems this should solve it. Don't forget to purge the broken lib with the filer. BTW: The program P0erase ist just to be used if the upgrade-process goes wrong and you don't even have acces to the download menu anymore. Hope this helps ---------- > I suppose Frido's and 's conversation was too much temptation for the > gods of calculator mischief ... > A newbie never would have installed such adventurous libraries Well, after waiting a week I finally received my first brand new graphing > calculator. I've owned it for about 6 hours now. So I am definitely a > complete newbie. First few things I did: > 1. changed the mode to RPN and set key beep on > 2. installed stat49pr.lib and played with it for a while (worked fine as > far as I could tell) > 3. upgraded the flash rom to 1.19-6 (following the instructions exactly to > the letter!) > 4. Tested the upgrade -- stat49pr performed OK so I felt the reflashing > was successful tho, crucially, I did not turn the calculator off in this > time. Went away to my statistics lecture this evening and when I returned home > went to play some more. To my great disappointment have discovered the > HP49G no longer fires up when I press ON. It will do so after I reset with > a paper clip and after I press ON several times in a row (sometimes it takes > dozens of ON presses before it boots!). Then it seems to refuse to turn on > again until I perform another paper clip reset. Everything works well when > the calculator finally turns on, but it just takes many attempts with the ON > key before it actually fires up. The ON key seems to work OK -- in keyboard > tests (when I can get ON + F4 to work), the ON key performs flawlessly, just > not from cold boot. In attempting to fix things, I have: > 1. reflashed to 1.19-6 > 2. read every help-me file on hpcalc.com > 3. discovered hp.com is virtually useless (sorry HP) > 4. p0erased my calculator > 5. reflashed to 1.18 With no success -- the ON key only sometimes turns the calculator on, and > mostly not! Is there some way of getting the calculator back to a virgin > state and then rebuilding from there? I'm guessing also that I haven't yet > returned the machine config to pure virginity because it has preserved its > keyboard beep flag state thru everything I have done. So nothing works! Is this normal! Can anyone help??? Please? I'm > totally, utterly desperate! > rey Jones >Excuse my bad english. >I have a big problem with my hp49g. I try a sys-rpl program today(a >part of MoonLight), and now is my hp49 not working. I see only the >Try to recover memory screen, and I can do anything. The yes >[F1]-key and the no [F6]-key doensn't work, and when I try to use >the [ON]-key the calculator make a continuous bip. >I try all: [ON][C], [ON][F1][F6], [ON][F3][backspace], RESET on the >back of the calculator, take out the battery, NOTHING!! >It's terrible. I don't kwon what I should do. >Please if someone know how to fix this problem, help me. >Dimitri. No, I mean integers. Is 1.2 allowed, for instance? > Hmm, it seems that Stefan is not there anymore to tell us. Anyway, > even if reals are present, does this make any difference? Nick. Yes Nicks program does it all! Sorry Guys,....I have been realy busy > lately.....and I am tinking about a new challenge! But don't expect a fast solution from me. Greeks and fast, well that doesn't work! Nick. P.S.: The other challenge of course is to fill the gap: Greek and __________, well that works! > Hmm, it seems that Stefan is not there anymore to tell us. Anyway, > even if reals are present, does this make any difference? For my ultrafaaast solution it did > Hmm, it seems that Stefan is not there anymore to tell us. Anyway, > even if reals are present, does this make any difference? For my ultrafaaast solution it did > May we see it? Arrrrrff! Arrrfff! Slow-Head-Nick. > May we see it? Arrrrrff! Arrrfff! Well, it was a SysRPL solution, but I opted for flexibility. My UserRPL program is this: << DUP AXL DUP OBJ-> SWAP 1. ROT 1. - START IF DUP2 >= PICK3 0. <= OR THEN SWAP END DROP NEXT POS IF OVER TYPE 3. == THEN [0.] ELSE [0] END REPL >> #CF65h @ 121 bytes. I compared with the fastest version of your program, #18A5h @ 125 bytes. It's pretty funny - all my UserRPL attempts landed very near 125 bytes. It must be a natural constant There is a big difference in speed when using my program - depending on whether the vector is numeric (type 3) or symbolic (type 29). Below when comparing random generated vectors, the two comparable timings are of course done with the _same_ vector: Type 29: [ 0 0 2300 0 250 8000] 'NickProg' RCL TEVAL -> 1.43 s. [ 0 0 2300 0 250 8000] 'MyProg' RCL TEVAL -> 1.08 s. {50} RANM 'NickProg' RCL TEVAL -> 10.51 s. {50} RANM 'MyProg' RCL TEVAL -> 8.92 s. {300} RANM 'NickProg' RCL TEVAL -> 64.25 s. {300} RANM 'MyProg' RCL TEVAL -> 60.23 s. Type 3: [ 0 0 2300 0 250 8000] 'NickProg' RCL TEVAL -> 1.13 s. [ 0 0 2300 0 250 8000] 'MyProg' RCL TEVAL -> 0.29 s. {50} RANM 'NickProg' RCL TEVAL -> 6.94 s. {50} RANM 'MyProg' RCL TEVAL -> 1.08 s. {300} RANM 'NickProg' RCL TEVAL -> 42.48 s. {300} RANM 'MyProg' RCL TEVAL -> 5.71 s. > May we see it? Arrrrrff! Arrrfff! Well, it was a SysRPL solution, but I opted for flexibility. My UserRPL > program is this: << DUP AXL DUP OBJ-> SWAP 1. ROT 1. - START IF DUP2 >= PICK3 0. <= OR THEN > SWAP END DROP NEXT POS IF OVER TYPE 3. == THEN [0.] ELSE [0] END REPL #CF65h @ 121 bytes. I compared with the fastest version of your program, > #18A5h @ 125 bytes. It's pretty funny - all my UserRPL attempts landed very > near 125 bytes. It must be a natural constant What? Isn't it 42? > There is a big difference in speed when using my program - depending on > whether the vector is numeric (type 3) or symbolic (type 29). Below when > comparing random generated vectors, the two comparable timings are of course > done with the _same_ vector: > ---snipped experimental results. The results of your experiments boil down to: Greek code is slow! Nick. > May we see it? Arrrrrff! Arrrfff! Well, it was a SysRPL solution, but I opted for flexibility. My UserRPL > program is this: << DUP AXL DUP OBJ-> SWAP 1. ROT 1. - START IF DUP2 >= PICK3 0. <= OR THEN > SWAP END DROP NEXT POS IF OVER TYPE 3. == THEN [0.] ELSE [0] END REPL >> Hmmm. Is it any faster if # are used? Who will test - Nick? << DUP AXL DUP OBJ-> R->B #2 SWAP START IF DUP2 >= PICK3 0. <= OR THEN SWAP END DROP NEXT POS OVER TYPE 3. == [ 0. ] [ 0 ] IFTE REPL >> PS: I shaved off some bytes. Can WR make it any smaller? > May we see it? Arrrrrff! Arrrfff! > Well, it was a SysRPL solution, but I opted for flexibility. My UserRPL > program is this: > << DUP AXL DUP OBJ-> SWAP 1. ROT 1. - START IF DUP2 >= PICK3 0. <= OR THEN > SWAP END DROP NEXT POS IF OVER TYPE 3. == THEN [0.] ELSE [0] END REPL Hmmm. Is it any faster if # are used? > Who will test - Nick? > << DUP AXL DUP OBJ-> R->B #2 SWAP START IF DUP2 >= PICK3 0. <= OR THEN > SWAP END DROP NEXT POS OVER TYPE 3. == [ 0. ] [ 0 ] IFTE REPL > PS: I shaved off some bytes. Can WR make it any smaller? Test results: ----------------------------------------------------- Depencence of vector size, vector with exact integers [1 2] .3722 .3728 [1 2 3] .5559 .5566 [1 2 3 4] .7394 .7405 [1 2 3 4 5] .9242 .9255 [1 2 3 4 5 6] 1.1086 1.1102 [1 2 3 4 5 6 7] 1.2946 1.2964 [1 2 3 4 5 6 7 8] 1.4801 1.4821 [1 2 3 4 5 6 7 8 9] 1.6672 1.6696 Linear fits Veli-Pekka your code seems to lag 100 microseconds independently of the size of the vector with exact integers. The size dependence is linear for both. ----------------------------------------------------- ----------------------------------------------------- Depencence of vector size, vector with reals. (I write the numbers in the vectors as integers to save width.) [1 2] .2096 .2097 [1 2 3] .2272 .2274 [1 2 3 4] .2444 .2446 [1 2 3 4 5] .2618 .2621 [1 2 3 4 5 6] .2792 .2795 [1 2 3 4 5 6 7] .2966 .2971 [1 2 3 4 5 6 7 8] .3138 .3142 [1 2 3 4 5 6 7 8 9] .3313 .3319 Linear fits vectors it gets faster and faster. ----------------------------------------------------- ----------------------------------------------------- Depencence of location of position element in vector vector with exact integers. [1 2 3 4 5 6 7 8 9] 1.6656 1.6688 [2 1 3 4 5 6 7 8 9] 1.671 1.6697 [2 3 1 4 5 6 7 8 9] 1.6705 1.6732 [2 3 4 1 5 6 7 8 9] 1.674 1.6765 [2 3 4 5 1 6 7 8 9] 1.6771 1.6799 [2 3 4 5 6 1 7 8 9] 1.6804 1.6831 [2 3 4 5 6 7 1 8 9] 1.6838 1.6688 [2 3 4 5 6 7 8 1 9] 1.6656 1.6864 [2 3 4 5 6 7 8 9 1] 1.687 1.6895 Exponential fits ----------------------------------------------------- ----------------------------------------------------- Depencence of position of smallest element in vector vector with reals. (I write the numbers in the vectors as integers to save width.) [1 2 3 4 5 6 7 8 9] .3319 .3331 [2 1 3 4 5 6 7 8 9] .3341 .3348 [2 3 1 4 5 6 7 8 9] .3372 .3379 [2 3 4 1 5 6 7 8 9] .3402 .3409 [2 3 4 5 1 6 7 8 9] .3433 .3441 [2 3 4 5 6 1 7 8 9] .3462 .347 [2 3 4 5 6 7 1 8 9] .3492 .3501 [2 3 4 5 6 7 8 1 9] .3529 .3539 [2 3 4 5 6 7 8 9 1] .3561 .3569 Exponential fits ----------------------------------------------------- Any other tests to carry out? Nick. (The test dummy ) So a float counter is faster. You surely tested them throughoutly. PS: WR *did* make it smaller !! > So a float counter is faster. No, a bint counter is definetely faster, but you also changed the IF-structure to IFTE, which is ALOT slower (albeit slightly smaller). > PS: WR *did* make it smaller !! Small is easy - I always opt for speed. That must be a Saturn-disease > No, a bint counter is definetely faster, but you also changed the > IF-structure to IFTE, which is ALOT slower (albeit slightly smaller). > PS: WR *did* make it smaller !! Small is easy - I always opt for speed. That must be a Saturn-disease I've the same disease. I wouldn't even try anymore to program a more advanced task in UsrRPL. I did bit unfair to compete with UsrRPL for speed in this case ? - Wolfgang > Isn't it a > bit unfair to compete with UsrRPL for speed in > this case ? I'd say so > << DUP AXL DUP OBJ-> R->B #2 SWAP START IF DUP2 >= PICK3 0. <= OR THEN > SWAP END DROP NEXT POS OVER TYPE 3. == [ 0. ] [ 0 ] IFTE REPL > PS: I shaved off some bytes. Can WR make it any smaller? First of all, you always saves bytes by processing a UsrRPL-program with ->XU from OT49 Please remember that writing even small arrays like [0.] and [0] explicitely in a program, cost a lot of bytes. [0.] has 20.5 bytes. It's better if the program << ... == 0. 0 IFTE 1 ROW-> REPL >> in your program which should save about 15 bytes. Ask Werner to make it still smaller ... - Wolfgang Werner? PS: Since NIck Pavlov is always willing to test I have some ideas: Use MIN or MAX..are negatives allowed? What if ALL numbers are negatives? What were the limiting factors of the original problem? Why not use EPSX0? ... > << DUP AXL DUP OBJ-> R->B #2 SWAP START IF DUP2 >= PICK3 0. <= OR THEN > SWAP END DROP NEXT POS OVER TYPE 3. == [ 0. ] [ 0 ] IFTE REPL > PS: I shaved off some bytes. Can WR make it any smaller? First of all, you always saves bytes by processing > a UsrRPL-program with ->XU from OT49 Please remember that writing even small arrays like > [0.] and [0] explicitely in a program, cost a lot of > bytes. [0.] has 20.5 bytes. It's better if the program > << ... == 0. 0 IFTE 1 ROW-> REPL > in your program which should save about 15 bytes. > Ask Werner to make it still smaller ... - Wolfgang Seen: > you always saves bytes by ... > writing even small arrays ... costs a lot of bytes. [0.] has 20.5 bytes... > simply write... in your program which should save about 15 bytes. Sounds as if there's a lot of byte-saving talent here, which could well have been used by a famous bloatware company, and could have saved us billions of bucks in hardware costs (probably could have been ten times as fast, too, as well as vastly less buggy and vastly more secure). Would that there were a way to connect the world's best talent with its most important projects. . The secret deal with hardware vendors and MS prevents this. Instead they use talented people to do the opposite! > Seen: > you always saves bytes by ... > writing even small arrays ... costs a lot of bytes. [0.] has 20.5 bytes... > simply write... in your program which should save about 15 bytes. Sounds as if there's a lot of byte-saving talent here, > which could well have been used by a famous bloatware company, > and could have saved us billions of bucks in hardware costs > (probably could have been ten times as fast, too, as well as > vastly less buggy and vastly more secure). Would that there were a way to connect the world's best talent > with its most important projects. And what was that (please quota the challenge, too - I forgot it already) > Hmm, it seems that Stefan is not there anymore to tell us. Anyway, > even if reals are present, does this make any difference? For my ultrafaaast solution it did Nick Karagiaouroglou :: >Please do send it. >>X >have not published my clock program, because it uses fonts and some >structures from <-RPL-> package, so it is not completely written by me, >and there are lot of time display programs on hpcalc.org. But if there >is interest towards it then I can send it to hpcalc.org. >>Best wishes, >>Robert Tiismus > Yes, Robert, send that please! I am not going to submit executable, because I think of it more as > the programming example than utility. It will hopefully appear there > today under the name IDClock and sections Docs/Programming and Utils/Time. Best wishes, Robert Tiismus. browser every two minutes, to see if hpcalc is updated. (Without falling in light sleep between the clicks ) Nick. Nick Karagiaouroglou :: > browser every two minutes, to see if hpcalc is updated. (Without > falling in light sleep between the clicks ) Sorry. I did not expect the HPCalc.org to be so slow. The code can be fetched now also from: http://www.physic.ut.ee/~robert/english/hpsoft/IDClock.zip Robert Tiismus. X > browser every two minutes, to see if hpcalc is updated. (Without > falling in light sleep between the clicks ) > Nick. THAT'S why there has been trouble with the www.hpcalc.org bandwidth Nick has been hogging it all the time !!! Please Nick! You don't have to keep on clicking. PS: I fall into light sleep every now and then... > X > browser every two minutes, to see if hpcalc is updated. (Without > falling in light sleep between the clicks ) > Nick. THAT'S why there has been trouble with the www.hpcalc.org bandwidth > Nick has been hogging it all the time !!! > Please Nick! > You don't have to keep on clicking. > PS: I fall into light sleep every now and then... Oops, I talked too much and now the got me! Am I going to be put in coma mode for that? Nick. I still can't make it work. when I enter (15, GreenRighShift6 90) I get (15*90) which is 1350 and not (15 arg 90). I can enter (15;16) in EQW but it is rectangular and not polar. > Hallo > How do i enter (15 < 90) i the EQW, where < is the angle sign? ( 15 , < 90) where < is GreenRighShift + Ciao, Andrea > I still can't make it work. when I enter (15, GreenRighShift6 90) I get (15*90) which is 1350 and not > (15 arg 90). I can enter (15;16) in EQW but it is rectangular and not polar. You can't enter number in polar forms in the EQW. EQW aim is to edit expression, and the HP49 doesn't support automatic polar form with symbolic expression. > I still can't make it work. > when I enter (15, GreenRighShift6 90) I get (15*90) which is 1350 and not > (15 arg 90). > I can enter (15;16) in EQW but it is rectangular and not polar. You can't enter number in polar forms in the EQW. > EQW aim is to edit expression, and the HP49 doesn't support automatic polar > form with symbolic expression. > Is it possible to make the EQW to understand lists (using internal list processing?) so that we could continue after multiple answers and also be able to use in the EQW those commands that require a list as argument... Just a thought... X > You can't enter number in polar forms in the EQW. > EQW aim is to edit expression, and the HP49 doesn't support automatic polar > form with symbolic expression. Is it possible to make the EQW to understand lists > (using internal list processing?) > so that we could continue after multiple answers and > also be able to use in the EQW those commands > that require a list as argument... > Just a thought... Hey, my EQW is better than yours :P -- > Is it possible to make the EQW to understand lists > (using internal list processing?) > so that we could continue after multiple answers and > also be able to use in the EQW those commands > that require a list as argument... > Just a thought... Hey, my EQW is better than yours :P > Yours?! No *MINE* is better: http://www.hpcalc.org/details.php?id=4360 It has only two bugs and one feature A) the contents of EXPMUL2SUMEXP and SUMEXP2EXPMUL have been accidentally SWAPped B) You need an extra EVAL in Solving VY Good luck in fixing those (you will learn a lot) PS: The selection of one root out of several is working ok. There is even a picture of it. > Is it possible to make the EQW to understand lists > (using internal list processing?) > so that we could continue after multiple answers and > also be able to use in the EQW those commands > that require a list as argument... > Just a thought... No. The EQW understand editing on one object, not multiple ones Then one should really use my STARTEQW http://www.hpcalc.org/details.php?id=4360 It has only two bugs and one feature A) the contents of EXPMUL2SUMEXP and SUMEXP2EXPMUL have been accidentally SWAPped B) You need an extra EVAL in Solving VY Good luck in fixing those (you will learn a lot) PS: The selection of one root out of several is working ok. There is even a picture of it. > Is it possible to make the EQW to understand lists > (using internal list processing?) > so that we could continue after multiple answers and > also be able to use in the EQW those commands > that require a list as argument... > Just a thought... No. > The EQW understand editing on one object, not multiple ones I have asked this question earlier but recieved no satisfying answers, > so, how is it possible to wire up an 48 G to print normal ascii code > to a, lets say Canon BJ-10SX? Or any other brand that accepts ASCII > print out, for that matter. > I also have access to the HP 4L laserjet and yes I have tried using > the PCLPRINT - anybody seen that work? I would love to be able to > print my strings on a normal printer instead of using the thermal > printer... The 48GX and PCLPRINT with an HP LaserJet Series II works with no problem, > using the printer's serial port. Just make sure that the baud rate etc are > the same on both ends, and if that doesn't work try throwing a null modem > doohickey onto the serial end of your cable (in case lines 2 and 3 need to > be swapped, as the Fates decree). If your printer only has a parallel port, a parallel-to-serial converter > should do the trick. Getting full-page printouts from the 48 is very nice indeed. Let us know if > you still have problems with it. > PS: Make sure that you have the G/GX version of PCLPRINT! The older version > only works on the 48S/SX. the standard parallel cable for my PC with HPÇs 9-25 pin converter and standard HP -48 wire. Could it be that I cannot find the correct baud rate for the HP 4L, the 9600 I tried using might then be wrong. IÇll try some other rate and come back. /Matti You can find emulators for the HP49G at www.hpcalc.org in the emulators section. I use the EMU48 with Windows XP just fine. Most programs designed for windows 2000 also work with XP (cross your fingers!) As for developing, I too use wordpad or other simple text editor. Make sure you save a text only with no formatting. I do all the development on the PC with the emulator, and let MASD assemble it in EMU48. The only transferring done is on completion. EMU48 even lets you save different versions of your calculator loaded with various programs and settings! Dennis There will be a new PC compiler environment any day now! www.hpcalc.org has a bunch of old tools and two emulators. Use search. > Where can i get a good emulator for HP 49 G on Windows XP ? And a > Sys-RPL editor for Windows XP ? May you help me ? I think iÇm spending > a lot of time trying to program in Windows NotePad, transferring it to > HP by HP PC Connectivity Kit and then compiling using MASD in HP 49 G. > ItÇs good for small programs and when the programs are ok. But itÇs > not good for developing and testing. > Wouldn't everyone who uses it be interested? I am! Why not post it? Or upload it to www.hpcalc.org? Dennis > Why not post it? Or upload it to www.hpcalc.org? Alain is trying to contact with the author for the uploading. This is the trick I received from Alain: >to modify the library, you must first crack it with libcracker 1.53. Then, decompile the file XL09 then change >the sequence starting with 220000222200000002 with 220000222200000022 (2 is gazeous, 0 is solid). >Recompile XL09. Recreate the lib. Et voil.88 ! >Ciao ! >Alain Robillard He sent to me the 49 version (that I don't need) and I used his trick for correcting my 48 version. If you don't have the tools for doing the work, I'll send you the final library. http://vader.brad.ac.uk/finance/tfp.html A quote from this homepage: Take a look at the chart produced by Tomorrow's Financial Pages. It shows the S&P 500 futures contract to October 2001. I chose this contract as it is well known to many readers and is a great favourite among professional traders. Curiously, TFP does not predict the CLOSE of the S&P very well but is astonishingly good at predicting the OPEN! This opens up the novel idea of the Night Trader, run the figures through TFP just before market close to get a prediction of tomorrow's open and take an appropriate position just before market close. How does he calculate this?? I need a good electrotehnics program for my 48gx. Does anyone have a clue what to get and where ? -- Fico Try to go on http://www.hp-network.com/hardware I dont know very well what there's in this part, but check if you can find smthg :) NB: this web site is in french ! Eric Vialle as611s$5crl$1@as201.hinet.hr... > I need a good electrotehnics program for my 48gx. > Does anyone have a clue what to get and where ? -- Fico --------------------------------------------------------------------- Is there an official web address (v.s. a mirrored site) where I can get the most recently updated pages? Toby boundary=----=_NextPart_000_0027_01C29729.FB9A9360 --------------------------------------------------------------------- Check http://hpcalc.beachnet.org/ ... and yes, that's the latest update... Carlos ---------------------------------------------------------------------------- ---- Is there an official web address (v.s. a mirrored site) where I can get the most recently updated pages? Toby I thought that rpn was supposed to be fast and efficient, but ever since i switched from my 89 to a 48gx it hasnt been the case. Am i doing something wrong? for simple problems such as 5+6+6+7 , a TI would only require 8 keystrokes...yet i find myself doing 5 SPC 6 SPC 6 SPC 7 +++ on my hp...which is a total of 10 keystrokes. i know i could have done 5ENTER 6+ 6+ 7+ but that doesnt work for all problems...considering that u have to worry about order of operation. FURTHERMORE...i find it tedious when it comes to simple problems such as 6+5*6-6/7. The TI automatically takes care of order of operations for me. With the hp i have to always keep order of operation in mind when keying in the number. That doesnt bother me for short problems...but it would be really annoying for longer ones. the hp doesnt seem to know that it has to do 5 * 6 and 6/7 first before doing the subraction and addition...well unless i use the delimiter button...which is another keystroke. Am i missing something...please help a newbie out. The baby has arrived today: an old Casio fx 4000P that I've bought for 6? in ebay last week. Just nostalgia. It was one of the most desired calculators among my classmates while we were studing Chemistry in the middle of the 80's: one of the first affordable alphanumeric calculators, and one of the first pure algebraic, where you can write normal: sin 30, ln 2, etc. And best of all, 550 prg steps! I have been playing and programming it, now, comparing it with the 15C (1982). The Casio is quicker: calculating P100,50 takes more than 7 seconds in the hp but it's almost instantaneus in the casio. Its alphanumeric screen is beatiful. Its statistical capabilities are better ( I need a program for entering 1 var or 2 var with freq in the hp)... and nothing else The hp is solid and durable. The keyboard is much better (not as those casio very little keys). It's humble segment screen is big and easy readable. And the matrix operations, a blessing. BUT above all, RPN is much efficient than the algebraic system: is very boring pressing ANS all the time and most of prgs are 30-50% shorter in RPN. As Jean Lemire has posted, RPN is THE way. > The Casio is quicker: calculating P100,50 takes more than 7 seconds in the > hp but it's almost instantaneus in the casio. Almost instantaneous on the TI-89 as well (less than 0.1 second). -- > The Casio is quicker: calculating P100,50 takes more than 7 seconds in the > hp but it's almost instantaneus in the casio. Almost instantaneous on the TI-89 as well (less than 0.1 second). As on the hp48. > The Casio is quicker: calculating P100,50 takes more than 7 seconds in > the > hp but it's almost instantaneus in the casio. > Almost instantaneous on the TI-89 as well (less than 0.1 second). As on the hp48. Hmm, so I guess the HP49G took a step back in this. I'm assuming that when you say the hp you mean the HP49G. -- > The Casio is quicker: calculating P100,50 takes more than 7 seconds in > the > hp but it's almost instantaneus in the casio. > Almost instantaneous on the TI-89 as well (less than 0.1 second). > As on the hp48. Hmm, so I guess the HP49G took a step back in this. I'm assuming that > when you say the hp you mean the HP49G. I think my post is clear: I have been playing and programming it (casio fx 4000p), now, comparing it with the 15C (1982). I did not talk about the 49, which I don't own. For P100,50, TEVAL gives me a time of 0.1034s on my 48GX. > ...I have been playing and programming it (casio fx > 4000p), now, comparing it with the 15C (1982). I Don't know another calculator that works almost 20 years on the same batteries, obviously that it should be a function of the speed... Tal any day. I surely hope HP will re-introduce it the same way that the HP 12C was, but with no brakes on speed. I don't need the batteries to last for 20 years, not even 20 moths, 20 weeks sound better and I would settle for 20 days, if the speed is great !! > ...I have been playing and programming it (casio fx > 4000p), now, comparing it with the 15C (1982). I Don't know another calculator that works almost 20 years on > the same batteries, obviously that it should be a function of > the speed... Tal > Hmm, so I guess the HP49G took a step back in this. I'm assuming that > when you say the hp you mean the HP49G. I think my post is clear: I have been playing and programming it (casio fx > 4000p), now, comparing it with the 15C (1982). Argh! Sorry. . We should now go back to number crunching and feed a 16x16 numerical matrix to both TI 89 & HP 49 and see which one is faster in inverting it. PS: try 32z32, too! (It may not fit into a puny TI - hee, hee) Ti sucks in matrix inversion and big time, 2. > The Casio is quicker: calculating P100,50 takes more than 7 seconds in > the > hp but it's almost instantaneus in the casio. > Almost instantaneous on the TI-89 as well (less than 0.1 second). As on the hp48. We should now go back to number crunching > and feed a 16x16 numerical matrix to both TI 89 & HP 49 > and see which one is faster in inverting it. > We can have a contest, but give me a little time. -- P.S.: Maybe this contest could be held at the HPTICC '03? > We should now go back to number crunching > and feed a 16x16 numerical matrix to both TI 89 & HP 49 > and see which one is faster in inverting it. > > PS: try 32z32, too! (It may not fit into a puny TI - hee, hee) > Ti sucks in matrix inversion and big time, 2. I'm sure, but I don't understand why started to talk about his famous TI-89... I was only comparing two old calculators of the 80's. Or better, comparing my feelings while playing with them. Sean, I was very much like you for a long time in that I couldn't 'get' RPN. I just couldn't figure out how to think in RPN mode. I guess I've had my HP49G for two years (first RPN calc for me) and I still consider myself a newbie, but about 6 months ago, and after visiting this newsgroup almost daily, something suddenly clicked and I haven't gone back. I still think RPN is difficult to read but its very easy to calculate in RPN. I don't know about you, but I have a little voice in my head whenever I perform calculations, either with paper or with a calculator. When it finally clicked, it was because I realized that I 'think' in RPN mode. Haha. Anyway, some very useful keys on the HP49G while working in RPN are 'ENTER' which duplicates the last entry on the stack (DUP command), and the right arrow, which swaps the last two entries on the stack (SWAP command). There's one last thing; when all else fails and you need to enter something as you read it while in RPN mode, just put it within single quotes. Simple enough. Hope this helps, - Ian > ... I just couldn't figure out how to think in RPN mode. > ... I still think RPN is difficult to read ... Let me make a few general remarks to this often discussed subject from the point of view of mathematic and language, with a few remarks on the historical background. Polish notation (PN) was not invented by Lukaciewicz alone but is a result of discussion in and achievements of the logical school in Lemberg (Lw.97w in Polish, today Lwiw in Ukrainean). At the begin of the 20th century, that school was a centre of logical research in Europe. PN served special tasks in axiomatizability of propositional logic and had been used until about 1950 in many scientific papers, mainly in the domain of propositional logic. When the basic questions of axiomatizability in logic were settled, also Polish logicians returned to algebraic notation in formalized languages throughout. How to explain this? It is a fact that our brain doesn't like consuming condensed information, like our stomac doesn't like to consume alcohol if not thinned below 5o%, say. In addition, our brain doesn't process information serially like a computer, but processes it in a very complex way by making pictures on the things. Thus, in descriptive math, no matter whether elementary or advanced, PN or RPN does not have the slightest chance to be accepted as a facon de parler. By the way, there'd been only a limited number of people like Lukaciewicz, Tarski and a few others who had trained their brains (like a blind chess-player, say) to read long formulas in PN. The situation is quite different in programming languages. Besides in the HPs, RPN is used in several well-established programming languages, in particular in POSTSCRIPT which is the language understood by all fast printers in the world. Why here RPN? Because the translation of POSTSCRIPT into printing action must be done fast and efficiently. There's no time for long-during compilation into mashine-language. The idea to use RPN it in programming calculator was one of the really great ideas of the Corvallis team. It was perhaps a kind of a game to use it not only in programming languages but also in direct manipulation of the keyboard. It was also no bad idea to integrate both approaches in a single operating system on the HP49. But ACO made a basic mistake. They squeezed everything which, by its nature, is not algebraic, into an algebraic pattern. The worst example for me is the handling of a directory name. Why the name is first edited so that you've to press ENTER, with some mysterious NOVAL on the stack? This sometimes artificial avoiding of RPN caused that all former HP-users refused to use algebraic mode, not to say they hate it Also in math, from time to time the operation symbol is written *after* the argument, as an exponent, for instance. That makes operator-composition sometimes more lucid. Still more so in daily life where commands are often named and executed *after* the argument has been named. Thus, it would have been completely natural for somebody who has never heard on RPN to set a directory by just pressing on the directory's key. are not RPN commands by its very nature. There is no reason why the argument list should precede the PURGE command in direct manipulation (not in programming). On some key on my 49 there first appears an empty input list named Purge, just to be filled in to do the actual purging. Thus, on the level of direct action, a natural symbiosis of RPN and algebra is the best approach. like computing 1+2, there is no natural preference of first delivering the arguments, or waiting with the + on the next argument, except for a computer itself who prefers to get first the arguments for obvious reason. A computer is always happy with condensed information. But for a normal human being, the little pause of waiting for the second argument after having gotten the operation sign, seems to be useful for preparting the brain onto the task: Aha, there'll come something I'll have to add to the already given argument... On this very elementary level, it may also be solely a question of habit. - Wolfgang [an interesting, historical, and thoughtful discussion] > are not RPN commands by its very nature. I don't see what differentiates these from any other functions; you could equally prompt the user to fill in what follows COS, for example (just as does Algebraic mode input), save that you simply decided to make only certain of your own selected library commands interactive. > There is no reason why the argument list should precede the > PURGE command in direct manipulation (not in programming). > On some key on my 49 there first appears an empty input > list named Purge, just to be filled in to do the actual > purging. Like certain older HP calcs (e.g. HP41,HP42S) -- you press STO and then the calc prompts you to fill in two digits representing the register number. This was in part motivated by the fact that a combination of a command with an argument selected from a very restricted set (e.g. a register number) used to be combined into the internal keystroke programming codes, which is no longer an applicable consideration. A significant issue here is that this also creates an interactive-only arrangement; manually responding to a prompt is not ideal for programming, and makes it harder to generalize to a single style which fits manual use and programming equally well, particularly since the most general argument (or even a list of arguments) is one which could have been produced by an executing program, and which therefore can not in general be manually filled in, from a limited, pre-determined, static selection, following a prompt. In SysRPL, prefix commands (those that act on the next item in the runstream) have the chief value that they spare the programmer from needing to quote the argument to prevent its premature evaluation; in effect, the prefix command serves simultaneously as the quoting mechanism, thus saving 2.5 bytes each time (at the expense of a little extra execution time while the prefix command first transfers the arguments anyway from the return stack to the data stack). But squeezing more coding into limited ROM was more important at the time. can't be effected with SYSEVAL any longer in the HP49, because the decision to move SYSEVAL itself into a FlashPtr messed up the ability to have its target work on the runstream at all, indicating yet another value of putting arguments first on the data stack, in a completely consistent manner. As to algebraic capability, all algebraic calculators have to analyze syntax and compile, frequently rearranging the input; one virtue of the RPL-centric system is that compilation occurs only once, upon initial entry, with no run-time penalty, because the generated object is pure RPN; there is also a cost when it comes to displaying algebraic final results, because these have to be decompiled to change the internal RPN back into what the user thinks it should look like (this is what sometimes makes people think that the calc is slow at even elementary internal operations, when it's really the screen display time). I don't know how much trouble this was (or wasn't) for the CAS; say, Bernard, was it easier or harder to make a CAS in this environment (or was there nothing else to compare it to)? [r->] [OFF] . X > can't be effected with SYSEVAL any longer in the HP49, > because the decision to move SYSEVAL itself into a FlashPtr > messed up the ability to have its target work on the runstream at all, X Maybe this could be fixed in 1.19-7: JYA could move SYSEVAL back to basic ROM > are not RPN commands by its very nature. > I don't see what differentiates these from any other functions; > you could equally prompt the user to fill in what follows COS, > for example (just as does Algebraic mode input), Of course, from the purely syntactic point of view, there is no difference between PURGE and COS, say, except for semantics. Thus, programs should treat them alike. The difference is of practical nature, in direct execution. If making a mistake with COS there is no problem. But making it with PURGE may have serious consequences. As is known, actions of even the most experienced pilot or nuclear power engineer under concrete circumstances are correct only with some probability which, in addition, decreases dramatically under stress. least a choice to make an extra confirm of the action. Flag -76 of the HP49 sets a flag for this, but the flag is, unfortunately, only obeyed by the filer, not by the PURGE command from the TOOL menu. > On some key on my 49 there first appears an empty input > list named Purge, just to be filled in to do the actual > purging. I have this on the leftshift backspace key. Purging in this way doesn't make it only more safe but saves a lot of extra key strokes. IMHO, in direct manipulation from the keyboard of a calculator, minimizing the number of necessary key presses and combining it with a maximum of security for dangerous keys should have absolute priority. Programming may go its own way. Interrupting a program's run for manual prompting should be a decision of the programmer. > As to algebraic capability, all algebraic calculators have to > analyze syntax and compile, frequently rearranging the input; > one virtue of the RPL-centric system is that compilation occurs > only once, upon initial entry, with no run-time penalty, because > the generated object is pure RPN; there is also a cost when it comes > to displaying algebraic final results, because these have to be decompiled > to change the internal RPN back into what the user thinks it should look like > (this is what sometimes makes people think that the calc is slow at even > elementary internal operations, when it's really the screen display time). Yes. I would add that the HP49 saturn ship may be simply too slow to cover these additional needs. Although in this direction ACO did its best and sometimes even exaggerates, e.g., in cursor moving in the PICTURE environement. - Wolfgang I first learned RPN on my HP-45 in 1974 and to me it was THE way to go. In fact it is like I learned in school. For example if you want to add 734 and 136 what I learned was to put 734, then under it, 136, then add like: 734 + 136 ------ 870 With RPN : 734 ENTER 136 + The fun with RPN and a multi line display is that the stack shows the number as you would put them on paper to perform the operation by hand. As for the examples given by others work them the way it was explained in HP instruction books of that era (1970's). Type a number. Can you perform a monadic function on it (monadic means using only one argument, like SIN, SQRT, LOG, etc.). If yes, then do it. If no then press ENTER to push the number on the stack. Type another number. Can you perform a dyadic function (function with two arguments)with the one already on the stack and the one you have just typed. If yes, then do it, if no then press ENTER to push the number on the stack. With HP 48, 49 and the like, you can see the first few levels of the stack and keep an eye on what is going on. With older models like 45, 41, etc. having one line display you would use ROLL DOWN and X<>Y function to manipulate the stack and check intermediate values. So, for a more complex example like: e^3 + 7 / (4 + 5 / 6) You can type: 3 e^x 7 ENTER 4 ENTER 5 ENTER 6 / + / + For a total of 13 keystrokes. Of course you can perform this calculation from the deepest level like: 5 ENTER 6 / 4 + 1/X 7 * 3 e^x + for 12 keystrokes. Not a big saving. Or: 7 ENTER 5 ENTER 6 / 4 + / 3 e^x + Again 12 keystrokes. Hoping that helps a little. Jean Lemire from Montreal. I first learned RPN on my HP-45 in 1974 and to me it was THE way to > go. In fact it is like I learned in school. For example if you want to add 734 and 136 what I learned was to put > 734, then under it, 136, then add like: 734 > + 136 > ------ > 870 With RPN : 734 ENTER 136 + The fun with RPN and a multi line display is that the stack shows the > number as you would put them on paper to perform the operation by > hand. As for the examples given by others work them the way it was explained > in HP instruction books of that era (1970's). Type a number. Can you perform a monadic function on it (monadic means using only one > argument, like SIN, SQRT, LOG, etc.). If yes, then do it. If no then > press ENTER to push the number on the stack. Type another number. Can you perform a dyadic function (function with two arguments)with > the one already on the stack and the one you have just typed. If yes, > then do it, if no then press ENTER to push the number on the stack. > With HP 48, 49 and the like, you can see the first few levels of the > stack and keep an eye on what is going on. With older models like 45, > 41, etc. having one line display you would use ROLL DOWN and X<>Y > function to manipulate the stack and check intermediate values. So, for a more complex example like: e^3 + 7 / (4 + 5 / 6) You can type: 3 e^x 7 ENTER 4 ENTER 5 ENTER 6 / + / + For a total of 13 keystrokes. Of course you can perform this calculation from the deepest level > like: 5 ENTER 6 / 4 + 1/X 7 * 3 e^x + for 12 keystrokes. Not a big saving. Or: 7 ENTER 5 ENTER 6 / 4 + / 3 e^x + Again 12 keystrokes. Hoping that helps a little. Jean Lemire from Montreal. supposed to just typing in the numbers and getting a meaningless answer with the TI...but i'll have to spend some time getting used to RPN...heheh. > to just typing in the numbers and getting a meaningless answer with the > TI...but i'll have to spend some time getting used to RPN...heheh. At the risk of sounding slightly nuts, entering an equation into an algebraic calculator makes me feel like a typist; solving it in RPN is a lot more fun. Neill McKay > At the risk of sounding slightly nuts, entering an equation into an > algebraic calculator makes me feel like a typist; solving it in RPN is a > lot more fun. Neill McKay I guess it boils down to personal preference. Even though I am familiar with RPN and use Lars' RPN from time to time, I usually work with algebraic notation. -- P.S.: And I've never felt like a typist > FURTHERMORE...i find it tedious when it comes to simple problems such > as 6+5*6-6/7. The TI automatically takes care of order of operations > for me. With the hp i have to always keep order of operation in > mind when keying in the number. Erm, but what about (5+6)*(3+4)? Algebraic systems deal with the precedence of operations for you when it agrees with the predefined precedences, and only then. --tim Comments interwoven... > I thought that rpn was supposed to be fast and efficient, but ever > since i switched from my 89 to a 48gx it hasnt been the case. It takes a little getting used to. When I first got a HP49 (which is very nice btw), I thought most people in this newsgroup were nuts for liking such an arcane thing as RPN. Why complicate things? After a day of playing with the thing, It really seems alot easier to me. It just takes practice. Of course, some people will never like RPN... > Am i > doing something wrong? for simple problems such as 5+6+6+7 , a TI > would only require 8 keystrokes...yet i find myself doing 5 SPC 6 SPC > 6 SPC 7 +++ on my hp...which is a total of 10 keystrokes. i know i > could have done 5ENTER 6+ 6+ 7+ but that doesnt work for all > problems...considering that u have to worry about order of operation. Perhaps you are thinking about it the wrong way. Here's how I think about it. With algerbraic, you basically type the thing in as you see it and boom, the anwser appears. With RPN, you 'build' the equation step by step. EG for 5+6+7+8, I think: get 5. add 6, then add 7, then add 8 - which translates to 5 enter 6 + 7+ 8 + Not much of an advantage so far I'd admit. I > FURTHERMORE...i find it tedious when it comes to simple problems such > as 6+5*6-6/7. Do it like you would by hand - multiply 5 by 6, then add 6. work out 6 / 7 then subtract. 5 e 6 * 6 + 6 e 7 / - Again, no point for something like this. >The TI automatically takes care of order of operations > for me. With the hp i have to always keep order of operation in > mind when keying in the number. That doesnt bother me for short > problems...but it would be really annoying for longer ones. Here's a trickier problem. Solve: 5^(sqr(7*4^Pi))/(8*9/4+sqr(7^2+5^2)) (30 keystrokes) It would take me several tries to get that right via algerbraic. Put the brackets in the wrong spot and you get the wrong answer. The beauty of RPN here is that as you build the equation, mistakes are very easier to spot and correct. EG: Take 5. Work out 4 to the power of Pi. multiply that by 7. Sqr the result. Put the result as 5's power. etc. etc. etc. 5 e 4 e Pi ^ * sqr ^ 8 e 9 * 4 / 7 sq 5 sq + sqr + / (23 keystrokes) Looks hard like this, but when you have a screen in front of you it;s easy. Saving almost a third of keystrokes is a bonus. > the hp > doesnt seem to know that it has to do 5 * 6 and 6/7 first before doing > the subraction and addition... both a blessing and a curse. >well unless i use the delimiter > button...which is another keystroke. To be honest I don;t know what the delimeter button is... You mean those tick things? >Am i missing something...please > help a newbie out. Don't think of RPN as a painful chore brought to you by the old school elite (like I used to but rather as building an equation step by step. The biggest time saver is not having to correct your equation after mismatching brackets. Fewer keystrokes as well. Hope this helps, Al www.alborowski.tk > With the hp i have to always keep order of operation in > mind when keying in the number. That is. > the hp doesnt seem to know that it has to do 5 * 6 and 6/7 first before doing > the subraction and addition...well unless i use the delimiter > button... I n other cases, you will need to use () in your TI, don't you? Example: TI: :(4+5)/(1+2)= HP: 4 enter 5+1enter2+/ PS: Press ' and write algebraicly. Yous'll see how the hp does know to do * and / before + and - Which way is easiest to program in hp49. Can I use basic? I have a program written in visual basic and i want it in my hp49. How can I do that - simple way. Thanx The ussually languages of HP-49G are: 1) UsrRPL (User Reverse Polish Lisp). 2) SysRPL (System RPL) and ML (Machine Languages) They are not compatible with Visual Basic Language. Please see the FAQs. in ... http://ca-on.hpcalc.org Miguel Angel CAPORALINI HERK **************************************************************************** *** Which way is easiest to program in hp49. Can I use basic? > I have a program written in visual basic and i want it in my hp49. > How can I do that - simple way. Thanx In the Algebraic mode the URPL is changed to a more BASIC -like try it out...but with VB you're out of luck :-( > The ussually languages of HP-49G are: > 1) UsrRPL (User Reverse Polish Lisp). > 2) SysRPL (System RPL) and ML (Machine Languages) > They are not compatible with Visual Basic Language. > Please see the FAQs. in ... http://ca-on.hpcalc.org > Miguel Angel CAPORALINI HERK > **************************************************************************** *** > Which way is easiest to program in hp49. Can I use basic? > I have a program written in visual basic and i want it in my hp49. > How can I do that - simple way. > Thanx answer to my problem(try to recover memory-screen without reaction). some good tip. MY HP49G still alive > answer to my problem(try to recover memory-screen without reaction). > some good tip. So what did you do to get it working? > answer to my problem(try to recover memory-screen without reaction). > some good tip. > So what did you do to get it working? Dimitri is seemingly so happy on that his 49 returned to life that he has no time to read the NG at present. Therefore, and since some other people have asked for Do not be desperate! It will work, be patient I suppose you did everything advised to you by JYA. I had the same problem some time ago. It is unfortunately not correct what JYA says that no bad SysRPL can damage the ROM, in particular, if you still use a ROM older than 19-6. If everything runs wrong, keep the paperclip in the hole until the screen is black and nothing is running anymore. You then can set in any case the DOWNLOAD menu. Please manipulate delicately with pressing ON and at the same time ENTER and +. Clearly, you must have already prepared the PC and clicked on ROM 19-6 in order to start the downloading process. Read JYA's description once again. The best will be you have it on a toggling PC-screen or an outprint in front of you. Do everything only with fresh batteries! advised and didn't loose any user data in port 2 (which is seemingly never the case). Clearly, the rest is lost. Hallo Herr Professor Rautenberg, Ich habe alles gemacht wie Sie es mir beschrieben haben. Ich habe das OS neu installiert und alles funktioniert wieder. Ich weiss wirklich nicht wie ich mich bei Ihnen bedanken kann. Ich bin so erleichtert. Es war sehr nett von Ihnen mir zu helfen. Ich bin wirklich froh . Danke vielmals. Sie haben mir schon einmal(vor c.a einem Jahr wegen emacs fuer hp49) geholfen. Vielen Dank noch mal. - Dimitri - Wolfgang PS. I'm unable to prove that the ROM flash in rare cases can be it is caused by BZDir than it is not the one from OT49 X X Yes, but you didn't translate the answer so I try my 2nd best (in a hurry - as usual :) > Hallo Herr Professor Rautenberg, > Ich habe alles gemacht wie Sie es mir beschrieben haben. I have done everything as You it to me described have. > Ich habe das OS neu installiert und alles funktioniert wieder. I have the OS in new installed and evrything works again. > Ich weiss wirklich nicht wie ich mich bei Ihnen bedanken kann. I don't really know how to to thank you I can. > Ich bin so erleichtert. Es war sehr nett von Ihnen mir zu helfen. I am so reliefed. It was quite nice for You to me help. The best thing is that I did not loose any data (in port 2 naturally). > Ich bin wirklich froh . Danke vielmals. > Sie haben mir schon einmal(vor c.a einem Jahr wegen emacs fuer hp49) You have me once again (?? one year eith emacs for hp49 ??? ) > geholfen. helped.?????? > Vielen Dank noch mal. - Dimitri Br.9fder-Peter Yes please tell us. > answer to my problem(try to recover memory-screen without reaction). >> some good tip. So what did you do to get it working? > I couldn't have access to .92nternet on week-end. Here ist the solution I use to get my hp49 work. I juste reinstall the rom(It was on the answer I get from Wolfang Rautenberg): Here the original version and than a short translation of the answer from W.R: ------------------------------------------------------------------- Lieber Dimitri! Nicht verzweifeln! Es geht, nur Geduld Ich nehme an Sie haben alles versucht was JYA Ihnen geraten hat. Ich hatte das uebrigens auch schon mal. Es ist falsch was JYA sagt, dass kein SysRPL program das ROM beschaedigen kann, vor allem dann, wenn Sie noch ein ROM 18 benutzen. Wenn alles schief geht, halten sie die Bueroklammer im Loch bis die Screen schwarz ist und auch keine Sanduhr mehr da ist. Sie kommen dann auf jeden Fall ins DOWNLOAD menu, ein bischen geschickt maipulieren mit ON und gleichzeitigem Druecken von ENTER und +. Vorher muessen sie ROM 19-6 schon auf dem PC vorbereitet und angeklickt haben, damit der Download-process beginnen kann. Lesen Sie nochmals die Bescheibung. Am besten Sie haben sie auf einem toggelnden Bildschirm oder gedruckt neben sich liegen. Arbeiten Sie nur mit frischen Batterien. Gruss W.R. ----------Translation ------------------------ Be patient. I suppose you already try all JYA tell you. I got one time the same problem. It's not really correct when JYA says that a sysrpl programm can not damage the rom(above all when you use a rom under 1.8). If nothing is working, reset your calc on the back, use [ENTER] [+] key combination to get the download menu and reinstall the rom 19-6....Use new battery. Bye. W.R. ------------------------------------------------------------------------ I try it and it's working Excuse my bad english(I prefer write in french). > Yes please tell us. >> answer to my problem(try to recover memory-screen without reaction). >> some good tip. >So what did you do to get it working? answer to my problem(try to recover memory-screen without reaction). > some good tip. > MY HP49G still alive Wolfgang The Great I've just received a brand new HP 32Sii, sealed in its blister packaging. Someone at this NG found and old stock, bought two of them and kindly sold me one for... about US$ 80.00. At first I though I had paid too much but when I saw the prices they are selling it at e-bay and Samson Cables (http://www.samsoncables.com/catalog/prodDetail.cfm?Prod_ID=226&Sku=32SIIBB) eighty dollars seemed a bargain indeed. I wonder how many of these calculators are still there... Once in while there appears someone who says I found one forgotten in a small store, covered with dust.... But, how many of these are expected to be around? How many of them were produced in the last year before they were discontinued? How many were sold? Well, back to the 32Sii, it is the best second calculator for those who own a 48 or 49G. To bad it has been discontinued... It lacks matrix operations and could have a few more bytes in memory, but I love it almost the same way I loved the old 15C I had in '84 (It belongs to my brother now and is still running nicely after all those years...) > I've just received a brand new HP 32Sii, sealed in its blister packaging. > Someone at this NG found and old stock, bought two of them and kindly sold me > one for... about US$ 80.00. At first I though I had paid too much but when I I am someone at this NG. Actually I sold two NOS 32SII - I just got a Brown Bezel 32SII and decided to sell the two NOS I got. I can get some more 32SII - *but* I am in Brazil. If someone is willing to try doing this overseas deal: IÇm your man. Renato you still can get the HP20s calc (algebraic) cheap. http://www.shopping.hp.com/cgi-bin/hpdirect/shopping/scripts/product_detail/ product_detail_view.jsp?product_code=20S%23ABA&aoid=7222&script_name=product . cgi > I've just received a brand new HP 32Sii, sealed in its blister packaging. Hmm, how do I go about trying to find me one of these? Or any non-financial HP pocket calc (OfficeMax has a couple financial models, but no scientifics)? The times I would love to have an RPN calc that fits in my pocket, rather than having to try to remember that no, the TI30xa has no key... -Mike On Friday 29 November 2002 06:25 pm, Gerson W Barbosa > I've just received a brand new HP 32Sii, sealed in its blister > packaging. Someone at this NG found and old stock, bought two of them > and kindly sold me one for... about US$ 80.00. At first I though I had > paid too much but when I > saw the prices they are selling it at e-bay and Samson Cables > (http://www.samsoncables.com/catalog/prodDetail.cfm?Prod_ID=226&Sku=32SIIBB) > eighty dollars seemed a bargain indeed. > I wonder how many of these calculators are still there... Once in > while there appears someone who says I found one forgotten in a small > store, covered with dust.... But, how many of these are expected to > be around? How many of them were produced in the last year before they > were discontinued? How many were sold? Well, back to the 32Sii, it is the best second calculator for those > who own a 48 or 49G. To bad it has been discontinued... > It lacks matrix operations and could have a few more bytes in memory, > but I love it almost the same way I loved the old 15C I had in '84 (It > belongs to my brother now and is still running nicely after all those > years...) > Is there a way to calculate a congruence system on a hp49? for example the following system x congruent to 2 mod 3 > x congruent to 4 mod 7 find the smallest entier solution...tried to look in my manual but can't > find anything. > Consider the ICHINREM command for ->Integer<- Chinese Remainder Theorem. For each congruence, x == a (mod m), put vector [a m] on the stack. While there are more than one such vector stacked up, the command will solve the last two on the stack, provided there is any solution. The resultant value of 'a' will be that closest to zero. To find only least nonnegative solutions, add the modulus to any such negative values. Example: [2 3] [4 7] ICHINREM results in [-10 21] Add the new modulus, 21 here, to get smallest non-negative solution, [11,21]. Checking: -10 == 11 == 2 (mod 3) and -10 == 11 == 4 (mod 7) Note that the CHINREM command is for polynomial congruences, not integer congruences. Do u know a soft who determinate if a number is prime or not. For hp48. > Do u know a soft who determinate if a number is prime or not. For hp48. In my grotesquely humble opinion, FCTR by Klaus Kalb is the best prime factorizer for performance / program size ratio. 'Tis here: http://hpcalc.beachnet.org/hp48/math/misc/fctr.zip If you don't need to factor numbers but merely wish to determine whether they are prime or not, nothing beats ALG48 by Mika Heiskanen and Claude-Nicolas Fiechter, available here: http://hpcalc.beachnet.org/hp48/math/symbolic/alg48v42.zip It contains a function that determines primality much faster than any factorizer can. > If you don't need to factor numbers but merely wish to determine whether > they are prime or not, nothing beats ALG48 by Mika Heiskanen and > Claude-Nicolas Fiechter... The command FCTR of Alg48 will factor numbers if you put them into inverted commas. 2356 FCTR gives: 2^2 * 19 * 31 > Do u know a soft who determinate if a number is prime or not. For hp48. Alg48 and Erable, but if you need something smaller look for it in hpcalc.org << -> prime.candidate << 2 -> divider << WHILE 'dividerNUM REPEAT 'divider' INCR DROP END IF '(prime.candidate MOD divider)#0' ->NUM THEN prime.candidate is a PRIME Number! + ELSE the number you gave earlier was not a prime END MSGBOX >> then later - much later - when you understand the code above you may possible do some optimization PS: It is so difficult to optimize this code that I doubt if even WR or WH can do anything... > Do u know a soft who determinate if a number is prime or not. For hp48. Alg48 and Erable, but if you need something smaller look for it in > hpcalc.org > PS. I have a sensational paper on my desk: PRIMES is in P > by M. Agrawal, N. Kayal and N. Saxena, published 8/6/2002 > in the Indian Institute of Technology, Kanpur. There it is > shown that PRIMES (the set of primes) has polynomial time > complexity and the algorithm is provided. It is a high-rank > challenge for a gifted youngster to program it on the HP49. > CAS provides all necessary tools It's easy to implement. The challenge is making its running time comparable to that of other well-known primality tests. -- > PS. I have a sensational paper on my desk: PRIMES is in P > by M. Agrawal, N. Kayal and N. Saxena, published 8/6/2002 > in the Indian Institute of Technology, Kanpur. There it is > shown that PRIMES (the set of primes) has polynomial time > complexity and the algorithm is provided. It is a high-rank > challenge for a gifted youngster to program it on the HP49. > CAS provides all necessary tools > It's easy to implement. The challenge is making its running time > comparable to that of other well-known primality tests. I agree. Clearly, it should be compared only to deterministic test procedures, not to probabilistic ones (unless the probability of failing to identify a prime is smaller than you and the poor HP49, while running it, being struck by lightening - Wolfgang > << -> prime.candidate << 2 -> divider << > WHILE 'divider ->NUM > REPEAT 'divider' INCR DROP > END > IF '(prime.candidate MOD divider)#0' ->NUM > THEN prime.candidate is a PRIME Number! + > ELSE the number you gave earlier was not a prime > END MSGBOX > then later - much later - when you understand the code above > you may possible do some optimization I really do not understand the above code, and can't get it to work either. If you want to explore the brute force method (trial division, really), I whipped up a simple SysRPL program: !NO CODE !RPL :: CK1&Dispatch ONE :: DUP %FP %0<> IT SETSIZEERR %ABS DUP %2 %< OVER %2 %MOD %0= OR ITE :: DROP %0 ; :: %1 SWAPDUP %2 %= OVER %3 %= OR OVER %5 %= OR OVER %7 %= OR ITE DROP :: DUP %SQRT %IP># DUP#1+ THREE DO OVERINDEX@ UNCOERCE %MOD %0= IT :: DUP INDEXSTO ROTDROP %0 UNROT ; TWO +LOOP 2DROP ; ; ; ; @ #CEB1h & 170 bytes. It will accept both reals and integers but input is limited to 12 digits. The output is either 0. or 1. A 100% certain primality check is executed, and numbers up to ~365 million are verified within 1 minute. Bigger numbers take longer, and smaller ones considerably less time of course. The program is not meant to beat ISPRIME? in any way (and certainly can't) - it is only meant as a fun program to learn a bit from (about prime numbers, about algorithms, about why probabilistic algorithms are used and maybe even about SysRPL). Some timings (ISPRIME? times are in parantheses): Prime: 1500000041: 124.59 s. (0.83 s.) 500000003: 71.13 s. (0.78 s.) 12!-11!-1=439084799: 67.39 s. (0.80 s.) 365000011: 60.23 s. (0.77 s.) 3499999: 5.03 s. (0.32 s.) 34519: 0.48 s. (0.06 s.) 5791: 0.22 s. (0.05 s.) Not prime: 6129973*25261=154849247953: 83.74 s. (0.73 s.) 12!-11!+1=439084801: 42.30 s. (0.54 s.) 3499921*5791=20268042511: 18.32 s. (0.66 s.) 85009*1201=102095809: 3.30 s. (0.27 s.) 6301*127=800227: 0.34 s. (0.06 s.) 17^9=118587876497: 0.09 s. (0.05 s.) 14!=87178291200: 0.04 s. (0.04 s.) My comparable UserRPL program spends around twice the amount of time the SysRPL one does. None of the ISPRIME? times are over one second. Add to that a very linear performance, practically only governed by number of digits in the subject - can anyone still doubt the value of probabilistic search? > If you want to explore the brute force method (trial division, really), I > whipped up a simple SysRPL program: > !NO CODE !RPL :: CK1&Dispatch ONE :: DUP %FP %0<> IT SETSIZEERR %ABS DUP %2 > %< OVER %2 %MOD %0= OR ITE :: DROP %0 ; :: %1 SWAPDUP %2 %= OVER %3 %= OR > OVER %5 %= OR OVER %7 %= OR ITE DROP :: DUP %SQRT %IP># DUP#1+ THREE DO > OVERINDEX@ UNCOERCE %MOD %0= IT :: DUP INDEXSTO ROTDROP %0 UNROT ; TWO +LOOP > 2DROP ; ; ; ; @ > #CEB1h & 170 bytes. This is the right feed for Werner and for me! I'm going to make a SysRPL-program of the Sieve of Eratosthenes which at the first go is 45 bytes smaller than yours :: CK1NOLASTWD CKREAL %ABS %IP %1=case XEQNOT_ (stable PTR 3CB5D) DUP %2 %MOD %0=case SWAPDROP DROPDUP %2 %= OVER %3 %= OR OVER %5 %= OR OVER %7 %= ORcase %SGN %1 SWAPDUP %SQRT %IP># DUP#1+ THREE DO OVERINDEX@ UNCOERCE %MOD %0= IT :: ROTDROP %0 UNROTDUP INDEXSTO ; TWO +LOOP 2DROP ; 125 bytes, CRC EE51. A fast and 100% certain primality check for reals or zints with at most 12 digits as well Wolfgang Sorry, my program for the Sieve of Eratosthenes contained a small bug. Meanwhile I got it down to 102.5 bytes (CRC 6212). Thus, a final program should not exceede 100 bytes. More Eratosthenes doesn't deserve :: CK1NOLASTWD CKREAL %ABS %IP %1=case XEQNOT_ (stable PTR 3CB5D) %2=case %SGN DUP %2 %MOD %0=case SWAPDROP DROPDUP %9 %< case %SGN %1 SWAPDUP %SQRT %IP># DUP#1+ THREE DO OVERINDEX@ UNCOERCE %MOD %0= IT :: ROTDROP %0 UNROTDUP INDEXSTO ; TWO +LOOP 2DROP ; - Wolfgang > :: > CK1NOLASTWD CKREAL %ABS %IP > %1=case XEQNOT_ (stable PTR 3CB5D) > %2=case %SGN > DUP %2 %MOD %0=case SWAPDROP > DROPDUP %9 %< case %SGN > %1 SWAPDUP %SQRT %IP># DUP#1+ THREE > DO OVERINDEX@ UNCOERCE %MOD %0= IT > :: ROTDROP %0 UNROTDUP INDEXSTO ; > TWO +LOOP 2DROP > ; You are magnificent, Wolfgang I use case-structures in my UserRPL counterpart to the program, but didn't deem it worthwhile here - you proved me wrong, thank God! I also accept the stable pointer, and the argument check was obvious (that's what I get for letting my autmatic template_from_arguments program make the frame work . Kudos! > You are magnificent, Wolfgang Whatever you mean, below is a second program. It doesn't use a definite but a BEGIN-loop. It has precisely 100 bytes (CRC E5E6) and is, to my surprise, faster than the previous one. Now Werner will have a harder job to beet me :: CK1NOLASTWD CKREAL %ABS %IP %1=case XEQNOT_ (stable PTR 3CB5D) %2=case %SGN DUP %2 %MOD %0=case SWAPDROP DROPDUP %9 %< case %SGN BEGIN #2+ 2DUP UNCOERCE %MOD %0= 1GETABND #>ITE %SGN DROP%0_ (stable PTR 282CC) ; Wolfgang > Now Werner will have a harder job to beet me :: > CK1NOLASTWD CKREAL %ABS %IP > %1=case XEQNOT_ (stable PTR 3CB5D) > %2=case %SGN > DUP %2 %MOD %0=case SWAPDROP > DROPDUP %9 %< case %SGN WH> wonder why you included the previous line WH> if you start the loop with 'ONE' anyway. > BEGIN #2+ 2DUP UNCOERCE %MOD %0= > 1GETABND #>ITE %SGN DROP%0_ (stable PTR 282CC) > ; Wolfgang First try: 80 bytes, BF72h :: CK1NOLASTWD CKREAL %ABS %IP %1=case %1- %2=case %SGN DUP %2 %MOD %0=case SWAPDROP DROPDUP %SQRT SWAP %1 BEGIN %2 %+ 2DUP %MOD %0= OVER5PICK %> OR UNTIL SWAPDROP %< COERCEFLAG ; @ remark the fact that there isn't an unsupported entry, stable or not and working with reals all the time is faster than converting them to bints. Werner Could you guys please comment you programs so that we mere mortals could understand them? Veli-Pekka Nousiainen PS: Should one not use IP after the square root AND should we not test after the loop why it ended eg. because of loop limit OR because of divisor found AND it is much faster to divide first by 2 AND 3 and then loop through +2 +4 jumps, right?! It is naturally much longer, but also equally much faaaaster! > Now Werner will have a harder job to beet me > :: > CK1NOLASTWD CKREAL %ABS %IP > %1=case XEQNOT_ (stable PTR 3CB5D) > %2=case %SGN > DUP %2 %MOD %0=case SWAPDROP > DROPDUP %9 %< case %SGN > WH> wonder why you included the previous line > WH> if you start the loop with 'ONE' anyway. > BEGIN #2+ 2DUP UNCOERCE %MOD %0= > 1GETABND #>ITE %SGN DROP%0_ (stable PTR 282CC) > ; > Wolfgang First try: > 80 bytes, BF72h > :: > CK1NOLASTWD > CKREAL > %ABS %IP > %1=case %1- > %2=case %SGN > DUP %2 %MOD %0=case SWAPDROP > DROPDUP %SQRT SWAP %1 > BEGIN > %2 %+ 2DUP %MOD %0= > OVER5PICK %> OR > UNTIL > SWAPDROP %< COERCEFLAG > ; > @ remark the fact that there isn't an unsupported entry, stable or not > and working with reals all the time is faster than converting them to bints. Werner > remark: ... working with reals all the time is faster than converting them to bints. For small numbers my program seems to be slightly as a prime, mine needs 0.11, yours 0.12 seconds. But for larger numbers you are right. The UNCOERCE seems to be slow; bint converting occurs only once. Anyway, my overlooking that the loop runs perfect also for the small primes 3,5,7 is unpardonable! Below a delux version of the revised prime test, for users who like comfort. It leaves the real/zint in the stack and flashes only prime or not prime, resp. The program runs on both calcs, the 48 and the 48. 114 bytes, CRC 624F. :: CK1NOLASTWD CKREAL %IP %ABS :: %1=case FALSE %2=case TRUE DUP %2 %MOD %0=case DROPFALSE DROPDUP %SQRT SWAP %1 BEGIN %2 %+ 2DUP %MOD %0= OVER5PICK %> OR UNTIL ROTSWAP %< ; prime DUP Not SWAP&$ RPITE DispCoord1 VERYSLOW ; Have Fun Wolfgang Are either of the listings I've seen in this thread safe for use in the 49? JasonG > Now Werner will have a harder job to beet me OR UNTIL ROTSWAP %< ; Not200Aprime (blank and newline after Not) SEP$NL OVER &$ RPITE DoPrompt_ ; @ DoPrompt_ is PTR 38C00 on the 49 and PPTR 23865 on the 48, both stable. It displays and freezes a text-string in the header. Note that blank and newline have character codes 20h and 0Ah, resp. I used them for uniqueness only. One need not write these backslash codes if the 49 has ROM 19-6. - Wolfgang > :: > CK1NOLASTWD CKREAL %ABS %IP > %1=case XEQNOT_ (stable PTR 3CB5D) > %2=case %SGN > DUP %2 %MOD %0=case SWAPDROP > DROPDUP %9 %< case %SGN > BEGIN #2+ 2DUP UNCOERCE %MOD %0= > 1GETABND #>ITE %SGN DROP%0_ (stable PTR 282CC) > ; Well, I have a very little improvement. Switch %ABS and %IP, so %IP i executed first (CRC C204) - that's slightly faster when FP(n)=!0, and only ultra slightly slower when SIGN(n)=-1 & FP(n)=0 It's hardly anything you'll notice in the above program, but you can check it out for yourself: :: #4000 ONE_DO %5. %ABS %IP DROP ; (20.32 s.) :: #4000 ONE_DO %5. %IP %ABS DROP ; (20.32 s.) :: #4000 ONE_DO %-5. %ABS %IP DROP ; (20.32 s.) :: #4000 ONE_DO %-5. %IP %ABS DROP ; (20.36 s.) :: #4000 ONE_DO %5.6 %ABS %IP DROP ; (36.09 s.) :: #4000 ONE_DO %5.6 %IP %ABS DROP ; (20.54 s.) :: #4000 ONE_DO %-5.6 %ABS %IP DROP ; (36.09 s.) :: #4000 ONE_DO %-5.6 %IP %ABS DROP ; (20.58 s.) Another interesting thing: IP executes in different times for positive and negative input, ABS does not. > Well, I have a very little improvement. Switch %ABS and %IP ... at most 12-digit reals or zints, 95 bytes, CRC 13F3: :: CK1NOLASTWD CKREAL %IP %ABS %1=case XEQNOT_ (stable PTR 3CB5D) %2=case %SGN DUP %2 %MOD %0=case SWAPDROP DROPDUP %9 %< case %SGN DUP %SQRT %IP># SWAPONE BEGIN #2+ 2DUP UNCOERCE %MOD %0= OVER5PICK #> OR UNTIL ROT #>ITE %SGN DROP%0_ (stable PTR 282CC) ; The test is fast for small numbers. Exponential growth of the procedure will be felt only if testing numbers of more than 7 digits. Unfortunately, UsrRPL doesn't have a chance to compete with the above, neither in size nor in speed. - Wolfgang > << -> prime.candidate << 2 -> divider << > WHILE 'divider ->NUM ... > then later - much later - when you understand the code above > PS: It is so difficult to optimize this code that > I doubt if even WR or WH can do anything... If Riemann's hypothesis on the zeros of the zeta-function is true it would be easy to provide a fast code . - Wolfgang PS. I have a sensational paper on my desk: PRIMES is in P by M. Agrawal, N. Kayal and N. Saxena, published 8/6/2002 in the Indian Institute of Technology, Kanpur. There it is shown that PRIMES (the set of primes) has polynomial time complexity and the algorithm is provided. It is a high-rank challenge for a gifted youngster to program it on the HP49. CAS provides all necessary tools > Of course the output primes will thin out as x gets bigger, but so do the prime x's. That's not true, isn it? You still get incredible amounts of prime numbers even when searcing through arbitrarily big numbers. miz. >> Of course the output primes will thin out as x gets bigger, but so do the prime x's. That's not true, isn it? You still get incredible amounts of prime >numbers even when searcing through arbitrarily big numbers. miz. The following theorems give some details to Mizrandir's comment. ----------------------------------------------------- (Euclid) The number of primes is infinite. That is, the sequence of primes {p1, p2, p3, ... Pn ...} has no largest member. Proof: Assume the list of primes is finite and can be written {p1, p2, p3,..., pn}. Form the number K= 1 + p1*p2*p3...*pn. This number is not divisible by p1 or p2 or p3... or pn. Since K is either prime or has a prime factor p, either K is prime itself (and it isn't in the list), or if K is composite there must be another prime not in the list. Hence, the list doesn't contain all the primes. So our assumption that the number of primes is finite is false. Q.E.D. ----------------------------------------------------- There are arbitrarily large gaps in the primes. Proof: Consider the integers (k+1)!+2, (k+1)!+3, ..., (k+1)!+k, (k+1)!+k+1 Every one of these is composite because j divides (k+1)!+j if 2 <= j <= k+1. Q.E.D. ------------------------------------------------------ So, if you give me a large integer K, I can display K consecutive composite integers. Even though the primes are infinite in number, there are arbitrarily large prime-free gaps in the integers. Isn't that fascinating? There are infinitely many primes, yet they get scarcer and scarcer way out there. > Of course the output primes will thin out as x gets bigger, but so do the prime x's. > That's not true, isn it? You still get incredible amounts of prime > numbers even when searcing through arbitrarily big numbers. Yes and no. The number of primes does decrease, but you're right that the number stays surprisingly high. Example: For the famous fabulous [1 21 1] poly pair, here are the number of prime pairs produced for every 1000 consecutive x's starting at 22 (and *this* time I remembered to clear the accumulator between iterations!): 236, 142, 114, 120, 101, *89*, 89, 93, *80*, 91, 81, 82, 87, 94, 93, *77*, 81, *65*, 78, 83, 80, 90, 69, 89, 78, 80, 74, 72, 73, *60*, 73, 93, 65, *53*, 61, 62, 75, 67, 58, 69, 72, 69, 74, *48*, 71, 68, 75, 58, 50, 60, 74, 64, 60, 60, 64, 52, 68, 53, 64, 67, 65, 60, 79, 60, *41*, ... Fitting this data to a curve is left as an exercise for the sutdent. >> Of course the output primes will thin out as x gets bigger, but so do >the prime x's. >> That's not true, isn it? You still get incredible amounts of prime >> numbers even when searcing through arbitrarily big numbers. Yes and no. The number of primes does decrease, but you're right that the >number stays surprisingly high. Example: For the famous fabulous [1 21 1] poly pair, here are the number of prime >pairs produced for every 1000 consecutive x's starting at 22 (and *this* >time I remembered to clear the accumulator between iterations!): 236, 142, 114, 120, 101, *89*, 89, 93, *80*, 91, 81, 82, 87, 94, 93, *77*, >81, *65*, 78, 83, 80, 90, 69, 89, 78, 80, 74, 72, 73, *60*, 73, 93, 65, >*53*, 61, 62, 75, 67, 58, 69, 72, 69, 74, *48*, 71, 68, 75, 58, 50, 60, 74, >64, 60, 60, 64, 52, 68, 53, 64, 67, 65, 60, 79, 60, *41*, ... What are the asterisks for? And, I get a slightly different list of x's, namely: 236, 142, 114, 120, 101, 89, 89, 93, 80, 91, 81, 82, 87, 94, 93, 76, 81, 65, 78, 83, 80, 90, 69, 89, 78, 80, 74, 72, 73, 60, 73, 93, 65, 53, 61, 62, 75, 67, 58, 69, 72, 69, 74, 48, 71, 68, 75, 58, 50, 60, 74, 64, 60, 60, 64, 52, 68, 53, 64, 67, 64, 59, 79, 59, 41 The first place where we differ is where you get 77 and I get 76. The values of x for which I get a prime pair are: 15027, 15036, 15044, 15048, 15050, 15069, 15076, 15093, 15097, 15101, 15107, 15169, 15194, 15223, 15228, 15244, 15245, 15264, 15274, 15278, 15284, 15308, 15309, 15330, 15343, 15395, 15398, 15404, 15419, 15424, 15433, 15435, 15436, 15451, 15470, 15509, 15528, 15530, 15567, 15588, 15622, 15629, 15650, 15656, 15668, 15681, 15684, 15697, 15701, 15703, 15711, 15718, 15758, 15770, 15773, 15798, 15810, 15811, 15831, 15860, 15872, 15879, 15886, 15887, 15889, 15900, 15905, 15906, 15919, 15927, 15939, 15943, 15976, 15989, 16010, 16020 This is for x such that 15022 <= x <= 16021. That's a thousand integers, right? Fitting this data to a curve is left as an exercise for the sutdent. 236, 142, 114, 120, 101, *89*, 89, 93, *80*, 91, 81, 82, 87, 94, 93, *77*, >81, *65*, 78, 83, 80, 90, 69, 89, 78, 80, 74, 72, 73, *60*, 73, 93, 65, >*53*, 61, 62, 75, 67, 58, 69, 72, 69, 74, *48*, 71, 68, 75, 58, 50, 60, 74, >64, 60, 60, 64, 52, 68, 53, 64, 67, 65, 60, 79, 60, *41*, ... What are the asterisks for? To bolster my hypothesis that as x increases the PO/PI ratio decreases slightly. The asterisked outputs are smaller than any previous output. > And, I get a slightly different list of x's ... Holy smokes! Believe it or not, I committed the newbie error of trying to iterate 1000 times by looping from N to N+1000! Boo, hiss! Changing N+1000 to N+999 (of course), and throwing in a Lampman Correction (for good luck), produces the same table as yours. N+1000! is *way* too big! X > Holy smokes! Believe it or not, I committed the newbie error of trying to > iterate 1000 times by looping from N to N+1000! Boo, hiss! Changing N+1000 > to N+999 (of course), and throwing in a Lampman Correction (for good luck), > produces the same table as yours. > > N+1000! is *way* too big! Joe! You've got the infamous Virus Programmaticus Nonsense You need a 40 day fast and a lots of prayer > If you put all the integers from 22 to 1000 into *both* > x^2 + 21x + 1 > *and* > x^2 - 21x + 1 > and count how many times the output from *both* is prime (for the same > input), it's an astoundingly high number: 480 times! > Out of those 480 primes, how many do both functions produce? It's not 480 primes; it's 480 *times* that *both* functions produce primes > simultaneously. oops, that's what I meant.. and exactly the point I was getting at. >> Joe, I plugged 7x^2 + 2x +3 >> and >> 7x^2 - 2x +3 >Rodger, what about x=1290. The HP49G says that then 7x^2+2x+3 and >7x^2-2x+3 are both primes. Is that false? >Nick. > When x=1290, for 7x^2 + 2x + 3 I get 11651283 > and for 7x^2 - 2x + 3 I get 11646123, neither of which is prime. Is this not what you > get? Perhaps you were evaluating 7x^2 + 2x +1 and 7x^2 - 2x +1, which are the expressions > Joe mentioned earlier. Ahaaaaaa! Joe's polynomials were: >7x^2 + 2x + 1 and 7x^2 - 2x + 1 and indeed these are those which I used. Are the following polynomials: >I plugged 7x^2 + 2x +3 >and >7x^2 - 2x +3 your own discovery? Nick. > > Joe, I plugged 7x^2 + 2x +3 > and > 7x^2 - 2x +3 >>Rodger, what about x=1290. The HP49G says that then 7x^2+2x+3 and >>7x^2-2x+3 are both primes. Is that false? >>Nick. >> When x=1290, for 7x^2 + 2x + 3 I get 11651283 >> and for 7x^2 - 2x + 3 I get 11646123, neither of which is prime. Is this not what you >> get? Perhaps you were evaluating 7x^2 + 2x +1 and 7x^2 - 2x +1, which are the expressions >> Joe mentioned earlier. Ahaaaaaa! Joe's polynomials were: >7x^2 + 2x + 1 and 7x^2 - 2x + 1 and indeed these are those which I used. >Are the following polynomials: >I plugged 7x^2 + 2x +3 >>and >>7x^2 - 2x +3 your own discovery? Well, (blush), yes. I think I used the same Joe used; fool around with the coefficients. But what about the question I asked. If, after n reaches 126 million or so, we haven't gotten a single prime pair, are we entitled to say that there will never be any? Technically, no, but how do you feel about it? >Nick. -snipped rest-- >Ahaaaaaa! Joe's polynomials were: >>7x^2 + 2x + 1 >>and >>7x^2 - 2x + 1 >and indeed these are those which I used. >Are the following polynomials: >>I plugged 7x^2 + 2x +3 >>and >>7x^2 - 2x +3 >your own discovery? Well, (blush), yes. > I think I used the same Joe used; fool around with the coefficients. > But what about the question I asked. If, after n reaches 126 million or so, we haven't > gotten a single prime pair, are we entitled to say that there will never be any? > Technically, no, but how do you feel about it? > It is always dangerous to make general statements out of particular events, though of course what one feels always plays some role. In this case, well, I really don't know. Nick. > But what about the question I asked. If, after n reaches 126 million or so, we haven't > gotten a single prime pair, are we entitled to say that there will never be any? > Technically, no, but how do you feel about it? Since the first prime-generating n for some poly pairs is very large (in the thousands), I have a tickly feeling that reaching 126 million without finding one does NOT necessarily mean that there aren't any. I've yet to see a first n greater than 1E6, but methinks that's only because I haven't looked long enough. But... that's just a feeling, and I'd equally enjoy seeing it proved or disproved. >I plugged 7x^2 + 2x +3 >and >7x^2 - 2x +3 your own discovery? Well, (blush), yes. > I think I used the same Joe used; fool around with the coefficients. > But what about the question I asked. If, after n reaches 126 million or >so, we haven't >gotten a single prime pair, are we entitled to say that there will never be >any? >Technically, no, but how do you feel about it? > If you do a little checking, you find that any x that is odd gives results where both numbers are divisible by 2. Also, any x that is a multiple of 3 will mean that both numbers are divisible by 3. Lastly, for 7x^2+2x+3, for numbers x=4 MOD 6, we find the numbers are divisible by 3. AND: for 7x^2-2x+3, for numbers x=2 MOD 6, we also find that the numbers are divisible by 3. (the = sign should be a congruence sign). Thus, you will NEVER find a value x>=1 where BOTH of the polynomials give a prime number. But, you're welcome to try it for as long as you wish to. Edry need to search anymore. Nick. I plugged 7x^2 + 2x +3 >and >7x^2 - 2x +3 >>your own discovery? > Well, (blush), yes. > I think I used the same Joe used; fool around with the coefficients. > But what about the question I asked. If, after n reaches 126 million or >so, we haven't >gotten a single prime pair, are we entitled to say that there will never be >any? >Technically, no, but how do you feel about it? > If you do a little checking, you find that any x that is odd gives > results where both numbers are divisible by 2. Also, any x that is a multiple of 3 will mean that both numbers > are divisible by 3. Lastly, for 7x^2+2x+3, for numbers x=4 MOD 6, we find the numbers > are divisible by 3. > AND: for 7x^2-2x+3, for numbers x=2 MOD 6, we also find that the > numbers are divisible by 3. (the = sign should be a congruence sign). Thus, you will NEVER find a value x>=1 where BOTH of the polynomials > give a prime number. But, you're welcome to try it for as long as you wish to. Edry > If you do a little checking, you find that any x that is odd > gives results where both numbers are divisible by 2. Also, any x that is a multiple of 3 will mean that both > numbers are divisible by 3. Lastly, for 7x^2+2x+3, for numbers x=4 MOD 6, > we find the numbers are divisible by 3. > AND: for 7x^2-2x+3, for numbers x=2 MOD 6, > we also find that the numbers are divisible by 3. > (the = sign should be a congruence sign). Thus, you will NEVER find a value x>=1 where BOTH > of the polynomials give a prime number. However... You proved that this particular poly pair is prime-pair output-free by examining inputs mod 6. Some other poly pair might be a mod 12 situation, right? Or mod 210. Is there any way of reaching our goal without using trial and error on sets of inputs mod m? Or is there any way of determining what the modulus is without trial and error? >I plugged 7x^2 + 2x +3 >>and >>7x^2 - 2x +3 >>your own discovery? Well, (blush), yes. >> I think I used the same Joe used; fool around with the coefficients. >> But what about the question I asked. If, after n reaches 126 million or >>so, we haven't >>gotten a single prime pair, are we entitled to say that there will never be >>any? >>Technically, no, but how do you feel about it? >If you do a little checking, you find that any x that is odd gives >results where both numbers are divisible by 2. Also, any x that is a multiple of 3 will mean that both numbers >are divisible by 3. Lastly, for 7x^2+2x+3, for numbers x=4 MOD 6, we find the numbers >are divisible by 3. >AND: for 7x^2-2x+3, for numbers x=2 MOD 6, we also find that the >numbers are divisible by 3. (the = sign should be a congruence sign). Thus, you will NEVER find a value x>=1 where BOTH of the polynomials >give a prime number. I had hoped that if I prodded long enough, I could get someone else interested. I can't do all the work, you know. But, you're welcome to try it for as long as you wish to. Edry Thomas how did you find x=5220, was it just searching or something > else? By searching, however not on my HP. Is that against the rules? Thomas Yes, you will be violently taken away from Glarus and brought in the darkest dungeons of Nidwalden, where you will spend your life waiting for an answer in front of your HP. On the other hand, considering that we don't have 3000000 years time for searching with the HP, we could declare working with other systems to be a rule. That is, just for finding something before we cross the river Nick. > Have you a specific example where the HP49 does this? > I'm surprised that such an example is known. For detailed discussion, see Mika Heiskanen's posts in this thread: (Mika implemented these commands) [r->] [OFF] . > Well, my HP49G is at 680 and searching... > 1050 and still searching.... > Aha! 1290. The primes are 11651281 and 11646121. I had to try too. 128 seconds - ISPRIME? must be really slow > Well, my HP49G is at 680 and searching... > 1050 and still searching.... > Aha! 1290. The primes are 11651281 and 11646121. I had to try too. 128 seconds - ISPRIME? must be really slow A couple months back, there was a news item saying that some number theorists in India had discovered a fast (polynomial time), deterministic primality testing algorithm. It was published in some scholarly journal, but the newsies felt that it was of interest to the general public. You can read about it at http://www.cse.iitk.ac.in/news/primality.html . The algorithm is simple enough, but I haven't gotten around to implementing it yet. If you guys beat me to implementation, I won't mind... ----- lrreiche@inav.your.pants.net Please remove your.pants. to contact me directly. 1050 and still searching.... > Aha! 1290. The primes are 11651281 and 11646121. > I had to try too. 128 seconds - ISPRIME? must be really slow A couple months back, there was a news item saying that some number > theorists in India had discovered a fast (polynomial time), deterministic > primality testing algorithm. It was published in some scholarly journal, This new algorithm is not *fast*. It runs in polynomial time and provides a deterministic answer about the primality of a given number. There were already other such polynomial-time algorithms, but those didn't work for *any* number (only special cases ones). In crypto, we use good sub-exponential probabilistic non-primality tests (such as Fermat, or Rabin-Miller), which, when run enough times, provide a good primality test with a definable risk of being wrong. Theoritically speaking, the algorithm you're talking about is a great enhancement, it proves that the primality test is a P-class problem. Unfortunately, the proposed algorithm runs in O((log n)^12), where n is the number to test. This is too slow to be practical. In practice, it can't compete with a good Rabin-Miller that runs in time O((log n)^5). The Rabin-Miller must be run a number of times to minimize the risks of letting a composite pass the test, but this number of times is a small one (5 or 6), and it decreases when n grows. -- ----- AD: Tous les outils et mat.8eriels existent, ce n'est pas on.8ereux de plus. AD: Monte ton serveur et tu pourras faire ce que bon te chantes. DP: Et la libert.8e Mr le censeur??? tu en fais quoi??? -+- In : Guide du Neuneu d'Usenet - Bien chier sur la moquette -+- > This new algorithm is not *fast*. It runs in polynomial time and provides > a deterministic answer about the primality of a given number. There were > already other such polynomial-time algorithms, but those didn't work for > *any* number (only special cases ones). > Theoritically speaking, the algorithm you're talking about is a great > enhancement, it proves that the primality test is a P-class problem. I understand that the discovery's chief value is in proving primality is in P. > Unfortunately, the proposed algorithm runs in O((log n)^12), where n > is the number to test. This is too slow to be practical. In practice, it > can't compete with a good Rabin-Miller that runs in time O((log n)^5). The > Rabin-Miller must be run a number of times to minimize the risks of > letting a composite pass the test, but this number of times is a small one > (5 or 6), and it decreases when n grows. Yes, O(log n)^12) is a huge growth rate. I was unaware that the probablistic tests were this good. You say that the number of retests using Rabin-Miller sufficient for confidence of correctness decreases as n grows. Is there any point at which it vanishes, or is it approaching zero assymptotically? For cryptography applications, what is an acceptable probability that a composite number gets labeled prime? How large an n is needed in order to reach that probability with a single run of Rabin-Miller? ------- Probabilities are useless for predicting the future -- they serve only to show that we don't know... lrreiche@inav.your.pants.net Drop your.pants. to reply directly. > You can read about it at http://www.cse.iitk.ac.in/news/primality.html . Yes, I read about it a while back. It's pretty decent work CODE GOSBVL =PopASavptr AD1EX C=DAT1 A LA(5) =DOLIB ?C=A A GOYES LDBE4C GOVLNG =GPPushFLoop LDBE4C GOVLNG =GPPushTLoop ENDCODE it is TYPELIB? it is correct???? GaaK you could shorten it a bit by: CODE GOSBVL =PopASavptr AD1EX A=DAT1 A LC(5) =DOLIB ** Note LC has a smaller opcode than LA ?C=A A GOYES LDBE4C LDBE4C GOVLNG =GPPushT/FLp ** This entry (#620B6 on HP-48) does both ENDCODE BTW: Do you use JAZZ or RPL48? CODE > GOSBVL =PopASavptr > AD1EX > C=DAT1 A > LA(5) =DOLIB > ?C=A A > GOYES LDBE4C > GOVLNG =GPPushFLoop > LDBE4C > GOVLNG =GPPushTLoop ENDCODE > it is TYPELIB? > it is correct???? GaaK you could shorten it a bit by: CODE > GOSBVL =PopASavptr > AD1EX > A=DAT1 A > LC(5) =DOLIB ** Note LC has a smaller opcode than LA > ?C=A A > GOYES LDBE4C LDBE4C > GOVLNG =GPPushT/FLp ** This entry (#620B6 on HP-48) does both ENDCODE > BTW: Do you use JAZZ or RPL48? texts of Pivo (mltut) and Eric (Introduction to Saturn Assembly Language for HP48). GaaK sorry, my hp is hp49G you could shorten it a bit by: CODE > GOSBVL =PopASavptr > AD1EX > A=DAT1 A > LC(5) =DOLIB ** Note LC has a smaller opcode than LA > ?C=A A > GOYES LDBE4C LDBE4C > GOVLNG =GPPushT/FLp ** This entry (#620B6 on HP-48) does both ENDCODE > BTW: Do you use JAZZ or RPL48? > CODE > GOSBVL =PopASavptr > AD1EX > C=DAT1 A > LA(5) =DOLIB > ?C=A A > GOYES LDBE4C > GOVLNG =GPPushFLoop > LDBE4C > GOVLNG =GPPushTLoop > ENDCODE > > it is TYPELIB? > it is correct???? > GaaK > sorry, my hp is hp49G > GOVLNG =GPPushT/FLp ** This entry (#620B6 on HP-48) does both GPPushT/FLp is an entry on the 49 (#35233h) so s program will work for you. -- ir. P.F.Geelhoed Delft University of Technology Laboratory for Aero & Hydrodynamics Leeghwaterstraat 21, 2628 CA Delft, The Netherlands +31-15-2786656 / +31-15-2782947 (fax) The auction at http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=1941100947&category=20335 contains text that looks suspiciously like a rip-off of Eric Rechlin's site. -- > The auction at > http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=1941100947&category=20335 > contains text that looks suspiciously like a rip-off of Eric Rechlin's > site. It's hard to tell what they are selling... Otherwise, I often use ebay and regularly copy another site to explain what I'm selling I guess if that's the only item the guy is selling, then it's fine. If he does it ona regular basis, then he's obviously making money on Eric's back > It's hard to tell what they are selling... Then look at this: http://www.mikewinters.net/DATAFILE/calculators.txt programs can be recompiled to run on the 49's. That we all know is a load > Otherwise, I often use ebay and regularly copy another site to explain what > I'm selling That's usually not good behaviour, but what the heck. This guy also copied the entire contents from the site too - complete with directory structure and so on. That's not legal. He's one of the persons who wouldn't obey Erics demand for not bulk-downloading. In fact, he may be responsible for Erics problems with his site. having to find a sponsor and all. > I guess if that's the only item the guy is selling, then it's fine. If he > does it ona regular basis, then he's obviously making money on Eric's back He currently has 8 identical CDs for sale - I wonder how many he has sold over time? All his items for sale are interesting: http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=1941342412 A picture of an HP12C handbook, but the text says he sells a CD with a .pdf of the handbook on it. I wonder how many he's selling of those (I can only find 4 of these CDs in the log). and what HP will say about it? http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=1941735720 He puts Casio good condition, he says. http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&category=20335&item=1940143443 Look at the pictures in that auction - do these calcs seem to be in good condition to you? He just bought a lot of these calcs: he bought 5 Casio calcs on September 18th, 5 again on October 17th, 10 on November 2nd and 5 on November 25th. All from the same seller. He off course sells them again along the way. He sold the above mentioned HP CDs on at least these dates: September 21 September 23 October 1 October 3 October 6 October 6 October 10 October 12 October 14 October 18 October 19 October 19 October 24 October 24 October 25 October 31 November 1 November 7 November 8 November 10 November 13 November 13 November 14 November 21 November 25 November 25 November 26 + 8 CDs not yet sold, at a price each between USD 1.75 and USD 20.50. This is 35 hpcalc.org CDs in two months! Still don't think this is stealing? Add to this an assortment of calculators, cables and manuals. You can only see a couple of months back on Ebay auctions, so his behaviour may have been the same for years. > It's hard to tell what they are selling... Then look at this: http://www.mikewinters.net/DATAFILE/calculators.txt http://pages.ebay.com/help/community/software-cdr-faq.html Just had a look.. The software must be on a CDR, it's forbidden to sell content on CDR on ebay Heello > + 8 CDs not yet sold, at a price each between USD 1.75 and USD 20.50. This > is 35 hpcalc.org CDs in two months! Still don't think this is stealing? > I think it is.. And it should be reported to Ebay... I guess Eric should do it, he will be in better position to do so... > I guess if that's the only item the guy is selling, then it's fine. If he > does it ona regular basis, then he's obviously making money on Eric's back And everyone elses too. My programs are freeware - they are not to be sold under any circumstances. I guess this is the case with most programs on Erics site. If they are on the CD... How would you characterize Joe's Goodies Disks ? Greg S > I guess if that's the only item the guy is selling, then it's fine. If he > does it ona regular basis, then he's obviously making money on Eric's back And everyone elses too. My programs are freeware - they are not to be sold > under any circumstances. I guess this is the case with most programs on > Erics site. If they are on the CD... How would you characterize Joe's Goodies Disks ? I never had to pay to use Joe's goodies disk. And these goodies disk were pre-internet era. Without them I would have missed out on the HP48 ! > How would you characterize Joe's Goodies Disks ? Some facts for the sake of the newbies: I never made one penny from the Goodies Disks, not even to recoup copying costs. EduCALC recouped their costs for copying, postage & handling, catalog space, warehouse space, etc etc, but they did not give me a piece of the action nor is there any reason to suspect that EduCALC ever made a penny from 'em either. They sold bazillions of those disks, with at least implicit blessings from the programmers (even the one who later told Eric Rechlin to remove his programs from the HPCALC.ORG CD) and explicit permission from HP. This guy on eBay, however, is selling ONE disc, at *auction* (!!!), pocketing whatever profit he makes, without the permission of anybody. Methinks that's uncool, uncouth, and unconscionable. If the bid never gets above $25, I won't worry about it, because I think that was Eric Rechlin's CD price before he temporarily suspended their sale . But if it goes above that, eBay should be notified, IMHO. > This guy on eBay, however, is selling ONE disc ... Ignore my previous posting. I take it all back and assert the opposite. Somebody please notify eBay, the IRS, and NORAD about this guy. Ignore previous cookie -- fortune cookie message > This guy on eBay, however, is selling ONE disc, at *auction* (!!!) This guy on Ebay has sold 35 of these discs in the last two months - Ebay public records don't go any further back. I wonder how many he has sold the last two years? > If the bid never gets above $25, I won't worry about it, because I think > that was Eric Rechlin's CD price before he temporarily suspended their sale The auctions the last two months ended on very different prices - ranging from USD 1.75 to USD 20.50 I think. On average it was probably around USD 8.00 (my best guestimate) per CD. That's something like USD 1500-2000 a year. He's doing the same trick with a CD-R containing a .pdf-copy of the HP-12C user guide (4 CDs in two months). Do you think HP(ack) finds that cool? He's selling CD-R's, which is not allowed on Ebay, he's ripping off Erics website layout and selling 1500 programs without, I suspect, even one auther giving their blessings. He also passes on his bad carma by speaking with two tongues - The HP48 programs can be recompiled to run on the 49's he told me. That's mostly a lie, but will catch many a HP49G user on the wrong foot. > How would you characterize Joe's Goodies Disks ? As freeware that may not be sold. I just purchased an HP49G, my 4th HP calculator about a week ago, and I love it. I do have the same problem I think quite a few people do by looking at some of the posts and that is programming the thing. There does not seem to be any real good step by step document that take a person from setting everything up to completing a program. I personally would like to develop everything on a PC (my personal preference) using an emulator etc. (i.e. a project/IDE environment) and then transfer the completed program to the calculator. Having done this type of development with embedded HW systems it would be much easier for me. I went and looked at the TI-89/200 and they have a really great program development suite that lets you develop your SW all on the PC. You start it up, write your code in C ,with their supplied dll's, and when you build your project it automatically brings up and loads the emulator ready to test. All of this is very well documented and extremely easy to use. So, my question is, since I cannot seem to find it anywhere, is there any similar development environment completely on a PC...with examples? Does anything like this even exist or is anyone working on such a project? It appears that HP had the same thing in mind once upon a time (C language interface IDE etc.) but dropped it...maybe because they don't know if they are staying in this market or not...it would be disappointing to see RPN disappear. Anyway, what I have found is just scattered bits and pieces of documents that state ...writing in User RPL I did this.... or ...writing in sysRPL is really great.... or lists of entry points and so on. A nice development environment, or a really good document telling someone how to set everything up, would be of great help. Also, does anyone know where I could find some software for digital control design, communications etc? I found one program (as a lib) for the HP48 but never could convert it to run on the 49. If anyone can point me in the right JF Please see this Web page: http://ca-on.hpcalc.org Note: You can too see my programs inserted in this site by typing ... caporalini, in the window (search!). The HP-49G don't have a infrared port and the remot control program for the HP-48 not run. The communication protocol and serial cable is ... F1897-A You can purchase a interfase HP - IR. Then can convert for use in the HP-49G. You only needed a solid knowledge of entries and ML or SysRPL Language's. Miguel Angel CAPORALINI HERK **************************************************************************** *** > I just purchased an HP49G, my 4th HP calculator about a week ago, and I love > it. I do have the same problem I think quite a few people do by looking at > some of the posts and that is programming the thing. There does not seem to > be any real good step by step document that take a person from setting > everything up to completing a program. I personally would like to develop > everything on a PC (my personal preference) using an emulator etc. (i.e. a > project/IDE environment) and then transfer the completed program to the > calculator. Having done this type of development with embedded HW systems it > would be much easier for me. I went and looked at the TI-89/200 and they have a really great program > development suite that lets you develop your SW all on the PC. You start it > up, write your code in C ,with their supplied dll's, and when you build > your project it automatically brings up and loads the emulator ready to > test. All of this is very well documented and extremely easy to use. So, my > question is, since I cannot seem to find it anywhere, is there any > similar development environment completely on a PC...with examples? Does > anything like this even exist or is anyone working on such a project? It > appears that HP had the same thing in mind once upon a time (C language > interface IDE etc.) but dropped it...maybe because they don't know if they > are staying in this market or not...it would be disappointing to see RPN > disappear. Anyway, what I have found is just scattered bits and pieces of documents > that state ...writing in User RPL I did this.... or ...writing in > sysRPL is really great.... or lists of entry points and so on. A nice > development environment, or a really good document telling someone how to > set everything up, would be of great help. Also, does anyone know where I could find some software for digital control > design, communications etc? I found one program (as a lib) for the HP48 but > never could convert it to run on the 49. If anyone can point me in the right JF Can someone help me port this program stenopad 1.2 to the HP 49G. I don't have much programming experience and need this program...finals are coming up soon. I need an program to easily store notes and formulas in to my 49G. Here is the link to the poggie http://www.hpcalc.org/details.php?id=127 TIA Jake > If we have a large sequence that all agree is random, and select a very small subset, > does that subset lose its randomness? I think not; it's just that taken in isolation and > without knowledge about how it was created, the usual tests cannot tell us whether it is > likely to have been created by a random process, because it is very small. But if I know > that it was created by a random process because I did the creating, then I can know that > it is a random sequence. Actually no. By selecting the subsequence, you have tainted its randomness, unless the selection itself was random. I was just discussing Dungeons & Dragons(tm) with my boys, so this example comes to mind: A character's attributes (of which there are six) are generated in a supposedly random manner, by throwing three six-sided dice and summing their pips. However, the rules book discusses several ways of improving a characters' survivability by tampering with the results. One method was to throw four dice, and discard the low one before summing the others; another was to roll up all six attribute numbers, but reserve assigning those numbers to any particular attribute until you've seen all six (for this reason, most low-level characters are ugly rather than sickly). In both cases, the individual die rolls are part of a truly random sequence, but selection of which rolls to use for what removes (or reduces, if that has meaning) their original randomness. > Perhaps to be precise, we should say that the tests don't so much tell me if the sequence > was generated by a random process, as they tell me if it was generated by a non-random > process. They can falsify the hypothesis that the sequence is random. Not even that -- our D&D character could have all six attribute scores legitimately rolled up as 18s (one chance in 101,559,956,668,416). The process was still random, but no string of 18 consecutive rolls of six could pass any test of randomness, nor would the Dungeon Master allow such a character. --- Graduate of the Las Vegas school of probability analysis. lrreiche@inav.your.pants.net Drop your.pants. to respond directly. >Non-randomly picked example: 17. 17 is biased; it *insists* on being 17. >It's predictable; it's *always* equal to 17. And it's reproduceable: 17 17 >17 17 71 (oops) 17 17 17 ... as many as you want. Isn't this called begging the question? You select an admittedly non-random number > and then proceed to show that it doesn't have randomness properties. Actually, to quote my Modelling and Simulation professor (lo these many decades ago), 17 is the MOST random number. When questioned about why this is so, he'd mumble something about its lack of unique properties and duck out the door. ----- Aging and unreformed college student lrreiche@inav.your.pants.net Drop your.pants. to reply directly. > NUMERICALLY, a numeric sequence is sufficiently random if it passes Test > Suite X chosen by Person Y for purpose Z, where X and Y and Z are > unpredictable but highly biased and reproducible. That's so subjective that > it boils down to, It's random if you think it's random, leading me to > suspect that numeric randomness is an art, not a science. If I can meld concepts from several CS classes correctly, an infinite sequence of symbols is truly random if and only if there is no finite way to completely describe it. (If I'd actually taken an information theory class rather than just discussed it with the students, I'd be able to state that more rigorously.) No statistical analysis can completely describe such a sequence. Mean, mode, median, standard deviation, and kurtosis together are insufficient to completely describe a random sequence. (For proof, I offer two numeric sequences, identical except that the second has exchanged the positions of the first's seventh and 17th elements. Both sequences would have identical statistics, yet they are different, so their complete descriptions must differ.) 's sequence 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,... appears to be completely described by the repetition of the subsequence '0,1,2,3,4,5,6,7,8,9' The infinite sequence produced by a linear congruential pseudo-random number generator (which is what most calculators and programming language libraries offer) is completely described by the mathematical transform used to generate the next number and the seed number. Since it is cyclic, it could also be described similarly to 's sequence. The sequence that begins 1,3,5,7,9,11,13,15,17,19,21,... is both infinite and non-cyclic, but it can be completely described as the odd natural numbers, in ascending order, so being infinite, acyclic, and having an infinite alphabet are not sufficient. No examination of a finite subsequence can prove that the sequence from which it was taken is random because there exists a cyclic, non-random sequence from which that subsequence could have been drawn. Since none of our experiments will ever exhaust an infinite sequence of input symbols, we really don't care about truly random input, and selection of a possibly non-random, but apparently-random subsequence is where the art arises. lrreiche@inav.your.pants.net Drop your.pants. to reply to me directly. > an infinite sequence of symbols is truly random if and only if > there is no finite way to completely describe it. How about, say, one million repetitions of the digit sequence 0,1,2,3,4,5,6,7,8,9, followed by cosmic-noise-generated random digits forever afterwards? This should pass the test above, but may leave something to be desired in the finite initial segment :) I suppose this indicates that one need look at both short-term and long-term sequences for patterns; an example of where a long-term search paid off in the annals of counterintelligence was the Venona project -- circa WWII, Soviet spies had used the most secure possible system to encrypt their most important information (e.g. stolen atomic bomb secrets and the identities of who provided them), this being the truly random, infinitely long one time pad. Their only slip-up was that manual labor was used in its production, and couldn't quite keep up with the demand, so eventually they copied and repeated some of it. This flaw, coupled with the equally enormous efforts of counterintelligence to spot this and make use of it, unraveled what is known of the operation, but as is usual, the unraveling itself was kept top secret for decades afterwards. There's a lot of history connected with this, including, as often happens, a rewrite of much that had been assumed during the period itself [quotes from reviews are indented below] years earlier. Independently corroborated by data from the Soviet and Comintern archives, the Venona decryptions confirm things that were once controversial. Communist agents deeply infiltrated American government at the highest levels. While the Venona secrets would seem to corroborate the worst and most paranoid fears of 1950s McCarthyism, the truth is arguably the reverse: because of information Venona uncovered, the US and most other Western governments did a thorough housecleaning in the years immediately after World War II. During those same years most of the leaders of the American labor movement also performed some housecleaning, and Communism lost its chic appeal in much of elite society. This was all BEFORE Joe McCarthy went off the deep end. Ultimately, Venona confirms that people were right to suspect and fear the Communists. But it also demonstrates that by the 1950s, Soviet infiltration had become a manageable problem rather than a screaming crisis. First chapter of the book reviewed above: http://www.yale.edu/yup/chapters/077718chap.htm signals intelligence organizations barely cooperated with one another, jealously guarding their reports and their access to President Roosevelt. Outside of the Oval Office there was no collation and analysis of the totality of the intelligence information -- let alone the counter-intelligence leads -- collected by the US Government. [does this sound familiar?] More at http://www.cia.gov/csi/books/venona/venona.htm And so it goes . The Rand Corp publication of a random digit sequence http://www.rand.org/publications/classics/randomdigits mentions von Neumann and cites two papers by H. Kahn So here's some more historical information about Herman Kahn: http://www.alteich.com/links/kahn.htm In 1952 Herman Kahn became involved with von Neumann in the design of the hydrogen bomb Perhaps the most damaging effect of game theory in the hands of RAND was the paranoid bias it introduced into the modeling of an enemy's psyche. While working at RAND, Kahn settled in with a group working on nuclear strategy known as the Strategic Objectives Committee. Its members recognized that an all out nuclear war with an initial strategy to attack cities was not feasible. In response to such a strategy, Kahn (only half jokingly) proposed his 'Doomsday Machine,' a massive computer connected to a stockpile of hydrogen bombs. When the computer sensed imminent and intolerable danger from a Soviet attack, it would detonate the bombs and cover the planet with radiation fallout and billions of dead. No one laughed (except for Stanley Kubrick, whose 1964 dark comedy, 'Dr. Strangelove, or: How I learned to stop worrying and love the Bomb,' parodied Kahn's Doomsday Device). Dr. Strangelove: http://www.filmsite.org/drst.html -[]- . Kahn a whole new meaning. >:-O (Or was that Khan? I can't remember.) Also, I'm very glad to know that *that* Kahn is not the same as the Kahan who helped HP optimize its calculators' accuracy back in the 70's. Just one letter away. So close, and yet... so far. Whew! (one letter away from Joke... Jove... Joel... Joey...) -Horn- (one letter away from Shorn... Thorn... Horny...) X > (one letter away from Joke... Jove... Joel... Joey...) > -Horn- (one letter away from Shorn... Thorn... Horny...) Joy Porn? > According to my layman definition a random number is one > that isn't predictable. To get one in the range from 1 to > 6 you could throw a dice. I don't see why the probability > of a random number, a random digit, or the Nth element in > a random sequence to be X is zero. People are getting confused here, the probability of a random number is zero only if it is comes from an infinite set. If it comes from a finite set it indeed has a probability of appearing (like in the dice example). Talking about a sequence, it will have a non zero probability of appearing only if it is a finite sequence comming from a finite set of possible numbers (for example the sequence { 1 1 4 6 2 4 } when throwing a dice. PS: Excuse me if I'm not using the exact mathematical terms: english is not my mother language and i'm an engineering student, not a mathematician. miz. > According to my layman definition a random number is one > that isn't predictable. To get one in the range from 1 to > 6 you could throw a dice. I don't see why the probability > of a random number, a random digit, or the Nth element in > a random sequence to be X is zero. I agree, any chosen number isn't random - only *before* it > appears. (Isn't that related to quantum mechanics?) > You grasped the meaning right away. I keep telling about this fine distinction of before and after the generation of the number, but nobody seems to be listening. Random stands for how it was made, and if we could predict what comes out, *before* it came out, not after it. The relationship to QM is only of very general nature, only an analogy, at least for our current knowledge. With QM you can of couse make very good random number generators but not every random number generator works a' la QM. Nick. > I keep telling about this fine distinction of before and after > the generation of the number, but nobody seems to be listening. Don't worry; we're listening. > Random stands for how it was made... I agree! Numbers contain within themselves no information regarding where they came from... but it makes perfect sense to ask Is the PROCESS that PICKED this number a random PROCESS? Is celery a healthy food? Most certainly not! It's not healthy at all: it's DEAD! But we *call* it healthy due to its relationship to *our* Similarly, we call the results of random number generators random numbers not because the numbers themselves are actually random (they're not!) but because of their relationship to the randomness of the process that generated them. In other words, we think of RNG's as random-number generators (that is, generators of random numbers) but they are really random number-generators (that is, random generators of numbers). I can randomly generate a specific number, but I can't generate a random number, unless we agree to understand the term random number similarly to the illogical but understood term healthy food. Don't carry this analogy too far, or I'll make you eat some celery. >:-b -stalker- I keep telling about this fine distinction of before and after > the generation of the number, but nobody seems to be listening. Don't worry; we're listening. Hmm... > Random stands for how it was made... I agree! Numbers contain within themselves no information regarding where > they came from... but it makes perfect sense to ask Is the PROCESS that > PICKED this number a random PROCESS? OK. Then the process itself must be examined thoroughly. If after examination we still have no clue, then it could be that it is a random process, or it could be that we just can't find that it is not a random process. In the case of Nick closes his eyes and picks a celery out of Joe's bucket, I think, nobody can find out what makes Nick pick the one and not the other celery. So we call it random process. Perhaps it isn't, perhaps there is a fantastic equation with three trillions parameters that predicts that I'm going to pick the smallest one. > Is celery a healthy food? Most certainly not! It's not healthy at all: > it's DEAD! But we *call* it healthy due to its relationship to *our* > Similarly, we call the results of random number generators random numbers > not because the numbers themselves are actually random (they're not!) but > because of their relationship to the randomness of the process that > generated them. In other words, we think of RNG's as random-number > generators (that is, generators of random numbers) but they are really > random number-generators (that is, random generators of numbers). I can > randomly generate a specific number, but I can't generate a random number, > unless we agree to understand the term random number similarly to the > illogical but understood term healthy food. Don't carry this analogy too > far, or I'll make you eat some celery. >:-b No please, anything else but not that! The celery can be considered as the case of a one celeried sequence, so it is the sequence which can be called random sequence of celeries. You totally confused me, Joe! *8-S Celereatings, Nick. Well, I think it is still healthier to eat healthy food, also in the sense you are refering to. Celery as a plant isn't dead from the beginning. Most food dies during the expensive processing to make it suitable for the food industry. Thomas [...] > Is celery a healthy food? Most certainly not! It's not healthy at all: > it's DEAD! But we *call* it healthy due to its relationship to *our* [...] X > It is the way > you constructed the sequence that makes it random, not the fact that > you can predict its digits when it is ready. No The cat is at quantum stage where it is dead and alive on the same time and when you measure it by looking at the box you then kill the cat (or something like that :) X > Isn't this one of those experiments that can only be performed by a > specially trained black cat in a hat or a box or something, singing > Memory but whenever you look at the cat it drops dead from > embarrassment? > -- > Bruce Horrocks > Hampshire > England > bh@granby.demon.co.uk > Free online prime testing and factoring calculators > from RAND Corporation: > http://www-3.engineering.com/cnc/Mathematics/NumberTheory?discipline=Mathema t ics I gave Integer factorization a try, banging out this input, at random: 9753195795197859751975951795979579259725975959597 A results page shortly appeared, seemingly with no result (no factors, nor even a copy of the original value, but no statement that it was prime, either). I clicked Download Results and got the same page image; and got the same again. The HP49G, meanwhile, got '4201*2321636704403203940008557913825179542900732197' Maybe we don't know for sure whether that second factor is really prime, but it seems to have proceeded further than the web calculator (provided by RAND corporation? The U.S. government's think tank?) [r->] [OFF] . > I gave Integer factorization a try, banging out this input, at random: 9753195795197859751975951795979579259725975959597 A results page shortly appeared, seemingly with no result > (no factors, nor even a copy of the original value, > but no statement that it was prime, either). I clicked Download Results and got the same page image; > and got the same again. The HP49G, meanwhile, got > '4201*2321636704403203940008557913825179542900732197' Maybe we don't know for sure whether that second factor is really prime, > but it seems to have proceeded further than the web calculator My copy of Maple6 says that the factors given by your 49 are both correct and prime. I'd guess that although the page is Maple enabled, the webmaster goofed somewhere. --- Anything is possible, so long as it's not what you're supposed to be doing. lrreiche@inav.your.pants.net Drop your.pants. to reply directly. > Free online prime testing and factoring calculators > from RAND Corporation: > http://www-3.engineering.com/cnc/Mathematics/NumberTheory?discipline=Mathema tics > I gave Integer factorization a try, banging out this input, at random: 9753195795197859751975951795979579259725975959597 A results page shortly appeared, seemingly with no result > (no factors, nor even a copy of the original value, > but no statement that it was prime, either). Please try again, and be sure to read everything shown. The screen is supposed to refresh itself every 6 seconds, and will show the result as soon as it is found. I just tried your example, and it factored by the first screen refresh (6 seconds). The delay you encountered may have been due to Internet delays of one kind or another. > Free online prime testing and factoring calculators > from RAND Corporation: > http://www-3.engineering.com/cnc/Mathematics/NumberTheory?discipline=Mathema tics > I gave Integer factorization a try, banging out this input, at random: 9753195795197859751975951795979579259725975959597 A results page shortly appeared, seemingly with no result > (no factors, nor even a copy of the original value, > but no statement that it was prime, either). I clicked Download Results and got the same page image; > and got the same again. The HP49G, meanwhile, got > '4201*2321636704403203940008557913825179542900732197' Maybe we don't know for sure whether that second factor is really prime, > but it seems to have proceeded further than the web calculator > (provided by RAND corporation? The U.S. government's think tank?) BAH! I got the right answer from that URL after the Java applet loaded. The same one that your HP 49G gave. > I got the right answer from that URL after the Java applet loaded. I had Java disabled; they didn't seem to say anything that would have given notice that Java was required to display results. This reminds me of an electrical outlet in a European hotel which looked like a 220V outlet, into which we plugged some very expensive EEG gear. It turned out to be a 380V circuit, however :-((((( http://www.me.gatech.edu/me/publicat/AugTranscript.htm -[]- . >> Non-randomly picked example: 17. 17 is biased; it >> *insists* on being 17. It's predictable; it's *always* >> equal to 17. And it's reproduceable: 17 17 17 17 71 >> (oops) 17 17 17 ... as many as you want. Isn't this called begging the question? You select > an admittedly non-random number and then proceed > to show that it doesn't have randomness properties. Ooh, you caught me red handed! You're right; 17 is in fact one of the well-known non-random numbers, and I knew that going in. How very uncouth of me. Please let me know which random number you'd like me to use next time. > As I said in an earlier post, what makes a number random is not some intrinsic > property, but rather the process by which it is selected. Is that another way of saying, Numbers aren't random, but processes of selecting them can be? If so, then we agree. > Kosher meat's kosherness isn't intrinsic; it's a certain > process that makes it kosher. Aha! As I understand it, a rabbi's blessing creates a *relationship* between the food and God, and it's that *relationship* which makes it kosher. Is that correct? If so, I see what you mean: X (some person or place or thing or number or other concept) can really have a relation of some kind with Y, and that relationship is a real, actual quality of X, but it cannot be *detected* by any kind of examination of X alone. [For example, I own this HP32SII. There is a real relationship of ownership there; it *really is* mine. But there is no way that anybody could discern that fact by examining it, since that relationship has not caused any unique Y can their relationship be known. Similarly, if a single number or finite sequence of numbers is extracted from an infinite random sequence, the randomness of the sequence might not be detectable in the finite sequence, and is certainly not detectable in the single number, BUT the fact remains that there is a real relationship between the random sequence and the finite sequence... and even the single number! Methinks there is a convergence of ideas happening here. I *love* it when that happens! > We seem to have a paradox here. Not only are all > RANDOM numbers of infinite length zero probability > events, all numbers of any kind would also be zero > probability events. That is correct, since all numbers are actually of infinite length (in show all leading and trailing zeros mode). No paradox, just reality. > Does this mean that we can't write down any number? No, it doesn't mean that, and here's why. I can write down the number 0.153 exactly. But that's because 0.153 is not a random number! I picked it on purpose, not randomly! If I were to create a TRUE random decimal-number generator, it would NEVER pick 0.153! That's what probability theory says, anyway: the probability of an event is equal to the number of successful outcomes divided by the total number of possible outcomes. There is only one decimal number equal to 0.153, and there are infinitely many possible P(0.153) = 1/infinity = zero. The only alternative I can think of is to reject the notion that 1/infinity = zero, and go instead with the much more palatable notion that 1/infinity = infinitesimal. Would you be comfortable with the statement, The probability of a random decimal being 0.153 is infinitesimal? I hope not, because 1/infinitesimal = infinity implies that 1/0 must be *more* than infinity, which makes no sense, so division by zero must remain undefined, which throws most of the calculus into the ash can, because it *depends* on the concept of defining division by zero for patching the holes in discontinuous functions. Hence, by reductio ad absurdum, I reject the alternative, and stick with the common notion that 0 and infinity are reciprocals. This whole discussion reminds me of my students' refusal to accept that 0.99999... is *exactly equal* to 1. Not merely approaching it as a limit; *equal* to it. Counterintuitive to the max, but mathematically certain. > ... if we can find some way to write down (metaphorically, > you understand) an infinitely long decimal number, it's more > (infinitely more, in fact) likely to be random than not > (in the sense that its digits form a random sequence). Exactly. The probability of a rational number being generated by a truly random number generator is zero, unlike all HP pseudo-random number generators which ONLY produce rational numbers. I wanted to mention that in the original posting, but I thought to myself, Nah, leave it out; somebody will probably disagree with it, even though it's mathematically certain. > the probability of an event is equal to the number of successful > outcomes divided by the total number of possible outcomes. Some words seem to be missing here, like finite set of outcomes, and equally likely. > There is only one decimal number equal to 0.153 But there are two infinite digit sequences equal to that value, as there are for every value expressed by only a finite number of digits, so actually that kind of value must be twice as likely as any other :) > and there are infinitely many possible decimal numbers How do you know that numbers, as far as they might represent quantities in nature, aren't actually all quantized, and even all selected from a finite set in every case? Even spatial distances might appear to be quantized, in some theories, which if true would mean that can be matched with the set of all integers might only be possible in the imagination, and not in the physical world. > 1/infinitesimal = infinity implies that 1/0 must be *more* than > infinity, which makes no sense Maybe it's equal to the number of points on a line, which you already said was more than infinity :) > so division by zero must remain undefined, > which throws most of the calculus into the ash can, because it *depends* > on the concept of defining division by zero for patching the holes in > discontinuous functions. I thought it depended only on defining limits of sequences. > Hence, by reductio ad absurdum, I reject the alternative, > and stick with the common notion that 0 and infinity are reciprocals. It's already been pointed out that infinities are of various kinds, some being greater than others, and so must there be various kinds of zero. But why should engineers care? They only know how to build finite structures, to approximate accuracies, and leave perfection (whatever that is) to God :) Perhaps the notion that we can conceive, in our consciousness, of that which never exists in physical form, is some evidence, or at least a hint, that consciousness lies beyond the material realm. Structural and societal engineering (following the HP49G stuff): [r->] [OFF] . > We seem to have a paradox here. Not only are all >> RANDOM numbers of infinite length zero probability >> events, all numbers of any kind would also be zero >> probability events. That is correct, since all numbers are actually of infinite length (in show >all leading and trailing zeros mode). No paradox, just reality. > Does this mean that we can't write down any number? No, it doesn't mean that, and here's why. I can write down the number 0.153 >exactly. But that's because 0.153 is not a random number! So we can write down some numbers. I picked it on >purpose, not randomly! If I were to create a TRUE random decimal-number >generator, it would NEVER pick 0.153! That's what probability theory says, >anyway: the probability of an event is equal to the number of successful >outcomes divided by the total number of possible outcomes. There is only >one decimal number equal to 0.153, and there are infinitely many possible ^Cantor^ was right). So >P(0.153) = 1/infinity = zero. But by this argument, we can never write down a random number since every other number besides 0.153 has the same probability of being picked, namely P(random n)=1/infinity. The only alternative I can think of is to reject the notion that 1/infinity >= zero, and go instead with the much more palatable notion that 1/infinity = >infinitesimal. Would you be comfortable with the statement, The >probability of a random decimal being 0.153 is infinitesimal? I hope not, >because 1/infinitesimal = infinity implies that 1/0 must be *more* than >infinity, which makes no sense, so division by zero must remain undefined, >which throws most of the calculus into the ash can, because it *depends* on >the concept of defining division by zero for patching the holes in >discontinuous functions. Hence, by reductio ad absurdum, I reject the >alternative, and stick with the common notion that 0 and infinity are >reciprocals. This whole discussion reminds me of my students' refusal to accept that >0.99999... is *exactly equal* to 1. Not merely approaching it as a limit; >*equal* to it. Counterintuitive to the max, but mathematically certain. > ... if we can find some way to write down (metaphorically, >> you understand) an infinitely long decimal number, it's more >> (infinitely more, in fact) likely to be random than not >> (in the sense that its digits form a random sequence). Exactly. The probability of a rational number being generated by a truly >random number generator is zero, unlike all HP pseudo-random number >generators which ONLY produce rational numbers. I wanted to mention that in >the original posting, but I thought to myself, Nah, leave it out; somebody >will probably disagree with it, even though it's mathematically certain. >decimal numbers (or MORE than infinitely many, if > ^Cantor^ Rats. I picked a random mathematician and it was the wrong one. Phooey. became terribly ill-conditioned for any kind of mathematics other than decomposition. > But by this argument, we can never write down a > random number since every other number besides > 0.153 has the same probability of being picked, > namely P(random n)=1/infinity. Correct. Give me a counterexample, and I'll recant. My stomach hurts! If you don't soon drop this subject I will burst and it's all your fault - Horn & Rosenbaum (A Catholic & a Jew - am I right? If I can predict that, it's not random) Hey! There are no randomness at all because God knows ALL the numbers even the infinite numbers. God > Cantor's infinity > infinity > 1 > 0 PS: I still think that atoms breaking down are not doing it randomly. This phenomenon just passes the Knuth's Spectral test (with flying colors - can colors fly? :) >>decimal numbers (or MORE than infinitely many, if > ^Cantor^ Rats. I picked a random mathematician and it was the wrong one. Phooey. became terribly ill-conditioned for any kind of mathematics other than > decomposition. > But by this argument, we can never write down a > random number since every other number besides > 0.153 has the same probability of being picked, > namely P(random n)=1/infinity. Correct. Give me a counterexample, and I'll recant. [Warning! This thread is getting more odd and more random as it goes on. It seems to be approaching maximum entropy. In any case, it went off-topic long ago. You have been warned! -jkh-] > My stomach hurts! Try the Mathematical Digest. > There are no randomness at all because God knows ALL > the numbers even the infinite numbers. That nothing is random from God's point of view was proven handily by Thomas Aquinas some 750 years ago. But that lends no support to the hypothesis that nothing is random from *our* point of view. After all, God's justice and God's mercy are both infinite and identical, but ours are neither by a long shot! > God > Cantor's infinity > infinity > 1 > 0 My way of looking at it is: if 1/infinitesimal = infinity, then 1/0 = God. Perhaps the Big Bang really *did* happen when God divided by zero. What are the reciprocals of transfinite numbers, anyhow? Subfinite numbers? Hypofinite numbers? Numericules? Diminutives? Speckulations? Weenies? > PS: I still think that atoms breaking down are not doing it randomly. > This phenomenon just passes the Knuth's Spectral test I agree. Furthermore, due to the quantum lumpiness of physical reality, we shouldn't call it a space-time continuum at all; it's a space-time contiguity (we ought to call it a contiguum, but there's no such word in English). In a way, Pythagoras was right; there are no irrational numbers in reality, only integers (quanta) and their ratios. So even so-called random physical processes only have a finite number of possible states, and hence are not truly random, but (like computer RNG's) can be sufficiently *chaotic* to survive the various tests of randomness. Whatever it is, it's all good. > What are the reciprocals of transfinite numbers, anyhow? Subfinite numbers? > Hypofinite numbers? Numericules? Diminutives? Speckulations? Weenies? Cantor proved for cardinal numbers a,b that a x b = max{a,b} if at least one of them is transfinite. Thus, no transfinite cardinal can have a reciprocal. Slighly more complicated are the arithmetical formulas for transfinite ordinals, but also such an ordinal has no reciprocal. The situation changes drastically when looking at non-standard-analysis, a new disciplie which has to do with real closed extensions of the real number field in which exist infinite numbers, i.e., those greater that all reals. Such a number has a positive reciprocal smaller than all positive reals, hence, is an infinitesimal in the sence of Newton, Leibniz and Euler. With the aid of his infinitesimals, Euler developed the exponential series for the function e^x already on page 1 of this book! Then he takes just a little rest in the theory to compute e from e = 1 + 1/1! +1/2! + ... with a precision of 25 decimals. Eulers book shows how fast one can attend results for which at present (without infinitesimals) at least 100 pages of preparation are needed Infinitesimals were eliminated from analysis by Cauchy and Weierstra¤ because of lack of a logical foundation. But to the great surprise of the classical analysis, where reintroduced in about 1960 by Abraham Robinson who explored modeltheoretic methods of Alfred Tarski. Both Alfred Tarski and Abraham Robinson emigrated just before world war to from Europe to the USA. At many universities in the world, non-standard analysis is already taught but it will be still about a decade to learn on these new numbers in colleges and high-scools. - Wolfgang PS. The USA receveid so much intellectual potential from Europe before and after world-war II for *nothing* that the should perhaps feel obliged to help the rest of the world at least in science and engineering. E I forgot to mention the title of Eulers book recommended occasionally to my math students: L. Euler, Introductio in Analysin infinitorum, Collected works, vol 8, Leipzig 1922. - Wolfgang Any ISBN numbers? What translations are available? Finnish would be good, English acceptable. My Svenska & Deutch are not good enough for math stuff. Remember, my IQ is almost certainly below 150. > I forgot to mention the title of Eulers book > recommended occasionally to my math students: L. Euler, Introductio in Analysin infinitorum, > Collected works, vol 8, Leipzig 1922. - Wolfgang > This whole discussion reminds me of my students' refusal to accept that > 0.99999... is *exactly equal* to 1. Not merely approaching it as a limit; > *equal* to it. Counterintuitive to the max, but mathematically certain. It's related to the concept of infinity, which I also found really hard to grasp at first. I hope you wasn't hard on him or her? Only time and thought - not lessons - will let the student see the truth... > Further proof: Is 0 a random digit? No. Is 1? No. Etc, up to 9. And > those are the only digits there are. Therefore, by process of brute > elimination, there is no such thing as a random digit. Why not? Ok, let's start from the top. Is 3 a random digit? Further proof: Is 0 a random digit? No. Is 1? No. Etc, up to 9. And > those are the only digits there are. Therefore, by process of brute > elimination, there is no such thing as a random digit. > Why not? Ok, let's start from the top. Is 3 a random digit? Well, if you give me a 3 and you tell me that's the number, boy!, then of course it is not random. But this is not the question. The question is, how was this 3, as a sequence iof only one digit, was constructed. If you tell me to close my eyes, and just pick a number out of a bucket full of 1's, 2's ... and so on, and if it just happens that I pick this 3, then this 3 *is* a random sequence of only 1 number, not because I don't know now what number I have in my hands, but because I couldn't tell that before I picked it up. The way the sequence was constructed is imposrtant, not if we can somehow re-construct it after we already have it. I'll answer to you with another question. As asked, is 0,1,2,3,4,5,6,7,8,9 a random sequence? Be careful here, because if you say no, then I have to ask you if you think that this sequence is impossible to create with the random number generator of the HP49G. And if you think that it is really impossible, then consider the sequence 7,2,5,9,1,6,3,8,4,0. Is this more or less possible? In fact they are both exactly as possible, the only difference being that on the first we all readily recognize a pattern, while on the second.., well it is harder. BTW, there is no single finite sequence on this world, that can't be patternized *after* it has been constructed. To use the same example as above, enter [[1 2 3 4 5 6 7 8 9][7 2 5 9 1 6 3 8 4 0 ]] and press [LAGRANGE] on the HP49G. You get a polynomial that predicts all digits, that is if X=1, then it spits out the digit 7, if X=2 then it spits out the digit 2, and so on, X being the ordinal number of the the digit in the sequence. You can do that with each an every sequence, after you have randomly constructed it. Does this mean that your hands obeyed the law of the Lagrange polynomial when they picked the numbers out of the bucket? Of course no. The important thing is how the sequence was created, not if you can re-construct it later on using some rule. And that because the next time you do the same experiment, picking numbers out of the bucket, the rule that you used to re-construct the previous sequence will be useless. If it were that way, that random meant unpredictability of the next digit of an already constructed sequence, then there would be not a single random sequence on this planet. In exactly the same way, if there is no way of saying what number I'll pick out of the bucket of numbers, then the resulting sequence of picked numbers is random, even if it only consists of a single number. It get's the lable random out of the way it was constructed, not because I know that it is 3 after having picked the number. I hope that my random chosen vocabulary was not too random for understanding. Predictabel greetings, Nick. > Joe: > Are you going to go to your local state lottery organiser and tell them > that the numbers painted on their balls are not random and therefore the > winning number each week has not been chosen randomly? No! *I* haven't got the balls! ... Um, what's that? ... Oh, *so* sorry. Unfortunate choice of words. Ahem. What I mean is, the winning numbers are not random in and of themselves, because if they were, they could just use the same numbers every time, because they're random, and that's all we need, right? No, of course not. The *sequence* of winning numbers is generated by a *random process*, and as long as that process stays random, it produces a random sequence from which winning numbers are *sequentially* chosen. It's not the numbers that have the property of randomness; it's the sequence, because of the process that generated it. Causality. Essential concept. Without it, we can only have sufficiently pseudo-random, but not random. > It's not the balls, it's the mixing up and unbiased > selection that makes *each number* random. If that were correct, that each number in the current winner's list is a random number, we could therefore reuse those exact same numbers (pre-determined to be truly random numbers) for each lottery! No need for that machine any more! Of course, after a few lotteries, everybody would notice how the same random numbers keep appearing, and everybody would bet on those, and everybody would win! No. It's the *sequence* of winning numbers that's random, not any of the numbers themselves. Is sequence S random? Maybe. Depends on how it was generated. Is number X random? No. Is 6 a random number? Is Giovanni H. Jonesmythe a random person? If you say, That depends on the sequence from which you extracted that example, then I rest my case. It's the *sequence* that's random, not the elements therein, just as the set of primes is an infinite set, but none of the primes themselves are infinite. Randomness is a property of *sequences*, not of numbers, and sequences *inherit* that property from the process that creates them. No, the elements do not inherit the properties of the sequence, as shown already with the case of prime numbers, and just about every other integer sequence in Sloane's delightful almost-infinite online set at http://www.research.att.com/~njas/sequences/index.html > One could argue that this week's lottery draw is simply the > continuation of last week's sequence, which was a continuation of the > week before's. One could argue? It's not just arguable; it's an historical fact. Print all the winning numbers ever picked, and what do you have? Yes, quite. A sequence. A *random* sequence, if the machine uses a physically random process to create that sequence. > Or is it only a continuation when the same machine and > the same set of balls are used? Answer: it's irrelevant. Au contraire! It's not only relevant, it's essential to the discussion! The randomness of a sequence *depends* on the process that created the sequence, doesn't it? Where else would this quality of randomness come from? Do we *impose* it upon unsuspecting numbers regardless of their origin and without their consent? Is it not rather *caused* by the process that generated the sequence? It all depends on this: Do I believe that mathematics is a useful but imperfect abstraction from external physical reality, or do I believe that so-called external reality is merely an imperfect shadow (cast on the cave wall of my consciousness) of imponderable, ineffable, mathematically pure realities? In brief, am I a Realist (aka scientist) or an Idealist (aka Platonist)? And am I such by my own free will, or was it determined by the Fates? And if there really is a Universal Consciousness, could it be wrong? Reporter: And who have we here? Joe Q Random: Here's my wife, Betty Random, and here are all the Random children. Reporter: Um, that boy over there doesn't look like a Random child to me. Betty: Yes, but I can assure you that his resemblance to Q Postman is a pure coincidence. Reporter: Ah, the unpredictable randomness of genetics! Joe: Exactly. -Realist- A mind is a terrible thing to boggle. > Is sequence S random? Maybe. Depends on how it was generated. I findi it interesting to note that the sequence of digits in the fractional part of pi (represented in decimal) passes all tests of randomness, yet the nth digit (represented in hexadecimal) may be computed without knowledge of any of the more significant digits. Does that imply that the decimal sequence cannot really be random? Or can the randomness of a sequence vary depending upon its encoding? -- A virtual font of useless and arcane knowledge. lrreiche@inav.your.pants.net Drop your.pants. to reply directly. > Is sequence S random? Maybe. Depends on how it was generated. I findi it interesting to note that the sequence of digits in the fractional > part of pi (represented in decimal) passes all tests of randomness, yet the but the decimal digit can not be computed? > nth digit (represented in hexadecimal) may be computed without knowledge of > any of the more significant digits. but the hexadecimals don't pass the randomness tests? > Does that imply that the decimal sequence cannot really be random? Or can > the randomness of a sequence vary depending upon its encoding? That might imply a flaw in your logic chips (A cousin to Mr. Spock, my real name is Peter Nimroy ;) > No. It's the *sequence* of winning numbers that's random, not any of the > numbers themselves. I've got it now! You have pretty understandable lessons you preach! (pun intended) I recently loaded MK,Erable, and ALG48 all onto my HP48GX. All programs are loaded in the slot 2 ( 1 Meg) card except MK of course. When I loaded Erable, it would only work on port 0, using up almost all of the available 120k ram. Is there a better way to do it? I couldn't seem to get Erable to work unless I loaded in port o. TIA program) > I recently loaded MK,Erable, and ALG48 all onto my HP48GX. All > programs are loaded in the slot 2 ( 1 Meg) card except MK of course. > When I loaded Erable, it would only work on port 0, using up almost > all of the available 120k ram. Is there a better way to do it? I > couldn't seem to get Erable to work unless I loaded in port o. Only the kernel of erable needs to be in port0, the rest of it can be in port2. I believe it only takes about 40KB in port 0 There is a version of erable using absolute addresses. it is smaller and slightly shorter than the other version of erable Only the kernel of erable needs to be in port0, the rest of it can be in > port2. I believe it only takes about 40KB in port 0 Yes: Erable 3.024 and Erable 3.1xx > There is a version of erable using absolute addresses. it is smaller and > slightly shorter than the other version of erable Erable 3.2xx: shorter the whole prg, but the part you must instal in port 0 (if MK is in port 1) is ~85Kb This is the best, in spite of the memory problems. using Erable, Alg48, MK, Jazz, etc enhancements OR one could by a HP 49G with almost everything build-in (except MASD replacing Jazz and no source debugging). The main features (with enhancements) are already in the ROM but no free ports (who needs them?). I love this machine!! (Maybe JYA can bring in a source debug?) VP(N) > Only the kernel of erable needs to be in port0, the rest of it can be in > port2. I believe it only takes about 40KB in port 0 Yes: Erable 3.024 and Erable 3.1xx > There is a version of erable using absolute addresses. it is smaller and > slightly shorter than the other version of erable Erable 3.2xx: shorter the whole prg, but the part you must instal in port 0 > (if MK is in port 1) is ~85Kb > This is the best, in spite of the memory problems. using Erable, Alg48, MK, Jazz, etc enhancements And another message ... You can't merge the port1 and have the MK Jean=Yves Autch! One more reason to think about buying the HP 49G. in X > You can't merge the port1 and have the MK Jean=Yves I've got a problem that appears with the 49 but not with the 48. The problem is that when you press EVAL the 49 replaces all the unknowns in an eq by their stored values. Is there any way (any flag) of stopping the 49 from doing this? It's a big problem when using some programs that where initially made for the 48. miz. > I've got a problem that appears with the 49 but not with the 48. The > problem is that when you press EVAL the 49 replaces all the unknowns > in an eq by their stored values. Is there any way (any flag) of > stopping the 49 from doing this? It's a big problem when using some > programs that where initially made for the 48. The '48 does the same - the behaviour is identical between the two calcs in this respect. There are solutions, however: - Use different variable names. - Purge the variables. - Move the variables to a higher directory than HOME, and do your EVAL in HOME. As a former Sharp user, I used to program in basic. I bought Hp49G and now I have to wright a program with many goto n structures. I am lost. Just got started and alredy have 20-30 subprograms. Is there any easier way? Sorry for my bad english and please help.. Zvonko Juras > As a former Sharp user, I used to program in basic. I bought Hp49G and > now I have to wright a program with many goto n structures. I am > lost. Just got started and alredy have 20-30 subprograms. Is there any > easier way? > Sorry for my bad english and please help.. > Zvonko Juras Long, long ago, in this very newsgroup, Chris Campbell (famous for giving for turning BASIC programs full of GOTO's into RPL! Learning RPL will serve you well in porting any program in any language into tight, efficient RPL. However, it must be admitted that many BASIC programs are just plain incomprehensible spaghetti code; for such evil programs, Campbell's method works just fine. He took one of the most convoluted BASIC programs ever written (a maze generator) and applied his method to it... and it ran in RPL! Oldtimers will recognize his writing style. Ah, those were the days! Happy Programming! I tried translating [MAZE] from Basic to RPL a couple of years ago, but very quickly went nuts in the process, as about 80% of the program lines end with a GOTO or implied Goto... The school of thought that i was then working from was that i would have to convert the Basic program into a Flow-Chart, and then translate -that- into RPL... I had pasted several sheets of paper together and was merrily pushing the chart out further and further, writing smaller and smaller, drawing more and more boxes with paths leading from one to another and back again, in several different colours, all the while trying to keep some sense of what the program was doing... I've found that whenever i'm engaged in something like this, i have to completely submerse myself in it, so that nothing is allowed to compete with the allocated neural capacity that's been set aside for this... Then for whatever reasons, i was somehow distracted, and when i returned to the flowchart in question, all my meticulous scribbilings made all the sense of the residue one might find in a slightly gelatinous puddle produced by a sick hamster. [!!! -jkh-] sigh. So i put it aside-- until just recently when the necessary Key Insight occurred to me, in conjunction with a collection of postings on the comp.sys.hp48. The Key Insight is this: Don't even Try to Understand the program. Simply create a List of all the Basic program lines, With each Program Line constituting one Programming Object, Then evaluate each object in the Desired Sequence. It's mighty dang slow, but the criteria that i was working from was that; a) i just want the program to work. b) i don't want to figure it out. c) & don't want to put alot of effort into it. The procedure then becomes: Type the Basic program into your Big Box. PROOF READ IT! PROOF READ IT AGAIN!! If possible, isolate the most offensive areas where the most number of Goto's occur...The method i used was to print out the program, paste the sheets together so that it created one long continuous listing, and then used a red pen to draw links from line to line going down through the program on the left, and a blue pen to draw links from line to line going up through the program on the right. This created a very messy listing, but it was also clear that the program consisted of essentially three parts, two of which could be converted into RPL fairly straight-forwardly. The middle part however was a classic example of incomprehensible spaghetti code. I took that middle part and copied it to another file where i could work on it in isolation. I then used the Find and Change-All functions to ReNumber the program lines from; in this case, 210 through 1000, to 1 through 100, along with all the internal references to those line numbers. Then i changed all the Carriage returns to ProgramObject delimiters so that each line was now enclosed in the proper << & >>'s for RPL, and then i put list delimiters { } around the outside of these, and an HP header at the top. So that it now looked something like this; %%HP: T(3)A(D)F(.); { << 1 GOTO 8 >> << 2 IF R<>H THEN 6 >> << 3 IF S<>V THEN 5 >> << 4 R=1: S=1: GOTO 7 >> << 5 R=1: S=S+1: GOTO 7 >> << 6 R=R+1 >> ... } Then each individual program object would have to be tediously translated to RPL, an annoying, but not impossibly dreary process... The Bit of Code in the Main program that executes this list consists of this routine: Which takes one number, the number referring to the object that should be next Evaluated...so that each Line/ProgramObject has to leave on the stack the number of -Next- Line/ProgramObject to be Evaluated...??? <> means Not-Equal; =/ %%HP: T(3)A(D)F(.); { << 8 >> << R H =/ 6 3 IFTE >> << S V =/ 5 4 IFTE >> << 1 { R S } STO 7 >> << 1 'R' STO 1 'S' STO+ 7 >> << 1 'R' STO+ >> ... } All the variables have to be either Global Variables or left-arrow prefixed Local Variables; <- ! Then simply arrange all the bits in their appropriate sequence and follow all the other -normal- RPL programming directives! program ----- > As a former Sharp user, I used to program in basic. I bought Hp49G and > now I have to wright a program with many goto n structures. I am > lost. Just got started and alredy have 20-30 subprograms. Is there any > easier way? Yes, start by using RPN input, and thereby UserRPL. Advance to SysRPL and you're saved In the process of doing Debug4x and Conn4x, I have updated the 4 basic HPTools (RPLCOMP etc). The BETA may be downloaded from: http://nereids.home.netcom.com/HPTools-3.0.7.zip Changes: RPLCOMP: aborted on any error in CODEM...ENDCODE blocks; fixed. RPLCOMP: now generates the proper values for HP49 MASD {{...}} sequences. Long file names with embeded spaces can be used on the command line AND most directives RPL INCLUDE as well!) See the ReadMe.txt for details and let me know if you find bugs or things that affect old files. -- - - - - - - - - - - - - - - - - Bill Graves RKBA! bgraves@ix.netcom.com I can't find it on your link, strange. It's not on hpcalc.org nether. (GNU?) Hptools have never worked for me. I have tested on DOS 6.5, Win98, AND See a one year old post, by me: 3%244N4.1568880%40newsc.telia.net I hope this loong link work. Today I tested with compiling the sourcecode, BUT it didn't work. package name (.tgz), that didn't work nether. strange.. > In the process of doing Debug4x and Conn4x, I have updated the 4 basic HPTools (RPLCOMP etc). The BETA may be downloaded from: > http://nereids.home.netcom.com/HPTools-3.0.7.zip Changes: > RPLCOMP: aborted on any error in CODEM...ENDCODE blocks; fixed. > RPLCOMP: now generates the proper values for HP49 MASD {{...}} sequences. Long file names with embeded spaces can be used on the command line AND most directives RPL INCLUDE as well!) See the ReadMe.txt for details and let me know if you find bugs or things that affect old files. > -- - - - - - - - - - - - - - - - - > Bill Graves RKBA! > bgraves@ix.netcom.com I am sorry everyone. I have been asked to withdraw the updated HPTools for now. Although I really do not wish to do this, it is prudent to wait for a time before making the tools available. -- - - - - - - - - - - - - - - - - Bill Graves RKBA! bgraves@ix.netcom.com > I am sorry everyone. > I have been asked to withdraw the updated HPTools for now. > Although I really do not wish to do this, it is prudent to wait for a time before making the tools available. > -- - - - - - - - - - - - - - - - - > Bill Graves RKBA! > bgraves@ix.netcom.com hum........ La Prensa 1/12/2002 Arnoldistas suplicar.87n a Washington Eliseo N.9c.96ez, vocero arnoldista, anuncia que cabildear.87n ante el Departamento de Estado de EE.UU. por la suspensi.97n de la visa a Arnoldo Alem.87n Dijo que ma.96ana informar.87n cu.87ndo reactivar.87n sus protestas en el pa.92s William Briones Lo.87isiga william.briones@laprensa.com.ni El Partido Liberal Constitucionalista (PLC) responder.87 a la suspensi.97n de la visa estadounidense del diputado Arnoldo Alem.87n, enviando emisarios al Departamento de Estado de Estados Unidos, para investigar sobre esa medida, a la par que reiniciar.87n a lo interno del pa.92s los actos de protesta contra el desafuero de Alem.87n. Aunque la cancelaci.97n de visas era una medida esperada por los liberales, la amenaza que pende sobre otros 38 diputados arnoldistas mantiene en estado de alerta a .8estos, muchos de los cu.87les insisten que no votar.87n en la Asamblea Nacional por el desafuero de Alem.87n, acusado de supuestos malos manejos de los fondos p.9cblicos. La suspensi.97n de la visa a Alem.87n, se produce siete d.92as despu.8es que la embajadora estadounidense Barbara Moore advirti.97 a los legisladores, que no deb.92an proteger a corruptos. .8bAquellos que protegen a los corruptos de ser castigados, no son amigos de Estados Unidos, y claro que no deben esperar ning.9cn favor o privilegio de parte del gobierno de Estados Unidos.8a, dijo el pasado 22 de noviembre. Eliseo N.9c.96ez, vocero del PLC, dijo a LA PRENSA que esa medida .8bno tiene mayor impacto. Vamos a cabildear a los niveles m.87s altos en Washington para tener derecho de exponer nuestro punto de vista. Se ha hecho alg.9cn tipo de cabildeo, pero vamos a intensificarlo, porque tenemos derecho a ser o.92dos, independientemente de los resultados.8a, coment.97. N.9c.96ez dijo que el PLC dar.87 a conocer ma.96ana lunes los detalles de las acciones ante esa medida que, asegur.97, .8bfue solicitada por Enrique Bola.96os, y se trata de una ayuda que le est.87 brindando (Estados Unidos) a este gobierno. Lo est.87n tratando de oxigenar para ver si logra salir de la crisis que lo agobia y que podr.92a llevarlo a dimitir.8a, coment.97 Confirm.97 que Adolfo Calero y el ex canciller Francisco Aguirre estar.87n al frente del cabildeo en Estados Unidos durante los pr.97ximos d.92as. .8bTambi.8en vamos a reactivar las protestas, que por razones estrat.8egicas se hab.92an suspendido, hasta marchar a Managua a mediados de diciembre.8a, adelant.97 N.9c.96ez. CASO POR CASO Michael Stevens, Consejero para Asuntos P.9cblicos de la Embajada estadounidense, dijo desconocer de una supuesta lista de diputados arnoldistas para cancelarles las visas. .8bNo tengo ning.9cn conocimiento con respecto a otros casos en este momento. La visa del doctor Alem.87n fue revocada ayer (viernes).8a, dijo. .8bLa aplicaci.97n de la Ley Patri.97tica sobre lavado de dinero, que resulta en revocaci.97n de visa se hace caso por caso, porque trabajamos en un gobierno bajo el dominio de las leyes y se trata de casos de individuos que tienen visa, no de listas ni de categor.92as de personas. Cuando se juntan pruebas suficientes de caso particular, se puede tomar una acci.97n.8a, explic.97. Stevens no quiso confirmar, aunque tampoco rechaz.97 la posibilidad de que en el futuro analicen caso por caso a los diputados arnoldistas. .8bPrefiero no entrar en casos hipot.8eticos con respecto al futuro.8a, indic.97. I successfully upgrade my rom from 1.10 to 19.6. Why is it that the serial number embossed on the back of the calculator's case differs from the number given when the serial command is executed? i.e. back of case: CN13101332 SERIAL: CN13201841 OFF TOPIC. . . but I have a problem with a Panasonic portable hand cassete player and no where else I can tyhink of to get the answer. One of the 2 AA battery kinds. A short while ago it stopped working. After a little bit of experimenting, it turns out that a Ëdiode? (i think) stopped wrking. I{ve asked the repair shops around here but no one has one. I figured as there are a few people here that know about electronics someone would be able to suggest an alternate replacement. Keep in mind I{m not able to just run down to Radio Shack and buy one. . . The diode (i think that is what is is) is different then most diodes. It looks like half a black cylinder with two feet. (like the three feeted ones that I can{t remember what are called *sheesh. . .*). On the flat end is written N25 and below it off to one side U. I tried bridging it with a little wire, and that works just fine with new batteries, but slows down after a short while. I tried various low level resistors like the honduran repair guys said, but that doesn{t work. I don{t have any books to look at to find an alternate replacement and cant find it on the net. I would be very appreciative if someone can suggest a more common alternate or something so I can fix this. I know someone out there knows about diodes as there has been past discussion of the question: my hp48Çs new batteries only last for 2 or 3 days after I put the batteries in backwards. . . next monday. =) TW the diode is for reverse battery protection i assume? is it in series with the batt's to the electronics? if so, then its for reverse protection. then you could bypass it, just make sure you always put your batt's in correctly. typical Si diode voltage drop is about 0.6 v. quite a bit from a 3v supply. maybe a special diode, or a Ge type which has 0.3v drop. good luck be sure to understand http://www.anti-matrix.net I am thinking of ways to add some user RPL support to Debug4x and that requires a font with all the special HP characters. There is such a font on HPCalc.org (HP48ttf.zip) and it looks reasonable except the character sizes are all off. A 10 or 12 font display in the editor requires me to set the size of the hp48ttf to 22 or 24! I suspect there is a parameter (or two) in the file that could be changed to fix this but I don't know much about these ttf fonts (I do know there is a lot to them). Anyone have a clue? -- - - - - - - - - - - - - - - - - Bill Graves RKBA! bgraves@ix.netcom.com