
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (- (+ t_0 (* 2.0 x2)) x1))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ t_1 t_2))
(t_4 (* (* 2.0 x1) t_3))
(t_5 (* (* x1 x1) (- (* 4.0 t_3) 6.0)))
(t_6 (* t_0 t_3)))
(if (<= x1 -7.5e+153)
t_0
(if (<= x1 -2e+55)
(+
x1
(+
(*
(+
(*
t_4
(- (/ (- (+ (+ t_1 (* 3.0 (/ t_3 t_2))) (* 2.0 x2)) x1) t_2) 3.0))
t_5)
t_2)
t_6))
(if (<= x1 1e+154)
(+
x1
(+
(+
(+ (+ (* (+ (* t_4 (- t_3 3.0)) t_5) t_2) t_6) (* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))))
t_0)))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (t_0 + (2.0 * x2)) - x1;
double t_2 = (x1 * x1) + 1.0;
double t_3 = t_1 / t_2;
double t_4 = (2.0 * x1) * t_3;
double t_5 = (x1 * x1) * ((4.0 * t_3) - 6.0);
double t_6 = t_0 * t_3;
double tmp;
if (x1 <= -7.5e+153) {
tmp = t_0;
} else if (x1 <= -2e+55) {
tmp = x1 + ((((t_4 * (((((t_1 + (3.0 * (t_3 / t_2))) + (2.0 * x2)) - x1) / t_2) - 3.0)) + t_5) * t_2) + t_6);
} else if (x1 <= 1e+154) {
tmp = x1 + (((((((t_4 * (t_3 - 3.0)) + t_5) * t_2) + t_6) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = (3.0d0 * x1) * x1
t_1 = (t_0 + (2.0d0 * x2)) - x1
t_2 = (x1 * x1) + 1.0d0
t_3 = t_1 / t_2
t_4 = (2.0d0 * x1) * t_3
t_5 = (x1 * x1) * ((4.0d0 * t_3) - 6.0d0)
t_6 = t_0 * t_3
if (x1 <= (-7.5d+153)) then
tmp = t_0
else if (x1 <= (-2d+55)) then
tmp = x1 + ((((t_4 * (((((t_1 + (3.0d0 * (t_3 / t_2))) + (2.0d0 * x2)) - x1) / t_2) - 3.0d0)) + t_5) * t_2) + t_6)
else if (x1 <= 1d+154) then
tmp = x1 + (((((((t_4 * (t_3 - 3.0d0)) + t_5) * t_2) + t_6) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (t_0 + (2.0 * x2)) - x1;
double t_2 = (x1 * x1) + 1.0;
double t_3 = t_1 / t_2;
double t_4 = (2.0 * x1) * t_3;
double t_5 = (x1 * x1) * ((4.0 * t_3) - 6.0);
double t_6 = t_0 * t_3;
double tmp;
if (x1 <= -7.5e+153) {
tmp = t_0;
} else if (x1 <= -2e+55) {
tmp = x1 + ((((t_4 * (((((t_1 + (3.0 * (t_3 / t_2))) + (2.0 * x2)) - x1) / t_2) - 3.0)) + t_5) * t_2) + t_6);
} else if (x1 <= 1e+154) {
tmp = x1 + (((((((t_4 * (t_3 - 3.0)) + t_5) * t_2) + t_6) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (t_0 + (2.0 * x2)) - x1 t_2 = (x1 * x1) + 1.0 t_3 = t_1 / t_2 t_4 = (2.0 * x1) * t_3 t_5 = (x1 * x1) * ((4.0 * t_3) - 6.0) t_6 = t_0 * t_3 tmp = 0 if x1 <= -7.5e+153: tmp = t_0 elif x1 <= -2e+55: tmp = x1 + ((((t_4 * (((((t_1 + (3.0 * (t_3 / t_2))) + (2.0 * x2)) - x1) / t_2) - 3.0)) + t_5) * t_2) + t_6) elif x1 <= 1e+154: tmp = x1 + (((((((t_4 * (t_3 - 3.0)) + t_5) * t_2) + t_6) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(t_1 / t_2) t_4 = Float64(Float64(2.0 * x1) * t_3) t_5 = Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_3) - 6.0)) t_6 = Float64(t_0 * t_3) tmp = 0.0 if (x1 <= -7.5e+153) tmp = t_0; elseif (x1 <= -2e+55) tmp = Float64(x1 + Float64(Float64(Float64(Float64(t_4 * Float64(Float64(Float64(Float64(Float64(t_1 + Float64(3.0 * Float64(t_3 / t_2))) + Float64(2.0 * x2)) - x1) / t_2) - 3.0)) + t_5) * t_2) + t_6)); elseif (x1 <= 1e+154) tmp = Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(t_4 * Float64(t_3 - 3.0)) + t_5) * t_2) + t_6) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (t_0 + (2.0 * x2)) - x1; t_2 = (x1 * x1) + 1.0; t_3 = t_1 / t_2; t_4 = (2.0 * x1) * t_3; t_5 = (x1 * x1) * ((4.0 * t_3) - 6.0); t_6 = t_0 * t_3; tmp = 0.0; if (x1 <= -7.5e+153) tmp = t_0; elseif (x1 <= -2e+55) tmp = x1 + ((((t_4 * (((((t_1 + (3.0 * (t_3 / t_2))) + (2.0 * x2)) - x1) / t_2) - 3.0)) + t_5) * t_2) + t_6); elseif (x1 <= 1e+154) tmp = x1 + (((((((t_4 * (t_3 - 3.0)) + t_5) * t_2) + t_6) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(2.0 * x1), $MachinePrecision] * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$3), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$0 * t$95$3), $MachinePrecision]}, If[LessEqual[x1, -7.5e+153], t$95$0, If[LessEqual[x1, -2e+55], N[(x1 + N[(N[(N[(N[(t$95$4 * N[(N[(N[(N[(N[(t$95$1 + N[(3.0 * N[(t$95$3 / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision] * t$95$2), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e+154], N[(x1 + N[(N[(N[(N[(N[(N[(N[(t$95$4 * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision] * t$95$2), $MachinePrecision] + t$95$6), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := \left(t\_0 + 2 \cdot x2\right) - x1\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{t\_1}{t\_2}\\
t_4 := \left(2 \cdot x1\right) \cdot t\_3\\
t_5 := \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_3 - 6\right)\\
t_6 := t\_0 \cdot t\_3\\
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -2 \cdot 10^{+55}:\\
\;\;\;\;x1 + \left(\left(t\_4 \cdot \left(\frac{\left(\left(t\_1 + 3 \cdot \frac{t\_3}{t\_2}\right) + 2 \cdot x2\right) - x1}{t\_2} - 3\right) + t\_5\right) \cdot t\_2 + t\_6\right)\\
\mathbf{elif}\;x1 \leq 10^{+154}:\\
\;\;\;\;x1 + \left(\left(\left(\left(\left(t\_4 \cdot \left(t\_3 - 3\right) + t\_5\right) \cdot t\_2 + t\_6\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -7.50000000000000065e153 or 1.00000000000000004e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0
Applied rewrites0.0%
Taylor expanded in x1 around 0
Applied rewrites0.0%
Taylor expanded in x1 around 0
Applied rewrites100.0%
if -7.50000000000000065e153 < x1 < -2.00000000000000002e55Initial program 44.8%
Taylor expanded in x1 around 0
Applied rewrites0.4%
Taylor expanded in x1 around 0
Applied rewrites99.8%
Taylor expanded in x1 around 0
Applied rewrites99.8%
if -2.00000000000000002e55 < x1 < 1.00000000000000004e154Initial program 99.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)))
(if (<= x1 -7.5e+153)
t_0
(if (<= x1 -2e+109)
(+ x1 t_3)
(if (<= x1 1e+154)
(+
x1
(+
(+ (+ (+ t_3 (* t_0 t_2)) (* (* x1 x1) x1)) x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))
t_0)))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = ((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1;
double tmp;
if (x1 <= -7.5e+153) {
tmp = t_0;
} else if (x1 <= -2e+109) {
tmp = x1 + t_3;
} else if (x1 <= 1e+154) {
tmp = x1 + ((((t_3 + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
t_3 = ((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1
if (x1 <= (-7.5d+153)) then
tmp = t_0
else if (x1 <= (-2d+109)) then
tmp = x1 + t_3
else if (x1 <= 1d+154) then
tmp = x1 + ((((t_3 + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = ((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1;
double tmp;
if (x1 <= -7.5e+153) {
tmp = t_0;
} else if (x1 <= -2e+109) {
tmp = x1 + t_3;
} else if (x1 <= 1e+154) {
tmp = x1 + ((((t_3 + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_3 = ((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1 tmp = 0 if x1 <= -7.5e+153: tmp = t_0 elif x1 <= -2e+109: tmp = x1 + t_3 elif x1 <= 1e+154: tmp = x1 + ((((t_3 + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) tmp = 0.0 if (x1 <= -7.5e+153) tmp = t_0; elseif (x1 <= -2e+109) tmp = Float64(x1 + t_3); elseif (x1 <= 1e+154) tmp = Float64(x1 + Float64(Float64(Float64(Float64(t_3 + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_3 = ((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1; tmp = 0.0; if (x1 <= -7.5e+153) tmp = t_0; elseif (x1 <= -2e+109) tmp = x1 + t_3; elseif (x1 <= 1e+154) tmp = x1 + ((((t_3 + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[x1, -7.5e+153], t$95$0, If[LessEqual[x1, -2e+109], N[(x1 + t$95$3), $MachinePrecision], If[LessEqual[x1, 1e+154], N[(x1 + N[(N[(N[(N[(t$95$3 + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := \left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1\\
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -2 \cdot 10^{+109}:\\
\;\;\;\;x1 + t\_3\\
\mathbf{elif}\;x1 \leq 10^{+154}:\\
\;\;\;\;x1 + \left(\left(\left(\left(t\_3 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -7.50000000000000065e153 or 1.00000000000000004e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0
Applied rewrites0.0%
Taylor expanded in x1 around 0
Applied rewrites0.0%
Taylor expanded in x1 around 0
Applied rewrites100.0%
if -7.50000000000000065e153 < x1 < -1.99999999999999996e109Initial program 0.0%
Taylor expanded in x1 around 0
Applied rewrites0.3%
Taylor expanded in x1 around 0
Applied rewrites100.0%
if -1.99999999999999996e109 < x1 < 1.00000000000000004e154Initial program 99.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)))
(if (<= x1 -7.5e+153)
t_0
(if (<= x1 -2e+109)
(+ x1 t_3)
(if (<= x1 1e+154)
(+
(+ (+ (+ t_3 (* t_0 t_2)) (* (* x1 x1) x1)) x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1)))
t_0)))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = ((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1;
double tmp;
if (x1 <= -7.5e+153) {
tmp = t_0;
} else if (x1 <= -2e+109) {
tmp = x1 + t_3;
} else if (x1 <= 1e+154) {
tmp = (((t_3 + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
t_3 = ((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1
if (x1 <= (-7.5d+153)) then
tmp = t_0
else if (x1 <= (-2d+109)) then
tmp = x1 + t_3
else if (x1 <= 1d+154) then
tmp = (((t_3 + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = ((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1;
double tmp;
if (x1 <= -7.5e+153) {
tmp = t_0;
} else if (x1 <= -2e+109) {
tmp = x1 + t_3;
} else if (x1 <= 1e+154) {
tmp = (((t_3 + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_3 = ((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1 tmp = 0 if x1 <= -7.5e+153: tmp = t_0 elif x1 <= -2e+109: tmp = x1 + t_3 elif x1 <= 1e+154: tmp = (((t_3 + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) tmp = 0.0 if (x1 <= -7.5e+153) tmp = t_0; elseif (x1 <= -2e+109) tmp = Float64(x1 + t_3); elseif (x1 <= 1e+154) tmp = Float64(Float64(Float64(Float64(t_3 + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_3 = ((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1; tmp = 0.0; if (x1 <= -7.5e+153) tmp = t_0; elseif (x1 <= -2e+109) tmp = x1 + t_3; elseif (x1 <= 1e+154) tmp = (((t_3 + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[x1, -7.5e+153], t$95$0, If[LessEqual[x1, -2e+109], N[(x1 + t$95$3), $MachinePrecision], If[LessEqual[x1, 1e+154], N[(N[(N[(N[(t$95$3 + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := \left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1\\
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -2 \cdot 10^{+109}:\\
\;\;\;\;x1 + t\_3\\
\mathbf{elif}\;x1 \leq 10^{+154}:\\
\;\;\;\;\left(\left(\left(t\_3 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -7.50000000000000065e153 or 1.00000000000000004e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0
Applied rewrites0.0%
Taylor expanded in x1 around 0
Applied rewrites0.0%
Taylor expanded in x1 around 0
Applied rewrites100.0%
if -7.50000000000000065e153 < x1 < -1.99999999999999996e109Initial program 0.0%
Taylor expanded in x1 around 0
Applied rewrites0.3%
Taylor expanded in x1 around 0
Applied rewrites100.0%
if -1.99999999999999996e109 < x1 < 1.00000000000000004e154Initial program 99.5%
Taylor expanded in x1 around 0
Applied rewrites86.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1))
(t_4 (+ t_3 (* t_0 t_2)))
(t_5 (* (* x1 x1) x1)))
(if (<= x1 -7.5e+153)
t_0
(if (<= x1 -8.4e-19)
t_4
(if (<= x1 -4.2e-51)
t_2
(if (<= x1 1.55e-9)
(+
(+ (+ (+ t_3 (* t_0 t_0)) t_5) x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1)))
(if (<= x1 1e+154) (+ t_4 t_5) t_0)))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = ((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1;
double t_4 = t_3 + (t_0 * t_2);
double t_5 = (x1 * x1) * x1;
double tmp;
if (x1 <= -7.5e+153) {
tmp = t_0;
} else if (x1 <= -8.4e-19) {
tmp = t_4;
} else if (x1 <= -4.2e-51) {
tmp = t_2;
} else if (x1 <= 1.55e-9) {
tmp = (((t_3 + (t_0 * t_0)) + t_5) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1));
} else if (x1 <= 1e+154) {
tmp = t_4 + t_5;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
t_3 = ((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1
t_4 = t_3 + (t_0 * t_2)
t_5 = (x1 * x1) * x1
if (x1 <= (-7.5d+153)) then
tmp = t_0
else if (x1 <= (-8.4d-19)) then
tmp = t_4
else if (x1 <= (-4.2d-51)) then
tmp = t_2
else if (x1 <= 1.55d-9) then
tmp = (((t_3 + (t_0 * t_0)) + t_5) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1))
else if (x1 <= 1d+154) then
tmp = t_4 + t_5
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = ((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1;
double t_4 = t_3 + (t_0 * t_2);
double t_5 = (x1 * x1) * x1;
double tmp;
if (x1 <= -7.5e+153) {
tmp = t_0;
} else if (x1 <= -8.4e-19) {
tmp = t_4;
} else if (x1 <= -4.2e-51) {
tmp = t_2;
} else if (x1 <= 1.55e-9) {
tmp = (((t_3 + (t_0 * t_0)) + t_5) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1));
} else if (x1 <= 1e+154) {
tmp = t_4 + t_5;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_3 = ((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1 t_4 = t_3 + (t_0 * t_2) t_5 = (x1 * x1) * x1 tmp = 0 if x1 <= -7.5e+153: tmp = t_0 elif x1 <= -8.4e-19: tmp = t_4 elif x1 <= -4.2e-51: tmp = t_2 elif x1 <= 1.55e-9: tmp = (((t_3 + (t_0 * t_0)) + t_5) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) elif x1 <= 1e+154: tmp = t_4 + t_5 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) t_4 = Float64(t_3 + Float64(t_0 * t_2)) t_5 = Float64(Float64(x1 * x1) * x1) tmp = 0.0 if (x1 <= -7.5e+153) tmp = t_0; elseif (x1 <= -8.4e-19) tmp = t_4; elseif (x1 <= -4.2e-51) tmp = t_2; elseif (x1 <= 1.55e-9) tmp = Float64(Float64(Float64(Float64(t_3 + Float64(t_0 * t_0)) + t_5) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1))); elseif (x1 <= 1e+154) tmp = Float64(t_4 + t_5); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_3 = ((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1; t_4 = t_3 + (t_0 * t_2); t_5 = (x1 * x1) * x1; tmp = 0.0; if (x1 <= -7.5e+153) tmp = t_0; elseif (x1 <= -8.4e-19) tmp = t_4; elseif (x1 <= -4.2e-51) tmp = t_2; elseif (x1 <= 1.55e-9) tmp = (((t_3 + (t_0 * t_0)) + t_5) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)); elseif (x1 <= 1e+154) tmp = t_4 + t_5; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]}, If[LessEqual[x1, -7.5e+153], t$95$0, If[LessEqual[x1, -8.4e-19], t$95$4, If[LessEqual[x1, -4.2e-51], t$95$2, If[LessEqual[x1, 1.55e-9], N[(N[(N[(N[(t$95$3 + N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e+154], N[(t$95$4 + t$95$5), $MachinePrecision], t$95$0]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := \left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1\\
t_4 := t\_3 + t\_0 \cdot t\_2\\
t_5 := \left(x1 \cdot x1\right) \cdot x1\\
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -8.4 \cdot 10^{-19}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x1 \leq -4.2 \cdot 10^{-51}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq 1.55 \cdot 10^{-9}:\\
\;\;\;\;\left(\left(\left(t\_3 + t\_0 \cdot t\_0\right) + t\_5\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{elif}\;x1 \leq 10^{+154}:\\
\;\;\;\;t\_4 + t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -7.50000000000000065e153 or 1.00000000000000004e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0
Applied rewrites0.0%
Taylor expanded in x1 around 0
Applied rewrites0.0%
Taylor expanded in x1 around 0
Applied rewrites100.0%
if -7.50000000000000065e153 < x1 < -8.3999999999999996e-19Initial program 70.6%
Taylor expanded in x1 around 0
Applied rewrites1.7%
Taylor expanded in x1 around 0
Applied rewrites94.8%
Taylor expanded in x1 around 0
Applied rewrites95.2%
if -8.3999999999999996e-19 < x1 < -4.20000000000000003e-51Initial program 98.8%
Taylor expanded in x1 around 0
Applied rewrites28.9%
Taylor expanded in x1 around 0
Applied rewrites88.1%
if -4.20000000000000003e-51 < x1 < 1.55000000000000002e-9Initial program 99.5%
Taylor expanded in x1 around 0
Applied rewrites83.7%
Taylor expanded in x1 around 0
Applied rewrites83.7%
if 1.55000000000000002e-9 < x1 < 1.00000000000000004e154Initial program 99.6%
Taylor expanded in x1 around 0
Applied rewrites99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))))
(if (<= x1 -7.5e+153)
t_0
(if (<= x1 -5.8e-85)
t_3
(if (<= x1 2.25e-153)
(+ x1 (+ t_0 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))
(if (<= x1 1e+154) (+ t_3 (* (* x1 x1) x1)) t_0))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = (((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2);
double tmp;
if (x1 <= -7.5e+153) {
tmp = t_0;
} else if (x1 <= -5.8e-85) {
tmp = t_3;
} else if (x1 <= 2.25e-153) {
tmp = x1 + (t_0 + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
} else if (x1 <= 1e+154) {
tmp = t_3 + ((x1 * x1) * x1);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
t_3 = (((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)
if (x1 <= (-7.5d+153)) then
tmp = t_0
else if (x1 <= (-5.8d-85)) then
tmp = t_3
else if (x1 <= 2.25d-153) then
tmp = x1 + (t_0 + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
else if (x1 <= 1d+154) then
tmp = t_3 + ((x1 * x1) * x1)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = (((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2);
double tmp;
if (x1 <= -7.5e+153) {
tmp = t_0;
} else if (x1 <= -5.8e-85) {
tmp = t_3;
} else if (x1 <= 2.25e-153) {
tmp = x1 + (t_0 + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
} else if (x1 <= 1e+154) {
tmp = t_3 + ((x1 * x1) * x1);
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_3 = (((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2) tmp = 0 if x1 <= -7.5e+153: tmp = t_0 elif x1 <= -5.8e-85: tmp = t_3 elif x1 <= 2.25e-153: tmp = x1 + (t_0 + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))) elif x1 <= 1e+154: tmp = t_3 + ((x1 * x1) * x1) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) tmp = 0.0 if (x1 <= -7.5e+153) tmp = t_0; elseif (x1 <= -5.8e-85) tmp = t_3; elseif (x1 <= 2.25e-153) tmp = Float64(x1 + Float64(t_0 + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))); elseif (x1 <= 1e+154) tmp = Float64(t_3 + Float64(Float64(x1 * x1) * x1)); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_3 = (((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2); tmp = 0.0; if (x1 <= -7.5e+153) tmp = t_0; elseif (x1 <= -5.8e-85) tmp = t_3; elseif (x1 <= 2.25e-153) tmp = x1 + (t_0 + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); elseif (x1 <= 1e+154) tmp = t_3 + ((x1 * x1) * x1); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.5e+153], t$95$0, If[LessEqual[x1, -5.8e-85], t$95$3, If[LessEqual[x1, 2.25e-153], N[(x1 + N[(t$95$0 + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e+154], N[(t$95$3 + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := \left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\\
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -5.8 \cdot 10^{-85}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq 2.25 \cdot 10^{-153}:\\
\;\;\;\;x1 + \left(t\_0 + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
\mathbf{elif}\;x1 \leq 10^{+154}:\\
\;\;\;\;t\_3 + \left(x1 \cdot x1\right) \cdot x1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -7.50000000000000065e153 or 1.00000000000000004e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0
Applied rewrites0.0%
Taylor expanded in x1 around 0
Applied rewrites0.0%
Taylor expanded in x1 around 0
Applied rewrites100.0%
if -7.50000000000000065e153 < x1 < -5.8000000000000004e-85Initial program 78.3%
Taylor expanded in x1 around 0
Applied rewrites2.1%
Taylor expanded in x1 around 0
Applied rewrites78.7%
Taylor expanded in x1 around 0
Applied rewrites79.5%
if -5.8000000000000004e-85 < x1 < 2.25e-153Initial program 99.5%
Taylor expanded in x1 around 0
Applied rewrites2.2%
Taylor expanded in x1 around 0
Applied rewrites14.5%
Taylor expanded in x1 around 0
Applied rewrites75.7%
if 2.25e-153 < x1 < 1.00000000000000004e154Initial program 99.5%
Taylor expanded in x1 around 0
Applied rewrites74.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))))
(if (<= x1 -7.5e+153)
t_0
(if (<= x1 -5.8e-85)
t_3
(if (<= x1 2.25e-153)
(+ x1 (+ t_0 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))
(if (<= x1 1e+154) t_3 t_0))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = (((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2);
double tmp;
if (x1 <= -7.5e+153) {
tmp = t_0;
} else if (x1 <= -5.8e-85) {
tmp = t_3;
} else if (x1 <= 2.25e-153) {
tmp = x1 + (t_0 + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
} else if (x1 <= 1e+154) {
tmp = t_3;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
t_3 = (((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)
if (x1 <= (-7.5d+153)) then
tmp = t_0
else if (x1 <= (-5.8d-85)) then
tmp = t_3
else if (x1 <= 2.25d-153) then
tmp = x1 + (t_0 + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
else if (x1 <= 1d+154) then
tmp = t_3
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = (((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2);
double tmp;
if (x1 <= -7.5e+153) {
tmp = t_0;
} else if (x1 <= -5.8e-85) {
tmp = t_3;
} else if (x1 <= 2.25e-153) {
tmp = x1 + (t_0 + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
} else if (x1 <= 1e+154) {
tmp = t_3;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_3 = (((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2) tmp = 0 if x1 <= -7.5e+153: tmp = t_0 elif x1 <= -5.8e-85: tmp = t_3 elif x1 <= 2.25e-153: tmp = x1 + (t_0 + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))) elif x1 <= 1e+154: tmp = t_3 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) tmp = 0.0 if (x1 <= -7.5e+153) tmp = t_0; elseif (x1 <= -5.8e-85) tmp = t_3; elseif (x1 <= 2.25e-153) tmp = Float64(x1 + Float64(t_0 + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))); elseif (x1 <= 1e+154) tmp = t_3; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_3 = (((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2); tmp = 0.0; if (x1 <= -7.5e+153) tmp = t_0; elseif (x1 <= -5.8e-85) tmp = t_3; elseif (x1 <= 2.25e-153) tmp = x1 + (t_0 + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); elseif (x1 <= 1e+154) tmp = t_3; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.5e+153], t$95$0, If[LessEqual[x1, -5.8e-85], t$95$3, If[LessEqual[x1, 2.25e-153], N[(x1 + N[(t$95$0 + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e+154], t$95$3, t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := \left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\\
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -5.8 \cdot 10^{-85}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq 2.25 \cdot 10^{-153}:\\
\;\;\;\;x1 + \left(t\_0 + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
\mathbf{elif}\;x1 \leq 10^{+154}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -7.50000000000000065e153 or 1.00000000000000004e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0
Applied rewrites0.0%
Taylor expanded in x1 around 0
Applied rewrites0.0%
Taylor expanded in x1 around 0
Applied rewrites100.0%
if -7.50000000000000065e153 < x1 < -5.8000000000000004e-85 or 2.25e-153 < x1 < 1.00000000000000004e154Initial program 90.0%
Taylor expanded in x1 around 0
Applied rewrites3.2%
Taylor expanded in x1 around 0
Applied rewrites75.6%
Taylor expanded in x1 around 0
Applied rewrites76.2%
if -5.8000000000000004e-85 < x1 < 2.25e-153Initial program 99.5%
Taylor expanded in x1 around 0
Applied rewrites2.2%
Taylor expanded in x1 around 0
Applied rewrites14.5%
Taylor expanded in x1 around 0
Applied rewrites75.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (- (- t_0 (* 2.0 x2)) x1))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2))
(t_4
(+
x1
(*
(+
(* (* (* 2.0 x1) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* 4.0 t_3) 6.0)))
t_2))))
(if (<= x1 -7.5e+153)
t_0
(if (<= x1 -1.65e-18)
t_4
(if (<= x1 -4.1e-119)
t_1
(if (<= x1 2.25e-153)
(+ x1 (+ t_0 (* 3.0 (/ t_1 t_2))))
(if (<= x1 1e+154) t_4 t_0)))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (t_0 - (2.0 * x2)) - x1;
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_4 = x1 + (((((2.0 * x1) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0))) * t_2);
double tmp;
if (x1 <= -7.5e+153) {
tmp = t_0;
} else if (x1 <= -1.65e-18) {
tmp = t_4;
} else if (x1 <= -4.1e-119) {
tmp = t_1;
} else if (x1 <= 2.25e-153) {
tmp = x1 + (t_0 + (3.0 * (t_1 / t_2)));
} else if (x1 <= 1e+154) {
tmp = t_4;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (3.0d0 * x1) * x1
t_1 = (t_0 - (2.0d0 * x2)) - x1
t_2 = (x1 * x1) + 1.0d0
t_3 = ((t_0 + (2.0d0 * x2)) - x1) / t_2
t_4 = x1 + (((((2.0d0 * x1) * t_3) * (t_3 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_3) - 6.0d0))) * t_2)
if (x1 <= (-7.5d+153)) then
tmp = t_0
else if (x1 <= (-1.65d-18)) then
tmp = t_4
else if (x1 <= (-4.1d-119)) then
tmp = t_1
else if (x1 <= 2.25d-153) then
tmp = x1 + (t_0 + (3.0d0 * (t_1 / t_2)))
else if (x1 <= 1d+154) then
tmp = t_4
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (t_0 - (2.0 * x2)) - x1;
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_4 = x1 + (((((2.0 * x1) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0))) * t_2);
double tmp;
if (x1 <= -7.5e+153) {
tmp = t_0;
} else if (x1 <= -1.65e-18) {
tmp = t_4;
} else if (x1 <= -4.1e-119) {
tmp = t_1;
} else if (x1 <= 2.25e-153) {
tmp = x1 + (t_0 + (3.0 * (t_1 / t_2)));
} else if (x1 <= 1e+154) {
tmp = t_4;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (t_0 - (2.0 * x2)) - x1 t_2 = (x1 * x1) + 1.0 t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2 t_4 = x1 + (((((2.0 * x1) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0))) * t_2) tmp = 0 if x1 <= -7.5e+153: tmp = t_0 elif x1 <= -1.65e-18: tmp = t_4 elif x1 <= -4.1e-119: tmp = t_1 elif x1 <= 2.25e-153: tmp = x1 + (t_0 + (3.0 * (t_1 / t_2))) elif x1 <= 1e+154: tmp = t_4 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(x1 + Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_3) - 6.0))) * t_2)) tmp = 0.0 if (x1 <= -7.5e+153) tmp = t_0; elseif (x1 <= -1.65e-18) tmp = t_4; elseif (x1 <= -4.1e-119) tmp = t_1; elseif (x1 <= 2.25e-153) tmp = Float64(x1 + Float64(t_0 + Float64(3.0 * Float64(t_1 / t_2)))); elseif (x1 <= 1e+154) tmp = t_4; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (t_0 - (2.0 * x2)) - x1; t_2 = (x1 * x1) + 1.0; t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2; t_4 = x1 + (((((2.0 * x1) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0))) * t_2); tmp = 0.0; if (x1 <= -7.5e+153) tmp = t_0; elseif (x1 <= -1.65e-18) tmp = t_4; elseif (x1 <= -4.1e-119) tmp = t_1; elseif (x1 <= 2.25e-153) tmp = x1 + (t_0 + (3.0 * (t_1 / t_2))); elseif (x1 <= 1e+154) tmp = t_4; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$3), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.5e+153], t$95$0, If[LessEqual[x1, -1.65e-18], t$95$4, If[LessEqual[x1, -4.1e-119], t$95$1, If[LessEqual[x1, 2.25e-153], N[(x1 + N[(t$95$0 + N[(3.0 * N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e+154], t$95$4, t$95$0]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := \left(t\_0 - 2 \cdot x2\right) - x1\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := x1 + \left(\left(\left(2 \cdot x1\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_3 - 6\right)\right) \cdot t\_2\\
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -1.65 \cdot 10^{-18}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x1 \leq -4.1 \cdot 10^{-119}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 2.25 \cdot 10^{-153}:\\
\;\;\;\;x1 + \left(t\_0 + 3 \cdot \frac{t\_1}{t\_2}\right)\\
\mathbf{elif}\;x1 \leq 10^{+154}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -7.50000000000000065e153 or 1.00000000000000004e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0
Applied rewrites0.0%
Taylor expanded in x1 around 0
Applied rewrites0.0%
Taylor expanded in x1 around 0
Applied rewrites100.0%
if -7.50000000000000065e153 < x1 < -1.6500000000000001e-18 or 2.25e-153 < x1 < 1.00000000000000004e154Initial program 88.7%
Taylor expanded in x1 around 0
Applied rewrites3.2%
Taylor expanded in x1 around 0
Applied rewrites81.2%
if -1.6500000000000001e-18 < x1 < -4.1000000000000002e-119Initial program 99.4%
Taylor expanded in x1 around 0
Applied rewrites33.8%
Taylor expanded in x1 around 0
Applied rewrites54.6%
if -4.1000000000000002e-119 < x1 < 2.25e-153Initial program 99.5%
Taylor expanded in x1 around 0
Applied rewrites2.1%
Taylor expanded in x1 around 0
Applied rewrites13.0%
Taylor expanded in x1 around 0
Applied rewrites80.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1)) (t_1 (- (- t_0 (* 2.0 x2)) x1)))
(if (<= x1 -4.1e-119)
t_1
(if (<= x1 1.25e-89)
(+ x1 (+ t_0 (* 3.0 (/ t_1 (+ (* x1 x1) 1.0)))))
t_1))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (t_0 - (2.0 * x2)) - x1;
double tmp;
if (x1 <= -4.1e-119) {
tmp = t_1;
} else if (x1 <= 1.25e-89) {
tmp = x1 + (t_0 + (3.0 * (t_1 / ((x1 * x1) + 1.0))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (3.0d0 * x1) * x1
t_1 = (t_0 - (2.0d0 * x2)) - x1
if (x1 <= (-4.1d-119)) then
tmp = t_1
else if (x1 <= 1.25d-89) then
tmp = x1 + (t_0 + (3.0d0 * (t_1 / ((x1 * x1) + 1.0d0))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (t_0 - (2.0 * x2)) - x1;
double tmp;
if (x1 <= -4.1e-119) {
tmp = t_1;
} else if (x1 <= 1.25e-89) {
tmp = x1 + (t_0 + (3.0 * (t_1 / ((x1 * x1) + 1.0))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (t_0 - (2.0 * x2)) - x1 tmp = 0 if x1 <= -4.1e-119: tmp = t_1 elif x1 <= 1.25e-89: tmp = x1 + (t_0 + (3.0 * (t_1 / ((x1 * x1) + 1.0)))) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) tmp = 0.0 if (x1 <= -4.1e-119) tmp = t_1; elseif (x1 <= 1.25e-89) tmp = Float64(x1 + Float64(t_0 + Float64(3.0 * Float64(t_1 / Float64(Float64(x1 * x1) + 1.0))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (t_0 - (2.0 * x2)) - x1; tmp = 0.0; if (x1 <= -4.1e-119) tmp = t_1; elseif (x1 <= 1.25e-89) tmp = x1 + (t_0 + (3.0 * (t_1 / ((x1 * x1) + 1.0)))); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, If[LessEqual[x1, -4.1e-119], t$95$1, If[LessEqual[x1, 1.25e-89], N[(x1 + N[(t$95$0 + N[(3.0 * N[(t$95$1 / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := \left(t\_0 - 2 \cdot x2\right) - x1\\
\mathbf{if}\;x1 \leq -4.1 \cdot 10^{-119}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 1.25 \cdot 10^{-89}:\\
\;\;\;\;x1 + \left(t\_0 + 3 \cdot \frac{t\_1}{x1 \cdot x1 + 1}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -4.1000000000000002e-119 or 1.24999999999999992e-89 < x1 Initial program 58.1%
Taylor expanded in x1 around 0
Applied rewrites42.8%
Taylor expanded in x1 around 0
Applied rewrites50.1%
if -4.1000000000000002e-119 < x1 < 1.24999999999999992e-89Initial program 99.5%
Taylor expanded in x1 around 0
Applied rewrites2.3%
Taylor expanded in x1 around 0
Applied rewrites19.8%
Taylor expanded in x1 around 0
Applied rewrites73.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1)) (t_1 (- (- t_0 (* 2.0 x2)) x1)))
(if (<= x1 -4.1e-119)
t_1
(if (<= x1 1.25e-89) (+ t_0 (* 3.0 (/ t_1 (+ (* x1 x1) 1.0)))) t_1))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (t_0 - (2.0 * x2)) - x1;
double tmp;
if (x1 <= -4.1e-119) {
tmp = t_1;
} else if (x1 <= 1.25e-89) {
tmp = t_0 + (3.0 * (t_1 / ((x1 * x1) + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (3.0d0 * x1) * x1
t_1 = (t_0 - (2.0d0 * x2)) - x1
if (x1 <= (-4.1d-119)) then
tmp = t_1
else if (x1 <= 1.25d-89) then
tmp = t_0 + (3.0d0 * (t_1 / ((x1 * x1) + 1.0d0)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (t_0 - (2.0 * x2)) - x1;
double tmp;
if (x1 <= -4.1e-119) {
tmp = t_1;
} else if (x1 <= 1.25e-89) {
tmp = t_0 + (3.0 * (t_1 / ((x1 * x1) + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (t_0 - (2.0 * x2)) - x1 tmp = 0 if x1 <= -4.1e-119: tmp = t_1 elif x1 <= 1.25e-89: tmp = t_0 + (3.0 * (t_1 / ((x1 * x1) + 1.0))) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) tmp = 0.0 if (x1 <= -4.1e-119) tmp = t_1; elseif (x1 <= 1.25e-89) tmp = Float64(t_0 + Float64(3.0 * Float64(t_1 / Float64(Float64(x1 * x1) + 1.0)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (t_0 - (2.0 * x2)) - x1; tmp = 0.0; if (x1 <= -4.1e-119) tmp = t_1; elseif (x1 <= 1.25e-89) tmp = t_0 + (3.0 * (t_1 / ((x1 * x1) + 1.0))); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, If[LessEqual[x1, -4.1e-119], t$95$1, If[LessEqual[x1, 1.25e-89], N[(t$95$0 + N[(3.0 * N[(t$95$1 / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := \left(t\_0 - 2 \cdot x2\right) - x1\\
\mathbf{if}\;x1 \leq -4.1 \cdot 10^{-119}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 1.25 \cdot 10^{-89}:\\
\;\;\;\;t\_0 + 3 \cdot \frac{t\_1}{x1 \cdot x1 + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -4.1000000000000002e-119 or 1.24999999999999992e-89 < x1 Initial program 58.1%
Taylor expanded in x1 around 0
Applied rewrites42.8%
Taylor expanded in x1 around 0
Applied rewrites50.1%
if -4.1000000000000002e-119 < x1 < 1.24999999999999992e-89Initial program 99.5%
Taylor expanded in x1 around 0
Applied rewrites90.7%
Taylor expanded in x1 around 0
Applied rewrites90.7%
Taylor expanded in x1 around 0
Applied rewrites73.3%
(FPCore (x1 x2) :precision binary64 (- (- (* (* 3.0 x1) x1) (* 2.0 x2)) x1))
double code(double x1, double x2) {
return (((3.0 * x1) * x1) - (2.0 * x2)) - x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = (((3.0d0 * x1) * x1) - (2.0d0 * x2)) - x1
end function
public static double code(double x1, double x2) {
return (((3.0 * x1) * x1) - (2.0 * x2)) - x1;
}
def code(x1, x2): return (((3.0 * x1) * x1) - (2.0 * x2)) - x1
function code(x1, x2) return Float64(Float64(Float64(Float64(3.0 * x1) * x1) - Float64(2.0 * x2)) - x1) end
function tmp = code(x1, x2) tmp = (((3.0 * x1) * x1) - (2.0 * x2)) - x1; end
code[x1_, x2_] := N[(N[(N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1
\end{array}
Initial program 71.5%
Taylor expanded in x1 around 0
Applied rewrites35.3%
Taylor expanded in x1 around 0
Applied rewrites41.3%
(FPCore (x1 x2) :precision binary64 (+ x1 (- (* (* 3.0 x1) x1) 3.0)))
double code(double x1, double x2) {
return x1 + (((3.0 * x1) * x1) - 3.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + (((3.0d0 * x1) * x1) - 3.0d0)
end function
public static double code(double x1, double x2) {
return x1 + (((3.0 * x1) * x1) - 3.0);
}
def code(x1, x2): return x1 + (((3.0 * x1) * x1) - 3.0)
function code(x1, x2) return Float64(x1 + Float64(Float64(Float64(3.0 * x1) * x1) - 3.0)) end
function tmp = code(x1, x2) tmp = x1 + (((3.0 * x1) * x1) - 3.0); end
code[x1_, x2_] := N[(x1 + N[(N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + \left(\left(3 \cdot x1\right) \cdot x1 - 3\right)
\end{array}
Initial program 71.5%
Taylor expanded in x1 around 0
Applied rewrites2.2%
Taylor expanded in x1 around 0
Applied rewrites27.2%
(FPCore (x1 x2) :precision binary64 (* (* 3.0 x1) x1))
double code(double x1, double x2) {
return (3.0 * x1) * x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = (3.0d0 * x1) * x1
end function
public static double code(double x1, double x2) {
return (3.0 * x1) * x1;
}
def code(x1, x2): return (3.0 * x1) * x1
function code(x1, x2) return Float64(Float64(3.0 * x1) * x1) end
function tmp = code(x1, x2) tmp = (3.0 * x1) * x1; end
code[x1_, x2_] := N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]
\begin{array}{l}
\\
\left(3 \cdot x1\right) \cdot x1
\end{array}
Initial program 71.5%
Taylor expanded in x1 around 0
Applied rewrites62.0%
Taylor expanded in x1 around 0
Applied rewrites54.4%
Taylor expanded in x1 around 0
Applied rewrites27.2%
herbie shell --seed 2024321
(FPCore (x1 x2)
:name "Rosa's FloatVsDoubleBenchmark"
:precision binary64
:pre (TRUE)
(+ x1 (+ (+ (+ (+ (* (+ (* (* (* 2.0 x1) (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))) (- (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)) 3.0)) (* (* x1 x1) (- (* 4.0 (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))) 6.0))) (+ (* x1 x1) 1.0)) (* (* (* 3.0 x1) x1) (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))) (* (* x1 x1) x1)) x1) (* 3.0 (/ (- (- (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))))))