34#ifndef ADAPTED_STEP_NULL_TOLERANCE
35 #define ADAPTED_STEP_NULL_TOLERANCE 1e-6
39#ifndef ADAPTED_STEP_MAX_ROOTFINDING_STEPS
40 #define ADAPTED_STEP_MAX_ROOTFINDING_STEPS 1e6
56static float p4_eval(
float x,
float a4,
float a3,
float a2,
float a1,
float a0)
58 return a0 + x * (a1 + x * (a2 + x * (a3 + x * (
a4))));
179 if (result *
ds < 0) {
float step_adaptation(float ds, float f1d, float f2d, float f3d, float f1dd, float f2dd, float f3dd)
Compute the adapted parametric step given the wanted geometric distance.
#define ADAPTED_STEP_NULL_TOLERANCE
static float p4_halley(float a4, float a3, float a2, float a1, float a0, float tol, float init, int max_steps)
Implementation of Halley's method for degree 4 polynomial root finding.
#define ADAPTED_STEP_MAX_ROOTFINDING_STEPS
static float p4_eval(float x, float a4, float a3, float a2, float a1, float a0)
Horner's method for fast degree 4 polynomial evaluation.
Dynamic parametric step adaptation for the GVF algorithm.