High precision library for Prime is possible? - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: High precision library for Prime is possible? (/thread-7914.html) |
High precision library for Prime is possible? - math7 - 03-10-2017 12:44 AM I had a library installed on my HP 50G which I think was great for more accurate calculations, its name is LongFloat. I wonder if it would be possible to carry this library for the HP Prime by some of the members with more knowledge of this forum, or by the developers of the HP Prime, this library is very good for calculations that require more figures Decimals and taking advantage of the speed and speed of the Prime would be great. See link and manual at LongFloat RE: High precision library for Prime is possible? - eried - 03-10-2017 09:36 PM What do you want to do? if you need really long numbers you can implement something using strings or lists for the numbers. There is no way to directly port hp50 libraries RE: High precision library for Prime is possible? - Joe Horn - 03-11-2017 12:23 AM Prime's CAS is pretty much a subset of Bernard Parisse's "XCAS" math software for PC's. XCAS, like most PC-based CAS software, has the feature of user-settable precision. You can tell it how many digits the floating-point results should have. Although that feature is not currently implemented in Prime, I agree with you that it would be MASSIVELY COOL if HP were to include it in a future firmware update. Here's my Crystal Ball Wild Guess about that... According to the XCAS documentation, the user can adjust the floating-point precision by setting the control variable called "Digits" to the number of decimal places desired. So for example Digits:=20 sets XCAS to produce 20 digits. Lo and behold, Prime's CAS also has a control variable called Digits, which is displayed in CAS Settings, page 1. But it currently is ignored by the system. I have a sneaking suspicion that *IF* they ever add user-adjustable precision to Prime's CAS, then it'll be via CAS's "Digits" control variable. In fact I'll bet up to 5ยข on it. Meanwhile, when my beloved 50g with LongFloat is not handy, I like to play with extended precision on the Prime using a trick from The Old Days of Programming: use CAS's *integer* type to fake floating point math. Thinking of ways to do floating-point math using only integers is a delightful mental exercise. For example, you can get the first 20 digits of 1234/6789 with this CAS command: iquo(1234*alog10(20),6789). Inserting the decimal point is left to you, just like in the Slide Rule days. |