Just a thought I had--a 35S Trig fix - 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: Just a thought I had--a 35S Trig fix (/thread-215550.html) |
Just a thought I had--a 35S Trig fix - Matt Agajanian - 03-25-2012 Helllo all, It just popped in my head. With regard to two of the 35S bugs: For the cos(x) bug where x is close to 90, why not normalise x to (90-x) and take the sine instead? For the issue of tan(x) where x is 3000 or above, again, normalise the angle so that x is within the correct quadrant and below 720º.
Would those approaches help?
Re: Just a thought I had--a 35S Trig fix - Paul Dale - 03-25-2012 This should work, but honestly why? It is a calculator, it should be doing the work for you not making you do things like this.
Re: Just a thought I had--a 35S Trig fix - Matt Agajanian - 03-25-2012 Yes, I realise that but, the 35S truly is a powerful machine. To junk it for some bugs that can be adjusted by just writing a program that gets around the glitch is quite challenging, remedies the shortfall and allows for more possibilities to expand the functionality. As an example, since I own both the 25 and 29C, I noticed that neither the 25 nor 29 had a register exchange function. So, without even peeking through my HP-35 Math Pack, I set a goal to write code with the least amount of programming steps and preserves the stack as much as possible to do the exchange operation. Next, as I was browsing the 25 manual about its statistical functions, I noticed that the summation for y^2 was missing. So, I wrote some code to sum the y^2 value in R2 and then execute the summation function.
Edited: 25 Mar 2012, 7:38 p.m.
Re: Just a thought I had--a 35S Trig fix - Paul Dale - 03-25-2012 In that case cut out the possibly flawed algorithms completely and go back to a lovely book of tables. No bugs to worry about there. Not even a concern about batteries going flat. I'd recommend Abramowitz and Stegun since it is very comprehensive and also contains lots of really useful formulas for approximating functions with. This will also remind you why we use calculators :-)
Re: Just a thought I had--a 35S Trig fix - Gerson W. Barbosa - 03-25-2012 Or you can run a user program more reliable than the built-in one:
http://www.finetune.jp/~lyuka/technote/trig/tan-hp35s.html
Re: Just a thought I had--a 35S Trig fix - Matt Agajanian - 03-25-2012 Pauli, I was just offering a suggestion. Although, looking at that program and the results table, I see your point about the severity of errors (especially around the value of n*pi). I'm wondering if perhaps, HP's choice of algorithms is at fault here or perhaps the number of iterations. Perhaps, if they had the right algorithms, then iterating them til there's only an error of one count in the 15th digit (or no error in digit 15 at all) would've made all the difference.
Edited: 25 Mar 2012, 8:59 p.m.
Re: Just a thought I had--a 35S Trig fix - bill platt - 03-25-2012 I'd rather pay the extra $100 and get an old reliable. I have a stack of 'em already:-) Collectors are the most difficult customers to satisfy with new products because we actually know rather more comprehensively what was possible. And we also buy these new, cheap products out of curiosity and if they don't pan out at some point they go in the bin. That's how I am feeling about the 33s and 35s. From an historical point, note that when the 33s came out, HP had only recently completely gotten out of the calculator business. All pioneer production had been halted, Champagne production halted as well. 49G was available but thought to be out of productions as well. It looked like the end. Prices on pioneers and champagnes SOARED. 33S and the 49G+ came along and we thought, "wow, maybe they are recommitting to the game" and then we all dove in and bought stuff to try it out. The 49G+ was nearly a disaster. Fortunately I didn't buy one. HP seemed to be listening--the early 33s development went through some iterations and some obvious bugs were fixed. The 35s turned out to be a major disappointment. Unlike the 33s development, as far as I can tell, HP has never done anything about the problems. This is rather bemusing because the team there now seems very focused--perhaps they are focused on the new products (30b etc and the new paradigm grapher) and maybe the 35s is going over the event horizon soon.
Re: Just a thought I had--a 35S Trig fix - Matt Agajanian - 03-25-2012 Yes, I too find that calculators, especially HPs, definitely HPs, should be the pinnacle of technology and mathematical accuracy and yes, the quality of HP calcs in the post-Pioneer and Post-Voyager era has been sadly lackluster. But, as fond as I am of HP and especially their calculators, I'm willing to bend my fickle precision boundary. Yes, it's very disappointing to see HP drop the ball after such an outstanding run of Pioneers and Voyagers as well as the grandparents--the Classics 35, 45, 65, 67 and 55, Bonnie & Clyde (19C/29C) as well as the rest of the Woodstocks. I'm even rather impressed with the Spices. And that's why, I like to put HP in a respectable light. But yes, being a veteran from the day I got my first HP, a 32E back in 79, I was hooked and I never was as fond of TIs as I had been before. Ever since then, I'm the proud parent of a 34C, 15C, 28S, 42S, 32SII, 48GX as well as the 33s, 35s and now, the 50G. I'm so devoted to HP, that I went way out of my budget to get a 21, 29C, 35A, 67 and replaced my retired 32E off of eBay. I say all this because I love mathematics and I love calculators. I also love programming my HPs. And to support HP, although it may mean they've had a bum season or just a couple of duds in the calculator line, which pulls the rug out from under me, creating a workaround due to a shortcoming in a 33s or 35s or even a 25, is all worth it.
Edited: 26 Mar 2012, 12:12 a.m.
Re: Just a thought I had - PLEASE CHILL OUT, MATE - Reth - 03-26-2012 No offence, but I'm getting sick and tired of your posts... Let others say something too...
Re: Just a thought I had - PLEASE CHILL OUT, MATE - Luiz C. Vieira (Brazil) - 03-26-2012 Not the kind of reaction we got used to here. Sorry, but I for one disagree with you. Many contributors (regular, old chaps) have not yet complained so far. And for the records, the activity has been enhanced. The only guy who has the right to complaint to this extent is Dave Hicks. What about not to read them, instead?
Luiz (Brazil) Edited: 26 Mar 2012, 1:04 a.m.
Re: Just a thought I had--a 35S Trig fix - db (martinez, ca.) - 03-26-2012 "It is a calculator, it should be doing the work for you not making you do things like this"
Spoken like someone who has actually designed a calculator or something...
Re: Just a thought I had--a 35S Trig fix - Timo - 03-26-2012 As an engineer I have to toss in my 2 cents of opinion into this discussion as well. While this behaviour of the 35S may certainly not be in line with former products of HP and also does not really help to make it the superior product compared to other calculator models on the market, the question I have to ask from an engineering point of view is this: Honestly, who needs a 15-digit accuracy for calculations??? In the engineering world I live in we accept that physics and math will, for almost all problems, only give us an approximation that is within 5-10% of the true value. I don't even display the full mantissa on my calculators, 4 to 6 digits are enough for my calculations. The link to finetune.jp only seems to support this, since the table indicates that the accuracy of the 35S trig functions seems to be always better than 5 digits. So for me, all that talk about inaccurate sin/cos/tan functions sounds like a problem of pure luxury. And it's certainly not worth heating up discussion about it either...
Kind regards,
Re: Just a thought I had - PLEASE CHILL OUT, MATE - Reth - 03-26-2012 Quote:So should I wait until one of the above decides so? And how should I not read every second posting in the forum? Re: Just a thought I had - PLEASE CHILL OUT, MATE - Nick_S - 03-26-2012
HP Forum Commandment 5 in the HP Museum Terms of Use states that:
Nick
Re: Just a thought I had--a 35S Trig fix - Andrés C. Rodríguez (Argentina) - 03-26-2012 You need sum of y^2 for the least squares method, as described on the HP-25 Applications Manual. I suspect there was little ROM space available when the function set was defined. x^2 was needed for standard deviation, so it was implemented.
Just my AR$ 0.10
Re: Just a thought I had - PLEASE CHILL OUT, MATE - Luiz C. Vieira (Brazil) - 03-26-2012 I just expressed my thoughts as well. If no one answers a particular message, the thread itself will not prevail. And we must agree with the fact that basic forum premises have been followed so far, no misdirections observed. There have been annoying 'contributors' in the past that were actually 'set apart' by simply having their requests not answered. People who have not contributed at all and usually posted about their own needs. In this particular case, I agree with the fact that old subjects have been brought back, but many known contributors have been participating. I actually thought this was kind of an old contributor maneuver to bring these subjects back, but it was just a thought of mine. You see, I would have sent the guy a private e-mail in order to suggest a slowing down, if so. My way of acting in someone else's environment, though.
Luiz (Brazil)
Re: Just a thought I had--a 35S Trig fix - Luiz C. Vieira (Brazil) - 03-26-2012 Ditto! (from another engineer, electrical one)
Luiz (Brazil)
Re: Just a thought I had--a 35S Trig fix - Bart (UK) - 03-26-2012 That reminds me of the following joke in this thread:
Quote:And as an engineer myself, I agree :-) Re: Just a thought I had - PLEASE CHILL OUT, MATE - Antonio Petri (UK) - 03-26-2012 Maybe, is it you who needs to chill out? No offence.
Re: Just a thought I had--a 35S Trig fix - Luiz C. Vieira (Brazil) - 03-26-2012 LOL! Great! Thanks!
Luiz (Brazil)
Re: Just a thought I had--a 35S Trig fix - Paul Dale - 03-26-2012 That large????
Re: Just a thought I had--a 35S Trig fix - Luiz C. Vieira (Brazil) - 03-26-2012 We use metrical system here, it did not occurred to me how far (that large!) was a '6 inches'... Gee! Edited: 26 Mar 2012, 6:35 a.m.
Re: Just a thought I had--a 35S Trig fix - Antonio Petri (UK) - 03-26-2012 Great! Thanks!
Re: Just a thought I had--a 35S Trig fix - Walter B - 03-26-2012 Thanks for bringing that back to my mind :-) And three Royal Thumbs are not too large, are they?
Re: Just a thought I had - PLEASE CHILL OUT, MATE - Andrés C. Rodríguez (Argentina) - 03-26-2012 Agree!
Re: Just a thought I had - PLEASE CHILL OUT, MATE - M. Joury - 03-26-2012 Actually I have rather enjoyed these posts. I have not responded to all, maybe not even most, but I, personally, have no issues with the questions being asked. If I am not interested in a thread I simply don't read it. At least there has been some activity here. There have been times in the past when activity on this forum slowed down so much that I could come back once every three days and not miss a thing. I much prefer this level of activity to the other. Just my 0.02... Cheers,
-Marwan
Re: Just a thought I had - PLEASE CHILL OUT, MATE - Andrés C. Rodríguez (Argentina) - 03-26-2012 Well said, Luiz!
Re: Just a thought I had--a 35S Trig fix - Timo - 03-26-2012 A really good one, thanks Bart!!
Regards, Re: Just a thought I had--a 35S Trig fix - Dave Britten - 03-26-2012 It's an interesting academic exercise, but I find it to be a bit like trying to buff the rust off a Reliant Robin. :)
Re: Just a thought I had - PLEASE CHILL OUT, MATE - Andrés C. Rodríguez (Argentina) - 03-26-2012 Why don't just skip what you are not interested in, and let others talk about their calculators and related interests?
(I apologize in advance if my imperfect command of the English language prevents this message to convey its intended, friendly meaning).
Re: Just a thought I had - PLEASE CHILL OUT, MATE - Raymund Heuvel - 03-26-2012 Postel's Law: "be conservative in what you do, be liberal in what you Re: Just a thought I had--a 35S Trig fix - aurelio - 03-26-2012 Thanks to all you, friends, for the contribute to this topic, it was really a pleasure to read it entirerely. A special thanks to Luiz, "old and wise" who take care of the board! It happens sometime to be taken complitely for the matter of the topic so that a "cup" of humor is always welcome for all! Edited: 26 Mar 2012, 10:29 a.m.
Re: Just a thought I had--a 35S Trig fix - Luiz C. Vieira (Brazil) - 03-26-2012 Grazie tanti, mio caro! I appreciate.
Re: Just a thought I had--a 35S Trig fix - bill platt - 03-26-2012 HAAHAAHA! LOL!
Re: Just a thought I had - PLEASE CHILL OUT, MATE - Matt Agajanian - 03-26-2012 Thank you for that very nice comment.
Re: Just a thought I had--a 35S Trig fix - Marc Ferrer (France) - 03-26-2012 Hello to everyone, Even if I don't show up that often, I really enjoy reading this fine forum each day. Well, I've been a bit surprised to see things heat up, which makes me think that everyone is right, indeed. A 6 to 7-digit accuracy is more than we need in every day computations. Absolutely right... for a non-programmable calculator. But what if you have to trust calculations resulting from many iterations, just as the ones a programmable machine was designed to do ? Remember the great articles from Prof. W. Kahan, the man behind hp accuracy, 30 years ago ? I'm not sure he'd be very happy with a 35s... Of course it's a theoretical point of view, we use other computing gear for complex calculations, just as NASA engineers who used big computers to send men to the moon : calculations were done with 1000-digit accuracy if I'm not wrong. Anyway I find it interesting in that we face this quality problem in many other fields : as a former electronics engineer, I really have nightmares with China-made lab equipment. Ironically, now there's more Chinese stuff at my work than in my home lab...... sigh
Just my 2 (euro) cents :-) Re: Just a thought I had - PLEASE CHILL OUT, MATE - Howard Owen - 03-26-2012 +1
Re: Just a thought I had--a 35S Trig fix - Howard Owen - 03-26-2012 So clearly, this is why there are more engineers than scientists.
Re: Just a thought I had--a 35S Trig fix - bill platt - 03-26-2012 I tell this joke regularly and botch it every time. Now I have a script to follow--Thanks!
Re: Just a thought I had--a 35S Trig fix - uhmgawa - 03-26-2012 Quote:
It appears the tables have been edited from that work
Quote:
Indeed it does. It also reminds how mind-numbingly spectacular Re: Just a thought I had--a 35S Trig fix - htom trites jr - 03-26-2012 Actually, it can be a problem. Coding a microcode transcendental package, a team wasted a man-month searching for errors because the package's output did not match that from several calculators. Fresh eye on the problem said "Hmmm ...", wrote independent code on a different computer to slowly calculate exceedingly precise values of the functions at a hundred places in the primary range (64 bit input, 64 bit output, correctly rounded.)
We found a lot of tiny errors in a lot of calculator values (sorry, didn't report them elsewhere; we probably should have) and some that we did report -- as they'd caused our search for problems in our new package's code, which was actually far better than we expected.
Re: Richard Nelson's pictures of the 4 HP 15c versions - Paulo MO - 03-27-2012 Hmmm.... The bottom-line sees to be that either the engineer did not understand the rules, or he attempted a seemingly impossible task. Neither is very flattering, I must say. Can we not have a version starring an intelligent and educated engineer, well versed in greek and ancient history, on Zeno paradoxes, and on the theory of limits? He would still get the girl... As an (electrical) engineer myself, I'm not very keen on this story about sloppy engineers, even though one has to admire the type of character you portrayed: unreliable, incapable of stricly following or deeply understanding a simple set of rules, with only a fuzzy and approximate notion of reality, but the one who, due to it all, ends up propagating his own DNA (assuming he did not cow in the end). "Trust me, I'm an engineer."...
Paulo
Re: Engineers and Girls - Marcus von Cube, Germany - 03-27-2012 Paulo, as an EE you can just rely on the electro magnetic force to bridge the gap. This way you'll get the girl without breaking any rules. :-) Edited: 27 Mar 2012, 3:00 a.m.
Re: Engineers and Girls - Walter B - 03-27-2012 But for that, you either need approaching quite a *bit* closer or waiting some e9 years - the latter decreasing DNA propagation odds significantly ;-)
Re: HP-35s trig & engineers and girls & required accuracy - Bart (UK) - 03-27-2012 And what would we have built if like the mathematician and physicist we gave up at the first hurdle? Re: HP-35s trig & engineers and girls & required accuracy - Paul Dale - 03-27-2012 What no 34S in there????
- Pauli
Re: Just a thought I had - PLEASE CHILL OUT, MATE - Nick_S - 03-27-2012 De nada
Re: Just a thought I had--a 35S Trig fix - Timo - 03-27-2012 Hi Marc (and all the others as well)! Thanks for this feedback. Actually, you are quite right that accuracy does indeed play a vital role for calculations that rely on multiple iterations. I've experienced this numerous times when I was still "number-crunching" using Matlab/Simulink some years ago. However, when you have a problem that required such calculations in engineering this is what you actually do - you use a sophisticated tool like Matlab/Simulink, Maple, etc. I don't think that any engineer today who is not totally out of his or her mind (or a fanatic calculator geek) would simulate the behaviour of, just an example from my previous work, a servo-hydraulic actuation system using his 35S or 48GX/50G. That's just not practicable, even if these calculators did feature the required accuracy. What I was talking about is automation of some chain calculations that you need to do every now and then or solving simple transcendental equations. And for those problems, 6 digits (and these only in some rare cases) are more than enough in my opinion. The message I want to transport is just that, for me, there is a difference between a completely flawed product that is prone to error whenever you turn it on (and, honestly, some posts about the 35S have that sound) or a basically very useful machine that in some "extreme" cases suffers from certain errors and / or inaccuracies. Please do not get me wrong, I do not want to end the bug hunting and bug posting in this forum. Far from it, the better we know these calculators the better you can judge how useful they are for your work. And for me as an engineer the 35S ist exactly this - a very useful tool that you just have to know in order to get the best performance and accuracy from it. Apart from that I still think that the 35S lacks full matrix support as well as alphanumeric program lables and variables... ;)
Kind regards, Edited: 27 Mar 2012, 4:07 a.m.
Re: HP-35s trig & engineers and girls & required accuracy - Walter B - 03-27-2012 Maybe there's a reason ... ;-)
Re: HP-35s trig & engineers and girls & required accuracy - Bart (UK) - 03-27-2012 Only Time. Re: HP-35s trig & engineers and girls & required accuracy - John B. Smitherman - 03-27-2012 Understood... if you don't take care of the household chores then no algorithm on any calculator is going to help you get closer than 6 inches to "that voice". ;-)
John
Re: Richard Nelson's pictures of the 4 HP 15c versions - Paulo MO - 03-27-2012 :-)
Cheers Re: Richard Nelson's pictures of the 4 HP 15c versions - Dominic Richens - 03-27-2012 Quote: Us engineers are always "filling the gap" to turn impractical science into something usable and economical. It's the ability to judge that something is "close enough" to work. I was watching Vi Hart's video trying to convince the viewer that .99999... = 1 and chuckled to myself that as an engineering, I am capable of believing sometimes that .9000 = 1
:D
Re: Just a thought I had--a 35S Trig fix - Matt Agajanian - 03-27-2012 My sentiments exactly. HP calcs (and others) do what they what they were intended do best. Although yes, a finer degree of accuracy would go a long way. But, to put double-precision accuracy and ROMs which hold multi-thousand line algorithms in a consumer calculator is just not practical. ALTHOUGH, the re-engineered alternatives of a WP-34S or HP-41CL are certainly feasible and possible and very marketable to the niche markets. I was considering a 41CL myself but, the halfnut I have doesn't qualify. But, from a consumer standpoint, to market a calculator with the ROM size adequate for double-precision algorithms for log, trig, SOLVE, INTEGRATE, and so forth, puts the calculator in the price bracket of the iPad or even a NetBook. So, the alternative of a niche market company (Systemide, for example) to throttle up HP-41CX spped and functionality or the Sourceforge/Calculator Store WP-34S is a nice compromise to serve those of us who want the HP-41 or HP-35 that should have been.
Edited: 27 Mar 2012, 4:05 p.m.
Re: Just a thought I had -- 34S - Marcus von Cube, Germany - 03-28-2012 The WP 34S has double precision! Most algorithms are good to more then 30 digits, many to the full internal precision of 39 which is then rounded to 16 (single precision) or 34 (double precision). The storage formats are variants of decimal64 and decimal128 respectively. Just as a reminder: We do this with 2 KB of NV RAM, 4 KB of scratch RAM and 128 KB of flash ROM. I think this is all a matter of commitment. A more powerful hardware would allow to add typed values, named variables, better UI with menus and more.
The most striking problem is to have professionally built hardware. We depend on the 20b/30b for now with a DIY keyboard overlay. I wish we had a chance to have the keys properly painted or moulded on a future device.
Re: Just a thought I had -- 34S - Paulo MO - 03-28-2012 And you should know that some of us love you guys for that. All the effort you've put into providing us with a numerically reliable calculator is invaluable, IMO. Tools must be reliable. Fawcets should not drip; cars should not choke; calculating machines should be numerically accurate. IMHO, it's either that, or don't show the non-significant digits at all. The numerical precision affordable by your 16(34)/39 scheme is, from my point of view, your strongest point (without demerit for all the other strong points, of course). We've all spent too much time learning and teaching error propagation, bashing students for presenting and trying to read meaningless digits, and struggling with the need to have discrete-time, discrete-space, discrete-frequency, or discrete-whatever models still performing under extreme numerical conditions, to not value the effort involved in attempting to suplly as much precision as possible. It may well be that packages like Matlab (not the best numerical example, BTW), Maple, Mathematica or whatever, makes calculators dispensable. But until then, if we're getting digits out of our hand tools, I'd like them to be either correct or blank. Your WP34s is invaluable, on that account. Please, all of you guys of the "Good enough is good, by definition" point if view: don't kill me on this. At least, not before the weekend :-)
Re: Just a thought I had -- 34S - Marcus von Cube, Germany - 03-28-2012 Paolo, there are still some issues with the accuracy of some transcendental functions. They do not surface in single precision but in double precision some of the digits may be wrong. I had my fights against Gamma and I'm only confident that 30 digits are accurate. I've made no attempt at deleting the questionable digits off the tail though. Maybe I should...
Re: Just a thought I had -- 34S - Harald - 03-28-2012 First of all I have to say again, how impressed I am by the 34S. It is amazing what you guys have achieved! About the accuracy: Re: Just a thought I had -- 34S - htom trites jr - 03-28-2012 Marcus, I'm inclined to think that 30 correct decimal digits is sufficient. (I suspect you meant bits? Some of the calculator values I referred to above were less than 20 bits correct!) In some ways -- not all! -- having a function be strictly increasing (or decreasing) and not returning the same result for neighboring input values can be more useful than having strictly correct results. It's also very good if f'(f(x))=x, or so close to x, x+d, that f'(f(x+d))=x, or x+d. Sometimes values are changing so fast or so slowly these conditions are difficult.
(nb. We did have some HP calculators in the lab; their values were the best of the calculators, period.)
Re: Just a thought I had -- 34S - Paul Dale - 03-28-2012 Quote: Not bits, definitely decimal digits. 30 bits in less than ten decimal digits, not even remotely good enough.
Re: Just a thought I had -- 34S - htom trites jr - 03-29-2012 Thirty decimal digits for a trancendental maths package in a calculator is very well done! Congratulations.
Re: Just a thought I had -- 34S - Paul Dale - 03-29-2012 Most of the more basic functions (trig, logs, exponentials) will be closer to 34 digits :-) Gamma is a bad case only achieving 30 - 32 digits. This flows on to functions that use gamma (zeta, factorial, permutations).
Re: Just a thought I had -- 34S - Marcus von Cube, Germany - 03-30-2012 I've played around with Victor Toth's algorithm for arbitrary precision and changed the Lanczos coefficients several times. It looks like a hard job to achieve higher accuracy. I even tried to increase the internal BCD precision and checked how accurate the LN and EXP functions were but gave up at one point. I may need to reevaluate Gamma for some cases and compare the results to a proven source. I'm confident we can rely on 30 digits in most cases.
|