Rosa's Benchmark

Percentage Accurate: 99.8% → 99.8%
Time: 7.1s
Alternatives: 6
Speedup: 1.2×

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, 1.0× speedup?

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

\\
0.954929658551372 \cdot x - \left(x \cdot x\right) \cdot \left(x \cdot 0.12900613773279798\right)
\end{array}
Derivation
  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. Step-by-step derivation
    1. associate-*r*N/A

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{238732414637843}{250000000000000}, x\right), \left(\left(\left(x \cdot x\right) \cdot \frac{6450306886639899}{50000000000000000}\right) \cdot x\right)\right) \]
    3. associate-*l*N/A

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{238732414637843}{250000000000000}, x\right), \mathsf{*.f64}\left(\left(x \cdot x\right), \color{blue}{\left(\frac{6450306886639899}{50000000000000000} \cdot x\right)}\right)\right) \]
    5. *-lowering-*.f64N/A

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

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{238732414637843}{250000000000000}, x\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \left(x \cdot \color{blue}{\frac{6450306886639899}{50000000000000000}}\right)\right)\right) \]
    7. *-lowering-*.f6499.8%

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{238732414637843}{250000000000000}, x\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, x\right), \mathsf{*.f64}\left(x, \color{blue}{\frac{6450306886639899}{50000000000000000}}\right)\right)\right) \]
  4. Applied egg-rr99.8%

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

Alternative 2: 74.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2.7:\\ \;\;\;\;0.954929658551372 \cdot x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(x \cdot \left(x \cdot -0.12900613773279798\right)\right)\\ \end{array} \end{array} \]
(FPCore (x)
 :precision binary64
 (if (<= x 2.7)
   (* 0.954929658551372 x)
   (* x (* x (* x -0.12900613773279798)))))
double code(double x) {
	double tmp;
	if (x <= 2.7) {
		tmp = 0.954929658551372 * x;
	} else {
		tmp = x * (x * (x * -0.12900613773279798));
	}
	return tmp;
}
real(8) function code(x)
    real(8), intent (in) :: x
    real(8) :: tmp
    if (x <= 2.7d0) then
        tmp = 0.954929658551372d0 * x
    else
        tmp = x * (x * (x * (-0.12900613773279798d0)))
    end if
    code = tmp
end function
public static double code(double x) {
	double tmp;
	if (x <= 2.7) {
		tmp = 0.954929658551372 * x;
	} else {
		tmp = x * (x * (x * -0.12900613773279798));
	}
	return tmp;
}
def code(x):
	tmp = 0
	if x <= 2.7:
		tmp = 0.954929658551372 * x
	else:
		tmp = x * (x * (x * -0.12900613773279798))
	return tmp
function code(x)
	tmp = 0.0
	if (x <= 2.7)
		tmp = Float64(0.954929658551372 * x);
	else
		tmp = Float64(x * Float64(x * Float64(x * -0.12900613773279798)));
	end
	return tmp
end
function tmp_2 = code(x)
	tmp = 0.0;
	if (x <= 2.7)
		tmp = 0.954929658551372 * x;
	else
		tmp = x * (x * (x * -0.12900613773279798));
	end
	tmp_2 = tmp;
