
(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 15 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 (+ (* 2.0 (+ y z)) t) (* y 5.0)))
double code(double x, double y, double z, double t) {
return fma(x, ((2.0 * (y + z)) + t), (y * 5.0));
}
function code(x, y, z, t) return fma(x, Float64(Float64(2.0 * Float64(y + z)) + t), Float64(y * 5.0)) end
code[x_, y_, z_, t_] := N[(x * N[(N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, 2 \cdot \left(y + z\right) + t, 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
(let* ((t_1 (* 2.0 (* x z))))
(if (<= x -3.9e+120)
(* x t)
(if (<= x -2.2e+47)
t_1
(if (<= x -7.2e-12) (* x t) (if (<= x 8.5e-11) (* y 5.0) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 * (x * z);
double tmp;
if (x <= -3.9e+120) {
tmp = x * t;
} else if (x <= -2.2e+47) {
tmp = t_1;
} else if (x <= -7.2e-12) {
tmp = x * t;
} else if (x <= 8.5e-11) {
tmp = y * 5.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 = 2.0d0 * (x * z)
if (x <= (-3.9d+120)) then
tmp = x * t
else if (x <= (-2.2d+47)) then
tmp = t_1
else if (x <= (-7.2d-12)) then
tmp = x * t
else if (x <= 8.5d-11) then
tmp = y * 5.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 = 2.0 * (x * z);
double tmp;
if (x <= -3.9e+120) {
tmp = x * t;
} else if (x <= -2.2e+47) {
tmp = t_1;
} else if (x <= -7.2e-12) {
tmp = x * t;
} else if (x <= 8.5e-11) {
tmp = y * 5.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 * (x * z) tmp = 0 if x <= -3.9e+120: tmp = x * t elif x <= -2.2e+47: tmp = t_1 elif x <= -7.2e-12: tmp = x * t elif x <= 8.5e-11: tmp = y * 5.0 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(2.0 * Float64(x * z)) tmp = 0.0 if (x <= -3.9e+120) tmp = Float64(x * t); elseif (x <= -2.2e+47) tmp = t_1; elseif (x <= -7.2e-12) tmp = Float64(x * t); elseif (x <= 8.5e-11) tmp = Float64(y * 5.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 * (x * z); tmp = 0.0; if (x <= -3.9e+120) tmp = x * t; elseif (x <= -2.2e+47) tmp = t_1; elseif (x <= -7.2e-12) tmp = x * t; elseif (x <= 8.5e-11) tmp = y * 5.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.9e+120], N[(x * t), $MachinePrecision], If[LessEqual[x, -2.2e+47], t$95$1, If[LessEqual[x, -7.2e-12], N[(x * t), $MachinePrecision], If[LessEqual[x, 8.5e-11], N[(y * 5.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;x \leq -3.9 \cdot 10^{+120}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;x \leq -2.2 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -7.2 \cdot 10^{-12}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-11}:\\
\;\;\;\;y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.8999999999999998e120 or -2.1999999999999999e47 < x < -7.2e-12Initial program 100.0%
Taylor expanded in t around inf 51.5%
Simplified51.5%
if -3.8999999999999998e120 < x < -2.1999999999999999e47 or 8.50000000000000037e-11 < x Initial program 100.0%
Taylor expanded in z around inf 44.6%
if -7.2e-12 < x < 8.50000000000000037e-11Initial program 99.8%
Taylor expanded in x around 0 59.8%
Final simplification53.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.2e+109)
(* y 5.0)
(if (<= y 1.15e+27)
(* x (+ t (* 2.0 z)))
(if (<= y 1.8e+155) (* y 5.0) (* x (* 2.0 (+ y z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.2e+109) {
tmp = y * 5.0;
} else if (y <= 1.15e+27) {
tmp = x * (t + (2.0 * z));
} else if (y <= 1.8e+155) {
tmp = y * 5.0;
} else {
tmp = x * (2.0 * (y + 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 (y <= (-2.2d+109)) then
tmp = y * 5.0d0
else if (y <= 1.15d+27) then
tmp = x * (t + (2.0d0 * z))
else if (y <= 1.8d+155) then
tmp = y * 5.0d0
else
tmp = x * (2.0d0 * (y + z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.2e+109) {
tmp = y * 5.0;
} else if (y <= 1.15e+27) {
tmp = x * (t + (2.0 * z));
} else if (y <= 1.8e+155) {
tmp = y * 5.0;
} else {
tmp = x * (2.0 * (y + z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.2e+109: tmp = y * 5.0 elif y <= 1.15e+27: tmp = x * (t + (2.0 * z)) elif y <= 1.8e+155: tmp = y * 5.0 else: tmp = x * (2.0 * (y + z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.2e+109) tmp = Float64(y * 5.0); elseif (y <= 1.15e+27) tmp = Float64(x * Float64(t + Float64(2.0 * z))); elseif (y <= 1.8e+155) tmp = Float64(y * 5.0); else tmp = Float64(x * Float64(2.0 * Float64(y + z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.2e+109) tmp = y * 5.0; elseif (y <= 1.15e+27) tmp = x * (t + (2.0 * z)); elseif (y <= 1.8e+155) tmp = y * 5.0; else tmp = x * (2.0 * (y + z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.2e+109], N[(y * 5.0), $MachinePrecision], If[LessEqual[y, 1.15e+27], N[(x * N[(t + N[(2.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e+155], N[(y * 5.0), $MachinePrecision], N[(x * N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+109}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+27}:\\
\;\;\;\;x \cdot \left(t + 2 \cdot z\right)\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+155}:\\
\;\;\;\;y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + z\right)\right)\\
\end{array}
\end{array}
if y < -2.1999999999999999e109 or 1.15e27 < y < 1.80000000000000004e155Initial program 99.9%
Taylor expanded in x around 0 61.7%
if -2.1999999999999999e109 < y < 1.15e27Initial program 99.9%
Taylor expanded in y around 0 78.6%
if 1.80000000000000004e155 < y Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in x around inf 65.3%
Taylor expanded in t around 0 59.7%
Final simplification71.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.45e+117)
(* y 5.0)
(if (<= y 8.5e+28)
(* x (+ t (* 2.0 z)))
(if (<= y 2.7e+181) (* y 5.0) (* x (+ t (* 2.0 y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.45e+117) {
tmp = y * 5.0;
} else if (y <= 8.5e+28) {
tmp = x * (t + (2.0 * z));
} else if (y <= 2.7e+181) {
tmp = y * 5.0;
} else {
tmp = x * (t + (2.0 * y));
}
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.45d+117)) then
tmp = y * 5.0d0
else if (y <= 8.5d+28) then
tmp = x * (t + (2.0d0 * z))
else if (y <= 2.7d+181) then
tmp = y * 5.0d0
else
tmp = x * (t + (2.0d0 * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.45e+117) {
tmp = y * 5.0;
} else if (y <= 8.5e+28) {
tmp = x * (t + (2.0 * z));
} else if (y <= 2.7e+181) {
tmp = y * 5.0;
} else {
tmp = x * (t + (2.0 * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.45e+117: tmp = y * 5.0 elif y <= 8.5e+28: tmp = x * (t + (2.0 * z)) elif y <= 2.7e+181: tmp = y * 5.0 else: tmp = x * (t + (2.0 * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.45e+117) tmp = Float64(y * 5.0); elseif (y <= 8.5e+28) tmp = Float64(x * Float64(t + Float64(2.0 * z))); elseif (y <= 2.7e+181) tmp = Float64(y * 5.0); else tmp = Float64(x * Float64(t + Float64(2.0 * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.45e+117) tmp = y * 5.0; elseif (y <= 8.5e+28) tmp = x * (t + (2.0 * z)); elseif (y <= 2.7e+181) tmp = y * 5.0; else tmp = x * (t + (2.0 * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.45e+117], N[(y * 5.0), $MachinePrecision], If[LessEqual[y, 8.5e+28], N[(x * N[(t + N[(2.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e+181], N[(y * 5.0), $MachinePrecision], N[(x * N[(t + N[(2.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+117}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+28}:\\
\;\;\;\;x \cdot \left(t + 2 \cdot z\right)\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+181}:\\
\;\;\;\;y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + 2 \cdot y\right)\\
\end{array}
\end{array}
if y < -1.45000000000000014e117 or 8.49999999999999954e28 < y < 2.70000000000000007e181Initial program 99.9%
Taylor expanded in x around 0 60.4%
if -1.45000000000000014e117 < y < 8.49999999999999954e28Initial program 99.9%
Taylor expanded in y around 0 78.6%
if 2.70000000000000007e181 < y Initial program 99.9%
fma-define99.9%
associate-+l+99.9%
+-commutative99.9%
count-299.9%
Simplified99.9%
Taylor expanded in x around inf 65.7%
Taylor expanded in z around 0 65.7%
*-commutative65.7%
Simplified65.7%
Final simplification71.8%
(FPCore (x y z t) :precision binary64 (if (or (<= x -7.5e-27) (not (<= x 1.45e-12))) (* x (+ (* 2.0 (+ y z)) t)) (+ (* y (+ 5.0 (* x 2.0))) (* x t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -7.5e-27) || !(x <= 1.45e-12)) {
tmp = x * ((2.0 * (y + z)) + t);
} else {
tmp = (y * (5.0 + (x * 2.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 <= (-7.5d-27)) .or. (.not. (x <= 1.45d-12))) then
tmp = x * ((2.0d0 * (y + z)) + t)
else
tmp = (y * (5.0d0 + (x * 2.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 <= -7.5e-27) || !(x <= 1.45e-12)) {
tmp = x * ((2.0 * (y + z)) + t);
} else {
tmp = (y * (5.0 + (x * 2.0))) + (x * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -7.5e-27) or not (x <= 1.45e-12): tmp = x * ((2.0 * (y + z)) + t) else: tmp = (y * (5.0 + (x * 2.0))) + (x * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -7.5e-27) || !(x <= 1.45e-12)) tmp = Float64(x * Float64(Float64(2.0 * Float64(y + z)) + t)); else tmp = Float64(Float64(y * Float64(5.0 + Float64(x * 2.0))) + Float64(x * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -7.5e-27) || ~((x <= 1.45e-12))) tmp = x * ((2.0 * (y + z)) + t); else tmp = (y * (5.0 + (x * 2.0))) + (x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -7.5e-27], N[Not[LessEqual[x, 1.45e-12]], $MachinePrecision]], N[(x * N[(N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{-27} \lor \neg \left(x \leq 1.45 \cdot 10^{-12}\right):\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + z\right) + t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right) + x \cdot t\\
\end{array}
\end{array}
if x < -7.50000000000000029e-27 or 1.4500000000000001e-12 < 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 98.8%
if -7.50000000000000029e-27 < x < 1.4500000000000001e-12Initial program 99.8%
Taylor expanded in y around 0 99.8%
Taylor expanded in z around 0 80.2%
Final simplification90.0%
(FPCore (x y z t) :precision binary64 (if (or (<= t -4.5e+74) (not (<= t 5.8e+88))) (+ (* x (+ t (+ y y))) (* y 5.0)) (+ (* x (* 2.0 (+ y z))) (* y 5.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -4.5e+74) || !(t <= 5.8e+88)) {
tmp = (x * (t + (y + y))) + (y * 5.0);
} else {
tmp = (x * (2.0 * (y + z))) + (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 <= (-4.5d+74)) .or. (.not. (t <= 5.8d+88))) then
tmp = (x * (t + (y + y))) + (y * 5.0d0)
else
tmp = (x * (2.0d0 * (y + z))) + (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 <= -4.5e+74) || !(t <= 5.8e+88)) {
tmp = (x * (t + (y + y))) + (y * 5.0);
} else {
tmp = (x * (2.0 * (y + z))) + (y * 5.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -4.5e+74) or not (t <= 5.8e+88): tmp = (x * (t + (y + y))) + (y * 5.0) else: tmp = (x * (2.0 * (y + z))) + (y * 5.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -4.5e+74) || !(t <= 5.8e+88)) tmp = Float64(Float64(x * Float64(t + Float64(y + y))) + Float64(y * 5.0)); else tmp = Float64(Float64(x * Float64(2.0 * Float64(y + z))) + Float64(y * 5.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -4.5e+74) || ~((t <= 5.8e+88))) tmp = (x * (t + (y + y))) + (y * 5.0); else tmp = (x * (2.0 * (y + z))) + (y * 5.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -4.5e+74], N[Not[LessEqual[t, 5.8e+88]], $MachinePrecision]], N[(N[(x * N[(t + N[(y + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+74} \lor \neg \left(t \leq 5.8 \cdot 10^{+88}\right):\\
\;\;\;\;x \cdot \left(t + \left(y + y\right)\right) + y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + z\right)\right) + y \cdot 5\\
\end{array}
\end{array}
if t < -4.5e74 or 5.7999999999999999e88 < t Initial program 99.9%
Taylor expanded in y around inf 95.9%
if -4.5e74 < t < 5.7999999999999999e88Initial program 99.9%
Taylor expanded in t around 0 93.7%
Simplified93.7%
Final simplification94.6%
(FPCore (x y z t)
:precision binary64
(if (<= t -5.5e+90)
(+ (* y 5.0) (* x t))
(if (<= t 3.1e+91)
(+ (* x (* 2.0 (+ y z))) (* y 5.0))
(+ (* y (+ 5.0 (* x 2.0))) (* x t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -5.5e+90) {
tmp = (y * 5.0) + (x * t);
} else if (t <= 3.1e+91) {
tmp = (x * (2.0 * (y + z))) + (y * 5.0);
} else {
tmp = (y * (5.0 + (x * 2.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 (t <= (-5.5d+90)) then
tmp = (y * 5.0d0) + (x * t)
else if (t <= 3.1d+91) then
tmp = (x * (2.0d0 * (y + z))) + (y * 5.0d0)
else
tmp = (y * (5.0d0 + (x * 2.0d0))) + (x * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -5.5e+90) {
tmp = (y * 5.0) + (x * t);
} else if (t <= 3.1e+91) {
tmp = (x * (2.0 * (y + z))) + (y * 5.0);
} else {
tmp = (y * (5.0 + (x * 2.0))) + (x * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -5.5e+90: tmp = (y * 5.0) + (x * t) elif t <= 3.1e+91: tmp = (x * (2.0 * (y + z))) + (y * 5.0) else: tmp = (y * (5.0 + (x * 2.0))) + (x * t) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -5.5e+90) tmp = Float64(Float64(y * 5.0) + Float64(x * t)); elseif (t <= 3.1e+91) tmp = Float64(Float64(x * Float64(2.0 * Float64(y + z))) + Float64(y * 5.0)); else tmp = Float64(Float64(y * Float64(5.0 + Float64(x * 2.0))) + Float64(x * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -5.5e+90) tmp = (y * 5.0) + (x * t); elseif (t <= 3.1e+91) tmp = (x * (2.0 * (y + z))) + (y * 5.0); else tmp = (y * (5.0 + (x * 2.0))) + (x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -5.5e+90], N[(N[(y * 5.0), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e+91], N[(N[(x * N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{+90}:\\
\;\;\;\;y \cdot 5 + x \cdot t\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+91}:\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + z\right)\right) + y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right) + x \cdot t\\
\end{array}
\end{array}
if t < -5.49999999999999999e90Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
flip-+0.0%
pow20.0%
pow20.0%
Applied egg-rr0.0%
Simplified93.7%
Taylor expanded in x around 0 93.7%
if -5.49999999999999999e90 < t < 3.09999999999999998e91Initial program 99.9%
Taylor expanded in t around 0 92.9%
Simplified92.9%
if 3.09999999999999998e91 < t Initial program 99.8%
Taylor expanded in y around 0 93.8%
Taylor expanded in z around 0 87.8%
Final simplification92.0%
(FPCore (x y z t)
:precision binary64
(if (<= x -3.6e+121)
(* x t)
(if (<= x -2.5)
(* y (* x 2.0))
(if (<= x 5.8e-13) (* y 5.0) (* 2.0 (* x z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.6e+121) {
tmp = x * t;
} else if (x <= -2.5) {
tmp = y * (x * 2.0);
} else if (x <= 5.8e-13) {
tmp = y * 5.0;
} else {
tmp = 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.6d+121)) then
tmp = x * t
else if (x <= (-2.5d0)) then
tmp = y * (x * 2.0d0)
else if (x <= 5.8d-13) then
tmp = y * 5.0d0
else
tmp = 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.6e+121) {
tmp = x * t;
} else if (x <= -2.5) {
tmp = y * (x * 2.0);
} else if (x <= 5.8e-13) {
tmp = y * 5.0;
} else {
tmp = 2.0 * (x * z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3.6e+121: tmp = x * t elif x <= -2.5: tmp = y * (x * 2.0) elif x <= 5.8e-13: tmp = y * 5.0 else: tmp = 2.0 * (x * z) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3.6e+121) tmp = Float64(x * t); elseif (x <= -2.5) tmp = Float64(y * Float64(x * 2.0)); elseif (x <= 5.8e-13) tmp = Float64(y * 5.0); else tmp = Float64(2.0 * Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3.6e+121) tmp = x * t; elseif (x <= -2.5) tmp = y * (x * 2.0); elseif (x <= 5.8e-13) tmp = y * 5.0; else tmp = 2.0 * (x * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.6e+121], N[(x * t), $MachinePrecision], If[LessEqual[x, -2.5], N[(y * N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.8e-13], N[(y * 5.0), $MachinePrecision], N[(2.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{+121}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;x \leq -2.5:\\
\;\;\;\;y \cdot \left(x \cdot 2\right)\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{-13}:\\
\;\;\;\;y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if x < -3.59999999999999981e121Initial program 100.0%
Taylor expanded in t around inf 56.4%
Simplified56.4%
if -3.59999999999999981e121 < x < -2.5Initial program 100.0%
Taylor expanded in y around inf 47.9%
Simplified47.9%
Taylor expanded in x around inf 46.7%
associate-*r*46.7%
Simplified46.7%
if -2.5 < x < 5.7999999999999995e-13Initial program 99.8%
Taylor expanded in x around 0 59.4%
if 5.7999999999999995e-13 < x Initial program 99.9%
Taylor expanded in z around inf 44.9%
Final simplification54.0%
(FPCore (x y z t) :precision binary64 (if (<= x 2e+33) (+ (* x (+ t (* 2.0 z))) (* y (+ 5.0 (* x 2.0)))) (* x (+ (* 2.0 (+ y z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 2e+33) {
tmp = (x * (t + (2.0 * z))) + (y * (5.0 + (x * 2.0)));
} else {
tmp = x * ((2.0 * (y + z)) + 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 <= 2d+33) then
tmp = (x * (t + (2.0d0 * z))) + (y * (5.0d0 + (x * 2.0d0)))
else
tmp = x * ((2.0d0 * (y + z)) + t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= 2e+33) {
tmp = (x * (t + (2.0 * z))) + (y * (5.0 + (x * 2.0)));
} else {
tmp = x * ((2.0 * (y + z)) + t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= 2e+33: tmp = (x * (t + (2.0 * z))) + (y * (5.0 + (x * 2.0))) else: tmp = x * ((2.0 * (y + z)) + t) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= 2e+33) tmp = Float64(Float64(x * Float64(t + Float64(2.0 * z))) + Float64(y * Float64(5.0 + Float64(x * 2.0)))); else tmp = Float64(x * Float64(Float64(2.0 * Float64(y + z)) + t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= 2e+33) tmp = (x * (t + (2.0 * z))) + (y * (5.0 + (x * 2.0))); else tmp = x * ((2.0 * (y + z)) + t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, 2e+33], N[(N[(x * N[(t + N[(2.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2 \cdot 10^{+33}:\\
\;\;\;\;x \cdot \left(t + 2 \cdot z\right) + y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + z\right) + t\right)\\
\end{array}
\end{array}
if x < 1.9999999999999999e33Initial program 99.9%
Taylor expanded in y around 0 97.9%
if 1.9999999999999999e33 < 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%
Final simplification98.4%
(FPCore (x y z t) :precision binary64 (if (or (<= x -4.5e-17) (not (<= x 8.5e-12))) (* x (+ (* 2.0 (+ y z)) t)) (+ (* y 5.0) (* x t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -4.5e-17) || !(x <= 8.5e-12)) {
tmp = x * ((2.0 * (y + z)) + t);
} 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 <= (-4.5d-17)) .or. (.not. (x <= 8.5d-12))) then
tmp = x * ((2.0d0 * (y + z)) + t)
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 <= -4.5e-17) || !(x <= 8.5e-12)) {
tmp = x * ((2.0 * (y + z)) + t);
} else {
tmp = (y * 5.0) + (x * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -4.5e-17) or not (x <= 8.5e-12): tmp = x * ((2.0 * (y + z)) + t) else: tmp = (y * 5.0) + (x * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -4.5e-17) || !(x <= 8.5e-12)) tmp = Float64(x * Float64(Float64(2.0 * Float64(y + z)) + t)); 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 <= -4.5e-17) || ~((x <= 8.5e-12))) tmp = x * ((2.0 * (y + z)) + t); else tmp = (y * 5.0) + (x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -4.5e-17], N[Not[LessEqual[x, 8.5e-12]], $MachinePrecision]], N[(x * N[(N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{-17} \lor \neg \left(x \leq 8.5 \cdot 10^{-12}\right):\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + z\right) + t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot t\\
\end{array}
\end{array}
if x < -4.49999999999999978e-17 or 8.4999999999999997e-12 < 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 98.8%
if -4.49999999999999978e-17 < x < 8.4999999999999997e-12Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
flip-+0.0%
pow20.0%
pow20.0%
Applied egg-rr0.0%
Simplified80.1%
Taylor expanded in x around 0 80.1%
Final simplification90.0%
(FPCore (x y z t) :precision binary64 (if (or (<= x -3.2e-22) (not (<= x 1.55e-12))) (* x (* 2.0 (+ y z))) (* y 5.0)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -3.2e-22) || !(x <= 1.55e-12)) {
tmp = x * (2.0 * (y + z));
} 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 <= (-3.2d-22)) .or. (.not. (x <= 1.55d-12))) then
tmp = x * (2.0d0 * (y + z))
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 <= -3.2e-22) || !(x <= 1.55e-12)) {
tmp = x * (2.0 * (y + z));
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -3.2e-22) or not (x <= 1.55e-12): tmp = x * (2.0 * (y + z)) else: tmp = y * 5.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -3.2e-22) || !(x <= 1.55e-12)) tmp = Float64(x * Float64(2.0 * Float64(y + z))); else tmp = Float64(y * 5.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -3.2e-22) || ~((x <= 1.55e-12))) tmp = x * (2.0 * (y + z)); else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -3.2e-22], N[Not[LessEqual[x, 1.55e-12]], $MachinePrecision]], N[(x * N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{-22} \lor \neg \left(x \leq 1.55 \cdot 10^{-12}\right):\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if x < -3.19999999999999987e-22 or 1.5500000000000001e-12 < 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 98.8%
Taylor expanded in t around 0 69.6%
if -3.19999999999999987e-22 < x < 1.5500000000000001e-12Initial program 99.8%
Taylor expanded in x around 0 60.6%
Final simplification65.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.2e+108) (not (<= y 7000000000.0))) (* y (+ 5.0 (* x 2.0))) (* x (+ t (* 2.0 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.2e+108) || !(y <= 7000000000.0)) {
tmp = y * (5.0 + (x * 2.0));
} else {
tmp = x * (t + (2.0 * 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 ((y <= (-4.2d+108)) .or. (.not. (y <= 7000000000.0d0))) then
tmp = y * (5.0d0 + (x * 2.0d0))
else
tmp = x * (t + (2.0d0 * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.2e+108) || !(y <= 7000000000.0)) {
tmp = y * (5.0 + (x * 2.0));
} else {
tmp = x * (t + (2.0 * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.2e+108) or not (y <= 7000000000.0): tmp = y * (5.0 + (x * 2.0)) else: tmp = x * (t + (2.0 * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.2e+108) || !(y <= 7000000000.0)) tmp = Float64(y * Float64(5.0 + Float64(x * 2.0))); else tmp = Float64(x * Float64(t + Float64(2.0 * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.2e+108) || ~((y <= 7000000000.0))) tmp = y * (5.0 + (x * 2.0)); else tmp = x * (t + (2.0 * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.2e+108], N[Not[LessEqual[y, 7000000000.0]], $MachinePrecision]], N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t + N[(2.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+108} \lor \neg \left(y \leq 7000000000\right):\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + 2 \cdot z\right)\\
\end{array}
\end{array}
if y < -4.20000000000000019e108 or 7e9 < y Initial program 99.9%
Taylor expanded in y around inf 86.5%
Simplified86.5%
if -4.20000000000000019e108 < y < 7e9Initial program 99.9%
Taylor expanded in y around 0 79.4%
Final simplification82.4%
(FPCore (x y z t) :precision binary64 (+ (* x (+ t (+ y (+ z (+ y z))))) (* y 5.0)))
double code(double x, double y, double z, double t) {
return (x * (t + (y + (z + (y + z))))) + (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 * (t + (y + (z + (y + z))))) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x * (t + (y + (z + (y + z))))) + (y * 5.0);
}
def code(x, y, z, t): return (x * (t + (y + (z + (y + z))))) + (y * 5.0)
function code(x, y, z, t) return Float64(Float64(x * Float64(t + Float64(y + Float64(z + Float64(y + z))))) + Float64(y * 5.0)) end
function tmp = code(x, y, z, t) tmp = (x * (t + (y + (z + (y + z))))) + (y * 5.0); end
code[x_, y_, z_, t_] := N[(N[(x * N[(t + N[(y + N[(z + N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(t + \left(y + \left(z + \left(y + z\right)\right)\right)\right) + y \cdot 5
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t) :precision binary64 (if (or (<= x -3.7e-13) (not (<= x 1.4e-11))) (* x t) (* y 5.0)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -3.7e-13) || !(x <= 1.4e-11)) {
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 ((x <= (-3.7d-13)) .or. (.not. (x <= 1.4d-11))) 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 ((x <= -3.7e-13) || !(x <= 1.4e-11)) {
tmp = x * t;
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -3.7e-13) or not (x <= 1.4e-11): tmp = x * t else: tmp = y * 5.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -3.7e-13) || !(x <= 1.4e-11)) 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 ((x <= -3.7e-13) || ~((x <= 1.4e-11))) tmp = x * t; else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -3.7e-13], N[Not[LessEqual[x, 1.4e-11]], $MachinePrecision]], N[(x * t), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.7 \cdot 10^{-13} \lor \neg \left(x \leq 1.4 \cdot 10^{-11}\right):\\
\;\;\;\;x \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if x < -3.69999999999999989e-13 or 1.4e-11 < x Initial program 100.0%
Taylor expanded in t around inf 38.7%
Simplified38.7%
if -3.69999999999999989e-13 < x < 1.4e-11Initial program 99.8%
Taylor expanded in x around 0 59.8%
Final simplification48.9%
(FPCore (x y z t) :precision binary64 (* y 5.0))
double code(double x, double y, double z, double t) {
return 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 = y * 5.0d0
end function
public static double code(double x, double y, double z, double t) {
return y * 5.0;
}
def code(x, y, z, t): return y * 5.0
function code(x, y, z, t) return Float64(y * 5.0) end
function tmp = code(x, y, z, t) tmp = y * 5.0; end
code[x_, y_, z_, t_] := N[(y * 5.0), $MachinePrecision]
\begin{array}{l}
\\
y \cdot 5
\end{array}
Initial program 99.9%
Taylor expanded in x around 0 30.2%
Final simplification30.2%
herbie shell --seed 2024053
(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)))