You won't need Decimal to replace Java's BigInteger of course, as Python's
integers are already big.
Here I just redid your Mersenne Primes exercise using native Python ints,
and also exposing the guts of a probable prime test that seems less flaky
than the one you had to use (set at 50% reliable
And here's BigInteger at work finding large Mersene Primes.
https://youtu.be/-Snd7a55FrE
I'm gonna have to do the same in python with Decimal. What about the N() method
in SAGE and numpy?
Regards,
Al
Sent from BlueMail
On Feb 2, 2020, 19:18, at 19:18, kirby urner wrote:
>Hi Jorge --
>
>I
Here's how I used BigDecimal to find Phi,
https://youtu.be/snk2IN3B2RI
HTH,
Al
Sent from BlueMail
On Feb 2, 2020, 19:18, at 19:18, kirby urner wrote:
>Hi Jorge --
>
>I agree, it'd be interesting to apply a Riemann Sum algorithm using
>arbitrary precision as the number crunching type, versus
Wow, Kirby, that's great! I've done something similar in java using the
BigInteger class. I have to try the Decimal module in python! Looks like fun.
I'm going to have to see how this works with MPI.
Thanx,
Al
Sent from BlueMail
On Feb 2, 2020, 19:18, at 19:18, kirby urner wrote:
>Hi
Hi Jorge --
I agree, it'd be interesting to apply a Riemann Sum algorithm using
arbitrary precision as the number crunching type, versus IEEE754.
Freed from FORTRAN, you would have that option. I'll do it now...
[ sometime later ]
Here's a sandbox version:
https://repl.it/@kurner/computepi
Hi Kirby,
Love your post about arbitrary precision. I wish I had seen it before I started
a project with my students computing PI on a Linux Cluster.Here's my blog post
about our project so far if anyone is
On Thu, Jan 30, 2020 at 4:55 AM Wes Turner wrote:
>
>
> Are they working on Windows platforms?
> I understand that Python is in the Microsoft App Store now, but conda is
> not.
>
>
Yes. Oft times these are public school labs and I'm not in charge of what
gets installed. Always Windows and/or
On Wed, Jan 29, 2020, 5:59 PM kirby urner wrote:
>
>
> Yes, I've especially used gmpy2 and met the maintainer at a user group,
> worked at Mentor Graphics as I recall, and was collaborating with Alex
> Martelli on getting Python such a library. Most of my Jupyter Notebooks
> exploring high
Yes, I've especially used gmpy2 and met the maintainer at a user group,
worked at Mentor Graphics as I recall, and was collaborating with Alex
Martelli on getting Python such a library. Most of my Jupyter Notebooks
exploring high precision are using that. Trig built right in, and complex
There's a three.js renderer for 3D graphics in Sage:
https://doc.sagemath.org/html/en/reference/plot3d/
On Wed, Jan 29, 2020, 5:21 PM Wes Turner wrote:
> You've probably already considered SymPy or Sage (which is installable
> with conda now)?
>
>
>
You've probably already considered SymPy or Sage (which is installable with
conda now)?
https://docs.sympy.org/1.5.1/modules/evalf.html :
>>> N(sqrt(2)*pi, 5)
4.4429
>>> N(sqrt(2)*pi, 50)
4.4428829381583662470158809900606936986146216893757
https://github.com/sympy/sympy/wiki/Dependencies :
>
More concretely, and continuing the arbitrary precision thread, one might
think Python, with its clever duck typing, could take either floating
point, or standard library Decimals, through precisely the same algorithm.
That's so in some cases, but when we get to powering, one can't use the
12 matches
Mail list logo