
(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 13 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 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
+-commutativeN/A
fma-defineN/A
fma-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (+ t (* z 2.0)))))
(if (<= x -1.46e+214)
(* x (+ t (* y 2.0)))
(if (<= x -6.5e+24)
(* x (* (+ y z) 2.0))
(if (<= x -4.2e-71) t_1 (if (<= x 1.55e-163) (* y 5.0) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t + (z * 2.0));
double tmp;
if (x <= -1.46e+214) {
tmp = x * (t + (y * 2.0));
} else if (x <= -6.5e+24) {
tmp = x * ((y + z) * 2.0);
} else if (x <= -4.2e-71) {
tmp = t_1;
} else if (x <= 1.55e-163) {
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 = x * (t + (z * 2.0d0))
if (x <= (-1.46d+214)) then
tmp = x * (t + (y * 2.0d0))
else if (x <= (-6.5d+24)) then
tmp = x * ((y + z) * 2.0d0)
else if (x <= (-4.2d-71)) then
tmp = t_1
else if (x <= 1.55d-163) 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 = x * (t + (z * 2.0));
double tmp;
if (x <= -1.46e+214) {
tmp = x * (t + (y * 2.0));
} else if (x <= -6.5e+24) {
tmp = x * ((y + z) * 2.0);
} else if (x <= -4.2e-71) {
tmp = t_1;
} else if (x <= 1.55e-163) {
tmp = y * 5.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t + (z * 2.0)) tmp = 0 if x <= -1.46e+214: tmp = x * (t + (y * 2.0)) elif x <= -6.5e+24: tmp = x * ((y + z) * 2.0) elif x <= -4.2e-71: tmp = t_1 elif x <= 1.55e-163: tmp = y * 5.0 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t + Float64(z * 2.0))) tmp = 0.0 if (x <= -1.46e+214) tmp = Float64(x * Float64(t + Float64(y * 2.0))); elseif (x <= -6.5e+24) tmp = Float64(x * Float64(Float64(y + z) * 2.0)); elseif (x <= -4.2e-71) tmp = t_1; elseif (x <= 1.55e-163) tmp = Float64(y * 5.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t + (z * 2.0)); tmp = 0.0; if (x <= -1.46e+214) tmp = x * (t + (y * 2.0)); elseif (x <= -6.5e+24) tmp = x * ((y + z) * 2.0); elseif (x <= -4.2e-71) tmp = t_1; elseif (x <= 1.55e-163) tmp = y * 5.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.46e+214], N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.5e+24], N[(x * N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.2e-71], t$95$1, If[LessEqual[x, 1.55e-163], N[(y * 5.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(t + z \cdot 2\right)\\
\mathbf{if}\;x \leq -1.46 \cdot 10^{+214}:\\
\;\;\;\;x \cdot \left(t + y \cdot 2\right)\\
\mathbf{elif}\;x \leq -6.5 \cdot 10^{+24}:\\
\;\;\;\;x \cdot \left(\left(y + z\right) \cdot 2\right)\\
\mathbf{elif}\;x \leq -4.2 \cdot 10^{-71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{-163}:\\
\;\;\;\;y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.46e214Initial program 100.0%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64100.0%
Simplified100.0%
Taylor expanded in z around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6494.7%
Simplified94.7%
if -1.46e214 < x < -6.4999999999999996e24Initial program 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6499.9%
Simplified99.9%
Taylor expanded in t around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6489.6%
Simplified89.6%
if -6.4999999999999996e24 < x < -4.2000000000000002e-71 or 1.54999999999999987e-163 < x Initial program 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6472.1%
Simplified72.1%
if -4.2000000000000002e-71 < x < 1.54999999999999987e-163Initial program 99.8%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in x around 0
*-lowering-*.f6466.7%
Simplified66.7%
Final simplification75.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (+ t (* (+ y z) 2.0)))))
(if (<= x -1.9e-23)
t_1
(if (<= x -7.5e-265)
(+ (* x t) (* y 5.0))
(if (<= x 3.6e-57) (+ (* x (* z 2.0)) (* y 5.0)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t + ((y + z) * 2.0));
double tmp;
if (x <= -1.9e-23) {
tmp = t_1;
} else if (x <= -7.5e-265) {
tmp = (x * t) + (y * 5.0);
} else if (x <= 3.6e-57) {
tmp = (x * (z * 2.0)) + (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 = x * (t + ((y + z) * 2.0d0))
if (x <= (-1.9d-23)) then
tmp = t_1
else if (x <= (-7.5d-265)) then
tmp = (x * t) + (y * 5.0d0)
else if (x <= 3.6d-57) then
tmp = (x * (z * 2.0d0)) + (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 = x * (t + ((y + z) * 2.0));
double tmp;
if (x <= -1.9e-23) {
tmp = t_1;
} else if (x <= -7.5e-265) {
tmp = (x * t) + (y * 5.0);
} else if (x <= 3.6e-57) {
tmp = (x * (z * 2.0)) + (y * 5.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t + ((y + z) * 2.0)) tmp = 0 if x <= -1.9e-23: tmp = t_1 elif x <= -7.5e-265: tmp = (x * t) + (y * 5.0) elif x <= 3.6e-57: tmp = (x * (z * 2.0)) + (y * 5.0) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t + Float64(Float64(y + z) * 2.0))) tmp = 0.0 if (x <= -1.9e-23) tmp = t_1; elseif (x <= -7.5e-265) tmp = Float64(Float64(x * t) + Float64(y * 5.0)); elseif (x <= 3.6e-57) tmp = Float64(Float64(x * Float64(z * 2.0)) + Float64(y * 5.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t + ((y + z) * 2.0)); tmp = 0.0; if (x <= -1.9e-23) tmp = t_1; elseif (x <= -7.5e-265) tmp = (x * t) + (y * 5.0); elseif (x <= 3.6e-57) tmp = (x * (z * 2.0)) + (y * 5.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.9e-23], t$95$1, If[LessEqual[x, -7.5e-265], N[(N[(x * t), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.6e-57], N[(N[(x * N[(z * 2.0), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
\mathbf{if}\;x \leq -1.9 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-265}:\\
\;\;\;\;x \cdot t + y \cdot 5\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{-57}:\\
\;\;\;\;x \cdot \left(z \cdot 2\right) + y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.90000000000000006e-23 or 3.6000000000000002e-57 < x Initial program 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6496.4%
Simplified96.4%
if -1.90000000000000006e-23 < x < -7.5000000000000001e-265Initial program 99.8%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in t around inf
*-commutativeN/A
*-lowering-*.f6483.9%
Simplified83.9%
if -7.5000000000000001e-265 < x < 3.6000000000000002e-57Initial program 99.8%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in z around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6483.1%
Simplified83.1%
Final simplification91.3%
(FPCore (x y z t)
:precision binary64
(if (<= x -1.55e+214)
(* x t)
(if (<= x -1.7e+28)
(* x (* y 2.0))
(if (<= x -1.35e-69) (* x t) (if (<= x 4e-57) (* y 5.0) (* x t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.55e+214) {
tmp = x * t;
} else if (x <= -1.7e+28) {
tmp = x * (y * 2.0);
} else if (x <= -1.35e-69) {
tmp = x * t;
} else if (x <= 4e-57) {
tmp = y * 5.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 (x <= (-1.55d+214)) then
tmp = x * t
else if (x <= (-1.7d+28)) then
tmp = x * (y * 2.0d0)
else if (x <= (-1.35d-69)) then
tmp = x * t
else if (x <= 4d-57) then
tmp = y * 5.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 (x <= -1.55e+214) {
tmp = x * t;
} else if (x <= -1.7e+28) {
tmp = x * (y * 2.0);
} else if (x <= -1.35e-69) {
tmp = x * t;
} else if (x <= 4e-57) {
tmp = y * 5.0;
} else {
tmp = x * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.55e+214: tmp = x * t elif x <= -1.7e+28: tmp = x * (y * 2.0) elif x <= -1.35e-69: tmp = x * t elif x <= 4e-57: tmp = y * 5.0 else: tmp = x * t return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.55e+214) tmp = Float64(x * t); elseif (x <= -1.7e+28) tmp = Float64(x * Float64(y * 2.0)); elseif (x <= -1.35e-69) tmp = Float64(x * t); elseif (x <= 4e-57) tmp = Float64(y * 5.0); else tmp = Float64(x * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.55e+214) tmp = x * t; elseif (x <= -1.7e+28) tmp = x * (y * 2.0); elseif (x <= -1.35e-69) tmp = x * t; elseif (x <= 4e-57) tmp = y * 5.0; else tmp = x * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.55e+214], N[(x * t), $MachinePrecision], If[LessEqual[x, -1.7e+28], N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.35e-69], N[(x * t), $MachinePrecision], If[LessEqual[x, 4e-57], N[(y * 5.0), $MachinePrecision], N[(x * t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+214}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{+28}:\\
\;\;\;\;x \cdot \left(y \cdot 2\right)\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-69}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;x \leq 4 \cdot 10^{-57}:\\
\;\;\;\;y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\\
\end{array}
\end{array}
if x < -1.54999999999999989e214 or -1.7e28 < x < -1.3499999999999999e-69 or 3.99999999999999982e-57 < x Initial program 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in t around inf
*-commutativeN/A
*-lowering-*.f6446.2%
Simplified46.2%
if -1.54999999999999989e214 < x < -1.7e28Initial program 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6499.9%
Simplified99.9%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6439.4%
Simplified39.4%
if -1.3499999999999999e-69 < x < 3.99999999999999982e-57Initial program 99.8%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in x around 0
*-lowering-*.f6461.3%
Simplified61.3%
Final simplification50.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (+ 5.0 (* x (+ 2.0 (/ (* z 2.0) y)))))))
(if (<= y -9.8e+64)
t_1
(if (<= y 6.4e+23) (* x (+ t (* (+ y z) 2.0))) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = y * (5.0 + (x * (2.0 + ((z * 2.0) / y))));
double tmp;
if (y <= -9.8e+64) {
tmp = t_1;
} else if (y <= 6.4e+23) {
tmp = x * (t + ((y + z) * 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 = y * (5.0d0 + (x * (2.0d0 + ((z * 2.0d0) / y))))
if (y <= (-9.8d+64)) then
tmp = t_1
else if (y <= 6.4d+23) then
tmp = x * (t + ((y + z) * 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 = y * (5.0 + (x * (2.0 + ((z * 2.0) / y))));
double tmp;
if (y <= -9.8e+64) {
tmp = t_1;
} else if (y <= 6.4e+23) {
tmp = x * (t + ((y + z) * 2.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (5.0 + (x * (2.0 + ((z * 2.0) / y)))) tmp = 0 if y <= -9.8e+64: tmp = t_1 elif y <= 6.4e+23: tmp = x * (t + ((y + z) * 2.0)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(5.0 + Float64(x * Float64(2.0 + Float64(Float64(z * 2.0) / y))))) tmp = 0.0 if (y <= -9.8e+64) tmp = t_1; elseif (y <= 6.4e+23) tmp = Float64(x * Float64(t + Float64(Float64(y + z) * 2.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (5.0 + (x * (2.0 + ((z * 2.0) / y)))); tmp = 0.0; if (y <= -9.8e+64) tmp = t_1; elseif (y <= 6.4e+23) tmp = x * (t + ((y + z) * 2.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(5.0 + N[(x * N[(2.0 + N[(N[(z * 2.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.8e+64], t$95$1, If[LessEqual[y, 6.4e+23], N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(5 + x \cdot \left(2 + \frac{z \cdot 2}{y}\right)\right)\\
\mathbf{if}\;y \leq -9.8 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+23}:\\
\;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.8000000000000005e64 or 6.4e23 < y Initial program 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in y around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in t around 0
*-lowering-*.f6493.7%
Simplified93.7%
if -9.8000000000000005e64 < y < 6.4e23Initial program 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6487.2%
Simplified87.2%
Final simplification89.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (+ t (* y 2.0)))))
(if (<= x -7e+214)
t_1
(if (<= x -2.4e-23)
(* x (* (+ y z) 2.0))
(if (<= x 4.7e-57) (* y 5.0) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t + (y * 2.0));
double tmp;
if (x <= -7e+214) {
tmp = t_1;
} else if (x <= -2.4e-23) {
tmp = x * ((y + z) * 2.0);
} else if (x <= 4.7e-57) {
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 = x * (t + (y * 2.0d0))
if (x <= (-7d+214)) then
tmp = t_1
else if (x <= (-2.4d-23)) then
tmp = x * ((y + z) * 2.0d0)
else if (x <= 4.7d-57) 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 = x * (t + (y * 2.0));
double tmp;
if (x <= -7e+214) {
tmp = t_1;
} else if (x <= -2.4e-23) {
tmp = x * ((y + z) * 2.0);
} else if (x <= 4.7e-57) {
tmp = y * 5.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t + (y * 2.0)) tmp = 0 if x <= -7e+214: tmp = t_1 elif x <= -2.4e-23: tmp = x * ((y + z) * 2.0) elif x <= 4.7e-57: tmp = y * 5.0 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t + Float64(y * 2.0))) tmp = 0.0 if (x <= -7e+214) tmp = t_1; elseif (x <= -2.4e-23) tmp = Float64(x * Float64(Float64(y + z) * 2.0)); elseif (x <= 4.7e-57) tmp = Float64(y * 5.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t + (y * 2.0)); tmp = 0.0; if (x <= -7e+214) tmp = t_1; elseif (x <= -2.4e-23) tmp = x * ((y + z) * 2.0); elseif (x <= 4.7e-57) tmp = y * 5.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7e+214], t$95$1, If[LessEqual[x, -2.4e-23], N[(x * N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.7e-57], N[(y * 5.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(t + y \cdot 2\right)\\
\mathbf{if}\;x \leq -7 \cdot 10^{+214}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -2.4 \cdot 10^{-23}:\\
\;\;\;\;x \cdot \left(\left(y + z\right) \cdot 2\right)\\
\mathbf{elif}\;x \leq 4.7 \cdot 10^{-57}:\\
\;\;\;\;y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -6.9999999999999999e214 or 4.6999999999999998e-57 < x Initial program 100.0%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6495.8%
Simplified95.8%
Taylor expanded in z around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6471.6%
Simplified71.6%
if -6.9999999999999999e214 < x < -2.39999999999999996e-23Initial program 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6497.5%
Simplified97.5%
Taylor expanded in t around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6483.2%
Simplified83.2%
if -2.39999999999999996e-23 < x < 4.6999999999999998e-57Initial program 99.8%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in x around 0
*-lowering-*.f6456.9%
Simplified56.9%
Final simplification68.6%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (+ t (* (+ y z) 2.0))))) (if (<= x -2.9e-23) t_1 (if (<= x 4e-57) (+ (* x t) (* y 5.0)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t + ((y + z) * 2.0));
double tmp;
if (x <= -2.9e-23) {
tmp = t_1;
} else if (x <= 4e-57) {
tmp = (x * t) + (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 = x * (t + ((y + z) * 2.0d0))
if (x <= (-2.9d-23)) then
tmp = t_1
else if (x <= 4d-57) then
tmp = (x * t) + (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 = x * (t + ((y + z) * 2.0));
double tmp;
if (x <= -2.9e-23) {
tmp = t_1;
} else if (x <= 4e-57) {
tmp = (x * t) + (y * 5.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t + ((y + z) * 2.0)) tmp = 0 if x <= -2.9e-23: tmp = t_1 elif x <= 4e-57: tmp = (x * t) + (y * 5.0) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t + Float64(Float64(y + z) * 2.0))) tmp = 0.0 if (x <= -2.9e-23) tmp = t_1; elseif (x <= 4e-57) tmp = Float64(Float64(x * t) + Float64(y * 5.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t + ((y + z) * 2.0)); tmp = 0.0; if (x <= -2.9e-23) tmp = t_1; elseif (x <= 4e-57) tmp = (x * t) + (y * 5.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.9e-23], t$95$1, If[LessEqual[x, 4e-57], N[(N[(x * t), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
\mathbf{if}\;x \leq -2.9 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 4 \cdot 10^{-57}:\\
\;\;\;\;x \cdot t + y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.9000000000000002e-23 or 3.99999999999999982e-57 < x Initial program 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6496.4%
Simplified96.4%
if -2.9000000000000002e-23 < x < 3.99999999999999982e-57Initial program 99.8%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in t around inf
*-commutativeN/A
*-lowering-*.f6478.2%
Simplified78.2%
Final simplification89.2%
(FPCore (x y z t) :precision binary64 (if (<= x -1.9e+214) (* x t) (if (<= x -2e-23) (* x (* z 2.0)) (if (<= x 2.6e-57) (* y 5.0) (* x t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.9e+214) {
tmp = x * t;
} else if (x <= -2e-23) {
tmp = x * (z * 2.0);
} else if (x <= 2.6e-57) {
tmp = y * 5.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 (x <= (-1.9d+214)) then
tmp = x * t
else if (x <= (-2d-23)) then
tmp = x * (z * 2.0d0)
else if (x <= 2.6d-57) then
tmp = y * 5.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 (x <= -1.9e+214) {
tmp = x * t;
} else if (x <= -2e-23) {
tmp = x * (z * 2.0);
} else if (x <= 2.6e-57) {
tmp = y * 5.0;
} else {
tmp = x * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.9e+214: tmp = x * t elif x <= -2e-23: tmp = x * (z * 2.0) elif x <= 2.6e-57: tmp = y * 5.0 else: tmp = x * t return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.9e+214) tmp = Float64(x * t); elseif (x <= -2e-23) tmp = Float64(x * Float64(z * 2.0)); elseif (x <= 2.6e-57) tmp = Float64(y * 5.0); else tmp = Float64(x * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.9e+214) tmp = x * t; elseif (x <= -2e-23) tmp = x * (z * 2.0); elseif (x <= 2.6e-57) tmp = y * 5.0; else tmp = x * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.9e+214], N[(x * t), $MachinePrecision], If[LessEqual[x, -2e-23], N[(x * N[(z * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.6e-57], N[(y * 5.0), $MachinePrecision], N[(x * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.9 \cdot 10^{+214}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;x \leq -2 \cdot 10^{-23}:\\
\;\;\;\;x \cdot \left(z \cdot 2\right)\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{-57}:\\
\;\;\;\;y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\\
\end{array}
\end{array}
if x < -1.89999999999999999e214 or 2.59999999999999985e-57 < x Initial program 100.0%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in t around inf
*-commutativeN/A
*-lowering-*.f6449.2%
Simplified49.2%
if -1.89999999999999999e214 < x < -1.99999999999999992e-23Initial program 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in z around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6453.9%
Simplified53.9%
if -1.99999999999999992e-23 < x < 2.59999999999999985e-57Initial program 99.8%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in x around 0
*-lowering-*.f6456.9%
Simplified56.9%
Final simplification53.3%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* y (+ 5.0 (* x 2.0))))) (if (<= y -6.8e+127) t_1 (if (<= y 6.5e+86) (* x (+ t (* z 2.0))) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = y * (5.0 + (x * 2.0));
double tmp;
if (y <= -6.8e+127) {
tmp = t_1;
} else if (y <= 6.5e+86) {
tmp = x * (t + (z * 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 = y * (5.0d0 + (x * 2.0d0))
if (y <= (-6.8d+127)) then
tmp = t_1
else if (y <= 6.5d+86) then
tmp = x * (t + (z * 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 = y * (5.0 + (x * 2.0));
double tmp;
if (y <= -6.8e+127) {
tmp = t_1;
} else if (y <= 6.5e+86) {
tmp = x * (t + (z * 2.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (5.0 + (x * 2.0)) tmp = 0 if y <= -6.8e+127: tmp = t_1 elif y <= 6.5e+86: tmp = x * (t + (z * 2.0)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(5.0 + Float64(x * 2.0))) tmp = 0.0 if (y <= -6.8e+127) tmp = t_1; elseif (y <= 6.5e+86) tmp = Float64(x * Float64(t + Float64(z * 2.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (5.0 + (x * 2.0)); tmp = 0.0; if (y <= -6.8e+127) tmp = t_1; elseif (y <= 6.5e+86) tmp = x * (t + (z * 2.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.8e+127], t$95$1, If[LessEqual[y, 6.5e+86], N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{if}\;y \leq -6.8 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+86}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.79999999999999955e127 or 6.49999999999999996e86 < y Initial program 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in y around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6484.8%
Simplified84.8%
if -6.79999999999999955e127 < y < 6.49999999999999996e86Initial program 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6479.9%
Simplified79.9%
Final simplification81.5%
(FPCore (x y z t) :precision binary64 (if (<= t -1.5e+22) (* x t) (if (<= t 2.55e+132) (* x (* (+ y z) 2.0)) (* x t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.5e+22) {
tmp = x * t;
} else if (t <= 2.55e+132) {
tmp = x * ((y + 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 (t <= (-1.5d+22)) then
tmp = x * t
else if (t <= 2.55d+132) then
tmp = x * ((y + 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 (t <= -1.5e+22) {
tmp = x * t;
} else if (t <= 2.55e+132) {
tmp = x * ((y + z) * 2.0);
} else {
tmp = x * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.5e+22: tmp = x * t elif t <= 2.55e+132: tmp = x * ((y + z) * 2.0) else: tmp = x * t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.5e+22) tmp = Float64(x * t); elseif (t <= 2.55e+132) tmp = Float64(x * Float64(Float64(y + z) * 2.0)); else tmp = Float64(x * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.5e+22) tmp = x * t; elseif (t <= 2.55e+132) tmp = x * ((y + z) * 2.0); else tmp = x * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.5e+22], N[(x * t), $MachinePrecision], If[LessEqual[t, 2.55e+132], N[(x * N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], N[(x * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+22}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;t \leq 2.55 \cdot 10^{+132}:\\
\;\;\;\;x \cdot \left(\left(y + z\right) \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\\
\end{array}
\end{array}
if t < -1.5e22 or 2.55e132 < t Initial program 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in t around inf
*-commutativeN/A
*-lowering-*.f6462.2%
Simplified62.2%
if -1.5e22 < t < 2.55e132Initial program 99.8%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in x around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6470.0%
Simplified70.0%
Taylor expanded in t around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6464.6%
Simplified64.6%
Final simplification63.6%
(FPCore (x y z t) :precision binary64 (if (<= x -1.35e-69) (* x t) (if (<= x 2.5e-57) (* y 5.0) (* x t))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.35e-69) {
tmp = x * t;
} else if (x <= 2.5e-57) {
tmp = y * 5.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 (x <= (-1.35d-69)) then
tmp = x * t
else if (x <= 2.5d-57) then
tmp = y * 5.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 (x <= -1.35e-69) {
tmp = x * t;
} else if (x <= 2.5e-57) {
tmp = y * 5.0;
} else {
tmp = x * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.35e-69: tmp = x * t elif x <= 2.5e-57: tmp = y * 5.0 else: tmp = x * t return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.35e-69) tmp = Float64(x * t); elseif (x <= 2.5e-57) tmp = Float64(y * 5.0); else tmp = Float64(x * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.35e-69) tmp = x * t; elseif (x <= 2.5e-57) tmp = y * 5.0; else tmp = x * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.35e-69], N[(x * t), $MachinePrecision], If[LessEqual[x, 2.5e-57], N[(y * 5.0), $MachinePrecision], N[(x * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{-69}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{-57}:\\
\;\;\;\;y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\\
\end{array}
\end{array}
if x < -1.3499999999999999e-69 or 2.5000000000000001e-57 < x Initial program 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in t around inf
*-commutativeN/A
*-lowering-*.f6437.0%
Simplified37.0%
if -1.3499999999999999e-69 < x < 2.5000000000000001e-57Initial program 99.8%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in x around 0
*-lowering-*.f6461.3%
Simplified61.3%
Final simplification45.1%
(FPCore (x y z t) :precision binary64 (+ (* x (+ t (* (+ y z) 2.0))) (* y 5.0)))
double code(double x, double y, double z, double t) {
return (x * (t + ((y + z) * 2.0))) + (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) * 2.0d0))) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x * (t + ((y + z) * 2.0))) + (y * 5.0);
}
def code(x, y, z, t): return (x * (t + ((y + z) * 2.0))) + (y * 5.0)
function code(x, y, z, t) return Float64(Float64(x * Float64(t + Float64(Float64(y + z) * 2.0))) + Float64(y * 5.0)) end
function tmp = code(x, y, z, t) tmp = (x * (t + ((y + z) * 2.0))) + (y * 5.0); end
code[x_, y_, z_, t_] := N[(N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(t + \left(y + z\right) \cdot 2\right) + y \cdot 5
\end{array}
Initial program 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Final simplification99.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%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-+l+N/A
+-commutativeN/A
count-2N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in x around 0
*-lowering-*.f6424.7%
Simplified24.7%
Final simplification24.7%
herbie shell --seed 2024161
(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)))