toastedcrumpets / stator

A compile-time Computer Algebra System (CAS) library (with some geometry)
https://toastedcrumpets.github.io/stator
18 stars 2 forks source link

Quadratic solver without constant - problem? #1

Closed smilingthax closed 6 years ago

smilingthax commented 6 years ago

https://github.com/toastedcrumpets/stator/blob/master/stator/symbolic/polynomial.hpp#L737

For the constant ==0 case only -f[1] is returned, whereas I'd expect -f[1]/f[2], as the scaling to normalize the x^2 -coefficient to 1 comes only 3 lines later...

toastedcrumpets commented 6 years ago

Thanks for the spot! Clearly a typo. I've added a test case to make sure I don't break it in future.