pavpanchekha
2021-10-6 17:52:22

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.


pavpanchekha
2021-10-6 17:53:39

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…


pavpanchekha
2021-10-6 17:54:32

(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.)


soegaard2
2021-10-6 17:55:24

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


pavpanchekha
2021-10-6 17:57:01

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


soegaard2
2021-10-6 17:57:18

Yes.


pavpanchekha
2021-10-6 17:57:26

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


pavpanchekha
2021-10-6 17:57:40

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


pavpanchekha
2021-10-6 17:58:31

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


soegaard2
2021-10-6 18:01:12

Sounds plausible, that that’s the real reason.