Rosa's Benchmark

Percentage Accurate: 99.8% → 99.8%
Time: 6.6s
Alternatives: 6
Speedup: 1.4×

Specification

?
\[\begin{array}{l} \\ 0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right) \end{array} \]
(FPCore (x)
 :precision binary64
 (- (* 0.954929658551372 x) (* 0.12900613773279798 (* (* x x) x))))
double code(double x) {
	return (0.954929658551372 * x) - (0.12900613773279798 * ((x * x) * x));
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = (0.954929658551372d0 * x) - (0.12900613773279798d0 * ((x * x) * x))
end function
public static double code(double x) {
	return (0.954929658551372 * x) - (0.12900613773279798 * ((x * x) * x));
}
def code(x):
	return (0.954929658551372 * x) - (0.12900613773279798 * ((x * x) * x))
function code(x)
	return Float64(Float64(0.954929658551372 * x) - Float64(0.12900613773279798 * Float64(Float64(x * x) * x)))
end
function tmp = code(x)
	tmp = (0.954929658551372 * x) - (0.12900613773279798 * ((x * x) * x));
end
code[x_] := N[(N[(0.954929658551372 * x), $MachinePrecision] - N[(0.12900613773279798 * N[(N[(x * x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 6 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ 0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right) \end{array} \]
(FPCore (x)
 :precision binary64
 (- (* 0.954929658551372 x) (* 0.12900613773279798 (* (* x x) x))))
double code(double x) {
	return (0.954929658551372 * x) - (0.12900613773279798 * ((x * x) * x));
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = (0.954929658551372d0 * x) - (0.12900613773279798d0 * ((x * x) * x))
end function
public static double code(double x) {
	return (0.954929658551372 * x) - (0.12900613773279798 * ((x * x) * x));
}
def code(x):
	return (0.954929658551372 * x) - (0.12900613773279798 * ((x * x) * x))
function code(x)
	return Float64(Float64(0.954929658551372 * x) - Float64(0.12900613773279798 * Float64(Float64(x * x) * x)))
end
function tmp = code(x)
	tmp = (0.954929658551372 * x) - (0.12900613773279798 * ((x * x) * x));
end
code[x_] := N[(N[(0.954929658551372 * x), $MachinePrecision] - N[(0.12900613773279798 * N[(N[(x * x), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
\end{array}

Alternative 1: 99.8% accurate, 0.2× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \mathsf{fma}\left(x\_m \cdot \left({x\_m}^{1.5} \cdot -0.12900613773279798\right), \sqrt{x\_m}, 0.954929658551372 \cdot x\_m\right) \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m)
 :precision binary64
 (*
  x_s
  (fma
   (* x_m (* (pow x_m 1.5) -0.12900613773279798))
   (sqrt x_m)
   (* 0.954929658551372 x_m))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m) {
	return x_s * fma((x_m * (pow(x_m, 1.5) * -0.12900613773279798)), sqrt(x_m), (0.954929658551372 * x_m));
}
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m)
	return Float64(x_s * fma(Float64(x_m * Float64((x_m ^ 1.5) * -0.12900613773279798)), sqrt(x_m), Float64(0.954929658551372 * x_m)))
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_] := N[(x$95$s * N[(N[(x$95$m * N[(N[Power[x$95$m, 1.5], $MachinePrecision] * -0.12900613773279798), $MachinePrecision]), $MachinePrecision] * N[Sqrt[x$95$m], $MachinePrecision] + N[(0.954929658551372 * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
x\_s \cdot \mathsf{fma}\left(x\_m \cdot \left({x\_m}^{1.5} \cdot -0.12900613773279798\right), \sqrt{x\_m}, 0.954929658551372 \cdot x\_m\right)
\end{array}
Derivation
  1. Initial program 99.4%

    \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift--.f64N/A

      \[\leadsto \color{blue}{\frac{238732414637843}{250000000000000} \cdot x - \frac{6450306886639899}{50000000000000000} \cdot \left(\left(x \cdot x\right) \cdot x\right)} \]
    2. lift-*.f64N/A

      \[\leadsto \frac{238732414637843}{250000000000000} \cdot x - \color{blue}{\frac{6450306886639899}{50000000000000000} \cdot \left(\left(x \cdot x\right) \cdot x\right)} \]
    3. fp-cancel-sub-sign-invN/A

      \[\leadsto \color{blue}{\frac{238732414637843}{250000000000000} \cdot x + \left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000}\right)\right) \cdot \left(\left(x \cdot x\right) \cdot x\right)} \]
    4. lift-*.f64N/A

      \[\leadsto \color{blue}{\frac{238732414637843}{250000000000000} \cdot x} + \left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000}\right)\right) \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
    5. rem-square-sqrtN/A

      \[\leadsto \frac{238732414637843}{250000000000000} \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} + \left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000}\right)\right) \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
    6. sqrt-prodN/A

      \[\leadsto \frac{238732414637843}{250000000000000} \cdot \color{blue}{\sqrt{x \cdot x}} + \left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000}\right)\right) \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
    7. sqr-neg-revN/A

      \[\leadsto \frac{238732414637843}{250000000000000} \cdot \sqrt{\color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot \left(\mathsf{neg}\left(x\right)\right)}} + \left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000}\right)\right) \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
    8. pow2N/A

      \[\leadsto \frac{238732414637843}{250000000000000} \cdot \sqrt{\color{blue}{{\left(\mathsf{neg}\left(x\right)\right)}^{2}}} + \left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000}\right)\right) \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
    9. sqrt-pow1N/A

      \[\leadsto \frac{238732414637843}{250000000000000} \cdot \color{blue}{{\left(\mathsf{neg}\left(x\right)\right)}^{\left(\frac{2}{2}\right)}} + \left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000}\right)\right) \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
    10. metadata-evalN/A

      \[\leadsto \frac{238732414637843}{250000000000000} \cdot {\left(\mathsf{neg}\left(x\right)\right)}^{\color{blue}{1}} + \left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000}\right)\right) \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
    11. unpow1N/A

      \[\leadsto \frac{238732414637843}{250000000000000} \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} + \left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000}\right)\right) \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
    12. distribute-rgt-neg-inN/A

      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000} \cdot x\right)\right)} + \left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000}\right)\right) \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
    13. lift-*.f64N/A

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{238732414637843}{250000000000000} \cdot x}\right)\right) + \left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000}\right)\right) \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
    14. distribute-lft-neg-inN/A

      \[\leadsto \left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000} \cdot x\right)\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000} \cdot \left(\left(x \cdot x\right) \cdot x\right)\right)\right)} \]
    15. lift-*.f64N/A

      \[\leadsto \left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000} \cdot x\right)\right) + \left(\mathsf{neg}\left(\color{blue}{\frac{6450306886639899}{50000000000000000} \cdot \left(\left(x \cdot x\right) \cdot x\right)}\right)\right) \]
    16. distribute-neg-inN/A

      \[\leadsto \color{blue}{\mathsf{neg}\left(\left(\frac{238732414637843}{250000000000000} \cdot x + \frac{6450306886639899}{50000000000000000} \cdot \left(\left(x \cdot x\right) \cdot x\right)\right)\right)} \]
    17. lift-*.f64N/A

      \[\leadsto \mathsf{neg}\left(\left(\color{blue}{\frac{238732414637843}{250000000000000} \cdot x} + \frac{6450306886639899}{50000000000000000} \cdot \left(\left(x \cdot x\right) \cdot x\right)\right)\right) \]
    18. lift-*.f64N/A

      \[\leadsto \mathsf{neg}\left(\left(\frac{238732414637843}{250000000000000} \cdot x + \color{blue}{\frac{6450306886639899}{50000000000000000} \cdot \left(\left(x \cdot x\right) \cdot x\right)}\right)\right) \]
    19. lift-*.f64N/A

      \[\leadsto \mathsf{neg}\left(\left(\frac{238732414637843}{250000000000000} \cdot x + \frac{6450306886639899}{50000000000000000} \cdot \color{blue}{\left(\left(x \cdot x\right) \cdot x\right)}\right)\right) \]
    20. associate-*r*N/A

      \[\leadsto \mathsf{neg}\left(\left(\frac{238732414637843}{250000000000000} \cdot x + \color{blue}{\left(\frac{6450306886639899}{50000000000000000} \cdot \left(x \cdot x\right)\right) \cdot x}\right)\right) \]
    21. distribute-rgt-outN/A

      \[\leadsto \mathsf{neg}\left(\color{blue}{x \cdot \left(\frac{238732414637843}{250000000000000} + \frac{6450306886639899}{50000000000000000} \cdot \left(x \cdot x\right)\right)}\right) \]
  4. Applied rewrites99.5%

    \[\leadsto \color{blue}{\mathsf{fma}\left(x, 0.954929658551372, -0.12900613773279798 \cdot {x}^{3}\right)} \]
  5. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto \mathsf{fma}\left(x, \frac{238732414637843}{250000000000000}, \color{blue}{\frac{-6450306886639899}{50000000000000000} \cdot {x}^{3}}\right) \]
    2. lift-pow.f64N/A

      \[\leadsto \mathsf{fma}\left(x, \frac{238732414637843}{250000000000000}, \frac{-6450306886639899}{50000000000000000} \cdot \color{blue}{{x}^{3}}\right) \]
    3. pow3N/A

      \[\leadsto \mathsf{fma}\left(x, \frac{238732414637843}{250000000000000}, \frac{-6450306886639899}{50000000000000000} \cdot \color{blue}{\left(\left(x \cdot x\right) \cdot x\right)}\right) \]
    4. lift-*.f64N/A

      \[\leadsto \mathsf{fma}\left(x, \frac{238732414637843}{250000000000000}, \frac{-6450306886639899}{50000000000000000} \cdot \left(\color{blue}{\left(x \cdot x\right)} \cdot x\right)\right) \]
    5. associate-*r*N/A

      \[\leadsto \mathsf{fma}\left(x, \frac{238732414637843}{250000000000000}, \color{blue}{\left(\frac{-6450306886639899}{50000000000000000} \cdot \left(x \cdot x\right)\right) \cdot x}\right) \]
    6. lift-*.f64N/A

      \[\leadsto \mathsf{fma}\left(x, \frac{238732414637843}{250000000000000}, \left(\frac{-6450306886639899}{50000000000000000} \cdot \color{blue}{\left(x \cdot x\right)}\right) \cdot x\right) \]
    7. associate-*l*N/A

      \[\leadsto \mathsf{fma}\left(x, \frac{238732414637843}{250000000000000}, \color{blue}{\left(\left(\frac{-6450306886639899}{50000000000000000} \cdot x\right) \cdot x\right)} \cdot x\right) \]
    8. lift-*.f64N/A

      \[\leadsto \mathsf{fma}\left(x, \frac{238732414637843}{250000000000000}, \left(\color{blue}{\left(\frac{-6450306886639899}{50000000000000000} \cdot x\right)} \cdot x\right) \cdot x\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{fma}\left(x, \frac{238732414637843}{250000000000000}, \color{blue}{\left(x \cdot \left(\frac{-6450306886639899}{50000000000000000} \cdot x\right)\right)} \cdot x\right) \]
    10. associate-*r*N/A

      \[\leadsto \mathsf{fma}\left(x, \frac{238732414637843}{250000000000000}, \color{blue}{x \cdot \left(\left(\frac{-6450306886639899}{50000000000000000} \cdot x\right) \cdot x\right)}\right) \]
    11. *-commutativeN/A

      \[\leadsto \mathsf{fma}\left(x, \frac{238732414637843}{250000000000000}, x \cdot \color{blue}{\left(x \cdot \left(\frac{-6450306886639899}{50000000000000000} \cdot x\right)\right)}\right) \]
    12. associate-*r*N/A

      \[\leadsto \mathsf{fma}\left(x, \frac{238732414637843}{250000000000000}, \color{blue}{\left(x \cdot x\right) \cdot \left(\frac{-6450306886639899}{50000000000000000} \cdot x\right)}\right) \]
    13. lift-*.f64N/A

      \[\leadsto \mathsf{fma}\left(x, \frac{238732414637843}{250000000000000}, \color{blue}{\left(x \cdot x\right)} \cdot \left(\frac{-6450306886639899}{50000000000000000} \cdot x\right)\right) \]
    14. lower-*.f6499.8

      \[\leadsto \mathsf{fma}\left(x, 0.954929658551372, \color{blue}{\left(x \cdot x\right) \cdot \left(-0.12900613773279798 \cdot x\right)}\right) \]
  6. Applied rewrites99.8%

    \[\leadsto \mathsf{fma}\left(x, 0.954929658551372, \color{blue}{\left(x \cdot x\right) \cdot \left(-0.12900613773279798 \cdot x\right)}\right) \]
  7. Step-by-step derivation
    1. lift-fma.f64N/A

      \[\leadsto \color{blue}{x \cdot \frac{238732414637843}{250000000000000} + \left(x \cdot x\right) \cdot \left(\frac{-6450306886639899}{50000000000000000} \cdot x\right)} \]
    2. +-commutativeN/A

      \[\leadsto \color{blue}{\left(x \cdot x\right) \cdot \left(\frac{-6450306886639899}{50000000000000000} \cdot x\right) + x \cdot \frac{238732414637843}{250000000000000}} \]
    3. lift-*.f64N/A

      \[\leadsto \color{blue}{\left(x \cdot x\right) \cdot \left(\frac{-6450306886639899}{50000000000000000} \cdot x\right)} + x \cdot \frac{238732414637843}{250000000000000} \]
    4. lift-*.f64N/A

      \[\leadsto \color{blue}{\left(x \cdot x\right)} \cdot \left(\frac{-6450306886639899}{50000000000000000} \cdot x\right) + x \cdot \frac{238732414637843}{250000000000000} \]
    5. associate-*l*N/A

      \[\leadsto \color{blue}{x \cdot \left(x \cdot \left(\frac{-6450306886639899}{50000000000000000} \cdot x\right)\right)} + x \cdot \frac{238732414637843}{250000000000000} \]
    6. lift-*.f64N/A

      \[\leadsto x \cdot \left(x \cdot \color{blue}{\left(\frac{-6450306886639899}{50000000000000000} \cdot x\right)}\right) + x \cdot \frac{238732414637843}{250000000000000} \]
    7. associate-*r*N/A

      \[\leadsto x \cdot \color{blue}{\left(\left(x \cdot \frac{-6450306886639899}{50000000000000000}\right) \cdot x\right)} + x \cdot \frac{238732414637843}{250000000000000} \]
    8. *-commutativeN/A

      \[\leadsto x \cdot \left(\color{blue}{\left(\frac{-6450306886639899}{50000000000000000} \cdot x\right)} \cdot x\right) + x \cdot \frac{238732414637843}{250000000000000} \]
    9. rem-square-sqrtN/A

      \[\leadsto x \cdot \left(\left(\frac{-6450306886639899}{50000000000000000} \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}\right) \cdot x\right) + x \cdot \frac{238732414637843}{250000000000000} \]
    10. lift-sqrt.f64N/A

      \[\leadsto x \cdot \left(\left(\frac{-6450306886639899}{50000000000000000} \cdot \left(\color{blue}{\sqrt{x}} \cdot \sqrt{x}\right)\right) \cdot x\right) + x \cdot \frac{238732414637843}{250000000000000} \]
    11. lift-sqrt.f64N/A

      \[\leadsto x \cdot \left(\left(\frac{-6450306886639899}{50000000000000000} \cdot \left(\sqrt{x} \cdot \color{blue}{\sqrt{x}}\right)\right) \cdot x\right) + x \cdot \frac{238732414637843}{250000000000000} \]
    12. associate-*l*N/A

      \[\leadsto x \cdot \left(\color{blue}{\left(\left(\frac{-6450306886639899}{50000000000000000} \cdot \sqrt{x}\right) \cdot \sqrt{x}\right)} \cdot x\right) + x \cdot \frac{238732414637843}{250000000000000} \]
    13. lift-*.f64N/A

      \[\leadsto x \cdot \left(\left(\color{blue}{\left(\frac{-6450306886639899}{50000000000000000} \cdot \sqrt{x}\right)} \cdot \sqrt{x}\right) \cdot x\right) + x \cdot \frac{238732414637843}{250000000000000} \]
    14. lift-*.f64N/A

      \[\leadsto x \cdot \left(\color{blue}{\left(\left(\frac{-6450306886639899}{50000000000000000} \cdot \sqrt{x}\right) \cdot \sqrt{x}\right)} \cdot x\right) + x \cdot \frac{238732414637843}{250000000000000} \]
  8. Applied rewrites49.1%

    \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot \left({x}^{1.5} \cdot -0.12900613773279798\right), \sqrt{x}, 0.954929658551372 \cdot x\right)} \]
  9. Add Preprocessing

