
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
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 * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
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 * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) -4e+34) (- (+ (/ (/ t z) (* 3.0 y)) x) (* y (/ 0.3333333333333333 z))) (- x (/ (- y (/ t y)) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -4e+34) {
tmp = (((t / z) / (3.0 * y)) + x) - (y * (0.3333333333333333 / z));
} else {
tmp = x - ((y - (t / y)) / (z * 3.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 ((z * 3.0d0) <= (-4d+34)) then
tmp = (((t / z) / (3.0d0 * y)) + x) - (y * (0.3333333333333333d0 / z))
else
tmp = x - ((y - (t / y)) / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -4e+34) {
tmp = (((t / z) / (3.0 * y)) + x) - (y * (0.3333333333333333 / z));
} else {
tmp = x - ((y - (t / y)) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -4e+34: tmp = (((t / z) / (3.0 * y)) + x) - (y * (0.3333333333333333 / z)) else: tmp = x - ((y - (t / y)) / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -4e+34) tmp = Float64(Float64(Float64(Float64(t / z) / Float64(3.0 * y)) + x) - Float64(y * Float64(0.3333333333333333 / z))); else tmp = Float64(x - Float64(Float64(y - Float64(t / y)) / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= -4e+34) tmp = (((t / z) / (3.0 * y)) + x) - (y * (0.3333333333333333 / z)); else tmp = x - ((y - (t / y)) / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -4e+34], N[(N[(N[(N[(t / z), $MachinePrecision] / N[(3.0 * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -4 \cdot 10^{+34}:\\
\;\;\;\;\left(\frac{\frac{t}{z}}{3 \cdot y} + x\right) - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y - \frac{t}{y}}{z \cdot 3}\\
\end{array}
\end{array}
if (*.f64 z 3) < -3.99999999999999978e34Initial program 98.1%
associate-*l*98.0%
*-commutative98.0%
Simplified98.0%
+-commutative98.0%
*-commutative98.0%
associate-*l*98.1%
associate-+r-98.1%
associate-*l*98.0%
*-commutative98.0%
associate-/r*99.7%
div-inv99.7%
metadata-eval99.7%
div-inv99.7%
clear-num99.8%
Applied egg-rr99.8%
if -3.99999999999999978e34 < (*.f64 z 3) Initial program 89.6%
associate-*l*89.6%
*-commutative89.6%
Simplified89.6%
*-commutative89.6%
associate-*l*89.6%
associate-+l-89.6%
*-commutative89.6%
associate-/r*96.9%
sub-div98.9%
Applied egg-rr98.9%
Final simplification99.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* -0.3333333333333333 (/ y z)))
(t_2 (* 0.3333333333333333 (/ (/ t y) z))))
(if (<= y -9.2e+78)
(/ y (* z -3.0))
(if (<= y -3.1e+52)
x
(if (<= y -3.6e+22)
t_1
(if (<= y 1.32e-136)
t_2
(if (<= y 1.45e+55) x (if (<= y 4.8e+59) t_2 t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = -0.3333333333333333 * (y / z);
double t_2 = 0.3333333333333333 * ((t / y) / z);
double tmp;
if (y <= -9.2e+78) {
tmp = y / (z * -3.0);
} else if (y <= -3.1e+52) {
tmp = x;
} else if (y <= -3.6e+22) {
tmp = t_1;
} else if (y <= 1.32e-136) {
tmp = t_2;
} else if (y <= 1.45e+55) {
tmp = x;
} else if (y <= 4.8e+59) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (-0.3333333333333333d0) * (y / z)
t_2 = 0.3333333333333333d0 * ((t / y) / z)
if (y <= (-9.2d+78)) then
tmp = y / (z * (-3.0d0))
else if (y <= (-3.1d+52)) then
tmp = x
else if (y <= (-3.6d+22)) then
tmp = t_1
else if (y <= 1.32d-136) then
tmp = t_2
else if (y <= 1.45d+55) then
tmp = x
else if (y <= 4.8d+59) then
tmp = t_2
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 = -0.3333333333333333 * (y / z);
double t_2 = 0.3333333333333333 * ((t / y) / z);
double tmp;
if (y <= -9.2e+78) {
tmp = y / (z * -3.0);
} else if (y <= -3.1e+52) {
tmp = x;
} else if (y <= -3.6e+22) {
tmp = t_1;
} else if (y <= 1.32e-136) {
tmp = t_2;
} else if (y <= 1.45e+55) {
tmp = x;
} else if (y <= 4.8e+59) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -0.3333333333333333 * (y / z) t_2 = 0.3333333333333333 * ((t / y) / z) tmp = 0 if y <= -9.2e+78: tmp = y / (z * -3.0) elif y <= -3.1e+52: tmp = x elif y <= -3.6e+22: tmp = t_1 elif y <= 1.32e-136: tmp = t_2 elif y <= 1.45e+55: tmp = x elif y <= 4.8e+59: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(-0.3333333333333333 * Float64(y / z)) t_2 = Float64(0.3333333333333333 * Float64(Float64(t / y) / z)) tmp = 0.0 if (y <= -9.2e+78) tmp = Float64(y / Float64(z * -3.0)); elseif (y <= -3.1e+52) tmp = x; elseif (y <= -3.6e+22) tmp = t_1; elseif (y <= 1.32e-136) tmp = t_2; elseif (y <= 1.45e+55) tmp = x; elseif (y <= 4.8e+59) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -0.3333333333333333 * (y / z); t_2 = 0.3333333333333333 * ((t / y) / z); tmp = 0.0; if (y <= -9.2e+78) tmp = y / (z * -3.0); elseif (y <= -3.1e+52) tmp = x; elseif (y <= -3.6e+22) tmp = t_1; elseif (y <= 1.32e-136) tmp = t_2; elseif (y <= 1.45e+55) tmp = x; elseif (y <= 4.8e+59) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.2e+78], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.1e+52], x, If[LessEqual[y, -3.6e+22], t$95$1, If[LessEqual[y, 1.32e-136], t$95$2, If[LessEqual[y, 1.45e+55], x, If[LessEqual[y, 4.8e+59], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -0.3333333333333333 \cdot \frac{y}{z}\\
t_2 := 0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\
\mathbf{if}\;y \leq -9.2 \cdot 10^{+78}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{+52}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.32 \cdot 10^{-136}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+55}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+59}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.2000000000000008e78Initial program 97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
*-commutative97.9%
associate-*l*97.9%
associate-+l-97.9%
*-commutative97.9%
associate-/r*97.9%
sub-div99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 83.3%
metadata-eval83.3%
times-frac83.5%
*-commutative83.5%
neg-mul-183.5%
*-rgt-identity83.5%
times-frac83.3%
neg-sub083.3%
associate--r-83.3%
neg-sub083.3%
remove-double-neg83.3%
distribute-frac-neg83.3%
distribute-neg-in83.3%
+-commutative83.3%
distribute-neg-in83.3%
distribute-frac-neg83.3%
remove-double-neg83.3%
sub-neg83.3%
metadata-eval83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in t around 0 81.7%
associate-*r/81.8%
associate-*l/81.7%
metadata-eval81.7%
distribute-neg-frac81.7%
*-commutative81.7%
distribute-neg-frac81.7%
metadata-eval81.7%
Simplified81.7%
associate-*r/81.8%
associate-/l*81.7%
div-inv81.8%
metadata-eval81.8%
Applied egg-rr81.8%
if -9.2000000000000008e78 < y < -3.1e52 or 1.3200000000000001e-136 < y < 1.4499999999999999e55Initial program 97.4%
Simplified99.6%
Taylor expanded in x around inf 50.4%
if -3.1e52 < y < -3.6e22 or 4.8000000000000004e59 < y Initial program 97.8%
associate-*l*97.8%
*-commutative97.8%
Simplified97.8%
*-commutative97.8%
associate-*l*97.8%
associate-+l-97.8%
*-commutative97.8%
associate-/r*97.8%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 71.1%
if -3.6e22 < y < 1.3200000000000001e-136 or 1.4499999999999999e55 < y < 4.8000000000000004e59Initial program 83.4%
associate-*l*83.4%
*-commutative83.4%
Simplified83.4%
*-commutative83.4%
associate-*l*83.4%
associate-+l-83.4%
*-commutative83.4%
associate-/r*92.3%
sub-div93.2%
Applied egg-rr93.2%
Taylor expanded in y around 0 59.5%
*-commutative59.5%
associate-/r*67.8%
Simplified67.8%
Final simplification68.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* -0.3333333333333333 (/ y z))))
(if (<= y -9.2e+78)
(/ y (* z -3.0))
(if (<= y -1.95e+52)
x
(if (<= y -4.1e+22)
t_1
(if (<= y 1.32e-136)
(* 0.3333333333333333 (/ (/ t z) y))
(if (<= y 3.2e+57)
x
(if (<= y 5.4e+59)
(* 0.3333333333333333 (/ (/ t y) z))
t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = -0.3333333333333333 * (y / z);
double tmp;
if (y <= -9.2e+78) {
tmp = y / (z * -3.0);
} else if (y <= -1.95e+52) {
tmp = x;
} else if (y <= -4.1e+22) {
tmp = t_1;
} else if (y <= 1.32e-136) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 3.2e+57) {
tmp = x;
} else if (y <= 5.4e+59) {
tmp = 0.3333333333333333 * ((t / y) / z);
} 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 = (-0.3333333333333333d0) * (y / z)
if (y <= (-9.2d+78)) then
tmp = y / (z * (-3.0d0))
else if (y <= (-1.95d+52)) then
tmp = x
else if (y <= (-4.1d+22)) then
tmp = t_1
else if (y <= 1.32d-136) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
else if (y <= 3.2d+57) then
tmp = x
else if (y <= 5.4d+59) then
tmp = 0.3333333333333333d0 * ((t / y) / z)
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 = -0.3333333333333333 * (y / z);
double tmp;
if (y <= -9.2e+78) {
tmp = y / (z * -3.0);
} else if (y <= -1.95e+52) {
tmp = x;
} else if (y <= -4.1e+22) {
tmp = t_1;
} else if (y <= 1.32e-136) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 3.2e+57) {
tmp = x;
} else if (y <= 5.4e+59) {
tmp = 0.3333333333333333 * ((t / y) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -0.3333333333333333 * (y / z) tmp = 0 if y <= -9.2e+78: tmp = y / (z * -3.0) elif y <= -1.95e+52: tmp = x elif y <= -4.1e+22: tmp = t_1 elif y <= 1.32e-136: tmp = 0.3333333333333333 * ((t / z) / y) elif y <= 3.2e+57: tmp = x elif y <= 5.4e+59: tmp = 0.3333333333333333 * ((t / y) / z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(-0.3333333333333333 * Float64(y / z)) tmp = 0.0 if (y <= -9.2e+78) tmp = Float64(y / Float64(z * -3.0)); elseif (y <= -1.95e+52) tmp = x; elseif (y <= -4.1e+22) tmp = t_1; elseif (y <= 1.32e-136) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); elseif (y <= 3.2e+57) tmp = x; elseif (y <= 5.4e+59) tmp = Float64(0.3333333333333333 * Float64(Float64(t / y) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -0.3333333333333333 * (y / z); tmp = 0.0; if (y <= -9.2e+78) tmp = y / (z * -3.0); elseif (y <= -1.95e+52) tmp = x; elseif (y <= -4.1e+22) tmp = t_1; elseif (y <= 1.32e-136) tmp = 0.3333333333333333 * ((t / z) / y); elseif (y <= 3.2e+57) tmp = x; elseif (y <= 5.4e+59) tmp = 0.3333333333333333 * ((t / y) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.2e+78], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.95e+52], x, If[LessEqual[y, -4.1e+22], t$95$1, If[LessEqual[y, 1.32e-136], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e+57], x, If[LessEqual[y, 5.4e+59], N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{if}\;y \leq -9.2 \cdot 10^{+78}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq -1.95 \cdot 10^{+52}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -4.1 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.32 \cdot 10^{-136}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+57}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{+59}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.2000000000000008e78Initial program 97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
*-commutative97.9%
associate-*l*97.9%
associate-+l-97.9%
*-commutative97.9%
associate-/r*97.9%
sub-div99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 83.3%
metadata-eval83.3%
times-frac83.5%
*-commutative83.5%
neg-mul-183.5%
*-rgt-identity83.5%
times-frac83.3%
neg-sub083.3%
associate--r-83.3%
neg-sub083.3%
remove-double-neg83.3%
distribute-frac-neg83.3%
distribute-neg-in83.3%
+-commutative83.3%
distribute-neg-in83.3%
distribute-frac-neg83.3%
remove-double-neg83.3%
sub-neg83.3%
metadata-eval83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in t around 0 81.7%
associate-*r/81.8%
associate-*l/81.7%
metadata-eval81.7%
distribute-neg-frac81.7%
*-commutative81.7%
distribute-neg-frac81.7%
metadata-eval81.7%
Simplified81.7%
associate-*r/81.8%
associate-/l*81.7%
div-inv81.8%
metadata-eval81.8%
Applied egg-rr81.8%
if -9.2000000000000008e78 < y < -1.95e52 or 1.3200000000000001e-136 < y < 3.20000000000000029e57Initial program 97.4%
Simplified99.6%
Taylor expanded in x around inf 50.4%
if -1.95e52 < y < -4.09999999999999979e22 or 5.4000000000000002e59 < y Initial program 97.8%
associate-*l*97.8%
*-commutative97.8%
Simplified97.8%
*-commutative97.8%
associate-*l*97.8%
associate-+l-97.8%
*-commutative97.8%
associate-/r*97.8%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 71.1%
if -4.09999999999999979e22 < y < 1.3200000000000001e-136Initial program 84.8%
associate-*l*84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in z around 0 72.3%
Taylor expanded in t around inf 67.3%
*-commutative67.3%
associate-*l/67.2%
associate-/l/59.6%
associate-/r*72.3%
Applied egg-rr72.3%
if 3.20000000000000029e57 < y < 5.4000000000000002e59Initial program 3.0%
associate-*l*3.0%
*-commutative3.0%
Simplified3.0%
*-commutative3.0%
associate-*l*3.0%
associate-+l-3.0%
*-commutative3.0%
associate-/r*50.0%
sub-div100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 52.2%
*-commutative52.2%
associate-/r*99.2%
Simplified99.2%
Final simplification70.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.15e+79)
(/ y (* z -3.0))
(if (<= y -1.12e+52)
x
(if (or (<= y -3.45e+22) (not (<= y 4.05e+49)))
(* -0.3333333333333333 (/ y z))
(* 0.3333333333333333 (/ t (* z y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.15e+79) {
tmp = y / (z * -3.0);
} else if (y <= -1.12e+52) {
tmp = x;
} else if ((y <= -3.45e+22) || !(y <= 4.05e+49)) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = 0.3333333333333333 * (t / (z * 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.15d+79)) then
tmp = y / (z * (-3.0d0))
else if (y <= (-1.12d+52)) then
tmp = x
else if ((y <= (-3.45d+22)) .or. (.not. (y <= 4.05d+49))) then
tmp = (-0.3333333333333333d0) * (y / z)
else
tmp = 0.3333333333333333d0 * (t / (z * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.15e+79) {
tmp = y / (z * -3.0);
} else if (y <= -1.12e+52) {
tmp = x;
} else if ((y <= -3.45e+22) || !(y <= 4.05e+49)) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.15e+79: tmp = y / (z * -3.0) elif y <= -1.12e+52: tmp = x elif (y <= -3.45e+22) or not (y <= 4.05e+49): tmp = -0.3333333333333333 * (y / z) else: tmp = 0.3333333333333333 * (t / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.15e+79) tmp = Float64(y / Float64(z * -3.0)); elseif (y <= -1.12e+52) tmp = x; elseif ((y <= -3.45e+22) || !(y <= 4.05e+49)) tmp = Float64(-0.3333333333333333 * Float64(y / z)); else tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.15e+79) tmp = y / (z * -3.0); elseif (y <= -1.12e+52) tmp = x; elseif ((y <= -3.45e+22) || ~((y <= 4.05e+49))) tmp = -0.3333333333333333 * (y / z); else tmp = 0.3333333333333333 * (t / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.15e+79], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.12e+52], x, If[Or[LessEqual[y, -3.45e+22], N[Not[LessEqual[y, 4.05e+49]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+79}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq -1.12 \cdot 10^{+52}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -3.45 \cdot 10^{+22} \lor \neg \left(y \leq 4.05 \cdot 10^{+49}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -1.15e79Initial program 97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
*-commutative97.9%
associate-*l*97.9%
associate-+l-97.9%
*-commutative97.9%
associate-/r*97.9%
sub-div99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 83.3%
metadata-eval83.3%
times-frac83.5%
*-commutative83.5%
neg-mul-183.5%
*-rgt-identity83.5%
times-frac83.3%
neg-sub083.3%
associate--r-83.3%
neg-sub083.3%
remove-double-neg83.3%
distribute-frac-neg83.3%
distribute-neg-in83.3%
+-commutative83.3%
distribute-neg-in83.3%
distribute-frac-neg83.3%
remove-double-neg83.3%
sub-neg83.3%
metadata-eval83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in t around 0 81.7%
associate-*r/81.8%
associate-*l/81.7%
metadata-eval81.7%
distribute-neg-frac81.7%
*-commutative81.7%
distribute-neg-frac81.7%
metadata-eval81.7%
Simplified81.7%
associate-*r/81.8%
associate-/l*81.7%
div-inv81.8%
metadata-eval81.8%
Applied egg-rr81.8%
if -1.15e79 < y < -1.12000000000000002e52Initial program 100.0%
Simplified99.8%
Taylor expanded in x around inf 62.9%
if -1.12000000000000002e52 < y < -3.4499999999999999e22 or 4.04999999999999989e49 < y Initial program 94.6%
associate-*l*94.6%
*-commutative94.6%
Simplified94.6%
*-commutative94.6%
associate-*l*94.6%
associate-+l-94.6%
*-commutative94.6%
associate-/r*96.3%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 67.3%
if -3.4499999999999999e22 < y < 4.04999999999999989e49Initial program 87.0%
associate-*l*87.1%
*-commutative87.1%
Simplified87.1%
*-commutative87.1%
associate-*l*87.0%
associate-+l-87.0%
*-commutative87.0%
associate-/r*93.7%
sub-div94.4%
Applied egg-rr94.4%
Taylor expanded in y around 0 55.0%
*-commutative55.0%
Simplified55.0%
Final simplification63.4%
(FPCore (x y z t)
:precision binary64
(if (<= (* z 3.0) -2e+14)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= (* z 3.0) 2e-10)
(* 0.3333333333333333 (/ (- (/ t y) y) z))
(- x (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -2e+14) {
tmp = x - (0.3333333333333333 * (y / z));
} else if ((z * 3.0) <= 2e-10) {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
} else {
tmp = x - (y / (z * 3.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 ((z * 3.0d0) <= (-2d+14)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if ((z * 3.0d0) <= 2d-10) then
tmp = 0.3333333333333333d0 * (((t / y) - y) / z)
else
tmp = x - (y / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -2e+14) {
tmp = x - (0.3333333333333333 * (y / z));
} else if ((z * 3.0) <= 2e-10) {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -2e+14: tmp = x - (0.3333333333333333 * (y / z)) elif (z * 3.0) <= 2e-10: tmp = 0.3333333333333333 * (((t / y) - y) / z) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -2e+14) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (Float64(z * 3.0) <= 2e-10) tmp = Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z)); else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= -2e+14) tmp = x - (0.3333333333333333 * (y / z)); elseif ((z * 3.0) <= 2e-10) tmp = 0.3333333333333333 * (((t / y) - y) / z); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -2e+14], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], 2e-10], N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{+14}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;z \cdot 3 \leq 2 \cdot 10^{-10}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if (*.f64 z 3) < -2e14Initial program 98.2%
associate-*l*98.1%
*-commutative98.1%
Simplified98.1%
Taylor expanded in t around 0 77.6%
if -2e14 < (*.f64 z 3) < 2.00000000000000007e-10Initial program 84.5%
associate-*l*84.5%
*-commutative84.5%
Simplified84.5%
*-commutative84.5%
associate-*l*84.5%
associate-+l-84.5%
*-commutative84.5%
associate-/r*96.9%
sub-div99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 95.8%
metadata-eval95.8%
times-frac95.9%
*-commutative95.9%
neg-mul-195.9%
*-rgt-identity95.9%
times-frac95.8%
neg-sub095.8%
associate--r-95.8%
neg-sub095.8%
remove-double-neg95.8%
distribute-frac-neg95.8%
distribute-neg-in95.8%
+-commutative95.8%
distribute-neg-in95.8%
distribute-frac-neg95.8%
remove-double-neg95.8%
sub-neg95.8%
metadata-eval95.8%
*-commutative95.8%
Simplified95.8%
if 2.00000000000000007e-10 < (*.f64 z 3) Initial program 99.7%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
*-commutative99.8%
associate-*l*99.7%
associate-+l-99.7%
*-commutative99.7%
associate-/r*96.9%
sub-div97.0%
Applied egg-rr97.0%
Taylor expanded in y around inf 75.4%
Final simplification86.5%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) -2e+48) (+ (- x (/ y (* z 3.0))) (/ t (* z (* 3.0 y)))) (- x (/ (- y (/ t y)) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -2e+48) {
tmp = (x - (y / (z * 3.0))) + (t / (z * (3.0 * y)));
} else {
tmp = x - ((y - (t / y)) / (z * 3.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 ((z * 3.0d0) <= (-2d+48)) then
tmp = (x - (y / (z * 3.0d0))) + (t / (z * (3.0d0 * y)))
else
tmp = x - ((y - (t / y)) / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -2e+48) {
tmp = (x - (y / (z * 3.0))) + (t / (z * (3.0 * y)));
} else {
tmp = x - ((y - (t / y)) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -2e+48: tmp = (x - (y / (z * 3.0))) + (t / (z * (3.0 * y))) else: tmp = x - ((y - (t / y)) / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -2e+48) tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(z * Float64(3.0 * y)))); else tmp = Float64(x - Float64(Float64(y - Float64(t / y)) / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= -2e+48) tmp = (x - (y / (z * 3.0))) + (t / (z * (3.0 * y))); else tmp = x - ((y - (t / y)) / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -2e+48], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{+48}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{z \cdot \left(3 \cdot y\right)}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y - \frac{t}{y}}{z \cdot 3}\\
\end{array}
\end{array}
if (*.f64 z 3) < -2.00000000000000009e48Initial program 97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
if -2.00000000000000009e48 < (*.f64 z 3) Initial program 89.8%
associate-*l*89.8%
*-commutative89.8%
Simplified89.8%
*-commutative89.8%
associate-*l*89.8%
associate-+l-89.8%
*-commutative89.8%
associate-/r*97.0%
sub-div98.9%
Applied egg-rr98.9%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) -4e+34) (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))) (- x (/ (- y (/ t y)) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -4e+34) {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
} else {
tmp = x - ((y - (t / y)) / (z * 3.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 ((z * 3.0d0) <= (-4d+34)) then
tmp = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
else
tmp = x - ((y - (t / y)) / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -4e+34) {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
} else {
tmp = x - ((y - (t / y)) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -4e+34: tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)) else: tmp = x - ((y - (t / y)) / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -4e+34) tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))); else tmp = Float64(x - Float64(Float64(y - Float64(t / y)) / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= -4e+34) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); else tmp = x - ((y - (t / y)) / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -4e+34], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -4 \cdot 10^{+34}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y - \frac{t}{y}}{z \cdot 3}\\
\end{array}
\end{array}
if (*.f64 z 3) < -3.99999999999999978e34Initial program 98.1%
if -3.99999999999999978e34 < (*.f64 z 3) Initial program 89.6%
associate-*l*89.6%
*-commutative89.6%
Simplified89.6%
*-commutative89.6%
associate-*l*89.6%
associate-+l-89.6%
*-commutative89.6%
associate-/r*96.9%
sub-div98.9%
Applied egg-rr98.9%
Final simplification98.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.7e+23)
(- x (/ y (* z 3.0)))
(if (<= y 3.7e+49)
(+ x (* 0.3333333333333333 (/ t (* z y))))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.7e+23) {
tmp = x - (y / (z * 3.0));
} else if (y <= 3.7e+49) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x + (y * (-0.3333333333333333 / 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 <= (-5.7d+23)) then
tmp = x - (y / (z * 3.0d0))
else if (y <= 3.7d+49) then
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.7e+23) {
tmp = x - (y / (z * 3.0));
} else if (y <= 3.7e+49) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.7e+23: tmp = x - (y / (z * 3.0)) elif y <= 3.7e+49: tmp = x + (0.3333333333333333 * (t / (z * y))) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.7e+23) tmp = Float64(x - Float64(y / Float64(z * 3.0))); elseif (y <= 3.7e+49) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.7e+23) tmp = x - (y / (z * 3.0)); elseif (y <= 3.7e+49) tmp = x + (0.3333333333333333 * (t / (z * y))); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.7e+23], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e+49], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.7 \cdot 10^{+23}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+49}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -5.7e23Initial program 98.4%
associate-*l*98.4%
*-commutative98.4%
Simplified98.4%
*-commutative98.4%
associate-*l*98.4%
associate-+l-98.4%
*-commutative98.4%
associate-/r*98.4%
sub-div99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 95.6%
if -5.7e23 < y < 3.70000000000000018e49Initial program 87.1%
Simplified94.3%
Taylor expanded in t around inf 80.1%
if 3.70000000000000018e49 < y Initial program 94.0%
Simplified99.8%
Taylor expanded in t around 0 92.2%
*-commutative92.2%
associate-*l/92.2%
associate-*r/92.2%
Simplified92.2%
Final simplification86.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.6e+25)
(- x (/ y (* z 3.0)))
(if (<= y 4.8e+59)
(+ x (/ (/ 0.3333333333333333 y) (/ z t)))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.6e+25) {
tmp = x - (y / (z * 3.0));
} else if (y <= 4.8e+59) {
tmp = x + ((0.3333333333333333 / y) / (z / t));
} else {
tmp = x + (y * (-0.3333333333333333 / 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 <= (-5.6d+25)) then
tmp = x - (y / (z * 3.0d0))
else if (y <= 4.8d+59) then
tmp = x + ((0.3333333333333333d0 / y) / (z / t))
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.6e+25) {
tmp = x - (y / (z * 3.0));
} else if (y <= 4.8e+59) {
tmp = x + ((0.3333333333333333 / y) / (z / t));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.6e+25: tmp = x - (y / (z * 3.0)) elif y <= 4.8e+59: tmp = x + ((0.3333333333333333 / y) / (z / t)) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.6e+25) tmp = Float64(x - Float64(y / Float64(z * 3.0))); elseif (y <= 4.8e+59) tmp = Float64(x + Float64(Float64(0.3333333333333333 / y) / Float64(z / t))); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.6e+25) tmp = x - (y / (z * 3.0)); elseif (y <= 4.8e+59) tmp = x + ((0.3333333333333333 / y) / (z / t)); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.6e+25], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e+59], N[(x + N[(N[(0.3333333333333333 / y), $MachinePrecision] / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{+25}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+59}:\\
\;\;\;\;x + \frac{\frac{0.3333333333333333}{y}}{\frac{z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -5.6000000000000003e25Initial program 98.4%
associate-*l*98.4%
*-commutative98.4%
Simplified98.4%
*-commutative98.4%
associate-*l*98.4%
associate-+l-98.4%
*-commutative98.4%
associate-/r*98.4%
sub-div99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 95.6%
if -5.6000000000000003e25 < y < 4.8000000000000004e59Initial program 86.3%
Simplified94.5%
Taylor expanded in t around inf 78.9%
associate-*r/78.9%
times-frac89.8%
metadata-eval89.8%
associate-/r*89.8%
associate-/l/89.8%
associate-/r*89.8%
associate-*l/89.8%
*-commutative89.8%
*-lft-identity89.8%
associate-/r*89.8%
Simplified89.8%
clear-num89.8%
inv-pow89.8%
div-inv89.8%
clear-num89.8%
div-inv89.7%
clear-num89.8%
Applied egg-rr89.8%
unpow-189.8%
associate-*r*89.8%
associate-/r*89.7%
*-commutative89.7%
associate-/r*89.8%
metadata-eval89.8%
Simplified89.8%
if 4.8000000000000004e59 < y Initial program 97.5%
Simplified99.8%
Taylor expanded in t around 0 95.5%
*-commutative95.5%
associate-*l/95.5%
associate-*r/95.5%
Simplified95.5%
Final simplification92.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.1e+25)
(- x (/ y (* z 3.0)))
(if (<= y 4.8e+59)
(+ x (/ (/ (/ t z) 3.0) y))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.1e+25) {
tmp = x - (y / (z * 3.0));
} else if (y <= 4.8e+59) {
tmp = x + (((t / z) / 3.0) / y);
} else {
tmp = x + (y * (-0.3333333333333333 / 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.1d+25)) then
tmp = x - (y / (z * 3.0d0))
else if (y <= 4.8d+59) then
tmp = x + (((t / z) / 3.0d0) / y)
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.1e+25) {
tmp = x - (y / (z * 3.0));
} else if (y <= 4.8e+59) {
tmp = x + (((t / z) / 3.0) / y);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.1e+25: tmp = x - (y / (z * 3.0)) elif y <= 4.8e+59: tmp = x + (((t / z) / 3.0) / y) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.1e+25) tmp = Float64(x - Float64(y / Float64(z * 3.0))); elseif (y <= 4.8e+59) tmp = Float64(x + Float64(Float64(Float64(t / z) / 3.0) / y)); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.1e+25) tmp = x - (y / (z * 3.0)); elseif (y <= 4.8e+59) tmp = x + (((t / z) / 3.0) / y); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.1e+25], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e+59], N[(x + N[(N[(N[(t / z), $MachinePrecision] / 3.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{+25}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+59}:\\
\;\;\;\;x + \frac{\frac{\frac{t}{z}}{3}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -2.0999999999999999e25Initial program 98.4%
associate-*l*98.4%
*-commutative98.4%
Simplified98.4%
*-commutative98.4%
associate-*l*98.4%
associate-+l-98.4%
*-commutative98.4%
associate-/r*98.4%
sub-div99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 95.6%
if -2.0999999999999999e25 < y < 4.8000000000000004e59Initial program 86.3%
Simplified94.5%
Taylor expanded in t around inf 78.9%
associate-*r/78.9%
times-frac89.8%
metadata-eval89.8%
associate-/r*89.8%
associate-/l/89.8%
associate-/r*89.8%
associate-*l/89.8%
*-commutative89.8%
*-lft-identity89.8%
associate-/r*89.8%
Simplified89.8%
if 4.8000000000000004e59 < y Initial program 97.5%
Simplified99.8%
Taylor expanded in t around 0 95.5%
*-commutative95.5%
associate-*l/95.5%
associate-*r/95.5%
Simplified95.5%
Final simplification92.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.9e-63) (not (<= y 1.32e-136))) (+ x (* y (/ -0.3333333333333333 z))) (* 0.3333333333333333 (/ (/ t z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.9e-63) || !(y <= 1.32e-136)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * ((t / z) / 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 <= (-3.9d-63)) .or. (.not. (y <= 1.32d-136))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = 0.3333333333333333d0 * ((t / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.9e-63) || !(y <= 1.32e-136)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * ((t / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.9e-63) or not (y <= 1.32e-136): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = 0.3333333333333333 * ((t / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.9e-63) || !(y <= 1.32e-136)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.9e-63) || ~((y <= 1.32e-136))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = 0.3333333333333333 * ((t / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.9e-63], N[Not[LessEqual[y, 1.32e-136]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{-63} \lor \neg \left(y \leq 1.32 \cdot 10^{-136}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -3.90000000000000022e-63 or 1.3200000000000001e-136 < y Initial program 96.8%
Simplified99.7%
Taylor expanded in t around 0 85.8%
*-commutative85.8%
associate-*l/85.8%
associate-*r/85.7%
Simplified85.7%
if -3.90000000000000022e-63 < y < 1.3200000000000001e-136Initial program 81.7%
associate-*l*81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in z around 0 73.0%
Taylor expanded in t around inf 72.0%
*-commutative72.0%
associate-*l/72.0%
associate-/l/62.8%
associate-/r*78.1%
Applied egg-rr78.1%
Final simplification83.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.25e-65) (not (<= y 1.3e-136))) (- x (/ y (* z 3.0))) (* 0.3333333333333333 (/ (/ t z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.25e-65) || !(y <= 1.3e-136)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = 0.3333333333333333 * ((t / z) / 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.25d-65)) .or. (.not. (y <= 1.3d-136))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = 0.3333333333333333d0 * ((t / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.25e-65) || !(y <= 1.3e-136)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = 0.3333333333333333 * ((t / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.25e-65) or not (y <= 1.3e-136): tmp = x - (y / (z * 3.0)) else: tmp = 0.3333333333333333 * ((t / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.25e-65) || !(y <= 1.3e-136)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.25e-65) || ~((y <= 1.3e-136))) tmp = x - (y / (z * 3.0)); else tmp = 0.3333333333333333 * ((t / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.25e-65], N[Not[LessEqual[y, 1.3e-136]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{-65} \lor \neg \left(y \leq 1.3 \cdot 10^{-136}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -1.24999999999999996e-65 or 1.29999999999999998e-136 < y Initial program 96.8%
associate-*l*96.8%
*-commutative96.8%
Simplified96.8%
*-commutative96.8%
associate-*l*96.8%
associate-+l-96.8%
*-commutative96.8%
associate-/r*97.4%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 85.8%
if -1.24999999999999996e-65 < y < 1.29999999999999998e-136Initial program 81.7%
associate-*l*81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in z around 0 73.0%
Taylor expanded in t around inf 72.0%
*-commutative72.0%
associate-*l/72.0%
associate-/l/62.8%
associate-/r*78.1%
Applied egg-rr78.1%
Final simplification83.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -3e-65)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 2.55e-138)
(* 0.3333333333333333 (/ (/ t z) y))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3e-65) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 2.55e-138) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else {
tmp = x + (y * (-0.3333333333333333 / 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 <= (-3d-65)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 2.55d-138) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3e-65) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 2.55e-138) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3e-65: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 2.55e-138: tmp = 0.3333333333333333 * ((t / z) / y) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3e-65) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 2.55e-138) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3e-65) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 2.55e-138) tmp = 0.3333333333333333 * ((t / z) / y); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3e-65], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.55e-138], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{-65}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 2.55 \cdot 10^{-138}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -2.99999999999999998e-65Initial program 98.7%
associate-*l*98.7%
*-commutative98.7%
Simplified98.7%
Taylor expanded in t around 0 88.4%
if -2.99999999999999998e-65 < y < 2.5500000000000001e-138Initial program 81.7%
associate-*l*81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in z around 0 73.0%
Taylor expanded in t around inf 72.0%
*-commutative72.0%
associate-*l/72.0%
associate-/l/62.8%
associate-/r*78.1%
Applied egg-rr78.1%
if 2.5500000000000001e-138 < y Initial program 94.7%
Simplified99.7%
Taylor expanded in t around 0 82.9%
*-commutative82.9%
associate-*l/82.9%
associate-*r/82.9%
Simplified82.9%
Final simplification83.0%
(FPCore (x y z t) :precision binary64 (if (<= x -2.6e+67) x (if (<= x 5.6e+64) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.6e+67) {
tmp = x;
} else if (x <= 5.6e+64) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-2.6d+67)) then
tmp = x
else if (x <= 5.6d+64) then
tmp = (-0.3333333333333333d0) * (y / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.6e+67) {
tmp = x;
} else if (x <= 5.6e+64) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -2.6e+67: tmp = x elif x <= 5.6e+64: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -2.6e+67) tmp = x; elseif (x <= 5.6e+64) tmp = Float64(-0.3333333333333333 * Float64(y / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -2.6e+67) tmp = x; elseif (x <= 5.6e+64) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -2.6e+67], x, If[LessEqual[x, 5.6e+64], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.6 \cdot 10^{+67}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 5.6 \cdot 10^{+64}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.6e67 or 5.60000000000000047e64 < x Initial program 94.5%
Simplified97.7%
Taylor expanded in x around inf 60.1%
if -2.6e67 < x < 5.60000000000000047e64Initial program 89.9%
associate-*l*89.9%
*-commutative89.9%
Simplified89.9%
*-commutative89.9%
associate-*l*89.9%
associate-+l-89.9%
*-commutative89.9%
associate-/r*94.2%
sub-div96.5%
Applied egg-rr96.5%
Taylor expanded in y around inf 45.9%
Final simplification50.5%
(FPCore (x y z t) :precision binary64 (if (<= x -1.75e+69) x (if (<= x 9.5e+62) (/ y (* z -3.0)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.75e+69) {
tmp = x;
} else if (x <= 9.5e+62) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
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.75d+69)) then
tmp = x
else if (x <= 9.5d+62) then
tmp = y / (z * (-3.0d0))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.75e+69) {
tmp = x;
} else if (x <= 9.5e+62) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.75e+69: tmp = x elif x <= 9.5e+62: tmp = y / (z * -3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.75e+69) tmp = x; elseif (x <= 9.5e+62) tmp = Float64(y / Float64(z * -3.0)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.75e+69) tmp = x; elseif (x <= 9.5e+62) tmp = y / (z * -3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.75e+69], x, If[LessEqual[x, 9.5e+62], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{+69}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+62}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.74999999999999994e69 or 9.5000000000000003e62 < x Initial program 94.5%
Simplified97.7%
Taylor expanded in x around inf 60.1%
if -1.74999999999999994e69 < x < 9.5000000000000003e62Initial program 89.9%
associate-*l*89.9%
*-commutative89.9%
Simplified89.9%
*-commutative89.9%
associate-*l*89.9%
associate-+l-89.9%
*-commutative89.9%
associate-/r*94.2%
sub-div96.5%
Applied egg-rr96.5%
Taylor expanded in x around 0 87.1%
metadata-eval87.1%
times-frac87.2%
*-commutative87.2%
neg-mul-187.2%
*-rgt-identity87.2%
times-frac87.1%
neg-sub087.1%
associate--r-87.1%
neg-sub087.1%
remove-double-neg87.1%
distribute-frac-neg87.1%
distribute-neg-in87.1%
+-commutative87.1%
distribute-neg-in87.1%
distribute-frac-neg87.1%
remove-double-neg87.1%
sub-neg87.1%
metadata-eval87.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in t around 0 45.9%
associate-*r/45.9%
associate-*l/45.8%
metadata-eval45.8%
distribute-neg-frac45.8%
*-commutative45.8%
distribute-neg-frac45.8%
metadata-eval45.8%
Simplified45.8%
associate-*r/45.9%
associate-/l*45.8%
div-inv45.9%
metadata-eval45.9%
Applied egg-rr45.9%
Final simplification50.5%
(FPCore (x y z t) :precision binary64 (+ x (* (/ 0.3333333333333333 z) (- (/ t y) y))))
double code(double x, double y, double z, double t) {
return x + ((0.3333333333333333 / z) * ((t / y) - y));
}
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 + ((0.3333333333333333d0 / z) * ((t / y) - y))
end function
public static double code(double x, double y, double z, double t) {
return x + ((0.3333333333333333 / z) * ((t / y) - y));
}
def code(x, y, z, t): return x + ((0.3333333333333333 / z) * ((t / y) - y))
function code(x, y, z, t) return Float64(x + Float64(Float64(0.3333333333333333 / z) * Float64(Float64(t / y) - y))) end
function tmp = code(x, y, z, t) tmp = x + ((0.3333333333333333 / z) * ((t / y) - y)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)
\end{array}
Initial program 91.4%
Simplified96.8%
Final simplification96.8%
(FPCore (x y z t) :precision binary64 (- x (/ (- y (/ t y)) (* z 3.0))))
double code(double x, double y, double z, double t) {
return x - ((y - (t / y)) / (z * 3.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 - (t / y)) / (z * 3.0d0))
end function
public static double code(double x, double y, double z, double t) {
return x - ((y - (t / y)) / (z * 3.0));
}
def code(x, y, z, t): return x - ((y - (t / y)) / (z * 3.0))
function code(x, y, z, t) return Float64(x - Float64(Float64(y - Float64(t / y)) / Float64(z * 3.0))) end
function tmp = code(x, y, z, t) tmp = x - ((y - (t / y)) / (z * 3.0)); end
code[x_, y_, z_, t_] := N[(x - N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - \frac{t}{y}}{z \cdot 3}
\end{array}
Initial program 91.4%
associate-*l*91.4%
*-commutative91.4%
Simplified91.4%
*-commutative91.4%
associate-*l*91.4%
associate-+l-91.4%
*-commutative91.4%
associate-/r*95.3%
sub-div96.9%
Applied egg-rr96.9%
Final simplification96.9%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 91.4%
Simplified96.8%
Taylor expanded in x around inf 27.2%
Final simplification27.2%
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y)))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
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 * 3.0d0))) + ((t / (z * 3.0d0)) / y)
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y)
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(Float64(t / Float64(z * 3.0)) / y)) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y}
\end{array}
herbie shell --seed 2024026
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))