Free42 functionality - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: Free42 functionality (/thread-65547.html) |
Free42 functionality - Vincent Weber - 11-09-2004 Hi Thomas, First, I really want to congratulate you for your simulator. I have it running just fine on my gold old Palm M500. I have started (but not finished) such a simulator myself, and I know how much work it is. Congrats ! Then, I think that what would be great is to take advantage of the freedom you get by writting a simulator instead of an emulator to actually -improve- the original calculator. Here is a list of what could be great improvements over the (already impressive) features of an HP-42S:
1) Direct alpha entry a la HP-41, with labeled letters, rather than the ennoying 2-stroke letter entry.
This would make the best calc even done by HP ! What do you think ?
Re: Free42 functionality - Thibaut.be - 11-09-2004 Hi Thomas,
I'm really happy that your emulator is available to us, and, cherry on the cake, for free ! So far it worked perfect for me, though I did not check advanced functions. I won't request many improvements, but just one for user-friendliness, as I wish it to be my permanent calculator on my desktop. Could you implement computr keyboard input for the essential keys, such as numbers, arithmetic operators, and of course ENTER... ?
And once again, good job !
Re: Free42 functionality - Thomas Okken - 11-09-2004 Could you implement computer keyboard input for the essential keys, such as numbers, arithmetic operators, and of course ENTER... ?
Absolutely. Configurable keyboard mapping would be a big plus, and it will definitely be available in the next major release (1.1). Re: Free42 functionality - Thomas Okken - 11-09-2004 Here is a list of what could be great improvements over the (already impressive) features of an HP-42S: [...] Direct alpha entry is on my own TODO list, too. Perhaps it will be done by PC keyboard mapping, like Emu42, or maybe something more direct -- things like PalmOS Graffiti input, and alternative input methods for the disabled, are all things I have to consider, too. Complex data entry independent of the display mode, and things like HP-41CX-type file and time functions, are easy to add. As long as a new function can be implemented using the 5 data types of the 42S, adding it to Free42 is pretty simple. (Display-mode-independent complex data entry can also be accomplished in about a dozen lines of user code.) Fractions and algebraic equations are a different story, because you have to add new data types. These would require new code all over the place, because almost every command has to be modified to handle them.
Speaking for myself, regarding algebraic equations: I have tried the HP-28S and the HP-48G in the past. I thought they were really clever and very elegant, but in the end, not really very useful. For symbolic math, anything less than Mathematica or Maple is useless (and handhelds necessarily don't have the full-size keyboards and displays that you need in order to work with that type of software). For programming, structured languages are a poor fit for handhelds too, again because of keyboard and display limitations. (Try writing functions with conditionals and/or loops nested more than a couple of levels deep. You will not be a happy camper editing such code on a 28/48 -- been there, done that.) Re: Free42 functionality - Vincent Weber - 11-09-2004 Hi Thomas,
Just my 2 cents :) Re: Free42 functionality - hugh steers - 11-09-2004 i have a suggestion for implementing fractions without requiring new types. provide a rationalizer that turns X into P/Q. what i did in scicalc is compute P and Q no bigger than a max size (eg 6 digits each) and if P/Q was within a very small error of X, say 1e-20 (in my case, maybe 1e-10 for you), then accept it, otherwise reject. that is to say my “rationalizer” would only rationalise number it believed to be rational rather than find rational approximations for an X (of course the latter might also be useful).
my algorithm was based on continued fractions (i can give you some code if you like). alternatively, there is a better algorithm designed by joe horn, detailed in datafile V22N6 called the PDQ algorithm. unfortunately, i cant untangle it from the code. does anyone know any other references to this method, joe horn??
Re: Free42 functionality - Erik Ehrling (Sweden) - 11-09-2004 The reason I once wrote a version of QPI for the HP-42S was that I missed the possibility to calculate with fractions. Given the speed of Free42 it should give an almost immediate answer - even though its all written in FOCAL. (However, I am a little bit curious on how it behaves on the binary artithmetic implementation in Free42.) And besides I think it is more important to "fool proof" the functionality of the existing HP-42S functions *first* before going off for something new. This way we would get a very stable implementation that we could trust in the same way we can trust the results on the HP-42S. Only then would I try to extend the functionality base beyond the original.
Best regards, Re: Free42 functionality - Thomas Okken - 11-09-2004 Well, I guess one way to add symbolic equations to the Free42 architecture would be to simply support unlimited-length strings, plus an EVAL function that maps names to variables and/or user programs and/or built-in functions and basically transforms infix notation to RPN on the fly. For maximum geek points, I probably wouldn't be able to resist writing a COMPILE function that transforms an expression to a regular stored user program, MVAR declarations and all. :-)
On the topic of rational numbers: if that can be done adequately as just another display mode, without adding a new type, than that's pretty easy... But just out of curiosity: who would actually *use* such a mode? (I can just feel another discussion about the (non)importance of "exact" results coming on! Like it's not enough having to put the BCD crowd in their place. <g>)
Re: Free42 functionality - Thomas Okken - 11-09-2004 If you want to implement, let's say, a Time Value of Money, this is more naturally done if you can type the expression rather than building a RPN program.
FWIW, this kind of stuff is totally easy on the 42S.
01 LBL "TVM"
Then go to SOLVE, select "TVM" from the menu, and presto, you have TVM, just like on a real financial calculator. The solver shows a menu consisting of the names listed in the MVAR instructions, and you can set the corresponding variables, and solve for any of them, by pressing the corresponding keys. It's not the most efficient approach in terms of CPU usage, but even the real 42S is fast enough to make this usable. Re: Free42 functionality - Vincent Weber - 11-10-2004 Hi Thomas, Re: Free42 functionality - Thomas Okken - 11-10-2004 Although TVM is a fairly trivial exmaple to implement in RPN, some other equations may require to store a lot of intermediate results in registers, and it makes sense to code them in algebraic form. I see your point, but still, how do you envision adding that kind of capability to the HP-42S? I still think that once you start dealing with the secondary issues of supporting complicated algebraic expressions, you'll find yourself having to implement an unlimited-depth stack, and a sophisticated expression editor, and support things like expression simplification and other symbolic operations (derivatives, at least, and before you know it you'll want symbolic integration and root finding, too). I think once you start going down that road, it will lead you straight to the HP-28[CS] and its successors. There's nothing wrong with that per se, but for me, the biggest asset of the HP-42S is its simplicity (as in "its ease of use", not as in "its limitations"), and for me, losing that simplicity is not acceptable.
Having said that, if you could suggest a user interface design that supports algebraic expressions, *without* adding any keystrokes, or complexity in the display, for when you're doing the kinds of things people use the HP-42S for today, I would be interested to hear about it.
Re: Free42 functionality - Nenad (Croatia) - 11-11-2004 IMHO, you, Thomas, have already done a great-great job and the present release is fully functional for me. The only possibilities I would like you to add refer to: a) the use of keyboard : 0-9, ., +, -, *, /, ENTER, A-Z to be entered directly from the keyboard; b) the use of shift key (press the function above the key directly, instead of using the shift key to do it). Both of the above have already been mentioned by other posters. If we discuss the functionality of the calculator itself, we may always come to another calculator, not the 42s any more.
On my PCs I always use good old ttCalc v1.3 as the Windows calculator and would be happy to replace it by a Free42.
Re: Free42 functionality - Vincent Weber - 11-11-2004 Hi Thomas,
Do you own a 17B/17BII/18C/19B/19BII or 27S? There is a nice equation editor, which does not do derivatives or anything complexe like this, but just allow you to specify multi-variables equations, with a IF and SUM functionality a la Excel, and L() and G() (LET and GET) functionality to store intermediate results. These advanced functionality would not be needed in the 42, which has more advanced RPN programmability. None of these model have anything to do with the complex RPL system of the 28/48. The equation functionality fits nicely in the calculator - as a complement to RPN (in the case of the 32SII).
Cheers, Re: Free42 functionality - Thomas Okken - 11-12-2004 I don't own any of those machines, I'm afraid. I'll have to take a look if I can find manual scans for any of them on the HP Museum CDs... I know there's a 32S manual there, but none for the 32SII... Do you know if that makes much difference, regarding the equation functionality?
- Thomas
Re: Free42 functionality - Thomas Okken - 11-13-2004 I found some relevant manuals on the HP Museum CDs -- 18C, 27S, 32S, and 27S/19B Technical Applications. Re: Free42 functionality - Vincent Weber - 11-14-2004 Hi Thomas,
Thanks a lot for this investigation - much appreciated. Just one more thing - there is a small behaviour difference between the real HP-42S and Free42: if you type XEQ, STO or RCL on a real HP-42S, you can then enter alpha mode (to enter a variable or lable) EITHER by pressing enter directly (as in Free42) or by shift-ENTER (which is legal on the HP-42S, but not in Free42). Small matter, but anyway :) I understand your priorites. Thanks for your openness to other ideas, and congrats for this great program.
Cheers, Re: Free42 functionality - Thomas Okken - 11-18-2004 [...]the 32SII is the only machine that has -both- the equation functionality -and- RPN programming; hence, you can have an equation directly in a RPN program, which is useful when you have a complex expression with a lot of variables to evaluate in a program.
OK... I found those manuals you mentioned on the HP web site; I'll take a look at them later on. When I do add equation functionality to Free42, I'll try and make sure I borrow *all* the neat ideas I can find. Just one more thing - there is a small behaviour difference between the real HP-42S and Free42: if you type XEQ, STO or RCL on a real HP-42S, you can then enter alpha mode (to enter a variable or lable) EITHER by pressing enter directly (as in Free42) or by shift-ENTER (which is legal on the HP-42S, but not in Free42). Small matter, but anyway :)
A bug is a bug! Thanks for letting me know. This will be fixed in Free42 1.0.9, probably later this week. Re: Free42 functionality - Vincent Weber - 11-18-2004 Great job Thomas ! I really appreciated your openness and your responsiveness. There should be more developpers like you... Do you know Charles Lee (P41CX HP-41 Palm emulator's author) ? He has the same passion as your have :) Thanks again and cheers,
Vincent
Re: Free42 functionality - Thomas Okken - 11-18-2004 Thanks for your kind words. One does what one can... Re: Free42 functionality - Vincent Weber - 11-19-2004 Dear Thomas,
Vincent
Re: Free42 functionality - Thomas Okken - 11-19-2004 Dear Thomas, I'm sure one day soon Free42 will look as nice as P41CX...:) I hope so but for now, my to-do list only keeps on getting longer and longer! I'll never get around to it... By the way, on both versions 1.0.9 and 1.0.10, calling 'BST' on a dummy argument from the catalog crashes the simulator (Fatal Alert). I guess this is not normal behaviour... :)
Of course it's normal. All software longer than 1,000 lines of code is supposed to crash every now and then, by Microsoft decree. :-D Thanks!
- Thomas
Re: Free42 functionality - Vincent Weber - 11-20-2004 Dear Thomas, Congrats for starting on the printer emulation! Do you intend (on Palm) to print to memos, like P41CX, for export to the PC, or to make a on-screen printer, or both (which would be great ? ;)). For the bug I was mentionning, sorry, the 'dummy argument' is irrelevant. Just go to the CATALOG, skim through until your reach 'BST', and press the soft-key - on Palm, you get a 'Fatal exception error' and you have to reset. Not a big deal since it is pretty silly to call BST this way, but still a bug, as you would say :)
Thanks and cheers, Re: Free42 functionality - Thomas Okken - 11-20-2004 Congrats for starting on the printer emulation! Do you intend (on Palm) to print to memos, like P41CX, for export to the PC, or to make a on-screen printer, or both (which would be great ? ;)). Print on-screen, print to memos, print to unlimited-size text files (on SD card), print to GIF files (so PLOT and other PRLCD-using programs can be used), the works. Needless to say, supporting all of that without turning the user interface into Frankenstein's Monster is a bit of a challenge, and it doesn't help that I want it all to work on all the three platforms I currently support... So I'm still spending a lot of time lying on the couch and staring at the ceiling, waiting for my moment of Zen. :-) For the bug I was mentionning, sorry, the 'dummy argument' is irrelevant. Just go to the CATALOG, skim through until your reach 'BST', and press the soft-key - on Palm, you get a 'Fatal exception error' and you have to reset. Not a big deal since it is pretty silly to call BST this way, but still a bug, as you would say :)
Indeed, a bug. I need to check if there are any more lurking like that -- all those functions that are usually invoked through special-case logic rather than the more general mechanisms. Some of these functions have NULL function pointers in the great big master function table, but if there turns out to be a way to invoke them in a way I hadn't anticipated, crash! CLALL suffered from this type of problem, too. Re: Free42 functionality - Vincent Weber - 11-21-2004 Hey Thomas, Cheers,
Vincent
|