Alternative 2: 98.1% accurate, 0.5× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;0.954929658551372 \cdot x\_m - 0.12900613773279798 \cdot \left(\left(x\_m \cdot x\_m\right) \cdot x\_m\right) \leq -5 \cdot 10^{+21}:\\ \;\;\;\;\left(\left(-0.12900613773279798 \cdot x\_m\right) \cdot x\_m\right) \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;0.954929658551372 \cdot x\_m\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m)
 :precision binary64
 (*
  x_s
  (if (<=
       (-
        (* 0.954929658551372 x_m)
        (* 0.12900613773279798 (* (* x_m x_m) x_m)))
       -5e+21)
    (* (* (* -0.12900613773279798 x_m) x_m) x_m)
    (* 0.954929658551372 x_m))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m) {
	double tmp;
	if (((0.954929658551372 * x_m) - (0.12900613773279798 * ((x_m * x_m) * x_m))) <= -5e+21) {
		tmp = ((-0.12900613773279798 * x_m) * x_m) * x_m;
	} else {
		tmp = 0.954929658551372 * x_m;
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8) :: tmp
    if (((0.954929658551372d0 * x_m) - (0.12900613773279798d0 * ((x_m * x_m) * x_m))) <= (-5d+21)) then
        tmp = (((-0.12900613773279798d0) * x_m) * x_m) * x_m
    else
        tmp = 0.954929658551372d0 * x_m
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m) {
	double tmp;
	if (((0.954929658551372 * x_m) - (0.12900613773279798 * ((x_m * x_m) * x_m))) <= -5e+21) {
		tmp = ((-0.12900613773279798 * x_m) * x_m) * x_m;
	} else {
		tmp = 0.954929658551372 * x_m;
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
def code(x_s, x_m):
	tmp = 0
	if ((0.954929658551372 * x_m) - (0.12900613773279798 * ((x_m * x_m) * x_m))) <= -5e+21:
		tmp = ((-0.12900613773279798 * x_m) * x_m) * x_m
	else:
		tmp = 0.954929658551372 * x_m
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m)
	tmp = 0.0
	if (Float64(Float64(0.954929658551372 * x_m) - Float64(0.12900613773279798 * Float64(Float64(x_m * x_m) * x_m))) <= -5e+21)
		tmp = Float64(Float64(Float64(-0.12900613773279798 * x_m) * x_m) * x_m);
	else
		tmp = Float64(0.954929658551372 * x_m);
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m)
	tmp = 0.0;
	if (((0.954929658551372 * x_m) - (0.12900613773279798 * ((x_m * x_m) * x_m))) <= -5e+21)
		tmp = ((-0.12900613773279798 * x_m) * x_m) * x_m;
	else
		tmp = 0.954929658551372 * x_m;
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_] := N[(x$95$s * If[LessEqual[N[(N[(0.954929658551372 * x$95$m), $MachinePrecision] - N[(0.12900613773279798 * N[(N[(x$95$m * x$95$m), $MachinePrecision] * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e+21], N[(N[(N[(-0.12900613773279798 * x$95$m), $MachinePrecision] * x$95$m), $MachinePrecision] * x$95$m), $MachinePrecision], N[(0.954929658551372 * x$95$m), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;0.954929658551372 \cdot x\_m - 0.12900613773279798 \cdot \left(\left(x\_m \cdot x\_m\right) \cdot x\_m\right) \leq -5 \cdot 10^{+21}:\\
\;\;\;\;\left(\left(-0.12900613773279798 \cdot x\_m\right) \cdot x\_m\right) \cdot x\_m\\

\mathbf{else}:\\
\;\;\;\;0.954929658551372 \cdot x\_m\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (*.f64 #s(literal 238732414637843/250000000000000 binary64) x) (*.f64 #s(literal 6450306886639899/50000000000000000 binary64) (*.f64 (*.f64 x x) x))) < -5e21

    1. Initial program 98.5%

      \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{x \cdot \left(\frac{238732414637843}{250000000000000} + \frac{-6450306886639899}{50000000000000000} \cdot {x}^{2}\right)} \]
    4. Applied rewrites99.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.12900613773279798 \cdot x, x, 0.954929658551372\right) \cdot x} \]
    5. Step-by-step derivation
      1. Applied rewrites99.6%

        \[\leadsto \mathsf{fma}\left(\left(-0.12900613773279798 \cdot \sqrt{x}\right) \cdot \sqrt{x}, x, 0.954929658551372\right) \cdot x \]
      2. Taylor expanded in x around -inf

        \[\leadsto \left(\frac{6450306886639899}{50000000000000000} \cdot \left({x}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right) \cdot x \]
      3. Step-by-step derivation
        1. Applied rewrites99.6%

          \[\leadsto \left(\left(-0.12900613773279798 \cdot x\right) \cdot x\right) \cdot x \]

        if -5e21 < (-.f64 (*.f64 #s(literal 238732414637843/250000000000000 binary64) x) (*.f64 #s(literal 6450306886639899/50000000000000000 binary64) (*.f64 (*.f64 x x) x)))

        1. Initial program 99.8%

          \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{238732414637843}{250000000000000} \cdot x} \]
        4. Step-by-step derivation
          1. remove-double-negN/A

            \[\leadsto \frac{238732414637843}{250000000000000} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right)} \]
          2. distribute-rgt-neg-outN/A

            \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{238732414637843}{250000000000000} \cdot \left(\mathsf{neg}\left(x\right)\right)\right)} \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot \frac{238732414637843}{250000000000000}}\right) \]
          4. distribute-lft-neg-outN/A

            \[\leadsto \mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{238732414637843}{250000000000000}\right)\right)}\right) \]
          5. distribute-rgt-neg-inN/A

            \[\leadsto \mathsf{neg}\left(\color{blue}{x \cdot \left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)}\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot x}\right) \]
          7. distribute-rgt-neg-outN/A

            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \left(\mathsf{neg}\left(x\right)\right)} \]
          8. metadata-evalN/A

            \[\leadsto \color{blue}{\frac{-238732414637843}{250000000000000}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
          9. metadata-evalN/A

            \[\leadsto \color{blue}{\left(\frac{-238732414637843}{250000000000000} \cdot 1\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
          10. metadata-evalN/A

            \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)} \cdot 1\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
          11. lft-mult-inverseN/A

            \[\leadsto \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \color{blue}{\left(\frac{1}{{x}^{2}} \cdot {x}^{2}\right)}\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
          12. associate-*l*N/A

            \[\leadsto \color{blue}{\left(\left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \frac{1}{{x}^{2}}\right) \cdot {x}^{2}\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
          13. *-commutativeN/A

            \[\leadsto \left(\color{blue}{\left(\frac{1}{{x}^{2}} \cdot \left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)\right)} \cdot {x}^{2}\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
          14. associate-*l*N/A

            \[\leadsto \color{blue}{\left(\frac{1}{{x}^{2}} \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
          15. associate-*l/N/A

            \[\leadsto \color{blue}{\frac{1 \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)}{{x}^{2}}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
          16. *-lft-identityN/A

            \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}}}{{x}^{2}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
          17. *-lft-identityN/A

            \[\leadsto \frac{\color{blue}{1 \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)}}{{x}^{2}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
          18. associate-*l/N/A

            \[\leadsto \color{blue}{\left(\frac{1}{{x}^{2}} \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
          19. associate-*l*N/A

            \[\leadsto \color{blue}{\left(\left(\frac{1}{{x}^{2}} \cdot \left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)\right) \cdot {x}^{2}\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
          20. *-commutativeN/A

            \[\leadsto \left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \frac{1}{{x}^{2}}\right)} \cdot {x}^{2}\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
          21. distribute-rgt-neg-inN/A

            \[\leadsto \color{blue}{\mathsf{neg}\left(\left(\left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \frac{1}{{x}^{2}}\right) \cdot {x}^{2}\right) \cdot x\right)} \]
        5. Applied rewrites63.3%

          \[\leadsto \color{blue}{0.954929658551372 \cdot x} \]
      4. Recombined 2 regimes into one program.
      5. Final simplification72.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right) \leq -5 \cdot 10^{+21}:\\ \;\;\;\;\left(\left(-0.12900613773279798 \cdot x\right) \cdot x\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;0.954929658551372 \cdot x\\ \end{array} \]
      6. Add Preprocessing

      Alternative 3: 98.1% accurate, 0.5× speedup?

      \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;0.954929658551372 \cdot x\_m - 0.12900613773279798 \cdot \left(\left(x\_m \cdot x\_m\right) \cdot x\_m\right) \leq -5 \cdot 10^{+21}:\\ \;\;\;\;\left(\left(x\_m \cdot x\_m\right) \cdot -0.12900613773279798\right) \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;0.954929658551372 \cdot x\_m\\ \end{array} \end{array} \]
      x\_m = (fabs.f64 x)
      x\_s = (copysign.f64 #s(literal 1 binary64) x)
      (FPCore (x_s x_m)
       :precision binary64
       (*
        x_s
        (if (<=
             (-
              (* 0.954929658551372 x_m)
              (* 0.12900613773279798 (* (* x_m x_m) x_m)))
             -5e+21)
          (* (* (* x_m x_m) -0.12900613773279798) x_m)
          (* 0.954929658551372 x_m))))
      x\_m = fabs(x);
      x\_s = copysign(1.0, x);
      double code(double x_s, double x_m) {
      	double tmp;
      	if (((0.954929658551372 * x_m) - (0.12900613773279798 * ((x_m * x_m) * x_m))) <= -5e+21) {
      		tmp = ((x_m * x_m) * -0.12900613773279798) * x_m;
      	} else {
      		tmp = 0.954929658551372 * x_m;
      	}
      	return x_s * tmp;
      }
      
      x\_m = abs(x)
      x\_s = copysign(1.0d0, x)
      real(8) function code(x_s, x_m)
          real(8), intent (in) :: x_s
          real(8), intent (in) :: x_m
          real(8) :: tmp
          if (((0.954929658551372d0 * x_m) - (0.12900613773279798d0 * ((x_m * x_m) * x_m))) <= (-5d+21)) then
              tmp = ((x_m * x_m) * (-0.12900613773279798d0)) * x_m
          else
              tmp = 0.954929658551372d0 * x_m
          end if
          code = x_s * tmp
      end function
      
      x\_m = Math.abs(x);
      x\_s = Math.copySign(1.0, x);
      public static double code(double x_s, double x_m) {
      	double tmp;
      	if (((0.954929658551372 * x_m) - (0.12900613773279798 * ((x_m * x_m) * x_m))) <= -5e+21) {
      		tmp = ((x_m * x_m) * -0.12900613773279798) * x_m;
      	} else {
      		tmp = 0.954929658551372 * x_m;
      	}
      	return x_s * tmp;
      }
      
      x\_m = math.fabs(x)
      x\_s = math.copysign(1.0, x)
      def code(x_s, x_m):
      	tmp = 0
      	if ((0.954929658551372 * x_m) - (0.12900613773279798 * ((x_m * x_m) * x_m))) <= -5e+21:
      		tmp = ((x_m * x_m) * -0.12900613773279798) * x_m
      	else:
      		tmp = 0.954929658551372 * x_m
      	return x_s * tmp
      
      x\_m = abs(x)
      x\_s = copysign(1.0, x)
      function code(x_s, x_m)
      	tmp = 0.0
      	if (Float64(Float64(0.954929658551372 * x_m) - Float64(0.12900613773279798 * Float64(Float64(x_m * x_m) * x_m))) <= -5e+21)
      		tmp = Float64(Float64(Float64(x_m * x_m) * -0.12900613773279798) * x_m);
      	else
      		tmp = Float64(0.954929658551372 * x_m);
      	end
      	return Float64(x_s * tmp)
      end
      
      x\_m = abs(x);
      x\_s = sign(x) * abs(1.0);
      function tmp_2 = code(x_s, x_m)
      	tmp = 0.0;
      	if (((0.954929658551372 * x_m) - (0.12900613773279798 * ((x_m * x_m) * x_m))) <= -5e+21)
      		tmp = ((x_m * x_m) * -0.12900613773279798) * x_m;
      	else
      		tmp = 0.954929658551372 * x_m;
      	end
      	tmp_2 = x_s * tmp;
      end
      
      x\_m = N[Abs[x], $MachinePrecision]
      x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[x$95$s_, x$95$m_] := N[(x$95$s * If[LessEqual[N[(N[(0.954929658551372 * x$95$m), $MachinePrecision] - N[(0.12900613773279798 * N[(N[(x$95$m * x$95$m), $MachinePrecision] * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e+21], N[(N[(N[(x$95$m * x$95$m), $MachinePrecision] * -0.12900613773279798), $MachinePrecision] * x$95$m), $MachinePrecision], N[(0.954929658551372 * x$95$m), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      x\_m = \left|x\right|
      \\
      x\_s = \mathsf{copysign}\left(1, x\right)
      
      \\
      x\_s \cdot \begin{array}{l}
      \mathbf{if}\;0.954929658551372 \cdot x\_m - 0.12900613773279798 \cdot \left(\left(x\_m \cdot x\_m\right) \cdot x\_m\right) \leq -5 \cdot 10^{+21}:\\
      \;\;\;\;\left(\left(x\_m \cdot x\_m\right) \cdot -0.12900613773279798\right) \cdot x\_m\\
      
      \mathbf{else}:\\
      \;\;\;\;0.954929658551372 \cdot x\_m\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (-.f64 (*.f64 #s(literal 238732414637843/250000000000000 binary64) x) (*.f64 #s(literal 6450306886639899/50000000000000000 binary64) (*.f64 (*.f64 x x) x))) < -5e21

        1. Initial program 98.5%

          \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{x \cdot \left(\frac{238732414637843}{250000000000000} + \frac{-6450306886639899}{50000000000000000} \cdot {x}^{2}\right)} \]
        4. Applied rewrites99.8%

          \[\leadsto \color{blue}{\mathsf{fma}\left(-0.12900613773279798 \cdot x, x, 0.954929658551372\right) \cdot x} \]
        5. Taylor expanded in x around inf

          \[\leadsto \left(\frac{-6450306886639899}{50000000000000000} \cdot {x}^{2}\right) \cdot x \]
        6. Step-by-step derivation
          1. Applied rewrites99.6%

            \[\leadsto \left(\left(x \cdot x\right) \cdot -0.12900613773279798\right) \cdot x \]

          if -5e21 < (-.f64 (*.f64 #s(literal 238732414637843/250000000000000 binary64) x) (*.f64 #s(literal 6450306886639899/50000000000000000 binary64) (*.f64 (*.f64 x x) x)))

          1. Initial program 99.8%

            \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
          2. Add Preprocessing
          3. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{238732414637843}{250000000000000} \cdot x} \]
          4. Step-by-step derivation
            1. remove-double-negN/A

              \[\leadsto \frac{238732414637843}{250000000000000} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right)} \]
            2. distribute-rgt-neg-outN/A

              \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{238732414637843}{250000000000000} \cdot \left(\mathsf{neg}\left(x\right)\right)\right)} \]
            3. *-commutativeN/A

              \[\leadsto \mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot \frac{238732414637843}{250000000000000}}\right) \]
            4. distribute-lft-neg-outN/A

              \[\leadsto \mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{238732414637843}{250000000000000}\right)\right)}\right) \]
            5. distribute-rgt-neg-inN/A

              \[\leadsto \mathsf{neg}\left(\color{blue}{x \cdot \left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)}\right) \]
            6. *-commutativeN/A

              \[\leadsto \mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot x}\right) \]
            7. distribute-rgt-neg-outN/A

              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \left(\mathsf{neg}\left(x\right)\right)} \]
            8. metadata-evalN/A

              \[\leadsto \color{blue}{\frac{-238732414637843}{250000000000000}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            9. metadata-evalN/A

              \[\leadsto \color{blue}{\left(\frac{-238732414637843}{250000000000000} \cdot 1\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            10. metadata-evalN/A

              \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)} \cdot 1\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            11. lft-mult-inverseN/A

              \[\leadsto \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \color{blue}{\left(\frac{1}{{x}^{2}} \cdot {x}^{2}\right)}\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            12. associate-*l*N/A

              \[\leadsto \color{blue}{\left(\left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \frac{1}{{x}^{2}}\right) \cdot {x}^{2}\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            13. *-commutativeN/A

              \[\leadsto \left(\color{blue}{\left(\frac{1}{{x}^{2}} \cdot \left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)\right)} \cdot {x}^{2}\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            14. associate-*l*N/A

              \[\leadsto \color{blue}{\left(\frac{1}{{x}^{2}} \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            15. associate-*l/N/A

              \[\leadsto \color{blue}{\frac{1 \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)}{{x}^{2}}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            16. *-lft-identityN/A

              \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}}}{{x}^{2}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            17. *-lft-identityN/A

              \[\leadsto \frac{\color{blue}{1 \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)}}{{x}^{2}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            18. associate-*l/N/A

              \[\leadsto \color{blue}{\left(\frac{1}{{x}^{2}} \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            19. associate-*l*N/A

              \[\leadsto \color{blue}{\left(\left(\frac{1}{{x}^{2}} \cdot \left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)\right) \cdot {x}^{2}\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            20. *-commutativeN/A

              \[\leadsto \left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \frac{1}{{x}^{2}}\right)} \cdot {x}^{2}\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            21. distribute-rgt-neg-inN/A

              \[\leadsto \color{blue}{\mathsf{neg}\left(\left(\left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \frac{1}{{x}^{2}}\right) \cdot {x}^{2}\right) \cdot x\right)} \]
          5. Applied rewrites63.3%

            \[\leadsto \color{blue}{0.954929658551372 \cdot x} \]
        7. Recombined 2 regimes into one program.
        8. Add Preprocessing

        Alternative 4: 99.8% accurate, 1.4× speedup?

        \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \left(\mathsf{fma}\left(-0.12900613773279798 \cdot x\_m, x\_m, 0.954929658551372\right) \cdot x\_m\right) \end{array} \]
        x\_m = (fabs.f64 x)
        x\_s = (copysign.f64 #s(literal 1 binary64) x)
        (FPCore (x_s x_m)
         :precision binary64
         (* x_s (* (fma (* -0.12900613773279798 x_m) x_m 0.954929658551372) x_m)))
        x\_m = fabs(x);
        x\_s = copysign(1.0, x);
        double code(double x_s, double x_m) {
        	return x_s * (fma((-0.12900613773279798 * x_m), x_m, 0.954929658551372) * x_m);
        }
        
        x\_m = abs(x)
        x\_s = copysign(1.0, x)
        function code(x_s, x_m)
        	return Float64(x_s * Float64(fma(Float64(-0.12900613773279798 * x_m), x_m, 0.954929658551372) * x_m))
        end
        
        x\_m = N[Abs[x], $MachinePrecision]
        x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        code[x$95$s_, x$95$m_] := N[(x$95$s * N[(N[(N[(-0.12900613773279798 * x$95$m), $MachinePrecision] * x$95$m + 0.954929658551372), $MachinePrecision] * x$95$m), $MachinePrecision]), $MachinePrecision]
        
        \begin{array}{l}
        x\_m = \left|x\right|
        \\
        x\_s = \mathsf{copysign}\left(1, x\right)
        
        \\
        x\_s \cdot \left(\mathsf{fma}\left(-0.12900613773279798 \cdot x\_m, x\_m, 0.954929658551372\right) \cdot x\_m\right)
        \end{array}
        
        Derivation
        1. Initial program 99.4%

          \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{x \cdot \left(\frac{238732414637843}{250000000000000} + \frac{-6450306886639899}{50000000000000000} \cdot {x}^{2}\right)} \]
        4. Applied rewrites99.8%

          \[\leadsto \color{blue}{\mathsf{fma}\left(-0.12900613773279798 \cdot x, x, 0.954929658551372\right) \cdot x} \]
        5. Add Preprocessing

        Alternative 5: 52.8% accurate, 2.0× speedup?

        \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 2.7:\\ \;\;\;\;0.954929658551372 \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot -0.954929658551372\\ \end{array} \end{array} \]
        x\_m = (fabs.f64 x)
        x\_s = (copysign.f64 #s(literal 1 binary64) x)
        (FPCore (x_s x_m)
         :precision binary64
         (*
          x_s
          (if (<= x_m 2.7) (* 0.954929658551372 x_m) (* x_m -0.954929658551372))))
        x\_m = fabs(x);
        x\_s = copysign(1.0, x);
        double code(double x_s, double x_m) {
        	double tmp;
        	if (x_m <= 2.7) {
        		tmp = 0.954929658551372 * x_m;
        	} else {
        		tmp = x_m * -0.954929658551372;
        	}
        	return x_s * tmp;
        }
        
        x\_m = abs(x)
        x\_s = copysign(1.0d0, x)
        real(8) function code(x_s, x_m)
            real(8), intent (in) :: x_s
            real(8), intent (in) :: x_m
            real(8) :: tmp
            if (x_m <= 2.7d0) then
                tmp = 0.954929658551372d0 * x_m
            else
                tmp = x_m * (-0.954929658551372d0)
            end if
            code = x_s * tmp
        end function
        
        x\_m = Math.abs(x);
        x\_s = Math.copySign(1.0, x);
        public static double code(double x_s, double x_m) {
        	double tmp;
        	if (x_m <= 2.7) {
        		tmp = 0.954929658551372 * x_m;
        	} else {
        		tmp = x_m * -0.954929658551372;
        	}
        	return x_s * tmp;
        }
        
        x\_m = math.fabs(x)
        x\_s = math.copysign(1.0, x)
        def code(x_s, x_m):
        	tmp = 0
        	if x_m <= 2.7:
        		tmp = 0.954929658551372 * x_m
        	else:
        		tmp = x_m * -0.954929658551372
        	return x_s * tmp
        
        x\_m = abs(x)
        x\_s = copysign(1.0, x)
        function code(x_s, x_m)
        	tmp = 0.0
        	if (x_m <= 2.7)
        		tmp = Float64(0.954929658551372 * x_m);
        	else
        		tmp = Float64(x_m * -0.954929658551372);
        	end
        	return Float64(x_s * tmp)
        end
        
        x\_m = abs(x);
        x\_s = sign(x) * abs(1.0);
        function tmp_2 = code(x_s, x_m)
        	tmp = 0.0;
        	if (x_m <= 2.7)
        		tmp = 0.954929658551372 * x_m;
        	else
        		tmp = x_m * -0.954929658551372;
        	end
        	tmp_2 = x_s * tmp;
        end
        
        x\_m = N[Abs[x], $MachinePrecision]
        x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        code[x$95$s_, x$95$m_] := N[(x$95$s * If[LessEqual[x$95$m, 2.7], N[(0.954929658551372 * x$95$m), $MachinePrecision], N[(x$95$m * -0.954929658551372), $MachinePrecision]]), $MachinePrecision]
        
        \begin{array}{l}
        x\_m = \left|x\right|
        \\
        x\_s = \mathsf{copysign}\left(1, x\right)
        
        \\
        x\_s \cdot \begin{array}{l}
        \mathbf{if}\;x\_m \leq 2.7:\\
        \;\;\;\;0.954929658551372 \cdot x\_m\\
        
        \mathbf{else}:\\
        \;\;\;\;x\_m \cdot -0.954929658551372\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < 2.7000000000000002

          1. Initial program 99.8%

            \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
          2. Add Preprocessing
          3. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{238732414637843}{250000000000000} \cdot x} \]
          4. Step-by-step derivation
            1. remove-double-negN/A

              \[\leadsto \frac{238732414637843}{250000000000000} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right)} \]
            2. distribute-rgt-neg-outN/A

              \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{238732414637843}{250000000000000} \cdot \left(\mathsf{neg}\left(x\right)\right)\right)} \]
            3. *-commutativeN/A

              \[\leadsto \mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot \frac{238732414637843}{250000000000000}}\right) \]
            4. distribute-lft-neg-outN/A

              \[\leadsto \mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{238732414637843}{250000000000000}\right)\right)}\right) \]
            5. distribute-rgt-neg-inN/A

              \[\leadsto \mathsf{neg}\left(\color{blue}{x \cdot \left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)}\right) \]
            6. *-commutativeN/A

              \[\leadsto \mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot x}\right) \]
            7. distribute-rgt-neg-outN/A

              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \left(\mathsf{neg}\left(x\right)\right)} \]
            8. metadata-evalN/A

              \[\leadsto \color{blue}{\frac{-238732414637843}{250000000000000}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            9. metadata-evalN/A

              \[\leadsto \color{blue}{\left(\frac{-238732414637843}{250000000000000} \cdot 1\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            10. metadata-evalN/A

              \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)} \cdot 1\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            11. lft-mult-inverseN/A

              \[\leadsto \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \color{blue}{\left(\frac{1}{{x}^{2}} \cdot {x}^{2}\right)}\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            12. associate-*l*N/A

              \[\leadsto \color{blue}{\left(\left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \frac{1}{{x}^{2}}\right) \cdot {x}^{2}\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            13. *-commutativeN/A

              \[\leadsto \left(\color{blue}{\left(\frac{1}{{x}^{2}} \cdot \left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)\right)} \cdot {x}^{2}\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            14. associate-*l*N/A

              \[\leadsto \color{blue}{\left(\frac{1}{{x}^{2}} \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            15. associate-*l/N/A

              \[\leadsto \color{blue}{\frac{1 \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)}{{x}^{2}}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            16. *-lft-identityN/A

              \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}}}{{x}^{2}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            17. *-lft-identityN/A

              \[\leadsto \frac{\color{blue}{1 \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)}}{{x}^{2}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            18. associate-*l/N/A

              \[\leadsto \color{blue}{\left(\frac{1}{{x}^{2}} \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            19. associate-*l*N/A

              \[\leadsto \color{blue}{\left(\left(\frac{1}{{x}^{2}} \cdot \left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)\right) \cdot {x}^{2}\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            20. *-commutativeN/A

              \[\leadsto \left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \frac{1}{{x}^{2}}\right)} \cdot {x}^{2}\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            21. distribute-rgt-neg-inN/A

              \[\leadsto \color{blue}{\mathsf{neg}\left(\left(\left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \frac{1}{{x}^{2}}\right) \cdot {x}^{2}\right) \cdot x\right)} \]
          5. Applied rewrites64.3%

            \[\leadsto \color{blue}{0.954929658551372 \cdot x} \]

          if 2.7000000000000002 < x

          1. Initial program 98.5%

            \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
          2. Add Preprocessing
          3. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{238732414637843}{250000000000000} \cdot x} \]
          4. Step-by-step derivation
            1. remove-double-negN/A

              \[\leadsto \frac{238732414637843}{250000000000000} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right)} \]
            2. distribute-rgt-neg-outN/A

              \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{238732414637843}{250000000000000} \cdot \left(\mathsf{neg}\left(x\right)\right)\right)} \]
            3. *-commutativeN/A

              \[\leadsto \mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot \frac{238732414637843}{250000000000000}}\right) \]
            4. distribute-lft-neg-outN/A

              \[\leadsto \mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{238732414637843}{250000000000000}\right)\right)}\right) \]
            5. distribute-rgt-neg-inN/A

              \[\leadsto \mathsf{neg}\left(\color{blue}{x \cdot \left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)}\right) \]
            6. *-commutativeN/A

              \[\leadsto \mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot x}\right) \]
            7. distribute-rgt-neg-outN/A

              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \left(\mathsf{neg}\left(x\right)\right)} \]
            8. metadata-evalN/A

              \[\leadsto \color{blue}{\frac{-238732414637843}{250000000000000}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            9. metadata-evalN/A

              \[\leadsto \color{blue}{\left(\frac{-238732414637843}{250000000000000} \cdot 1\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            10. metadata-evalN/A

              \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)} \cdot 1\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            11. lft-mult-inverseN/A

              \[\leadsto \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \color{blue}{\left(\frac{1}{{x}^{2}} \cdot {x}^{2}\right)}\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            12. associate-*l*N/A

              \[\leadsto \color{blue}{\left(\left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \frac{1}{{x}^{2}}\right) \cdot {x}^{2}\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            13. *-commutativeN/A

              \[\leadsto \left(\color{blue}{\left(\frac{1}{{x}^{2}} \cdot \left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)\right)} \cdot {x}^{2}\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            14. associate-*l*N/A

              \[\leadsto \color{blue}{\left(\frac{1}{{x}^{2}} \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            15. associate-*l/N/A

              \[\leadsto \color{blue}{\frac{1 \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)}{{x}^{2}}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            16. *-lft-identityN/A

              \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}}}{{x}^{2}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            17. *-lft-identityN/A

              \[\leadsto \frac{\color{blue}{1 \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)}}{{x}^{2}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            18. associate-*l/N/A

              \[\leadsto \color{blue}{\left(\frac{1}{{x}^{2}} \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            19. associate-*l*N/A

              \[\leadsto \color{blue}{\left(\left(\frac{1}{{x}^{2}} \cdot \left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)\right) \cdot {x}^{2}\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            20. *-commutativeN/A

              \[\leadsto \left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \frac{1}{{x}^{2}}\right)} \cdot {x}^{2}\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            21. distribute-rgt-neg-inN/A

              \[\leadsto \color{blue}{\mathsf{neg}\left(\left(\left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \frac{1}{{x}^{2}}\right) \cdot {x}^{2}\right) \cdot x\right)} \]
          5. Applied rewrites0.5%

            \[\leadsto \color{blue}{0.954929658551372 \cdot x} \]
          6. Step-by-step derivation
            1. Applied rewrites6.3%

              \[\leadsto x \cdot \color{blue}{-0.954929658551372} \]
          7. Recombined 2 regimes into one program.
          8. Add Preprocessing

          Alternative 6: 49.9% accurate, 4.0× speedup?

          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \left(0.954929658551372 \cdot x\_m\right) \end{array} \]
          x\_m = (fabs.f64 x)
          x\_s = (copysign.f64 #s(literal 1 binary64) x)
          (FPCore (x_s x_m) :precision binary64 (* x_s (* 0.954929658551372 x_m)))
          x\_m = fabs(x);
          x\_s = copysign(1.0, x);
          double code(double x_s, double x_m) {
          	return x_s * (0.954929658551372 * x_m);
          }
          
          x\_m = abs(x)
          x\_s = copysign(1.0d0, x)
          real(8) function code(x_s, x_m)
              real(8), intent (in) :: x_s
              real(8), intent (in) :: x_m
              code = x_s * (0.954929658551372d0 * x_m)
          end function
          
          x\_m = Math.abs(x);
          x\_s = Math.copySign(1.0, x);
          public static double code(double x_s, double x_m) {
          	return x_s * (0.954929658551372 * x_m);
          }
          
          x\_m = math.fabs(x)
          x\_s = math.copysign(1.0, x)
          def code(x_s, x_m):
          	return x_s * (0.954929658551372 * x_m)
          
          x\_m = abs(x)
          x\_s = copysign(1.0, x)
          function code(x_s, x_m)
          	return Float64(x_s * Float64(0.954929658551372 * x_m))
          end
          
          x\_m = abs(x);
          x\_s = sign(x) * abs(1.0);
          function tmp = code(x_s, x_m)
          	tmp = x_s * (0.954929658551372 * x_m);
          end
          
          x\_m = N[Abs[x], $MachinePrecision]
          x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[x$95$s_, x$95$m_] := N[(x$95$s * N[(0.954929658551372 * x$95$m), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          x\_m = \left|x\right|
          \\
          x\_s = \mathsf{copysign}\left(1, x\right)
          
          \\
          x\_s \cdot \left(0.954929658551372 \cdot x\_m\right)
          \end{array}
          
          Derivation
          1. Initial program 99.4%

            \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
          2. Add Preprocessing
          3. Taylor expanded in x around 0

            \[\leadsto \color{blue}{\frac{238732414637843}{250000000000000} \cdot x} \]
          4. Step-by-step derivation
            1. remove-double-negN/A

              \[\leadsto \frac{238732414637843}{250000000000000} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right)} \]
            2. distribute-rgt-neg-outN/A

              \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{238732414637843}{250000000000000} \cdot \left(\mathsf{neg}\left(x\right)\right)\right)} \]
            3. *-commutativeN/A

              \[\leadsto \mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot \frac{238732414637843}{250000000000000}}\right) \]
            4. distribute-lft-neg-outN/A

              \[\leadsto \mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x \cdot \frac{238732414637843}{250000000000000}\right)\right)}\right) \]
            5. distribute-rgt-neg-inN/A

              \[\leadsto \mathsf{neg}\left(\color{blue}{x \cdot \left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)}\right) \]
            6. *-commutativeN/A

              \[\leadsto \mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot x}\right) \]
            7. distribute-rgt-neg-outN/A

              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \left(\mathsf{neg}\left(x\right)\right)} \]
            8. metadata-evalN/A

              \[\leadsto \color{blue}{\frac{-238732414637843}{250000000000000}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            9. metadata-evalN/A

              \[\leadsto \color{blue}{\left(\frac{-238732414637843}{250000000000000} \cdot 1\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            10. metadata-evalN/A

              \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)} \cdot 1\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            11. lft-mult-inverseN/A

              \[\leadsto \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \color{blue}{\left(\frac{1}{{x}^{2}} \cdot {x}^{2}\right)}\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            12. associate-*l*N/A

              \[\leadsto \color{blue}{\left(\left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \frac{1}{{x}^{2}}\right) \cdot {x}^{2}\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            13. *-commutativeN/A

              \[\leadsto \left(\color{blue}{\left(\frac{1}{{x}^{2}} \cdot \left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)\right)} \cdot {x}^{2}\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            14. associate-*l*N/A

              \[\leadsto \color{blue}{\left(\frac{1}{{x}^{2}} \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            15. associate-*l/N/A

              \[\leadsto \color{blue}{\frac{1 \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)}{{x}^{2}}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            16. *-lft-identityN/A

              \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}}}{{x}^{2}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            17. *-lft-identityN/A

              \[\leadsto \frac{\color{blue}{1 \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)}}{{x}^{2}} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            18. associate-*l/N/A

              \[\leadsto \color{blue}{\left(\frac{1}{{x}^{2}} \cdot \left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot {x}^{2}\right)\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            19. associate-*l*N/A

              \[\leadsto \color{blue}{\left(\left(\frac{1}{{x}^{2}} \cdot \left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right)\right) \cdot {x}^{2}\right)} \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            20. *-commutativeN/A

              \[\leadsto \left(\color{blue}{\left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \frac{1}{{x}^{2}}\right)} \cdot {x}^{2}\right) \cdot \left(\mathsf{neg}\left(x\right)\right) \]
            21. distribute-rgt-neg-inN/A

              \[\leadsto \color{blue}{\mathsf{neg}\left(\left(\left(\left(\mathsf{neg}\left(\frac{238732414637843}{250000000000000}\right)\right) \cdot \frac{1}{{x}^{2}}\right) \cdot {x}^{2}\right) \cdot x\right)} \]
          5. Applied rewrites47.3%

            \[\leadsto \color{blue}{0.954929658551372 \cdot x} \]
          6. Add Preprocessing

          Reproduce

          ?
          herbie shell --seed 2024338 
          (FPCore (x)
            :name "Rosa's Benchmark"
            :precision binary64
            (- (* 0.954929658551372 x) (* 0.12900613773279798 (* (* x x) x))))