
(FPCore (x y z t) :precision binary64 (+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))
double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * ((((y + z) + z) + y) + t)) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
def code(x, y, z, t): return (x * ((((y + z) + z) + y) + t)) + (y * 5.0)
function code(x, y, z, t) return Float64(Float64(x * Float64(Float64(Float64(Float64(y + z) + z) + y) + t)) + Float64(y * 5.0)) end
function tmp = code(x, y, z, t) tmp = (x * ((((y + z) + z) + y) + t)) + (y * 5.0); end
code[x_, y_, z_, t_] := N[(N[(x * N[(N[(N[(N[(y + z), $MachinePrecision] + z), $MachinePrecision] + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))
double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * ((((y + z) + z) + y) + t)) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
def code(x, y, z, t): return (x * ((((y + z) + z) + y) + t)) + (y * 5.0)
function code(x, y, z, t) return Float64(Float64(x * Float64(Float64(Float64(Float64(y + z) + z) + y) + t)) + Float64(y * 5.0)) end
function tmp = code(x, y, z, t) tmp = (x * ((((y + z) + z) + y) + t)) + (y * 5.0); end
code[x_, y_, z_, t_] := N[(N[(x * N[(N[(N[(N[(y + z), $MachinePrecision] + z), $MachinePrecision] + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5
\end{array}
(FPCore (x y z t) :precision binary64 (fma x (+ (+ y (+ z z)) (+ y t)) (* y 5.0)))
double code(double x, double y, double z, double t) {
return fma(x, ((y + (z + z)) + (y + t)), (y * 5.0));
}
function code(x, y, z, t) return fma(x, Float64(Float64(y + Float64(z + z)) + Float64(y + t)), Float64(y * 5.0)) end
code[x_, y_, z_, t_] := N[(x * N[(N[(y + N[(z + z), $MachinePrecision]), $MachinePrecision] + N[(y + t), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, \left(y + \left(z + z\right)\right) + \left(y + t\right), y \cdot 5\right)
\end{array}
Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
associate-+l+99.9%
Simplified99.9%
(FPCore (x y z t) :precision binary64 (fma x (+ t (* 2.0 (+ y z))) (* y 5.0)))
double code(double x, double y, double z, double t) {
return fma(x, (t + (2.0 * (y + z))), (y * 5.0));
}
function code(x, y, z, t) return fma(x, Float64(t + Float64(2.0 * Float64(y + z))), Float64(y * 5.0)) end
code[x_, y_, z_, t_] := N[(x * N[(t + N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, t + 2 \cdot \left(y + z\right), y \cdot 5\right)
\end{array}
Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t) :precision binary64 (if (or (<= x -6.6e+202) (not (<= x 10000000000000.0))) (* x (+ t (* 2.0 (+ y z)))) (+ (* x (+ t (* z 2.0))) (* y (+ 5.0 (* x 2.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -6.6e+202) || !(x <= 10000000000000.0)) {
tmp = x * (t + (2.0 * (y + z)));
} else {
tmp = (x * (t + (z * 2.0))) + (y * (5.0 + (x * 2.0)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-6.6d+202)) .or. (.not. (x <= 10000000000000.0d0))) then
tmp = x * (t + (2.0d0 * (y + z)))
else
tmp = (x * (t + (z * 2.0d0))) + (y * (5.0d0 + (x * 2.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -6.6e+202) || !(x <= 10000000000000.0)) {
tmp = x * (t + (2.0 * (y + z)));
} else {
tmp = (x * (t + (z * 2.0))) + (y * (5.0 + (x * 2.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -6.6e+202) or not (x <= 10000000000000.0): tmp = x * (t + (2.0 * (y + z))) else: tmp = (x * (t + (z * 2.0))) + (y * (5.0 + (x * 2.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -6.6e+202) || !(x <= 10000000000000.0)) tmp = Float64(x * Float64(t + Float64(2.0 * Float64(y + z)))); else tmp = Float64(Float64(x * Float64(t + Float64(z * 2.0))) + Float64(y * Float64(5.0 + Float64(x * 2.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -6.6e+202) || ~((x <= 10000000000000.0))) tmp = x * (t + (2.0 * (y + z))); else tmp = (x * (t + (z * 2.0))) + (y * (5.0 + (x * 2.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -6.6e+202], N[Not[LessEqual[x, 10000000000000.0]], $MachinePrecision]], N[(x * N[(t + N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.6 \cdot 10^{+202} \lor \neg \left(x \leq 10000000000000\right):\\
\;\;\;\;x \cdot \left(t + 2 \cdot \left(y + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right) + y \cdot \left(5 + x \cdot 2\right)\\
\end{array}
\end{array}
if x < -6.5999999999999998e202 or 1e13 < x Initial program 100.0%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if -6.5999999999999998e202 < x < 1e13Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in y around 0 99.9%
Final simplification99.9%
(FPCore (x y z t)
:precision binary64
(if (<= x -9.5e+37)
(* x (+ t (+ y z)))
(if (or (<= x -8.2e-97) (not (<= x 7.2e-127)))
(* x (+ t (* z 2.0)))
(* y 5.0))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -9.5e+37) {
tmp = x * (t + (y + z));
} else if ((x <= -8.2e-97) || !(x <= 7.2e-127)) {
tmp = x * (t + (z * 2.0));
} else {
tmp = y * 5.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-9.5d+37)) then
tmp = x * (t + (y + z))
else if ((x <= (-8.2d-97)) .or. (.not. (x <= 7.2d-127))) then
tmp = x * (t + (z * 2.0d0))
else
tmp = y * 5.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -9.5e+37) {
tmp = x * (t + (y + z));
} else if ((x <= -8.2e-97) || !(x <= 7.2e-127)) {
tmp = x * (t + (z * 2.0));
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -9.5e+37: tmp = x * (t + (y + z)) elif (x <= -8.2e-97) or not (x <= 7.2e-127): tmp = x * (t + (z * 2.0)) else: tmp = y * 5.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -9.5e+37) tmp = Float64(x * Float64(t + Float64(y + z))); elseif ((x <= -8.2e-97) || !(x <= 7.2e-127)) tmp = Float64(x * Float64(t + Float64(z * 2.0))); else tmp = Float64(y * 5.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -9.5e+37) tmp = x * (t + (y + z)); elseif ((x <= -8.2e-97) || ~((x <= 7.2e-127))) tmp = x * (t + (z * 2.0)); else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -9.5e+37], N[(x * N[(t + N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -8.2e-97], N[Not[LessEqual[x, 7.2e-127]], $MachinePrecision]], N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+37}:\\
\;\;\;\;x \cdot \left(t + \left(y + z\right)\right)\\
\mathbf{elif}\;x \leq -8.2 \cdot 10^{-97} \lor \neg \left(x \leq 7.2 \cdot 10^{-127}\right):\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if x < -9.4999999999999995e37Initial program 100.0%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
Simplified82.3%
Taylor expanded in x around inf 82.3%
+-commutative82.3%
Simplified82.3%
if -9.4999999999999995e37 < x < -8.19999999999999986e-97 or 7.1999999999999999e-127 < x Initial program 99.9%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in y around 0 95.9%
Taylor expanded in y around 0 65.4%
if -8.19999999999999986e-97 < x < 7.1999999999999999e-127Initial program 99.8%
fma-define99.8%
associate-+l+99.8%
+-commutative99.8%
count-299.8%
Simplified99.8%
Taylor expanded in y around inf 66.7%
Simplified66.7%
Taylor expanded in x around 0 66.7%
Final simplification69.1%
(FPCore (x y z t)
:precision binary64
(if (<= z -2.05e+82)
(* x (+ t (* 2.0 (+ y z))))
(if (<= z 1.55e+133)
(+ (* y 5.0) (* x (+ t (* y 2.0))))
(+ (* y 5.0) (* 2.0 (* x z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.05e+82) {
tmp = x * (t + (2.0 * (y + z)));
} else if (z <= 1.55e+133) {
tmp = (y * 5.0) + (x * (t + (y * 2.0)));
} else {
tmp = (y * 5.0) + (2.0 * (x * z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-2.05d+82)) then
tmp = x * (t + (2.0d0 * (y + z)))
else if (z <= 1.55d+133) then
tmp = (y * 5.0d0) + (x * (t + (y * 2.0d0)))
else
tmp = (y * 5.0d0) + (2.0d0 * (x * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.05e+82) {
tmp = x * (t + (2.0 * (y + z)));
} else if (z <= 1.55e+133) {
tmp = (y * 5.0) + (x * (t + (y * 2.0)));
} else {
tmp = (y * 5.0) + (2.0 * (x * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.05e+82: tmp = x * (t + (2.0 * (y + z))) elif z <= 1.55e+133: tmp = (y * 5.0) + (x * (t + (y * 2.0))) else: tmp = (y * 5.0) + (2.0 * (x * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.05e+82) tmp = Float64(x * Float64(t + Float64(2.0 * Float64(y + z)))); elseif (z <= 1.55e+133) tmp = Float64(Float64(y * 5.0) + Float64(x * Float64(t + Float64(y * 2.0)))); else tmp = Float64(Float64(y * 5.0) + Float64(2.0 * Float64(x * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.05e+82) tmp = x * (t + (2.0 * (y + z))); elseif (z <= 1.55e+133) tmp = (y * 5.0) + (x * (t + (y * 2.0))); else tmp = (y * 5.0) + (2.0 * (x * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.05e+82], N[(x * N[(t + N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e+133], N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(2.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{+82}:\\
\;\;\;\;x \cdot \left(t + 2 \cdot \left(y + z\right)\right)\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+133}:\\
\;\;\;\;y \cdot 5 + x \cdot \left(t + y \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + 2 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if z < -2.04999999999999998e82Initial program 100.0%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 91.0%
if -2.04999999999999998e82 < z < 1.55e133Initial program 99.9%
Taylor expanded in y around inf 91.7%
if 1.55e133 < z Initial program 100.0%
Taylor expanded in z around inf 95.2%
Final simplification92.2%
(FPCore (x y z t)
:precision binary64
(if (<= z -7.5e+81)
(* x (+ t (* 2.0 (+ y z))))
(if (<= z 1.4e+34)
(+ (* y (+ 5.0 (* x 2.0))) (* x t))
(+ (* y 5.0) (* 2.0 (* x z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.5e+81) {
tmp = x * (t + (2.0 * (y + z)));
} else if (z <= 1.4e+34) {
tmp = (y * (5.0 + (x * 2.0))) + (x * t);
} else {
tmp = (y * 5.0) + (2.0 * (x * z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-7.5d+81)) then
tmp = x * (t + (2.0d0 * (y + z)))
else if (z <= 1.4d+34) then
tmp = (y * (5.0d0 + (x * 2.0d0))) + (x * t)
else
tmp = (y * 5.0d0) + (2.0d0 * (x * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.5e+81) {
tmp = x * (t + (2.0 * (y + z)));
} else if (z <= 1.4e+34) {
tmp = (y * (5.0 + (x * 2.0))) + (x * t);
} else {
tmp = (y * 5.0) + (2.0 * (x * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -7.5e+81: tmp = x * (t + (2.0 * (y + z))) elif z <= 1.4e+34: tmp = (y * (5.0 + (x * 2.0))) + (x * t) else: tmp = (y * 5.0) + (2.0 * (x * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -7.5e+81) tmp = Float64(x * Float64(t + Float64(2.0 * Float64(y + z)))); elseif (z <= 1.4e+34) tmp = Float64(Float64(y * Float64(5.0 + Float64(x * 2.0))) + Float64(x * t)); else tmp = Float64(Float64(y * 5.0) + Float64(2.0 * Float64(x * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -7.5e+81) tmp = x * (t + (2.0 * (y + z))); elseif (z <= 1.4e+34) tmp = (y * (5.0 + (x * 2.0))) + (x * t); else tmp = (y * 5.0) + (2.0 * (x * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -7.5e+81], N[(x * N[(t + N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+34], N[(N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(2.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+81}:\\
\;\;\;\;x \cdot \left(t + 2 \cdot \left(y + z\right)\right)\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+34}:\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right) + x \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + 2 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if z < -7.49999999999999973e81Initial program 100.0%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 91.1%
if -7.49999999999999973e81 < z < 1.40000000000000004e34Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in y around 0 97.2%
Taylor expanded in t around inf 90.8%
*-commutative90.8%
Simplified90.8%
if 1.40000000000000004e34 < z Initial program 100.0%
Taylor expanded in z around inf 87.9%
Final simplification90.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (+ z t))))
(if (<= x -2.3e-38)
t_1
(if (<= x 5.8e-17) (* y 5.0) (if (<= x 1.4e+171) (* x (* y 2.0)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x * (z + t);
double tmp;
if (x <= -2.3e-38) {
tmp = t_1;
} else if (x <= 5.8e-17) {
tmp = y * 5.0;
} else if (x <= 1.4e+171) {
tmp = x * (y * 2.0);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x * (z + t)
if (x <= (-2.3d-38)) then
tmp = t_1
else if (x <= 5.8d-17) then
tmp = y * 5.0d0
else if (x <= 1.4d+171) then
tmp = x * (y * 2.0d0)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (z + t);
double tmp;
if (x <= -2.3e-38) {
tmp = t_1;
} else if (x <= 5.8e-17) {
tmp = y * 5.0;
} else if (x <= 1.4e+171) {
tmp = x * (y * 2.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (z + t) tmp = 0 if x <= -2.3e-38: tmp = t_1 elif x <= 5.8e-17: tmp = y * 5.0 elif x <= 1.4e+171: tmp = x * (y * 2.0) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(z + t)) tmp = 0.0 if (x <= -2.3e-38) tmp = t_1; elseif (x <= 5.8e-17) tmp = Float64(y * 5.0); elseif (x <= 1.4e+171) tmp = Float64(x * Float64(y * 2.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (z + t); tmp = 0.0; if (x <= -2.3e-38) tmp = t_1; elseif (x <= 5.8e-17) tmp = y * 5.0; elseif (x <= 1.4e+171) tmp = x * (y * 2.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(z + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.3e-38], t$95$1, If[LessEqual[x, 5.8e-17], N[(y * 5.0), $MachinePrecision], If[LessEqual[x, 1.4e+171], N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(z + t\right)\\
\mathbf{if}\;x \leq -2.3 \cdot 10^{-38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{-17}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{+171}:\\
\;\;\;\;x \cdot \left(y \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.30000000000000002e-38 or 1.40000000000000002e171 < x Initial program 100.0%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 99.9%
Simplified78.1%
Taylor expanded in y around 0 63.3%
+-commutative63.3%
Simplified63.3%
if -2.30000000000000002e-38 < x < 5.8000000000000006e-17Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in y around inf 57.8%
Simplified57.8%
Taylor expanded in x around 0 57.8%
if 5.8000000000000006e-17 < x < 1.40000000000000002e171Initial program 99.9%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in y around 0 97.2%
Taylor expanded in x around inf 96.9%
distribute-lft-out96.9%
+-commutative96.9%
Simplified96.9%
Taylor expanded in y around inf 50.2%
*-commutative50.2%
associate-*r*50.2%
Simplified50.2%
Final simplification58.7%
(FPCore (x y z t) :precision binary64 (if (or (<= x -3.5e-27) (not (<= x 1.02e-35))) (* x (+ t (* 2.0 (+ y z)))) (+ (* y 5.0) (* 2.0 (* x z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -3.5e-27) || !(x <= 1.02e-35)) {
tmp = x * (t + (2.0 * (y + z)));
} else {
tmp = (y * 5.0) + (2.0 * (x * z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-3.5d-27)) .or. (.not. (x <= 1.02d-35))) then
tmp = x * (t + (2.0d0 * (y + z)))
else
tmp = (y * 5.0d0) + (2.0d0 * (x * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -3.5e-27) || !(x <= 1.02e-35)) {
tmp = x * (t + (2.0 * (y + z)));
} else {
tmp = (y * 5.0) + (2.0 * (x * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -3.5e-27) or not (x <= 1.02e-35): tmp = x * (t + (2.0 * (y + z))) else: tmp = (y * 5.0) + (2.0 * (x * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -3.5e-27) || !(x <= 1.02e-35)) tmp = Float64(x * Float64(t + Float64(2.0 * Float64(y + z)))); else tmp = Float64(Float64(y * 5.0) + Float64(2.0 * Float64(x * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -3.5e-27) || ~((x <= 1.02e-35))) tmp = x * (t + (2.0 * (y + z))); else tmp = (y * 5.0) + (2.0 * (x * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -3.5e-27], N[Not[LessEqual[x, 1.02e-35]], $MachinePrecision]], N[(x * N[(t + N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(2.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{-27} \lor \neg \left(x \leq 1.02 \cdot 10^{-35}\right):\\
\;\;\;\;x \cdot \left(t + 2 \cdot \left(y + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + 2 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if x < -3.5000000000000001e-27 or 1.01999999999999995e-35 < x Initial program 99.9%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 95.8%
if -3.5000000000000001e-27 < x < 1.01999999999999995e-35Initial program 99.9%
Taylor expanded in z around inf 81.9%
Final simplification88.8%
(FPCore (x y z t) :precision binary64 (if (or (<= x -3.9e-10) (not (<= x 9.6e-123))) (* x (+ t (* 2.0 (+ y z)))) (+ (* y 5.0) (* x t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -3.9e-10) || !(x <= 9.6e-123)) {
tmp = x * (t + (2.0 * (y + z)));
} else {
tmp = (y * 5.0) + (x * t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-3.9d-10)) .or. (.not. (x <= 9.6d-123))) then
tmp = x * (t + (2.0d0 * (y + z)))
else
tmp = (y * 5.0d0) + (x * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -3.9e-10) || !(x <= 9.6e-123)) {
tmp = x * (t + (2.0 * (y + z)));
} else {
tmp = (y * 5.0) + (x * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -3.9e-10) or not (x <= 9.6e-123): tmp = x * (t + (2.0 * (y + z))) else: tmp = (y * 5.0) + (x * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -3.9e-10) || !(x <= 9.6e-123)) tmp = Float64(x * Float64(t + Float64(2.0 * Float64(y + z)))); else tmp = Float64(Float64(y * 5.0) + Float64(x * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -3.9e-10) || ~((x <= 9.6e-123))) tmp = x * (t + (2.0 * (y + z))); else tmp = (y * 5.0) + (x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -3.9e-10], N[Not[LessEqual[x, 9.6e-123]], $MachinePrecision]], N[(x * N[(t + N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.9 \cdot 10^{-10} \lor \neg \left(x \leq 9.6 \cdot 10^{-123}\right):\\
\;\;\;\;x \cdot \left(t + 2 \cdot \left(y + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot t\\
\end{array}
\end{array}
if x < -3.9e-10 or 9.6e-123 < x Initial program 99.9%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 91.9%
if -3.9e-10 < x < 9.6e-123Initial program 99.9%
Taylor expanded in t around inf 79.4%
Simplified79.4%
Final simplification86.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.2e+129) (not (<= y 9.5e+32))) (* y (+ 5.0 (* x 2.0))) (* x (+ t (* z 2.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.2e+129) || !(y <= 9.5e+32)) {
tmp = y * (5.0 + (x * 2.0));
} else {
tmp = x * (t + (z * 2.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.2d+129)) .or. (.not. (y <= 9.5d+32))) then
tmp = y * (5.0d0 + (x * 2.0d0))
else
tmp = x * (t + (z * 2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.2e+129) || !(y <= 9.5e+32)) {
tmp = y * (5.0 + (x * 2.0));
} else {
tmp = x * (t + (z * 2.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.2e+129) or not (y <= 9.5e+32): tmp = y * (5.0 + (x * 2.0)) else: tmp = x * (t + (z * 2.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.2e+129) || !(y <= 9.5e+32)) tmp = Float64(y * Float64(5.0 + Float64(x * 2.0))); else tmp = Float64(x * Float64(t + Float64(z * 2.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.2e+129) || ~((y <= 9.5e+32))) tmp = y * (5.0 + (x * 2.0)); else tmp = x * (t + (z * 2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.2e+129], N[Not[LessEqual[y, 9.5e+32]], $MachinePrecision]], N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+129} \lor \neg \left(y \leq 9.5 \cdot 10^{+32}\right):\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\end{array}
\end{array}
if y < -1.1999999999999999e129 or 9.50000000000000006e32 < y Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in y around inf 82.9%
if -1.1999999999999999e129 < y < 9.50000000000000006e32Initial program 99.9%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in y around 0 99.3%
Taylor expanded in y around 0 78.1%
Final simplification80.2%
(FPCore (x y z t) :precision binary64 (if (or (<= x -2.2e-97) (not (<= x 7e-128))) (* x (+ t (* z 2.0))) (* y 5.0)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.2e-97) || !(x <= 7e-128)) {
tmp = x * (t + (z * 2.0));
} else {
tmp = y * 5.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-2.2d-97)) .or. (.not. (x <= 7d-128))) then
tmp = x * (t + (z * 2.0d0))
else
tmp = y * 5.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.2e-97) || !(x <= 7e-128)) {
tmp = x * (t + (z * 2.0));
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -2.2e-97) or not (x <= 7e-128): tmp = x * (t + (z * 2.0)) else: tmp = y * 5.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -2.2e-97) || !(x <= 7e-128)) tmp = Float64(x * Float64(t + Float64(z * 2.0))); else tmp = Float64(y * 5.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -2.2e-97) || ~((x <= 7e-128))) tmp = x * (t + (z * 2.0)); else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.2e-97], N[Not[LessEqual[x, 7e-128]], $MachinePrecision]], N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{-97} \lor \neg \left(x \leq 7 \cdot 10^{-128}\right):\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if x < -2.1999999999999999e-97 or 6.99999999999999999e-128 < x Initial program 99.9%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in y around 0 93.6%
Taylor expanded in y around 0 67.6%
if -2.1999999999999999e-97 < x < 6.99999999999999999e-128Initial program 99.8%
fma-define99.8%
associate-+l+99.8%
+-commutative99.8%
count-299.8%
Simplified99.8%
Taylor expanded in y around inf 66.7%
Simplified66.7%
Taylor expanded in x around 0 66.7%
Final simplification67.3%
(FPCore (x y z t) :precision binary64 (if (or (<= x -2.6e-38) (not (<= x 1.22e-17))) (* x (+ z t)) (* y 5.0)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.6e-38) || !(x <= 1.22e-17)) {
tmp = x * (z + t);
} else {
tmp = y * 5.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-2.6d-38)) .or. (.not. (x <= 1.22d-17))) then
tmp = x * (z + t)
else
tmp = y * 5.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.6e-38) || !(x <= 1.22e-17)) {
tmp = x * (z + t);
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -2.6e-38) or not (x <= 1.22e-17): tmp = x * (z + t) else: tmp = y * 5.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -2.6e-38) || !(x <= 1.22e-17)) tmp = Float64(x * Float64(z + t)); else tmp = Float64(y * 5.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -2.6e-38) || ~((x <= 1.22e-17))) tmp = x * (z + t); else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.6e-38], N[Not[LessEqual[x, 1.22e-17]], $MachinePrecision]], N[(x * N[(z + t), $MachinePrecision]), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.6 \cdot 10^{-38} \lor \neg \left(x \leq 1.22 \cdot 10^{-17}\right):\\
\;\;\;\;x \cdot \left(z + t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if x < -2.60000000000000011e-38 or 1.22e-17 < x Initial program 100.0%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
Simplified72.4%
Taylor expanded in y around 0 56.4%
+-commutative56.4%
Simplified56.4%
if -2.60000000000000011e-38 < x < 1.22e-17Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in y around inf 57.8%
Simplified57.8%
Taylor expanded in x around 0 57.8%
Final simplification57.1%
(FPCore (x y z t) :precision binary64 (+ (* y 5.0) (* x (+ t (+ y (+ z (+ y z)))))))
double code(double x, double y, double z, double t) {
return (y * 5.0) + (x * (t + (y + (z + (y + z)))));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (y * 5.0d0) + (x * (t + (y + (z + (y + z)))))
end function
public static double code(double x, double y, double z, double t) {
return (y * 5.0) + (x * (t + (y + (z + (y + z)))));
}
def code(x, y, z, t): return (y * 5.0) + (x * (t + (y + (z + (y + z)))))
function code(x, y, z, t) return Float64(Float64(y * 5.0) + Float64(x * Float64(t + Float64(y + Float64(z + Float64(y + z)))))) end
function tmp = code(x, y, z, t) tmp = (y * 5.0) + (x * (t + (y + (z + (y + z))))); end
code[x_, y_, z_, t_] := N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(t + N[(y + N[(z + N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot 5 + x \cdot \left(t + \left(y + \left(z + \left(y + z\right)\right)\right)\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.5e+120) (not (<= t 1e+33))) (* x t) (* y 5.0)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.5e+120) || !(t <= 1e+33)) {
tmp = x * t;
} else {
tmp = y * 5.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-1.5d+120)) .or. (.not. (t <= 1d+33))) then
tmp = x * t
else
tmp = y * 5.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.5e+120) || !(t <= 1e+33)) {
tmp = x * t;
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.5e+120) or not (t <= 1e+33): tmp = x * t else: tmp = y * 5.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.5e+120) || !(t <= 1e+33)) tmp = Float64(x * t); else tmp = Float64(y * 5.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.5e+120) || ~((t <= 1e+33))) tmp = x * t; else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.5e+120], N[Not[LessEqual[t, 1e+33]], $MachinePrecision]], N[(x * t), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+120} \lor \neg \left(t \leq 10^{+33}\right):\\
\;\;\;\;x \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if t < -1.5e120 or 9.9999999999999995e32 < t Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in y around 0 90.9%
Taylor expanded in x around inf 85.4%
distribute-lft-out85.4%
+-commutative85.4%
Simplified85.4%
Taylor expanded in t around inf 60.8%
*-commutative60.8%
Simplified60.8%
if -1.5e120 < t < 9.9999999999999995e32Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in y around inf 59.6%
Simplified40.5%
Taylor expanded in x around 0 40.5%
Final simplification48.4%
(FPCore (x y z t) :precision binary64 (if (or (<= z -2.15e+172) (not (<= z 1.85e+104))) (* x z) (* x t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.15e+172) || !(z <= 1.85e+104)) {
tmp = x * z;
} else {
tmp = x * t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-2.15d+172)) .or. (.not. (z <= 1.85d+104))) then
tmp = x * z
else
tmp = x * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.15e+172) || !(z <= 1.85e+104)) {
tmp = x * z;
} else {
tmp = x * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -2.15e+172) or not (z <= 1.85e+104): tmp = x * z else: tmp = x * t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -2.15e+172) || !(z <= 1.85e+104)) tmp = Float64(x * z); else tmp = Float64(x * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -2.15e+172) || ~((z <= 1.85e+104))) tmp = x * z; else tmp = x * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.15e+172], N[Not[LessEqual[z, 1.85e+104]], $MachinePrecision]], N[(x * z), $MachinePrecision], N[(x * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+172} \lor \neg \left(z \leq 1.85 \cdot 10^{+104}\right):\\
\;\;\;\;x \cdot z\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\\
\end{array}
\end{array}
if z < -2.1500000000000001e172 or 1.8499999999999999e104 < z Initial program 100.0%
fma-define100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
Simplified100.0%
Taylor expanded in x around inf 89.9%
Simplified52.4%
Taylor expanded in z around inf 38.9%
if -2.1500000000000001e172 < z < 1.8499999999999999e104Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in y around 0 96.1%
Taylor expanded in x around inf 65.0%
distribute-lft-out65.0%
+-commutative65.0%
Simplified65.0%
Taylor expanded in t around inf 36.0%
*-commutative36.0%
Simplified36.0%
Final simplification36.8%
(FPCore (x y z t) :precision binary64 (* x t))
double code(double x, double y, double z, double t) {
return x * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x * t
end function
public static double code(double x, double y, double z, double t) {
return x * t;
}
def code(x, y, z, t): return x * t
function code(x, y, z, t) return Float64(x * t) end
function tmp = code(x, y, z, t) tmp = x * t; end
code[x_, y_, z_, t_] := N[(x * t), $MachinePrecision]
\begin{array}{l}
\\
x \cdot t
\end{array}
Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in y around 0 95.6%
Taylor expanded in x around inf 70.1%
distribute-lft-out70.1%
+-commutative70.1%
Simplified70.1%
Taylor expanded in t around inf 28.4%
*-commutative28.4%
Simplified28.4%
herbie shell --seed 2024170
(FPCore (x y z t)
:name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, B"
:precision binary64
(+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))