84 if (abs(this->coeffs[0]) >= epsilon)
86 return _x * copysign(T(1.), this->coeffs[0]);
88 if (abs(this->coeffs[1]) >= epsilon)
90 return copysign(_x, this->coeffs[1]);
92 if (abs(this->coeffs[2]) >= epsilon)
94 return _x * copysign(T(1.), this->coeffs[2]);
96 return this->coeffs[3];
98 const T _x2 = _x * _x;
99 const T _x3 = _x2 * _x;
101 return (this->coeffs[0] * _x3 + this->coeffs[1] * _x2 +
102 this->coeffs[2] * _x + this->coeffs[3]);
120 if (_interval.
Empty())
129 const T yLeft = this->Evaluate(xLeft);
130 const T yRight = this->Evaluate(xRight);
143 if (abs(this->coeffs[0]) >= epsilon)
150 const T a = this->coeffs[0] * T(3.);
151 const T b = this->coeffs[1] * T(2.);
152 const T c = this->coeffs[2];
154 const T discriminant = b * b - T(4.) * a * c;
155 if (discriminant >= T(0.))
158 const T x = (-b + sqrt(discriminant)) / (T(2.) * a);
161 const T y = this->Evaluate(x);
170 else if (abs(this->coeffs[1]) >= epsilon)
174 const T a = this->coeffs[1];
175 const T b = this->coeffs[2];
178 const T x = -b / (T(2.) * a);
181 const T y = this->Evaluate(x);