(FPCore (x) :precision binary64 (let* ((t_0 (+ (* 12194.217 12194.217) (* x x))) (t_1 (+ (* 20.598997 20.598997) (* x x)))) (- 1.0 (sqrt (/ (* (* (* (* (* (* (* (* (* 3.5041384 1e+16) x) x) x) x) x) x) x) x) (* (* (* (* (* t_1 t_1) (+ (* 107.65265 107.65265) (* x x))) (+ (* 737.86223 737.86223) (* x x))) t_0) t_0))))))
double code(double x) { double t_0 = (12194.217 * 12194.217) + (x * x); double t_1 = (20.598997 * 20.598997) + (x * x); return 1.0 - sqrt(((((((((((3.5041384 * 1e+16) * x) * x) * x) * x) * x) * x) * x) * x) / (((((t_1 * t_1) * ((107.65265 * 107.65265) + (x * x))) * ((737.86223 * 737.86223) + (x * x))) * t_0) * t_0))); }
real(8) function code(x) real(8), intent (in) :: x real(8) :: t_0 real(8) :: t_1 t_0 = (12194.217d0 * 12194.217d0) + (x * x) t_1 = (20.598997d0 * 20.598997d0) + (x * x) code = 1.0d0 - sqrt(((((((((((3.5041384d0 * 1d+16) * x) * x) * x) * x) * x) * x) * x) * x) / (((((t_1 * t_1) * ((107.65265d0 * 107.65265d0) + (x * x))) * ((737.86223d0 * 737.86223d0) + (x * x))) * t_0) * t_0))) end function
public static double code(double x) { double t_0 = (12194.217 * 12194.217) + (x * x); double t_1 = (20.598997 * 20.598997) + (x * x); return 1.0 - Math.sqrt(((((((((((3.5041384 * 1e+16) * x) * x) * x) * x) * x) * x) * x) * x) / (((((t_1 * t_1) * ((107.65265 * 107.65265) + (x * x))) * ((737.86223 * 737.86223) + (x * x))) * t_0) * t_0))); }
def code(x): t_0 = (12194.217 * 12194.217) + (x * x) t_1 = (20.598997 * 20.598997) + (x * x) return 1.0 - math.sqrt(((((((((((3.5041384 * 1e+16) * x) * x) * x) * x) * x) * x) * x) * x) / (((((t_1 * t_1) * ((107.65265 * 107.65265) + (x * x))) * ((737.86223 * 737.86223) + (x * x))) * t_0) * t_0)))
function code(x) t_0 = Float64(Float64(12194.217 * 12194.217) + Float64(x * x)) t_1 = Float64(Float64(20.598997 * 20.598997) + Float64(x * x)) return Float64(1.0 - sqrt(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(3.5041384 * 1e+16) * x) * x) * x) * x) * x) * x) * x) * x) / Float64(Float64(Float64(Float64(Float64(t_1 * t_1) * Float64(Float64(107.65265 * 107.65265) + Float64(x * x))) * Float64(Float64(737.86223 * 737.86223) + Float64(x * x))) * t_0) * t_0)))) end
function tmp = code(x) t_0 = (12194.217 * 12194.217) + (x * x); t_1 = (20.598997 * 20.598997) + (x * x); tmp = 1.0 - sqrt(((((((((((3.5041384 * 1e+16) * x) * x) * x) * x) * x) * x) * x) * x) / (((((t_1 * t_1) * ((107.65265 * 107.65265) + (x * x))) * ((737.86223 * 737.86223) + (x * x))) * t_0) * t_0))); end
code[x_] := Block[{t$95$0 = N[(N[(12194.217 * 12194.217), $MachinePrecision] + N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(20.598997 * 20.598997), $MachinePrecision] + N[(x * x), $MachinePrecision]), $MachinePrecision]}, N[(1.0 - N[Sqrt[N[(N[(N[(N[(N[(N[(N[(N[(N[(N[(3.5041384 * 1e+16), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] / N[(N[(N[(N[(N[(t$95$1 * t$95$1), $MachinePrecision] * N[(N[(107.65265 * 107.65265), $MachinePrecision] + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(737.86223 * 737.86223), $MachinePrecision] + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l} \\ \begin{array}{l} t_0 := 12194.217 \cdot 12194.217 + x \cdot x\\ t_1 := 20.598997 \cdot 20.598997 + x \cdot x\\ 1 - \sqrt{\frac{\left(\left(\left(\left(\left(\left(\left(\left(3.5041384 \cdot 10^{+16}\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x}{\left(\left(\left(\left(t\_1 \cdot t\_1\right) \cdot \left(107.65265 \cdot 107.65265 + x \cdot x\right)\right) \cdot \left(737.86223 \cdot 737.86223 + x \cdot x\right)\right) \cdot t\_0\right) \cdot t\_0}} \end{array} \end{array}
Sampling outcomes in binary64 precision:
Herbie found 6 alternatives:
Alternative | Accuracy | Speedup |
---|
(FPCore (x) :precision binary64 (let* ((t_0 (+ (* 12194.217 12194.217) (* x x))) (t_1 (+ (* 20.598997 20.598997) (* x x)))) (- 1.0 (sqrt (/ (* (* (* (* (* (* (* (* (* 3.5041384 1e+16) x) x) x) x) x) x) x) x) (* (* (* (* (* t_1 t_1) (+ (* 107.65265 107.65265) (* x x))) (+ (* 737.86223 737.86223) (* x x))) t_0) t_0))))))
double code(double x) { double t_0 = (12194.217 * 12194.217) + (x * x); double t_1 = (20.598997 * 20.598997) + (x * x); return 1.0 - sqrt(((((((((((3.5041384 * 1e+16) * x) * x) * x) * x) * x) * x) * x) * x) / (((((t_1 * t_1) * ((107.65265 * 107.65265) + (x * x))) * ((737.86223 * 737.86223) + (x * x))) * t_0) * t_0))); }
real(8) function code(x) real(8), intent (in) :: x real(8) :: t_0 real(8) :: t_1 t_0 = (12194.217d0 * 12194.217d0) + (x * x) t_1 = (20.598997d0 * 20.598997d0) + (x * x) code = 1.0d0 - sqrt(((((((((((3.5041384d0 * 1d+16) * x) * x) * x) * x) * x) * x) * x) * x) / (((((t_1 * t_1) * ((107.65265d0 * 107.65265d0) + (x * x))) * ((737.86223d0 * 737.86223d0) + (x * x))) * t_0) * t_0))) end function
public static double code(double x) { double t_0 = (12194.217 * 12194.217) + (x * x); double t_1 = (20.598997 * 20.598997) + (x * x); return 1.0 - Math.sqrt(((((((((((3.5041384 * 1e+16) * x) * x) * x) * x) * x) * x) * x) * x) / (((((t_1 * t_1) * ((107.65265 * 107.65265) + (x * x))) * ((737.86223 * 737.86223) + (x * x))) * t_0) * t_0))); }
def code(x): t_0 = (12194.217 * 12194.217) + (x * x) t_1 = (20.598997 * 20.598997) + (x * x) return 1.0 - math.sqrt(((((((((((3.5041384 * 1e+16) * x) * x) * x) * x) * x) * x) * x) * x) / (((((t_1 * t_1) * ((107.65265 * 107.65265) + (x * x))) * ((737.86223 * 737.86223) + (x * x))) * t_0) * t_0)))
function code(x) t_0 = Float64(Float64(12194.217 * 12194.217) + Float64(x * x)) t_1 = Float64(Float64(20.598997 * 20.598997) + Float64(x * x)) return Float64(1.0 - sqrt(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(3.5041384 * 1e+16) * x) * x) * x) * x) * x) * x) * x) * x) / Float64(Float64(Float64(Float64(Float64(t_1 * t_1) * Float64(Float64(107.65265 * 107.65265) + Float64(x * x))) * Float64(Float64(737.86223 * 737.86223) + Float64(x * x))) * t_0) * t_0)))) end
function tmp = code(x) t_0 = (12194.217 * 12194.217) + (x * x); t_1 = (20.598997 * 20.598997) + (x * x); tmp = 1.0 - sqrt(((((((((((3.5041384 * 1e+16) * x) * x) * x) * x) * x) * x) * x) * x) / (((((t_1 * t_1) * ((107.65265 * 107.65265) + (x * x))) * ((737.86223 * 737.86223) + (x * x))) * t_0) * t_0))); end
code[x_] := Block[{t$95$0 = N[(N[(12194.217 * 12194.217), $MachinePrecision] + N[(x * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(20.598997 * 20.598997), $MachinePrecision] + N[(x * x), $MachinePrecision]), $MachinePrecision]}, N[(1.0 - N[Sqrt[N[(N[(N[(N[(N[(N[(N[(N[(N[(N[(3.5041384 * 1e+16), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] / N[(N[(N[(N[(N[(t$95$1 * t$95$1), $MachinePrecision] * N[(N[(107.65265 * 107.65265), $MachinePrecision] + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(737.86223 * 737.86223), $MachinePrecision] + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l} \\ \begin{array}{l} t_0 := 12194.217 \cdot 12194.217 + x \cdot x\\ t_1 := 20.598997 \cdot 20.598997 + x \cdot x\\ 1 - \sqrt{\frac{\left(\left(\left(\left(\left(\left(\left(\left(3.5041384 \cdot 10^{+16}\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x}{\left(\left(\left(\left(t\_1 \cdot t\_1\right) \cdot \left(107.65265 \cdot 107.65265 + x \cdot x\right)\right) \cdot \left(737.86223 \cdot 737.86223 + x \cdot x\right)\right) \cdot t\_0\right) \cdot t\_0}} \end{array} \end{array}
(FPCore (x) :precision binary64 (- 1.0 (* (* (sqrt (* 3.5041384e+16 x)) (* x x)) (sqrt (* (* x x) (/ x (* (* (fma x x 11589.0930520225) (fma x x 544440.6704605728)) (pow (* (fma x x 424.31867740600904) (fma x x 148698928.24308902)) 2.0))))))))
double code(double x) { return 1.0 - ((sqrt((3.5041384e+16 * x)) * (x * x)) * sqrt(((x * x) * (x / ((fma(x, x, 11589.0930520225) * fma(x, x, 544440.6704605728)) * pow((fma(x, x, 424.31867740600904) * fma(x, x, 148698928.24308902)), 2.0)))))); }
function code(x) return Float64(1.0 - Float64(Float64(sqrt(Float64(3.5041384e+16 * x)) * Float64(x * x)) * sqrt(Float64(Float64(x * x) * Float64(x / Float64(Float64(fma(x, x, 11589.0930520225) * fma(x, x, 544440.6704605728)) * (Float64(fma(x, x, 424.31867740600904) * fma(x, x, 148698928.24308902)) ^ 2.0))))))) end
code[x_] := N[(1.0 - N[(N[(N[Sqrt[N[(3.5041384e+16 * x), $MachinePrecision]], $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(x * x), $MachinePrecision] * N[(x / N[(N[(N[(x * x + 11589.0930520225), $MachinePrecision] * N[(x * x + 544440.6704605728), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(x * x + 424.31867740600904), $MachinePrecision] * N[(x * x + 148698928.24308902), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l} \\ 1 - \left(\sqrt{3.5041384 \cdot 10^{+16} \cdot x} \cdot \left(x \cdot x\right)\right) \cdot \sqrt{\left(x \cdot x\right) \cdot \frac{x}{\left(\mathsf{fma}\left(x, x, 11589.0930520225\right) \cdot \mathsf{fma}\left(x, x, 544440.6704605728\right)\right) \cdot {\left(\mathsf{fma}\left(x, x, 424.31867740600904\right) \cdot \mathsf{fma}\left(x, x, 148698928.24308902\right)\right)}^{2}}} \end{array}
Initial program 100.0%
Applied rewrites100.0%
Applied rewrites100.0%
(FPCore (x) :precision binary64 (let* ((t_0 (+ (* 12194.217 12194.217) (* x x)))) (- 1.0 (sqrt (/ (* (* (* (* (* (* (* (* x x) 3.5041384e+16) x) x) x) x) x) x) (* (* (* (* (* (fma x x 424.31867740600904) (fma x x 424.31867740600904)) (+ (* 107.65265 107.65265) (* x x))) (+ (* 737.86223 737.86223) (* x x))) t_0) t_0))))))
double code(double x) { double t_0 = (12194.217 * 12194.217) + (x * x); return 1.0 - sqrt((((((((((x * x) * 3.5041384e+16) * x) * x) * x) * x) * x) * x) / (((((fma(x, x, 424.31867740600904) * fma(x, x, 424.31867740600904)) * ((107.65265 * 107.65265) + (x * x))) * ((737.86223 * 737.86223) + (x * x))) * t_0) * t_0))); }
function code(x) t_0 = Float64(Float64(12194.217 * 12194.217) + Float64(x * x)) return Float64(1.0 - sqrt(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * x) * 3.5041384e+16) * x) * x) * x) * x) * x) * x) / Float64(Float64(Float64(Float64(Float64(fma(x, x, 424.31867740600904) * fma(x, x, 424.31867740600904)) * Float64(Float64(107.65265 * 107.65265) + Float64(x * x))) * Float64(Float64(737.86223 * 737.86223) + Float64(x * x))) * t_0) * t_0)))) end
code[x_] := Block[{t$95$0 = N[(N[(12194.217 * 12194.217), $MachinePrecision] + N[(x * x), $MachinePrecision]), $MachinePrecision]}, N[(1.0 - N[Sqrt[N[(N[(N[(N[(N[(N[(N[(N[(N[(x * x), $MachinePrecision] * 3.5041384e+16), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] / N[(N[(N[(N[(N[(N[(x * x + 424.31867740600904), $MachinePrecision] * N[(x * x + 424.31867740600904), $MachinePrecision]), $MachinePrecision] * N[(N[(107.65265 * 107.65265), $MachinePrecision] + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(737.86223 * 737.86223), $MachinePrecision] + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l} \\ \begin{array}{l} t_0 := 12194.217 \cdot 12194.217 + x \cdot x\\ 1 - \sqrt{\frac{\left(\left(\left(\left(\left(\left(\left(x \cdot x\right) \cdot 3.5041384 \cdot 10^{+16}\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x}{\left(\left(\left(\left(\mathsf{fma}\left(x, x, 424.31867740600904\right) \cdot \mathsf{fma}\left(x, x, 424.31867740600904\right)\right) \cdot \left(107.65265 \cdot 107.65265 + x \cdot x\right)\right) \cdot \left(737.86223 \cdot 737.86223 + x \cdot x\right)\right) \cdot t\_0\right) \cdot t\_0}} \end{array} \end{array}
Initial program 100.0%
lift-+.f64
N/A
+-commutative
N/A
lift-*.f64
N/A
lower-fma.f64
100.0
lift-*.f64
N/A
metadata-eval
100.0
lift-+.f64
N/A
+-commutative
N/A
lift-*.f64
N/A
lower-fma.f64
100.0
lift-*.f64
N/A
metadata-eval
100.0
Applied rewrites100.0%
lift-*.f64
N/A
lift-*.f64
N/A
lift-*.f64
N/A
metadata-eval
N/A
associate-*l*
N/A
lift-*.f64
N/A
*-commutative
N/A
lower-*.f64
100.0
Applied rewrites100.0%
(FPCore (x) :precision binary64 (- 1.0 (sqrt (/ (* (* (* (* (* (* (* (* (* 3.5041384 1e+16) x) x) x) x) x) x) x) x) (fma (fma (fma 1.2315361913695067e+22 (* x x) 1.499525677491431e+26) (* x x) 1.2061015046255844e+29) (* x x) 2.5118863397964406e+31)))))
double code(double x) { return 1.0 - sqrt(((((((((((3.5041384 * 1e+16) * x) * x) * x) * x) * x) * x) * x) * x) / fma(fma(fma(1.2315361913695067e+22, (x * x), 1.499525677491431e+26), (x * x), 1.2061015046255844e+29), (x * x), 2.5118863397964406e+31))); }
function code(x) return Float64(1.0 - sqrt(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(3.5041384 * 1e+16) * x) * x) * x) * x) * x) * x) * x) * x) / fma(fma(fma(1.2315361913695067e+22, Float64(x * x), 1.499525677491431e+26), Float64(x * x), 1.2061015046255844e+29), Float64(x * x), 2.5118863397964406e+31)))) end
code[x_] := N[(1.0 - N[Sqrt[N[(N[(N[(N[(N[(N[(N[(N[(N[(N[(3.5041384 * 1e+16), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] / N[(N[(N[(1.2315361913695067e+22 * N[(x * x), $MachinePrecision] + 1.499525677491431e+26), $MachinePrecision] * N[(x * x), $MachinePrecision] + 1.2061015046255844e+29), $MachinePrecision] * N[(x * x), $MachinePrecision] + 2.5118863397964406e+31), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l} \\ 1 - \sqrt{\frac{\left(\left(\left(\left(\left(\left(\left(\left(3.5041384 \cdot 10^{+16}\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(1.2315361913695067 \cdot 10^{+22}, x \cdot x, 1.499525677491431 \cdot 10^{+26}\right), x \cdot x, 1.2061015046255844 \cdot 10^{+29}\right), x \cdot x, 2.5118863397964406 \cdot 10^{+31}\right)}} \end{array}
Initial program 100.0%
Taylor expanded in x around 0
+-commutative
N/A
*-commutative
N/A
lower-fma.f64
N/A
+-commutative
N/A
*-commutative
N/A
lower-fma.f64
N/A
+-commutative
N/A
lower-fma.f64
N/A
unpow2
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
98.5
Applied rewrites98.5%
(FPCore (x) :precision binary64 (- 1.0 (* (* (sqrt (* 3.5041384e+16 x)) (* x x)) (sqrt (* (* x x) (/ x (fma (fma 1.499525677491431e+26 (* x x) 1.2061015046255844e+29) (* x x) 2.5118863397964406e+31)))))))
double code(double x) { return 1.0 - ((sqrt((3.5041384e+16 * x)) * (x * x)) * sqrt(((x * x) * (x / fma(fma(1.499525677491431e+26, (x * x), 1.2061015046255844e+29), (x * x), 2.5118863397964406e+31))))); }
function code(x) return Float64(1.0 - Float64(Float64(sqrt(Float64(3.5041384e+16 * x)) * Float64(x * x)) * sqrt(Float64(Float64(x * x) * Float64(x / fma(fma(1.499525677491431e+26, Float64(x * x), 1.2061015046255844e+29), Float64(x * x), 2.5118863397964406e+31)))))) end
code[x_] := N[(1.0 - N[(N[(N[Sqrt[N[(3.5041384e+16 * x), $MachinePrecision]], $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(x * x), $MachinePrecision] * N[(x / N[(N[(1.499525677491431e+26 * N[(x * x), $MachinePrecision] + 1.2061015046255844e+29), $MachinePrecision] * N[(x * x), $MachinePrecision] + 2.5118863397964406e+31), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l} \\ 1 - \left(\sqrt{3.5041384 \cdot 10^{+16} \cdot x} \cdot \left(x \cdot x\right)\right) \cdot \sqrt{\left(x \cdot x\right) \cdot \frac{x}{\mathsf{fma}\left(\mathsf{fma}\left(1.499525677491431 \cdot 10^{+26}, x \cdot x, 1.2061015046255844 \cdot 10^{+29}\right), x \cdot x, 2.5118863397964406 \cdot 10^{+31}\right)}} \end{array}
Initial program 100.0%
Taylor expanded in x around 0
+-commutative
N/A
*-commutative
N/A
lower-fma.f64
N/A
+-commutative
N/A
lower-fma.f64
N/A
unpow2
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
98.4
Applied rewrites98.4%
Applied rewrites98.4%
(FPCore (x) :precision binary64 (- 1.0 (sqrt (/ (* (* (* (* (* (* (* (* (* 3.5041384 1e+16) x) x) x) x) x) x) x) x) (fma 1.2061015046255844e+29 (* x x) 2.5118863397964406e+31)))))
double code(double x) { return 1.0 - sqrt(((((((((((3.5041384 * 1e+16) * x) * x) * x) * x) * x) * x) * x) * x) / fma(1.2061015046255844e+29, (x * x), 2.5118863397964406e+31))); }
function code(x) return Float64(1.0 - sqrt(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(3.5041384 * 1e+16) * x) * x) * x) * x) * x) * x) * x) * x) / fma(1.2061015046255844e+29, Float64(x * x), 2.5118863397964406e+31)))) end
code[x_] := N[(1.0 - N[Sqrt[N[(N[(N[(N[(N[(N[(N[(N[(N[(N[(3.5041384 * 1e+16), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] * x), $MachinePrecision] / N[(1.2061015046255844e+29 * N[(x * x), $MachinePrecision] + 2.5118863397964406e+31), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l} \\ 1 - \sqrt{\frac{\left(\left(\left(\left(\left(\left(\left(\left(3.5041384 \cdot 10^{+16}\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x\right) \cdot x}{\mathsf{fma}\left(1.2061015046255844 \cdot 10^{+29}, x \cdot x, 2.5118863397964406 \cdot 10^{+31}\right)}} \end{array}
Initial program 100.0%
Taylor expanded in x around 0
+-commutative
N/A
lower-fma.f64
N/A
unpow2
N/A
lower-*.f64
98.3
Applied rewrites98.3%
(FPCore (x) :precision binary64 1.0)
double code(double x) { return 1.0; }
real(8) function code(x) real(8), intent (in) :: x code = 1.0d0 end function
public static double code(double x) { return 1.0; }
def code(x): return 1.0
function code(x) return 1.0 end
function tmp = code(x) tmp = 1.0; end
code[x_] := 1.0
\begin{array}{l} \\ 1 \end{array}
Initial program 100.0%
Applied rewrites100.0%
Taylor expanded in x around 0
Applied rewrites98.2%
herbie shell --seed 1
(FPCore (x)
:name "1 - sqrt( (3.5041384 * 10e15 * x * x * x * x * x * x * x * x) / ((20.598997 * 20.598997 + x * x) * (20.598997 * 20.598997 + x * x) * (107.65265 * 107.65265 + x*x) * (737.86223 * 737.86223 + x*x) * (12194.217 * 12194.217 + x*x) * (12194.217 * 12194.217 + x*x)))"
:precision binary64
:pre (and (<= 0.0 x) (<= x 44100.0))
(- 1.0 (sqrt (/ (* (* (* (* (* (* (* (* (* 3.5041384 1e+16) x) x) x) x) x) x) x) x) (* (* (* (* (* (+ (* 20.598997 20.598997) (* x x)) (+ (* 20.598997 20.598997) (* x x))) (+ (* 107.65265 107.65265) (* x x))) (+ (* 737.86223 737.86223) (* x x))) (+ (* 12194.217 12194.217) (* x x))) (+ (* 12194.217 12194.217) (* x x)))))))