HP-50g: help remembering library with Interval Arithmetic - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: General Forum (/forum-4.html) +--- Thread: HP-50g: help remembering library with Interval Arithmetic (/thread-21241.html) |
HP-50g: help remembering library with Interval Arithmetic - johnb - 02-04-2024 10:09 PM Hello again, everyone. I need help from the hive mind here: I've forgotten exactly where to find a certain library for the HP-50g. The sad thing is, it was recommended to me by someone when we were discussing my similar library on the HP-48g, and I cannot find the thread! Shame on me. What I do recall: (1) It was a library specifically for the 50g, and it included operations for Interval Arithmetic... but that was not the library's primary purpose. (2) It wasn't in the Museum's archives, it was in some other popular HP-calc archive on the web. (3) It was written by someone whose credentials would provide adequate reason to expect that their implementation was correct, even for most edge or corner cases. Maybe he was a mathematician... or an electrical or mechanical engineer? (I do recall the author was male. I'm a big supporter of Women-in-STEM so I take positive notice of their work.) Any clues which library I'm referring to here? RE: HP-50g: help remembering library with Interval Arithmetic - Massimo Gnerucci - 02-04-2024 10:28 PM Longfloat on HPCALC.org? RE: HP-50g: help remembering library with Interval Arithmetic - johnb - 02-05-2024 12:33 AM (02-04-2024 10:28 PM)Massimo Gnerucci Wrote: Longfloat on HPCALC.org? Thanks!! I have a strong suspicion that this is indeed the library I was thinking of! For one, I vaguely remembered that one of the authors was named Thomas. (I didn't remember there being two authors though.) And, more importantly, I remember it was a logical extension of the general theme of the library, not a side item added as an afterthought. Will try this out and maybe even write a short review. Arbitrary-precision math is also right up my alley. Having that makes a lot of numerical analysis sins go away! (LOL) (Common theme: World-class software engineers share several tendencies, chief of which is that they are all larcenous at heart and want something for nothing. They'll spend 2.5 days thinking hard to design something that takes a day to code, just to get out of having to spend a week coding something. The resulting code is 10x smaller, 10x faster, and because it's simpler, has fewer bugs. Such "lazy effectiveness" is what I aspire to.) RE: HP-50g: help remembering library with Interval Arithmetic - Gjermund Skailand - 02-05-2024 02:33 PM Hi I wrote the longfloat library a long time ago. The good thing about the library is that you can manually calculate in interval mode or enter formulas and automatically have uncertainty calculated. As far as I remember, the main problem with the (simple implementation) is that the uncertainty tends to blow up if the intervals are ...too... big, resulting in something that is practically unusable. I spent a lot of time trying to get border cases calculated correctly. I think the source code is included, but comments are very sparse.. best regards Gjermund RE: HP-50g: help remembering library with Interval Arithmetic - cdmackay - 02-05-2024 05:55 PM (02-04-2024 10:09 PM)johnb Wrote: I need help from the hive mind here: I've forgotten exactly where to find a certain library for the For future use, note that you can find all your old posts/threads, from your profile, e.g. looking at: https://www.hpmuseum.org/forum/search.php?action=finduserthreads&uid=639 shows your threads, and the "Interval Arithmetic - x-squared and other functions" thread, from October 2022, has Gjermund's longfloat recommendation. The search facilities here are useful indeed. RE: HP-50g: help remembering library with Interval Arithmetic - johnb - 02-06-2024 04:26 PM (02-05-2024 05:55 PM)cdmackay Wrote: For future use, note that you can find all your old posts/threads, from your profile, e.g. looking at: Thanks a bunch for that; I'd forgotten all about the things available via profile! RE: HP-50g: help remembering library with Interval Arithmetic - johnb - 02-06-2024 04:41 PM (02-05-2024 02:33 PM)Gjermund Skailand Wrote: As far as I remember, the main problem with the (simple implementation) is that the uncertainty tends to blow up if the intervals are ...too... big, resulting in something that is practically unusable. @Gjermund - thank you for your efforts in producing this, however long ago it might have been! I've found similar behavior in my own (mostly dumb, brute force) implementation as well, but some of my blowups are actually a good warning that a chained calculation has gone wrong. (02-05-2024 02:33 PM)Gjermund Skailand Wrote: I spent a lot of time trying to get border cases calculated correctly. That effort is much appreciated: it represents your code's chief value to me. Also, I think you're very likely a better mathematician or numerics programmer than I am. So it's great to have your implementation to compare mine with. My 48g code is all in User RPL so I might have to learn System RPL to make it worthwhile to others. Of note: My experimental code differs from everything else that I've seen in that I store triplets not tuples: not just the endpoints of the range but also the "most likely value," which permits it to track asymmetrical error bands. I've searched the web (also for C/C++ implementations, as well as other languages) and I'm quite honestly surprised no one else has tried to do this. I understand that the serious Numerical Analysis community is exploring hardware implementations. I would love to see a CPU that directly supports my triplet approach, along with a standard library that properly uses this for transcendentals and other functions! |