pull down to refresh
0 sats \ 1 reply \ @Scroogey 1 Jan \ parent \ on: [Not-so-daily puzzle] happy.newyear science
I got strange results with Python's built-in floats, as if the precision wasn't good enough.
Here's my sloppy code.
Closest match so far:
I got strange results with Python's built-in floats, as if the precision wasn't good enough.
Oh that's a good point. Will test using
mpmath.tan(n)
instead of math.tan(n)
and setting the number of decimals using mpmath.mp.dps = 100
.Tnx for your code.
From my end, I could probably speed up things by switching to Fortran, but I guess I'll be content for now knowing there is a likely way and a likely solution. Learned a few things in the process :)
reply