pull down to refresh
1 sat \ 2 replies \ @south_korea_ln OP 1 Jan \ parent \ on: [Not-so-daily puzzle] happy.newyear science
I ended up playing with the continued fractions. I used ChatGPT to help me write out the logic. In this process, ChatGPT came up with the idea of the Levenshtein distance to check for near misses.
No answer yet on "happy.newyear" case, testing on a simpler string now.
This is taking me more time than expected~~
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:
u=97366344686.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 z=305885393174.00000000000140601378546118371359432952443993406280164926158704474801197648048400878906250000000000000000000000000000 r=305885393174.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 y=29052179.885292215619356553510385828347735846057466489994871801023624482995165949265643254134563120164232130092252951481137523825 haosz.vvc6yx5pfugb5u1knqd1
reply
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