

Quite a lot of work to cover all the bases—I do think our complex quadratic solver could be more accurate, but the real one at least is now quite quite good.

I’m honestly not sure why the -integral
and -natural
versions exist. The underlying quadratic-solutions
function does need careful work to support this, by keeping exact computations exact, but the actual implementations of -integral
and -natural
are just a filter…

(Having the complex
version makes sense though I’m not sure it really matches the rest of Racket’s design, which is usually happy to return complex answers to real inputs. But I don’t want to change that right now, because the real version is way more accurate than the complex one.)

Yeah. I think those functions came from “stuff used to solve Project Euler” problems.

I assume that our backwards-compability story requires not removing them?

Yes.

One thing the PR above added was a promise to the documentation that exact inputs will produce exact outputs if possible

I think that promise was missing before and justified having separate functions

Anyway, they’re short and easy to maintain, so I’m not going to push for deprecation here.

Sounds plausible, that that’s the real reason.