Remix.run Logo
achille 4 days ago

Nice, that worked. It's even faster.

                 yours  yours+opt  claude
  ---------------------------------------
  Time (ns)        40.9      36.4    38.7
  sqrt/iter           3         2       1
  Instructions      207       187     241
Edit: it looks like the claude algorithm fails at high eccentricities. Gave chatgpt pro more context and it worked for 30min and only made marginal improvement on yours, by doing 2 steps then taking a third local step.

https://gist.github.com/achille/23680e9100db87565a8e67038797...

0xfaded 4 days ago | parent [-]

Haha nice, hanging in there by a thread

gchuf 4 days ago | parent | next [-]

Consider updating your answer on SO - I know I'll keep visiting SO for answers like these for quite some time. And enjoy the deserved upvotes :)

HappyPanacea 4 days ago | parent | prev [-]

Do you think you can extend it to distance from a point to an ellipsoid?

0xfaded 4 days ago | parent [-]

Yes, people have done this