end
code[x_] := If[LessEqual[x, 2.7], N[(0.954929658551372 * x), $MachinePrecision], N[(x * N[(x * N[(x * -0.12900613773279798), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.7:\\
\;\;\;\;0.954929658551372 \cdot x\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot \left(x \cdot -0.12900613773279798\right)\right)\\


\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. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \left(\mathsf{neg}\left(\left(\frac{6450306886639899}{50000000000000000} \cdot x\right) \cdot x\right)\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \left(\mathsf{neg}\left(x \cdot \left(\frac{6450306886639899}{50000000000000000} \cdot x\right)\right)\right)\right)\right) \]
      8. distribute-rgt-neg-inN/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000}\right)\right)}\right)\right)\right)\right) \]
      13. metadata-eval99.8%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{-6450306886639899}{50000000000000000}\right)\right)\right)\right) \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x \cdot \left(0.954929658551372 + x \cdot \left(x \cdot -0.12900613773279798\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\frac{238732414637843}{250000000000000}}\right) \]
    6. Step-by-step derivation
      1. Simplified64.3%

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

      if 2.7000000000000002 < x

      1. Initial program 99.7%

        \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
      2. Step-by-step derivation
        1. associate-*r*N/A

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \left(\mathsf{neg}\left(\left(\frac{6450306886639899}{50000000000000000} \cdot x\right) \cdot x\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \left(\mathsf{neg}\left(x \cdot \left(\frac{6450306886639899}{50000000000000000} \cdot x\right)\right)\right)\right)\right) \]
        8. distribute-rgt-neg-inN/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000}\right)\right)}\right)\right)\right)\right) \]
        13. metadata-eval99.9%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{-6450306886639899}{50000000000000000}\right)\right)\right)\right) \]
      3. Simplified99.9%

        \[\leadsto \color{blue}{x \cdot \left(0.954929658551372 + x \cdot \left(x \cdot -0.12900613773279798\right)\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in x around inf

        \[\leadsto \color{blue}{\frac{-6450306886639899}{50000000000000000} \cdot {x}^{3}} \]
      6. Step-by-step derivation
        1. unpow3N/A

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

          \[\leadsto \frac{-6450306886639899}{50000000000000000} \cdot \left({x}^{2} \cdot x\right) \]
        3. associate-*r*N/A

          \[\leadsto \left(\frac{-6450306886639899}{50000000000000000} \cdot {x}^{2}\right) \cdot \color{blue}{x} \]
        4. *-commutativeN/A

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

          \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{-6450306886639899}{50000000000000000} \cdot {x}^{2}\right)}\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\frac{-6450306886639899}{50000000000000000}, \color{blue}{\left({x}^{2}\right)}\right)\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\frac{-6450306886639899}{50000000000000000}, \left(x \cdot \color{blue}{x}\right)\right)\right) \]
        8. *-lowering-*.f6499.0%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\frac{-6450306886639899}{50000000000000000}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right)\right) \]
      7. Simplified99.0%

        \[\leadsto \color{blue}{x \cdot \left(-0.12900613773279798 \cdot \left(x \cdot x\right)\right)} \]
      8. Step-by-step derivation
        1. *-commutativeN/A

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)\right), \color{blue}{x}\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)\right), x\right) \]
        6. *-lowering-*.f6499.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{-6450306886639899}{50000000000000000}\right)\right), x\right) \]
      9. Applied egg-rr99.0%

        \[\leadsto \color{blue}{\left(x \cdot \left(x \cdot -0.12900613773279798\right)\right) \cdot x} \]
    7. Recombined 2 regimes into one program.
    8. Final simplification73.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.7:\\ \;\;\;\;0.954929658551372 \cdot x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(x \cdot \left(x \cdot -0.12900613773279798\right)\right)\\ \end{array} \]
    9. Add Preprocessing

    Alternative 3: 74.4% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2.7:\\ \;\;\;\;0.954929658551372 \cdot x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(x \cdot x\right) \cdot -0.12900613773279798\right)\\ \end{array} \end{array} \]
    (FPCore (x)
     :precision binary64
     (if (<= x 2.7)
       (* 0.954929658551372 x)
       (* x (* (* x x) -0.12900613773279798))))
    double code(double x) {
    	double tmp;
    	if (x <= 2.7) {
    		tmp = 0.954929658551372 * x;
    	} else {
    		tmp = x * ((x * x) * -0.12900613773279798);
    	}
    	return tmp;
    }
    
    real(8) function code(x)
        real(8), intent (in) :: x
        real(8) :: tmp
        if (x <= 2.7d0) then
            tmp = 0.954929658551372d0 * x
        else
            tmp = x * ((x * x) * (-0.12900613773279798d0))
        end if
        code = tmp
    end function
    
    public static double code(double x) {
    	double tmp;
    	if (x <= 2.7) {
    		tmp = 0.954929658551372 * x;
    	} else {
    		tmp = x * ((x * x) * -0.12900613773279798);
    	}
    	return tmp;
    }
    
    def code(x):
    	tmp = 0
    	if x <= 2.7:
    		tmp = 0.954929658551372 * x
    	else:
    		tmp = x * ((x * x) * -0.12900613773279798)
    	return tmp
    
    function code(x)
    	tmp = 0.0
    	if (x <= 2.7)
    		tmp = Float64(0.954929658551372 * x);
    	else
    		tmp = Float64(x * Float64(Float64(x * x) * -0.12900613773279798));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x)
    	tmp = 0.0;
    	if (x <= 2.7)
    		tmp = 0.954929658551372 * x;
    	else
    		tmp = x * ((x * x) * -0.12900613773279798);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_] := If[LessEqual[x, 2.7], N[(0.954929658551372 * x), $MachinePrecision], N[(x * N[(N[(x * x), $MachinePrecision] * -0.12900613773279798), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;x \leq 2.7:\\
    \;\;\;\;0.954929658551372 \cdot x\\
    
    \mathbf{else}:\\
    \;\;\;\;x \cdot \left(\left(x \cdot x\right) \cdot -0.12900613773279798\right)\\
    
    
    \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. Step-by-step derivation
        1. associate-*r*N/A

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \left(\mathsf{neg}\left(\left(\frac{6450306886639899}{50000000000000000} \cdot x\right) \cdot x\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \left(\mathsf{neg}\left(x \cdot \left(\frac{6450306886639899}{50000000000000000} \cdot x\right)\right)\right)\right)\right) \]
        8. distribute-rgt-neg-inN/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000}\right)\right)}\right)\right)\right)\right) \]
        13. metadata-eval99.8%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{-6450306886639899}{50000000000000000}\right)\right)\right)\right) \]
      3. Simplified99.8%

        \[\leadsto \color{blue}{x \cdot \left(0.954929658551372 + x \cdot \left(x \cdot -0.12900613773279798\right)\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in x around 0

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\frac{238732414637843}{250000000000000}}\right) \]
      6. Step-by-step derivation
        1. Simplified64.3%

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

        if 2.7000000000000002 < x

        1. Initial program 99.7%

          \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
        2. Step-by-step derivation
          1. associate-*r*N/A

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \left(\mathsf{neg}\left(\left(\frac{6450306886639899}{50000000000000000} \cdot x\right) \cdot x\right)\right)\right)\right) \]
          7. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \left(\mathsf{neg}\left(x \cdot \left(\frac{6450306886639899}{50000000000000000} \cdot x\right)\right)\right)\right)\right) \]
          8. distribute-rgt-neg-inN/A

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000}\right)\right)}\right)\right)\right)\right) \]
          13. metadata-eval99.9%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{-6450306886639899}{50000000000000000}\right)\right)\right)\right) \]
        3. Simplified99.9%

          \[\leadsto \color{blue}{x \cdot \left(0.954929658551372 + x \cdot \left(x \cdot -0.12900613773279798\right)\right)} \]
        4. Add Preprocessing
        5. Taylor expanded in x around inf

          \[\leadsto \color{blue}{\frac{-6450306886639899}{50000000000000000} \cdot {x}^{3}} \]
        6. Step-by-step derivation
          1. unpow3N/A

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

            \[\leadsto \frac{-6450306886639899}{50000000000000000} \cdot \left({x}^{2} \cdot x\right) \]
          3. associate-*r*N/A

            \[\leadsto \left(\frac{-6450306886639899}{50000000000000000} \cdot {x}^{2}\right) \cdot \color{blue}{x} \]
          4. *-commutativeN/A

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

            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{-6450306886639899}{50000000000000000} \cdot {x}^{2}\right)}\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\frac{-6450306886639899}{50000000000000000}, \color{blue}{\left({x}^{2}\right)}\right)\right) \]
          7. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\frac{-6450306886639899}{50000000000000000}, \left(x \cdot \color{blue}{x}\right)\right)\right) \]
          8. *-lowering-*.f6499.0%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(\frac{-6450306886639899}{50000000000000000}, \mathsf{*.f64}\left(x, \color{blue}{x}\right)\right)\right) \]
        7. Simplified99.0%

          \[\leadsto \color{blue}{x \cdot \left(-0.12900613773279798 \cdot \left(x \cdot x\right)\right)} \]
      7. Recombined 2 regimes into one program.
      8. Final simplification73.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.7:\\ \;\;\;\;0.954929658551372 \cdot x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(x \cdot x\right) \cdot -0.12900613773279798\right)\\ \end{array} \]
      9. Add Preprocessing

      Alternative 4: 99.8% accurate, 1.2× speedup?

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

        \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
      2. Step-by-step derivation
        1. associate-*r*N/A

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \left(\mathsf{neg}\left(\left(\frac{6450306886639899}{50000000000000000} \cdot x\right) \cdot x\right)\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \left(\mathsf{neg}\left(x \cdot \left(\frac{6450306886639899}{50000000000000000} \cdot x\right)\right)\right)\right)\right) \]
        8. distribute-rgt-neg-inN/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000}\right)\right)}\right)\right)\right)\right) \]
        13. metadata-eval99.8%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{-6450306886639899}{50000000000000000}\right)\right)\right)\right) \]
      3. Simplified99.8%

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

      Alternative 5: 50.9% accurate, 1.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2.7:\\ \;\;\;\;0.954929658551372 \cdot x\\ \mathbf{else}:\\ \;\;\;\;x \cdot -0.954929658551372\\ \end{array} \end{array} \]
      (FPCore (x)
       :precision binary64
       (if (<= x 2.7) (* 0.954929658551372 x) (* x -0.954929658551372)))
      double code(double x) {
      	double tmp;
      	if (x <= 2.7) {
      		tmp = 0.954929658551372 * x;
      	} else {
      		tmp = x * -0.954929658551372;
      	}
      	return tmp;
      }
      
      real(8) function code(x)
          real(8), intent (in) :: x
          real(8) :: tmp
          if (x <= 2.7d0) then
              tmp = 0.954929658551372d0 * x
          else
              tmp = x * (-0.954929658551372d0)
          end if
          code = tmp
      end function
      
      public static double code(double x) {
      	double tmp;
      	if (x <= 2.7) {
      		tmp = 0.954929658551372 * x;
      	} else {
      		tmp = x * -0.954929658551372;
      	}
      	return tmp;
      }
      
      def code(x):
      	tmp = 0
      	if x <= 2.7:
      		tmp = 0.954929658551372 * x
      	else:
      		tmp = x * -0.954929658551372
      	return tmp
      
      function code(x)
      	tmp = 0.0
      	if (x <= 2.7)
      		tmp = Float64(0.954929658551372 * x);
      	else
      		tmp = Float64(x * -0.954929658551372);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x)
      	tmp = 0.0;
      	if (x <= 2.7)
      		tmp = 0.954929658551372 * x;
      	else
      		tmp = x * -0.954929658551372;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_] := If[LessEqual[x, 2.7], N[(0.954929658551372 * x), $MachinePrecision], N[(x * -0.954929658551372), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq 2.7:\\
      \;\;\;\;0.954929658551372 \cdot x\\
      
      \mathbf{else}:\\
      \;\;\;\;x \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. Step-by-step derivation
          1. associate-*r*N/A

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \left(\mathsf{neg}\left(\left(\frac{6450306886639899}{50000000000000000} \cdot x\right) \cdot x\right)\right)\right)\right) \]
          7. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \left(\mathsf{neg}\left(x \cdot \left(\frac{6450306886639899}{50000000000000000} \cdot x\right)\right)\right)\right)\right) \]
          8. distribute-rgt-neg-inN/A

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000}\right)\right)}\right)\right)\right)\right) \]
          13. metadata-eval99.8%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{-6450306886639899}{50000000000000000}\right)\right)\right)\right) \]
        3. Simplified99.8%

          \[\leadsto \color{blue}{x \cdot \left(0.954929658551372 + x \cdot \left(x \cdot -0.12900613773279798\right)\right)} \]
        4. Add Preprocessing
        5. Taylor expanded in x around 0

          \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\frac{238732414637843}{250000000000000}}\right) \]
        6. Step-by-step derivation
          1. Simplified64.3%

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

          if 2.7000000000000002 < x

          1. Initial program 99.7%

            \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
          2. Step-by-step derivation
            1. associate-*r*N/A

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \left(\mathsf{neg}\left(\left(\frac{6450306886639899}{50000000000000000} \cdot x\right) \cdot x\right)\right)\right)\right) \]
            7. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \left(\mathsf{neg}\left(x \cdot \left(\frac{6450306886639899}{50000000000000000} \cdot x\right)\right)\right)\right)\right) \]
            8. distribute-rgt-neg-inN/A

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000}\right)\right)}\right)\right)\right)\right) \]
            13. metadata-eval99.9%

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{-6450306886639899}{50000000000000000}\right)\right)\right)\right) \]
          3. Simplified99.9%

            \[\leadsto \color{blue}{x \cdot \left(0.954929658551372 + x \cdot \left(x \cdot -0.12900613773279798\right)\right)} \]
          4. Add Preprocessing
          5. Step-by-step derivation
            1. flip-+N/A

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

              \[\leadsto x \cdot \frac{1}{\color{blue}{\frac{\frac{238732414637843}{250000000000000} - x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)}{\frac{238732414637843}{250000000000000} \cdot \frac{238732414637843}{250000000000000} - \left(x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)\right) \cdot \left(x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)\right)}}} \]
            3. un-div-invN/A

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

              \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(\frac{\frac{238732414637843}{250000000000000} - x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)}{\frac{238732414637843}{250000000000000} \cdot \frac{238732414637843}{250000000000000} - \left(x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)\right) \cdot \left(x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)\right)}\right)}\right) \]
            5. clear-numN/A

              \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{\frac{238732414637843}{250000000000000} \cdot \frac{238732414637843}{250000000000000} - \left(x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)\right) \cdot \left(x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)\right)}{\frac{238732414637843}{250000000000000} - x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)}}}\right)\right) \]
            6. flip-+N/A

              \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{\frac{238732414637843}{250000000000000} + \color{blue}{x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)}}\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{238732414637843}{250000000000000} + x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)\right)}\right)\right) \]
            8. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \color{blue}{\left(x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)\right)}\right)\right)\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \color{blue}{\left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)}\right)\right)\right)\right) \]
            10. *-lowering-*.f6499.8%

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\frac{-6450306886639899}{50000000000000000}}\right)\right)\right)\right)\right) \]
          6. Applied egg-rr99.8%

            \[\leadsto \color{blue}{\frac{x}{\frac{1}{0.954929658551372 + x \cdot \left(x \cdot -0.12900613773279798\right)}}} \]
          7. Taylor expanded in x around 0

            \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\frac{250000000000000}{238732414637843}}\right) \]
          8. Step-by-step derivation
            1. Simplified0.5%

              \[\leadsto \frac{x}{\color{blue}{1.0471975511965979}} \]
            2. Step-by-step derivation
              1. clear-numN/A

                \[\leadsto \frac{1}{\color{blue}{\frac{\frac{250000000000000}{238732414637843}}{x}}} \]
              2. div-invN/A

                \[\leadsto \frac{1}{\frac{250000000000000}{238732414637843} \cdot \color{blue}{\frac{1}{x}}} \]
              3. associate-/r*N/A

                \[\leadsto \frac{\frac{1}{\frac{250000000000000}{238732414637843}}}{\color{blue}{\frac{1}{x}}} \]
              4. inv-powN/A

                \[\leadsto \frac{\frac{1}{\frac{250000000000000}{238732414637843}}}{{x}^{\color{blue}{-1}}} \]
              5. sqr-powN/A

                \[\leadsto \frac{\frac{1}{\frac{250000000000000}{238732414637843}}}{{x}^{\left(\frac{-1}{2}\right)} \cdot \color{blue}{{x}^{\left(\frac{-1}{2}\right)}}} \]
              6. unpow-prod-downN/A

                \[\leadsto \frac{\frac{1}{\frac{250000000000000}{238732414637843}}}{{\left(x \cdot x\right)}^{\color{blue}{\left(\frac{-1}{2}\right)}}} \]
              7. sqr-negN/A

                \[\leadsto \frac{\frac{1}{\frac{250000000000000}{238732414637843}}}{{\left(\left(\mathsf{neg}\left(x\right)\right) \cdot \left(\mathsf{neg}\left(x\right)\right)\right)}^{\left(\frac{\color{blue}{-1}}{2}\right)}} \]
              8. unpow-prod-downN/A

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

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

                \[\leadsto \frac{\frac{1}{\frac{250000000000000}{238732414637843}}}{\frac{1}{\color{blue}{\mathsf{neg}\left(x\right)}}} \]
              11. associate-/r*N/A

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

                \[\leadsto \frac{1}{\frac{\frac{250000000000000}{238732414637843}}{\color{blue}{\mathsf{neg}\left(x\right)}}} \]
              13. clear-numN/A

                \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\color{blue}{\frac{250000000000000}{238732414637843}}} \]
              14. frac-2negN/A

                \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)}{\color{blue}{\mathsf{neg}\left(\frac{250000000000000}{238732414637843}\right)}} \]
              15. remove-double-negN/A

                \[\leadsto \frac{x}{\mathsf{neg}\left(\color{blue}{\frac{250000000000000}{238732414637843}}\right)} \]
              16. div-invN/A

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

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

                \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1}{\frac{-250000000000000}{238732414637843}}\right)\right) \]
              19. metadata-eval5.7%

                \[\leadsto \mathsf{*.f64}\left(x, \frac{-238732414637843}{250000000000000}\right) \]
            3. Applied egg-rr5.7%

              \[\leadsto \color{blue}{x \cdot -0.954929658551372} \]
          9. Recombined 2 regimes into one program.
          10. Final simplification49.2%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.7:\\ \;\;\;\;0.954929658551372 \cdot x\\ \mathbf{else}:\\ \;\;\;\;x \cdot -0.954929658551372\\ \end{array} \]
          11. Add Preprocessing

          Alternative 6: 5.1% accurate, 3.7× speedup?

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

            \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right) \]
          2. Step-by-step derivation
            1. associate-*r*N/A

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \left(\mathsf{neg}\left(\left(\frac{6450306886639899}{50000000000000000} \cdot x\right) \cdot x\right)\right)\right)\right) \]
            7. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \left(\mathsf{neg}\left(x \cdot \left(\frac{6450306886639899}{50000000000000000} \cdot x\right)\right)\right)\right)\right) \]
            8. distribute-rgt-neg-inN/A

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\left(\mathsf{neg}\left(\frac{6450306886639899}{50000000000000000}\right)\right)}\right)\right)\right)\right) \]
            13. metadata-eval99.8%

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \frac{-6450306886639899}{50000000000000000}\right)\right)\right)\right) \]
          3. Simplified99.8%

            \[\leadsto \color{blue}{x \cdot \left(0.954929658551372 + x \cdot \left(x \cdot -0.12900613773279798\right)\right)} \]
          4. Add Preprocessing
          5. Step-by-step derivation
            1. flip-+N/A

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

              \[\leadsto x \cdot \frac{1}{\color{blue}{\frac{\frac{238732414637843}{250000000000000} - x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)}{\frac{238732414637843}{250000000000000} \cdot \frac{238732414637843}{250000000000000} - \left(x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)\right) \cdot \left(x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)\right)}}} \]
            3. un-div-invN/A

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

              \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(\frac{\frac{238732414637843}{250000000000000} - x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)}{\frac{238732414637843}{250000000000000} \cdot \frac{238732414637843}{250000000000000} - \left(x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)\right) \cdot \left(x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)\right)}\right)}\right) \]
            5. clear-numN/A

              \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{\color{blue}{\frac{\frac{238732414637843}{250000000000000} \cdot \frac{238732414637843}{250000000000000} - \left(x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)\right) \cdot \left(x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)\right)}{\frac{238732414637843}{250000000000000} - x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)}}}\right)\right) \]
            6. flip-+N/A

              \[\leadsto \mathsf{/.f64}\left(x, \left(\frac{1}{\frac{238732414637843}{250000000000000} + \color{blue}{x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)}}\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{238732414637843}{250000000000000} + x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)\right)}\right)\right) \]
            8. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \color{blue}{\left(x \cdot \left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)\right)}\right)\right)\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \color{blue}{\left(x \cdot \frac{-6450306886639899}{50000000000000000}\right)}\right)\right)\right)\right) \]
            10. *-lowering-*.f6499.3%

              \[\leadsto \mathsf{/.f64}\left(x, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\frac{238732414637843}{250000000000000}, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(x, \color{blue}{\frac{-6450306886639899}{50000000000000000}}\right)\right)\right)\right)\right) \]
          6. Applied egg-rr99.3%

            \[\leadsto \color{blue}{\frac{x}{\frac{1}{0.954929658551372 + x \cdot \left(x \cdot -0.12900613773279798\right)}}} \]
          7. Taylor expanded in x around 0

            \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\frac{250000000000000}{238732414637843}}\right) \]
          8. Step-by-step derivation
            1. Simplified47.5%

              \[\leadsto \frac{x}{\color{blue}{1.0471975511965979}} \]
            2. Step-by-step derivation
              1. clear-numN/A

                \[\leadsto \frac{1}{\color{blue}{\frac{\frac{250000000000000}{238732414637843}}{x}}} \]
              2. div-invN/A

                \[\leadsto \frac{1}{\frac{250000000000000}{238732414637843} \cdot \color{blue}{\frac{1}{x}}} \]
              3. associate-/r*N/A

                \[\leadsto \frac{\frac{1}{\frac{250000000000000}{238732414637843}}}{\color{blue}{\frac{1}{x}}} \]
              4. inv-powN/A

                \[\leadsto \frac{\frac{1}{\frac{250000000000000}{238732414637843}}}{{x}^{\color{blue}{-1}}} \]
              5. sqr-powN/A

                \[\leadsto \frac{\frac{1}{\frac{250000000000000}{238732414637843}}}{{x}^{\left(\frac{-1}{2}\right)} \cdot \color{blue}{{x}^{\left(\frac{-1}{2}\right)}}} \]
              6. unpow-prod-downN/A

                \[\leadsto \frac{\frac{1}{\frac{250000000000000}{238732414637843}}}{{\left(x \cdot x\right)}^{\color{blue}{\left(\frac{-1}{2}\right)}}} \]
              7. sqr-negN/A

                \[\leadsto \frac{\frac{1}{\frac{250000000000000}{238732414637843}}}{{\left(\left(\mathsf{neg}\left(x\right)\right) \cdot \left(\mathsf{neg}\left(x\right)\right)\right)}^{\left(\frac{\color{blue}{-1}}{2}\right)}} \]
              8. unpow-prod-downN/A

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

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

                \[\leadsto \frac{\frac{1}{\frac{250000000000000}{238732414637843}}}{\frac{1}{\color{blue}{\mathsf{neg}\left(x\right)}}} \]
              11. associate-/r*N/A

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

                \[\leadsto \frac{1}{\frac{\frac{250000000000000}{238732414637843}}{\color{blue}{\mathsf{neg}\left(x\right)}}} \]
              13. clear-numN/A

                \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\color{blue}{\frac{250000000000000}{238732414637843}}} \]
              14. frac-2negN/A

                \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)}{\color{blue}{\mathsf{neg}\left(\frac{250000000000000}{238732414637843}\right)}} \]
              15. remove-double-negN/A

                \[\leadsto \frac{x}{\mathsf{neg}\left(\color{blue}{\frac{250000000000000}{238732414637843}}\right)} \]
              16. div-invN/A

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

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

                \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1}{\frac{-250000000000000}{238732414637843}}\right)\right) \]
              19. metadata-eval5.0%

                \[\leadsto \mathsf{*.f64}\left(x, \frac{-238732414637843}{250000000000000}\right) \]
            3. Applied egg-rr5.0%

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

            Reproduce

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