
(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 14 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 y 5.0 (* x (+ t (* (+ y z) 2.0)))))
double code(double x, double y, double z, double t) {
return fma(y, 5.0, (x * (t + ((y + z) * 2.0))));
}
function code(x, y, z, t) return fma(y, 5.0, Float64(x * Float64(t + Float64(Float64(y + z) * 2.0)))) end
code[x_, y_, z_, t_] := N[(y * 5.0 + N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, 5, x \cdot \left(t + \left(y + z\right) \cdot 2\right)\right)
\end{array}
Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Final simplification100.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (* (+ y z) 2.0))))
(if (<= x -1.7e+82)
t_1
(if (<= x -4.8e-88)
(* x t)
(if (<= x 2.85e-68) (* y 5.0) (if (<= x 3.3e-16) (* x t) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y + z) * 2.0);
double tmp;
if (x <= -1.7e+82) {
tmp = t_1;
} else if (x <= -4.8e-88) {
tmp = x * t;
} else if (x <= 2.85e-68) {
tmp = y * 5.0;
} else if (x <= 3.3e-16) {
tmp = x * t;
} 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 * ((y + z) * 2.0d0)
if (x <= (-1.7d+82)) then
tmp = t_1
else if (x <= (-4.8d-88)) then
tmp = x * t
else if (x <= 2.85d-68) then
tmp = y * 5.0d0
else if (x <= 3.3d-16) then
tmp = x * t
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 * ((y + z) * 2.0);
double tmp;
if (x <= -1.7e+82) {
tmp = t_1;
} else if (x <= -4.8e-88) {
tmp = x * t;
} else if (x <= 2.85e-68) {
tmp = y * 5.0;
} else if (x <= 3.3e-16) {
tmp = x * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y + z) * 2.0) tmp = 0 if x <= -1.7e+82: tmp = t_1 elif x <= -4.8e-88: tmp = x * t elif x <= 2.85e-68: tmp = y * 5.0 elif x <= 3.3e-16: tmp = x * t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y + z) * 2.0)) tmp = 0.0 if (x <= -1.7e+82) tmp = t_1; elseif (x <= -4.8e-88) tmp = Float64(x * t); elseif (x <= 2.85e-68) tmp = Float64(y * 5.0); elseif (x <= 3.3e-16) tmp = Float64(x * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y + z) * 2.0); tmp = 0.0; if (x <= -1.7e+82) tmp = t_1; elseif (x <= -4.8e-88) tmp = x * t; elseif (x <= 2.85e-68) tmp = y * 5.0; elseif (x <= 3.3e-16) tmp = x * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.7e+82], t$95$1, If[LessEqual[x, -4.8e-88], N[(x * t), $MachinePrecision], If[LessEqual[x, 2.85e-68], N[(y * 5.0), $MachinePrecision], If[LessEqual[x, 3.3e-16], N[(x * t), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\left(y + z\right) \cdot 2\right)\\
\mathbf{if}\;x \leq -1.7 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -4.8 \cdot 10^{-88}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;x \leq 2.85 \cdot 10^{-68}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{-16}:\\
\;\;\;\;x \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.69999999999999997e82 or 3.29999999999999988e-16 < x Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 97.9%
Taylor expanded in t around 0 70.4%
if -1.69999999999999997e82 < x < -4.7999999999999999e-88 or 2.8500000000000001e-68 < x < 3.29999999999999988e-16Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 54.0%
*-commutative54.0%
Simplified54.0%
if -4.7999999999999999e-88 < x < 2.8500000000000001e-68Initial program 99.9%
+-commutative99.9%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 64.6%
*-commutative64.6%
Simplified64.6%
Final simplification65.1%
(FPCore (x y z t)
:precision binary64
(if (<= x -5.4e+111)
(* x (* (+ y z) 2.0))
(if (or (<= x -2.2e-163) (not (<= x 8.2e-69)))
(* x (+ t (* z 2.0)))
(* y 5.0))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -5.4e+111) {
tmp = x * ((y + z) * 2.0);
} else if ((x <= -2.2e-163) || !(x <= 8.2e-69)) {
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 <= (-5.4d+111)) then
tmp = x * ((y + z) * 2.0d0)
else if ((x <= (-2.2d-163)) .or. (.not. (x <= 8.2d-69))) 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 <= -5.4e+111) {
tmp = x * ((y + z) * 2.0);
} else if ((x <= -2.2e-163) || !(x <= 8.2e-69)) {
tmp = x * (t + (z * 2.0));
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -5.4e+111: tmp = x * ((y + z) * 2.0) elif (x <= -2.2e-163) or not (x <= 8.2e-69): tmp = x * (t + (z * 2.0)) else: tmp = y * 5.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -5.4e+111) tmp = Float64(x * Float64(Float64(y + z) * 2.0)); elseif ((x <= -2.2e-163) || !(x <= 8.2e-69)) 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 <= -5.4e+111) tmp = x * ((y + z) * 2.0); elseif ((x <= -2.2e-163) || ~((x <= 8.2e-69))) tmp = x * (t + (z * 2.0)); else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -5.4e+111], N[(x * N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -2.2e-163], N[Not[LessEqual[x, 8.2e-69]], $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 -5.4 \cdot 10^{+111}:\\
\;\;\;\;x \cdot \left(\left(y + z\right) \cdot 2\right)\\
\mathbf{elif}\;x \leq -2.2 \cdot 10^{-163} \lor \neg \left(x \leq 8.2 \cdot 10^{-69}\right):\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if x < -5.3999999999999998e111Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 100.0%
Taylor expanded in t around 0 79.8%
if -5.3999999999999998e111 < x < -2.20000000000000011e-163 or 8.1999999999999998e-69 < x Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 74.4%
+-commutative74.4%
Simplified74.4%
if -2.20000000000000011e-163 < x < 8.1999999999999998e-69Initial program 99.9%
+-commutative99.9%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 69.4%
*-commutative69.4%
Simplified69.4%
Final simplification74.2%
(FPCore (x y z t)
:precision binary64
(if (<= x -4.5e+87)
(* x (* (+ y z) 2.0))
(if (or (<= x -1.02e-24) (not (<= x 2.45e-68)))
(* x (+ t (* y 2.0)))
(* y 5.0))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4.5e+87) {
tmp = x * ((y + z) * 2.0);
} else if ((x <= -1.02e-24) || !(x <= 2.45e-68)) {
tmp = x * (t + (y * 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 <= (-4.5d+87)) then
tmp = x * ((y + z) * 2.0d0)
else if ((x <= (-1.02d-24)) .or. (.not. (x <= 2.45d-68))) then
tmp = x * (t + (y * 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 <= -4.5e+87) {
tmp = x * ((y + z) * 2.0);
} else if ((x <= -1.02e-24) || !(x <= 2.45e-68)) {
tmp = x * (t + (y * 2.0));
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -4.5e+87: tmp = x * ((y + z) * 2.0) elif (x <= -1.02e-24) or not (x <= 2.45e-68): tmp = x * (t + (y * 2.0)) else: tmp = y * 5.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -4.5e+87) tmp = Float64(x * Float64(Float64(y + z) * 2.0)); elseif ((x <= -1.02e-24) || !(x <= 2.45e-68)) tmp = Float64(x * Float64(t + Float64(y * 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 <= -4.5e+87) tmp = x * ((y + z) * 2.0); elseif ((x <= -1.02e-24) || ~((x <= 2.45e-68))) tmp = x * (t + (y * 2.0)); else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -4.5e+87], N[(x * N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -1.02e-24], N[Not[LessEqual[x, 2.45e-68]], $MachinePrecision]], N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{+87}:\\
\;\;\;\;x \cdot \left(\left(y + z\right) \cdot 2\right)\\
\mathbf{elif}\;x \leq -1.02 \cdot 10^{-24} \lor \neg \left(x \leq 2.45 \cdot 10^{-68}\right):\\
\;\;\;\;x \cdot \left(t + y \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if x < -4.5000000000000003e87Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 100.0%
Taylor expanded in t around 0 79.9%
if -4.5000000000000003e87 < x < -1.0200000000000001e-24 or 2.44999999999999988e-68 < x Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 92.9%
Taylor expanded in y around inf 66.3%
if -1.0200000000000001e-24 < x < 2.44999999999999988e-68Initial program 99.9%
+-commutative99.9%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 61.3%
*-commutative61.3%
Simplified61.3%
Final simplification67.5%
(FPCore (x y z t) :precision binary64 (if (or (<= x -310.0) (not (<= x 1.0))) (* x (+ t (* (+ y z) 2.0))) (+ (* y 5.0) (* x (+ t (* z 2.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -310.0) || !(x <= 1.0)) {
tmp = x * (t + ((y + z) * 2.0));
} else {
tmp = (y * 5.0) + (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 ((x <= (-310.0d0)) .or. (.not. (x <= 1.0d0))) then
tmp = x * (t + ((y + z) * 2.0d0))
else
tmp = (y * 5.0d0) + (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 ((x <= -310.0) || !(x <= 1.0)) {
tmp = x * (t + ((y + z) * 2.0));
} else {
tmp = (y * 5.0) + (x * (t + (z * 2.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -310.0) or not (x <= 1.0): tmp = x * (t + ((y + z) * 2.0)) else: tmp = (y * 5.0) + (x * (t + (z * 2.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -310.0) || !(x <= 1.0)) tmp = Float64(x * Float64(t + Float64(Float64(y + z) * 2.0))); else tmp = Float64(Float64(y * 5.0) + Float64(x * Float64(t + Float64(z * 2.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -310.0) || ~((x <= 1.0))) tmp = x * (t + ((y + z) * 2.0)); else tmp = (y * 5.0) + (x * (t + (z * 2.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -310.0], N[Not[LessEqual[x, 1.0]], $MachinePrecision]], N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -310 \lor \neg \left(x \leq 1\right):\\
\;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot \left(t + z \cdot 2\right)\\
\end{array}
\end{array}
if x < -310 or 1 < x Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 99.1%
if -310 < x < 1Initial program 99.9%
Taylor expanded in y around 0 98.5%
Final simplification98.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (+ y z) 2.0)))
(if (<= y -5.8e-31)
(+ (* y 5.0) (* x t_1))
(if (<= y 7.8e-32) (* x (+ t t_1)) (+ (* y 5.0) (* x (+ t (* y 2.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = (y + z) * 2.0;
double tmp;
if (y <= -5.8e-31) {
tmp = (y * 5.0) + (x * t_1);
} else if (y <= 7.8e-32) {
tmp = x * (t + t_1);
} else {
tmp = (y * 5.0) + (x * (t + (y * 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) :: t_1
real(8) :: tmp
t_1 = (y + z) * 2.0d0
if (y <= (-5.8d-31)) then
tmp = (y * 5.0d0) + (x * t_1)
else if (y <= 7.8d-32) then
tmp = x * (t + t_1)
else
tmp = (y * 5.0d0) + (x * (t + (y * 2.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y + z) * 2.0;
double tmp;
if (y <= -5.8e-31) {
tmp = (y * 5.0) + (x * t_1);
} else if (y <= 7.8e-32) {
tmp = x * (t + t_1);
} else {
tmp = (y * 5.0) + (x * (t + (y * 2.0)));
}
return tmp;
}
def code(x, y, z, t): t_1 = (y + z) * 2.0 tmp = 0 if y <= -5.8e-31: tmp = (y * 5.0) + (x * t_1) elif y <= 7.8e-32: tmp = x * (t + t_1) else: tmp = (y * 5.0) + (x * (t + (y * 2.0))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y + z) * 2.0) tmp = 0.0 if (y <= -5.8e-31) tmp = Float64(Float64(y * 5.0) + Float64(x * t_1)); elseif (y <= 7.8e-32) tmp = Float64(x * Float64(t + t_1)); else tmp = Float64(Float64(y * 5.0) + Float64(x * Float64(t + Float64(y * 2.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y + z) * 2.0; tmp = 0.0; if (y <= -5.8e-31) tmp = (y * 5.0) + (x * t_1); elseif (y <= 7.8e-32) tmp = x * (t + t_1); else tmp = (y * 5.0) + (x * (t + (y * 2.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[y, -5.8e-31], N[(N[(y * 5.0), $MachinePrecision] + N[(x * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.8e-32], N[(x * N[(t + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + z\right) \cdot 2\\
\mathbf{if}\;y \leq -5.8 \cdot 10^{-31}:\\
\;\;\;\;y \cdot 5 + x \cdot t\_1\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{-32}:\\
\;\;\;\;x \cdot \left(t + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot \left(t + y \cdot 2\right)\\
\end{array}
\end{array}
if y < -5.8000000000000001e-31Initial program 99.9%
associate-+l+99.9%
*-un-lft-identity99.9%
+-commutative99.9%
*-un-lft-identity99.9%
distribute-rgt-out99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 88.6%
if -5.8000000000000001e-31 < y < 7.8000000000000003e-32Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 95.0%
if 7.8000000000000003e-32 < y Initial program 100.0%
Taylor expanded in y around inf 91.7%
Final simplification92.3%
(FPCore (x y z t) :precision binary64 (if (or (<= x -2.2e-25) (not (<= x 1.5e-68))) (* x (+ t (* (+ y z) 2.0))) (+ (* y 5.0) (* 2.0 (* x z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.2e-25) || !(x <= 1.5e-68)) {
tmp = x * (t + ((y + z) * 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 ((x <= (-2.2d-25)) .or. (.not. (x <= 1.5d-68))) then
tmp = x * (t + ((y + z) * 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 ((x <= -2.2e-25) || !(x <= 1.5e-68)) {
tmp = x * (t + ((y + z) * 2.0));
} else {
tmp = (y * 5.0) + (2.0 * (x * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -2.2e-25) or not (x <= 1.5e-68): tmp = x * (t + ((y + z) * 2.0)) else: tmp = (y * 5.0) + (2.0 * (x * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -2.2e-25) || !(x <= 1.5e-68)) tmp = Float64(x * Float64(t + Float64(Float64(y + z) * 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 ((x <= -2.2e-25) || ~((x <= 1.5e-68))) tmp = x * (t + ((y + z) * 2.0)); else tmp = (y * 5.0) + (2.0 * (x * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.2e-25], N[Not[LessEqual[x, 1.5e-68]], $MachinePrecision]], N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $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 -2.2 \cdot 10^{-25} \lor \neg \left(x \leq 1.5 \cdot 10^{-68}\right):\\
\;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + 2 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if x < -2.2000000000000002e-25 or 1.5e-68 < x Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 95.4%
if -2.2000000000000002e-25 < x < 1.5e-68Initial program 99.9%
Taylor expanded in z around inf 85.3%
Final simplification91.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.8e+143) (not (<= y 1.2e+130))) (* y (+ 5.0 (* x 2.0))) (* x (+ t (* (+ y z) 2.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.8e+143) || !(y <= 1.2e+130)) {
tmp = y * (5.0 + (x * 2.0));
} else {
tmp = x * (t + ((y + 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 <= (-4.8d+143)) .or. (.not. (y <= 1.2d+130))) then
tmp = y * (5.0d0 + (x * 2.0d0))
else
tmp = x * (t + ((y + 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 <= -4.8e+143) || !(y <= 1.2e+130)) {
tmp = y * (5.0 + (x * 2.0));
} else {
tmp = x * (t + ((y + z) * 2.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.8e+143) or not (y <= 1.2e+130): tmp = y * (5.0 + (x * 2.0)) else: tmp = x * (t + ((y + z) * 2.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.8e+143) || !(y <= 1.2e+130)) tmp = Float64(y * Float64(5.0 + Float64(x * 2.0))); else tmp = Float64(x * Float64(t + Float64(Float64(y + z) * 2.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.8e+143) || ~((y <= 1.2e+130))) tmp = y * (5.0 + (x * 2.0)); else tmp = x * (t + ((y + z) * 2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.8e+143], N[Not[LessEqual[y, 1.2e+130]], $MachinePrecision]], N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+143} \lor \neg \left(y \leq 1.2 \cdot 10^{+130}\right):\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
\end{array}
\end{array}
if y < -4.79999999999999959e143 or 1.20000000000000012e130 < y Initial program 99.9%
Taylor expanded in y around inf 91.8%
if -4.79999999999999959e143 < y < 1.20000000000000012e130Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 86.4%
Final simplification87.9%
(FPCore (x y z t) :precision binary64 (if (<= x -2.85e+111) (* y (* x 2.0)) (if (or (<= x -1.52e-86) (not (<= x 3.05e-68))) (* x t) (* y 5.0))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.85e+111) {
tmp = y * (x * 2.0);
} else if ((x <= -1.52e-86) || !(x <= 3.05e-68)) {
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 <= (-2.85d+111)) then
tmp = y * (x * 2.0d0)
else if ((x <= (-1.52d-86)) .or. (.not. (x <= 3.05d-68))) 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 <= -2.85e+111) {
tmp = y * (x * 2.0);
} else if ((x <= -1.52e-86) || !(x <= 3.05e-68)) {
tmp = x * t;
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -2.85e+111: tmp = y * (x * 2.0) elif (x <= -1.52e-86) or not (x <= 3.05e-68): tmp = x * t else: tmp = y * 5.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -2.85e+111) tmp = Float64(y * Float64(x * 2.0)); elseif ((x <= -1.52e-86) || !(x <= 3.05e-68)) 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 <= -2.85e+111) tmp = y * (x * 2.0); elseif ((x <= -1.52e-86) || ~((x <= 3.05e-68))) tmp = x * t; else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -2.85e+111], N[(y * N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -1.52e-86], N[Not[LessEqual[x, 3.05e-68]], $MachinePrecision]], N[(x * t), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.85 \cdot 10^{+111}:\\
\;\;\;\;y \cdot \left(x \cdot 2\right)\\
\mathbf{elif}\;x \leq -1.52 \cdot 10^{-86} \lor \neg \left(x \leq 3.05 \cdot 10^{-68}\right):\\
\;\;\;\;x \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if x < -2.85e111Initial program 100.0%
Taylor expanded in y around inf 47.7%
Taylor expanded in x around inf 47.7%
if -2.85e111 < x < -1.52e-86 or 3.05e-68 < x Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 47.5%
*-commutative47.5%
Simplified47.5%
if -1.52e-86 < x < 3.05e-68Initial program 99.9%
+-commutative99.9%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 64.6%
*-commutative64.6%
Simplified64.6%
Final simplification53.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.35e+27) (not (<= y 1.05e+70))) (* 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.35e+27) || !(y <= 1.05e+70)) {
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.35d+27)) .or. (.not. (y <= 1.05d+70))) 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.35e+27) || !(y <= 1.05e+70)) {
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.35e+27) or not (y <= 1.05e+70): 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.35e+27) || !(y <= 1.05e+70)) 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.35e+27) || ~((y <= 1.05e+70))) 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.35e+27], N[Not[LessEqual[y, 1.05e+70]], $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.35 \cdot 10^{+27} \lor \neg \left(y \leq 1.05 \cdot 10^{+70}\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.3499999999999999e27 or 1.05000000000000004e70 < y Initial program 99.9%
Taylor expanded in y around inf 79.6%
if -1.3499999999999999e27 < y < 1.05000000000000004e70Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 86.2%
+-commutative86.2%
Simplified86.2%
Final simplification83.3%
(FPCore (x y z t) :precision binary64 (if (or (<= z -8500.0) (not (<= z 2.4e+17))) (* x (* z 2.0)) (* x t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8500.0) || !(z <= 2.4e+17)) {
tmp = x * (z * 2.0);
} 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 <= (-8500.0d0)) .or. (.not. (z <= 2.4d+17))) then
tmp = x * (z * 2.0d0)
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 <= -8500.0) || !(z <= 2.4e+17)) {
tmp = x * (z * 2.0);
} else {
tmp = x * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -8500.0) or not (z <= 2.4e+17): tmp = x * (z * 2.0) else: tmp = x * t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -8500.0) || !(z <= 2.4e+17)) tmp = Float64(x * Float64(z * 2.0)); else tmp = Float64(x * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -8500.0) || ~((z <= 2.4e+17))) tmp = x * (z * 2.0); else tmp = x * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -8500.0], N[Not[LessEqual[z, 2.4e+17]], $MachinePrecision]], N[(x * N[(z * 2.0), $MachinePrecision]), $MachinePrecision], N[(x * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8500 \lor \neg \left(z \leq 2.4 \cdot 10^{+17}\right):\\
\;\;\;\;x \cdot \left(z \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\\
\end{array}
\end{array}
if z < -8500 or 2.4e17 < z Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in z around inf 59.1%
*-commutative59.1%
associate-*r*59.1%
Simplified59.1%
if -8500 < z < 2.4e17Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 46.1%
*-commutative46.1%
Simplified46.1%
Final simplification52.9%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.1e-86) (not (<= x 2.1e-68))) (* x t) (* y 5.0)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.1e-86) || !(x <= 2.1e-68)) {
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 <= (-1.1d-86)) .or. (.not. (x <= 2.1d-68))) 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 <= -1.1e-86) || !(x <= 2.1e-68)) {
tmp = x * t;
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.1e-86) or not (x <= 2.1e-68): tmp = x * t else: tmp = y * 5.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.1e-86) || !(x <= 2.1e-68)) 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 <= -1.1e-86) || ~((x <= 2.1e-68))) tmp = x * t; else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.1e-86], N[Not[LessEqual[x, 2.1e-68]], $MachinePrecision]], N[(x * t), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{-86} \lor \neg \left(x \leq 2.1 \cdot 10^{-68}\right):\\
\;\;\;\;x \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if x < -1.1000000000000001e-86 or 2.10000000000000008e-68 < x Initial program 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 43.7%
*-commutative43.7%
Simplified43.7%
if -1.1000000000000001e-86 < x < 2.10000000000000008e-68Initial program 99.9%
+-commutative99.9%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 64.6%
*-commutative64.6%
Simplified64.6%
Final simplification50.6%
(FPCore (x y z t) :precision binary64 (+ (* y 5.0) (* x (+ t (* (+ y z) 2.0)))))
double code(double x, double y, double z, double t) {
return (y * 5.0) + (x * (t + ((y + z) * 2.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) + (x * (t + ((y + z) * 2.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return (y * 5.0) + (x * (t + ((y + z) * 2.0)));
}
def code(x, y, z, t): return (y * 5.0) + (x * (t + ((y + z) * 2.0)))
function code(x, y, z, t) return Float64(Float64(y * 5.0) + Float64(x * Float64(t + Float64(Float64(y + z) * 2.0)))) end
function tmp = code(x, y, z, t) tmp = (y * 5.0) + (x * (t + ((y + z) * 2.0))); end
code[x_, y_, z_, t_] := N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot 5 + x \cdot \left(t + \left(y + z\right) \cdot 2\right)
\end{array}
Initial program 100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Final simplification100.0%
(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 100.0%
+-commutative100.0%
fma-define100.0%
*-un-lft-identity100.0%
*-un-lft-identity100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 33.3%
*-commutative33.3%
Simplified33.3%
herbie shell --seed 2024165
(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)))