[Edu-sig] Re: arbitrary precision computing in K-12

2020-02-03 Thread kirby urner
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

[Edu-sig] Re: arbitrary precision computing in K-12

2020-02-02 Thread A. Jorge Garcia via Edu-sig
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

[Edu-sig] Re: arbitrary precision computing in K-12

2020-02-02 Thread A. Jorge Garcia via Edu-sig
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

[Edu-sig] Re: arbitrary precision computing in K-12

2020-02-02 Thread A. Jorge Garcia via Edu-sig
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

[Edu-sig] Re: arbitrary precision computing in K-12

2020-02-02 Thread kirby urner
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

[Edu-sig] Re: arbitrary precision computing in K-12

2020-01-31 Thread A. Jorge Garcia via Edu-sig
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

[Edu-sig] Re: arbitrary precision computing in K-12

2020-01-30 Thread kirby urner
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

[Edu-sig] Re: arbitrary precision computing in K-12

2020-01-30 Thread Wes Turner
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

[Edu-sig] Re: arbitrary precision computing in K-12

2020-01-29 Thread kirby urner
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

[Edu-sig] Re: arbitrary precision computing in K-12

2020-01-29 Thread Wes Turner
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)? > > >

[Edu-sig] Re: arbitrary precision computing in K-12

2020-01-29 Thread Wes Turner
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 : >

[Edu-sig] Re: arbitrary precision computing in K-12

2020-01-29 Thread kirby urner
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