HP Forums

Full Version: Finally found a use for my WP34s that I can't replicate elsewhere
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have been struggling with needing to calculate the exponential integral for my work. In order to do this, I need Euler-Mascheroni's constant in the highest precision possible. I've been trying to write code to do this in C++ and it has been challenging, then I remembered that the WP34s has 34 digit precision.

Not only that but it has the constant already built in, with 34 digits of precision!

The only question I have so far is, how do I scroll right in the double precision mode to see the rest of the digits?

f-shift and g-shift x<>y show the left and right halves of the number including all digits.

IIRC, Free42 also has 34 digits of precision, and pressing the SHOW button displays all the digits at once.

EDIT: And if you have an HP 50g, you can install the LongFloat library and set whatever precision you want, up to 9999 digits.
Out of curiosity is there a way to get 9999 digits of precision in c++ without having to code it yourself?

For now, the WP34s will work because it can do the Ei(-x) pretty fast, with accuracy up to about x=30 (more than I should really need, c++ can't even converge at x=1 using Theis (1935)).
Don't even consider writing it yourself, you will get it wrong.

Instead, try an existing library. GNU's GMP is well regarded but there are others. The WP 34S uses decNumber, Free42 uses Intel's decimal library which isn't arbitrary precision.

To see the calculator solve Ei(-x):

Reference URL's