
(FPCore (x y z t) :precision binary64 (+ x (/ (* y (- z x)) t)))
double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y * (z - x)) / t)
end function
public static double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
def code(x, y, z, t): return x + ((y * (z - x)) / t)
function code(x, y, z, t) return Float64(x + Float64(Float64(y * Float64(z - x)) / t)) end
function tmp = code(x, y, z, t) tmp = x + ((y * (z - x)) / t); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - x\right)}{t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (/ (* y (- z x)) t)))
double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y * (z - x)) / t)
end function
public static double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
def code(x, y, z, t): return x + ((y * (z - x)) / t)
function code(x, y, z, t) return Float64(x + Float64(Float64(y * Float64(z - x)) / t)) end
function tmp = code(x, y, z, t) tmp = x + ((y * (z - x)) / t); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - x\right)}{t}
\end{array}
(FPCore (x y z t) :precision binary64 (+ x (* (/ y t) (- z x))))
double code(double x, double y, double z, double t) {
return x + ((y / t) * (z - 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 + ((y / t) * (z - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y / t) * (z - x));
}
def code(x, y, z, t): return x + ((y / t) * (z - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y / t) * Float64(z - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y / t) * (z - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y / t), $MachinePrecision] * N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{t} \cdot \left(z - x\right)
\end{array}
Initial program 94.3%
associate-*l/98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ (- y) t))) (t_2 (/ z (/ t y))))
(if (<= z -7.5e+64)
t_2
(if (<= z -5e-217)
x
(if (<= z -1.18e-259)
t_1
(if (<= z -2.2e-303)
x
(if (<= z 1.8e-241)
t_1
(if (<= z 1.85e-30)
x
(if (<= z 2.5e+17)
(* y (/ z t))
(if (<= z 5e+104) x t_2))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (-y / t);
double t_2 = z / (t / y);
double tmp;
if (z <= -7.5e+64) {
tmp = t_2;
} else if (z <= -5e-217) {
tmp = x;
} else if (z <= -1.18e-259) {
tmp = t_1;
} else if (z <= -2.2e-303) {
tmp = x;
} else if (z <= 1.8e-241) {
tmp = t_1;
} else if (z <= 1.85e-30) {
tmp = x;
} else if (z <= 2.5e+17) {
tmp = y * (z / t);
} else if (z <= 5e+104) {
tmp = x;
} else {
tmp = t_2;
}
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 = x * (-y / t)
t_2 = z / (t / y)
if (z <= (-7.5d+64)) then
tmp = t_2
else if (z <= (-5d-217)) then
tmp = x
else if (z <= (-1.18d-259)) then
tmp = t_1
else if (z <= (-2.2d-303)) then
tmp = x
else if (z <= 1.8d-241) then
tmp = t_1
else if (z <= 1.85d-30) then
tmp = x
else if (z <= 2.5d+17) then
tmp = y * (z / t)
else if (z <= 5d+104) then
tmp = x
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (-y / t);
double t_2 = z / (t / y);
double tmp;
if (z <= -7.5e+64) {
tmp = t_2;
} else if (z <= -5e-217) {
tmp = x;
} else if (z <= -1.18e-259) {
tmp = t_1;
} else if (z <= -2.2e-303) {
tmp = x;
} else if (z <= 1.8e-241) {
tmp = t_1;
} else if (z <= 1.85e-30) {
tmp = x;
} else if (z <= 2.5e+17) {
tmp = y * (z / t);
} else if (z <= 5e+104) {
tmp = x;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (-y / t) t_2 = z / (t / y) tmp = 0 if z <= -7.5e+64: tmp = t_2 elif z <= -5e-217: tmp = x elif z <= -1.18e-259: tmp = t_1 elif z <= -2.2e-303: tmp = x elif z <= 1.8e-241: tmp = t_1 elif z <= 1.85e-30: tmp = x elif z <= 2.5e+17: tmp = y * (z / t) elif z <= 5e+104: tmp = x else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(-y) / t)) t_2 = Float64(z / Float64(t / y)) tmp = 0.0 if (z <= -7.5e+64) tmp = t_2; elseif (z <= -5e-217) tmp = x; elseif (z <= -1.18e-259) tmp = t_1; elseif (z <= -2.2e-303) tmp = x; elseif (z <= 1.8e-241) tmp = t_1; elseif (z <= 1.85e-30) tmp = x; elseif (z <= 2.5e+17) tmp = Float64(y * Float64(z / t)); elseif (z <= 5e+104) tmp = x; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (-y / t); t_2 = z / (t / y); tmp = 0.0; if (z <= -7.5e+64) tmp = t_2; elseif (z <= -5e-217) tmp = x; elseif (z <= -1.18e-259) tmp = t_1; elseif (z <= -2.2e-303) tmp = x; elseif (z <= 1.8e-241) tmp = t_1; elseif (z <= 1.85e-30) tmp = x; elseif (z <= 2.5e+17) tmp = y * (z / t); elseif (z <= 5e+104) tmp = x; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[((-y) / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e+64], t$95$2, If[LessEqual[z, -5e-217], x, If[LessEqual[z, -1.18e-259], t$95$1, If[LessEqual[z, -2.2e-303], x, If[LessEqual[z, 1.8e-241], t$95$1, If[LessEqual[z, 1.85e-30], x, If[LessEqual[z, 2.5e+17], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+104], x, t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{-y}{t}\\
t_2 := \frac{z}{\frac{t}{y}}\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{+64}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-217}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.18 \cdot 10^{-259}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-303}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-241}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-30}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+17}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+104}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -7.5000000000000005e64 or 4.9999999999999997e104 < z Initial program 92.2%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 67.4%
Taylor expanded in z around inf 67.6%
*-commutative67.6%
associate-/r/75.1%
Applied egg-rr75.1%
if -7.5000000000000005e64 < z < -5.0000000000000002e-217 or -1.18e-259 < z < -2.20000000000000014e-303 or 1.7999999999999999e-241 < z < 1.8500000000000002e-30 or 2.5e17 < z < 4.9999999999999997e104Initial program 94.1%
associate-*l/99.2%
Simplified99.2%
Taylor expanded in y around 0 60.6%
if -5.0000000000000002e-217 < z < -1.18e-259 or -2.20000000000000014e-303 < z < 1.7999999999999999e-241Initial program 99.6%
associate-*l/93.2%
Simplified93.2%
Taylor expanded in x around inf 93.1%
mul-1-neg93.1%
unsub-neg93.1%
Simplified93.1%
Taylor expanded in y around inf 66.5%
associate-*r/66.5%
neg-mul-166.5%
Simplified66.5%
if 1.8500000000000002e-30 < z < 2.5e17Initial program 99.4%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in y around inf 99.8%
Taylor expanded in z around inf 70.0%
Final simplification66.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ z (/ t y))))
(if (<= z -9.6e+63)
t_1
(if (<= z -2.7e-234)
x
(if (<= z -8.5e-260)
(* y (/ (- x) t))
(if (<= z -5.2e-303)
x
(if (<= z 8.6e-242)
(* x (/ (- y) t))
(if (<= z 2.05e-28)
x
(if (<= z 1.15e+18)
(* y (/ z t))
(if (<= z 3.6e+104) x t_1))))))))))
double code(double x, double y, double z, double t) {
double t_1 = z / (t / y);
double tmp;
if (z <= -9.6e+63) {
tmp = t_1;
} else if (z <= -2.7e-234) {
tmp = x;
} else if (z <= -8.5e-260) {
tmp = y * (-x / t);
} else if (z <= -5.2e-303) {
tmp = x;
} else if (z <= 8.6e-242) {
tmp = x * (-y / t);
} else if (z <= 2.05e-28) {
tmp = x;
} else if (z <= 1.15e+18) {
tmp = y * (z / t);
} else if (z <= 3.6e+104) {
tmp = x;
} 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 = z / (t / y)
if (z <= (-9.6d+63)) then
tmp = t_1
else if (z <= (-2.7d-234)) then
tmp = x
else if (z <= (-8.5d-260)) then
tmp = y * (-x / t)
else if (z <= (-5.2d-303)) then
tmp = x
else if (z <= 8.6d-242) then
tmp = x * (-y / t)
else if (z <= 2.05d-28) then
tmp = x
else if (z <= 1.15d+18) then
tmp = y * (z / t)
else if (z <= 3.6d+104) then
tmp = x
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 = z / (t / y);
double tmp;
if (z <= -9.6e+63) {
tmp = t_1;
} else if (z <= -2.7e-234) {
tmp = x;
} else if (z <= -8.5e-260) {
tmp = y * (-x / t);
} else if (z <= -5.2e-303) {
tmp = x;
} else if (z <= 8.6e-242) {
tmp = x * (-y / t);
} else if (z <= 2.05e-28) {
tmp = x;
} else if (z <= 1.15e+18) {
tmp = y * (z / t);
} else if (z <= 3.6e+104) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z / (t / y) tmp = 0 if z <= -9.6e+63: tmp = t_1 elif z <= -2.7e-234: tmp = x elif z <= -8.5e-260: tmp = y * (-x / t) elif z <= -5.2e-303: tmp = x elif z <= 8.6e-242: tmp = x * (-y / t) elif z <= 2.05e-28: tmp = x elif z <= 1.15e+18: tmp = y * (z / t) elif z <= 3.6e+104: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z / Float64(t / y)) tmp = 0.0 if (z <= -9.6e+63) tmp = t_1; elseif (z <= -2.7e-234) tmp = x; elseif (z <= -8.5e-260) tmp = Float64(y * Float64(Float64(-x) / t)); elseif (z <= -5.2e-303) tmp = x; elseif (z <= 8.6e-242) tmp = Float64(x * Float64(Float64(-y) / t)); elseif (z <= 2.05e-28) tmp = x; elseif (z <= 1.15e+18) tmp = Float64(y * Float64(z / t)); elseif (z <= 3.6e+104) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z / (t / y); tmp = 0.0; if (z <= -9.6e+63) tmp = t_1; elseif (z <= -2.7e-234) tmp = x; elseif (z <= -8.5e-260) tmp = y * (-x / t); elseif (z <= -5.2e-303) tmp = x; elseif (z <= 8.6e-242) tmp = x * (-y / t); elseif (z <= 2.05e-28) tmp = x; elseif (z <= 1.15e+18) tmp = y * (z / t); elseif (z <= 3.6e+104) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.6e+63], t$95$1, If[LessEqual[z, -2.7e-234], x, If[LessEqual[z, -8.5e-260], N[(y * N[((-x) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.2e-303], x, If[LessEqual[z, 8.6e-242], N[(x * N[((-y) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e-28], x, If[LessEqual[z, 1.15e+18], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+104], x, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{\frac{t}{y}}\\
\mathbf{if}\;z \leq -9.6 \cdot 10^{+63}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-234}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-260}:\\
\;\;\;\;y \cdot \frac{-x}{t}\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-303}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 8.6 \cdot 10^{-242}:\\
\;\;\;\;x \cdot \frac{-y}{t}\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{-28}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+18}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+104}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -9.6e63 or 3.60000000000000001e104 < z Initial program 92.2%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 67.4%
Taylor expanded in z around inf 67.6%
*-commutative67.6%
associate-/r/75.1%
Applied egg-rr75.1%
if -9.6e63 < z < -2.7000000000000002e-234 or -8.5000000000000003e-260 < z < -5.20000000000000009e-303 or 8.6000000000000004e-242 < z < 2.0500000000000001e-28 or 1.15e18 < z < 3.60000000000000001e104Initial program 94.4%
associate-*l/98.5%
Simplified98.5%
Taylor expanded in y around 0 59.1%
if -2.7000000000000002e-234 < z < -8.5000000000000003e-260Initial program 100.0%
associate-*l/84.2%
Simplified84.2%
Taylor expanded in y around inf 99.2%
Taylor expanded in z around 0 99.2%
mul-1-neg99.2%
distribute-frac-neg99.2%
Simplified99.2%
if -5.20000000000000009e-303 < z < 8.6000000000000004e-242Initial program 99.7%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in x around inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in y around inf 72.3%
associate-*r/72.3%
neg-mul-172.3%
Simplified72.3%
if 2.0500000000000001e-28 < z < 1.15e18Initial program 99.4%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in y around inf 99.8%
Taylor expanded in z around inf 70.0%
Final simplification66.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ z (/ t y))))
(if (<= z -1.1e+59)
t_1
(if (<= z -2.6e-234)
x
(if (<= z -1.85e-259)
(/ y (- (/ t x)))
(if (<= z -5.5e-303)
x
(if (<= z 2.5e-240)
(* x (/ (- y) t))
(if (<= z 3.2e-28)
x
(if (<= z 3.4e+18)
(* y (/ z t))
(if (<= z 5.5e+104) x t_1))))))))))
double code(double x, double y, double z, double t) {
double t_1 = z / (t / y);
double tmp;
if (z <= -1.1e+59) {
tmp = t_1;
} else if (z <= -2.6e-234) {
tmp = x;
} else if (z <= -1.85e-259) {
tmp = y / -(t / x);
} else if (z <= -5.5e-303) {
tmp = x;
} else if (z <= 2.5e-240) {
tmp = x * (-y / t);
} else if (z <= 3.2e-28) {
tmp = x;
} else if (z <= 3.4e+18) {
tmp = y * (z / t);
} else if (z <= 5.5e+104) {
tmp = x;
} 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 = z / (t / y)
if (z <= (-1.1d+59)) then
tmp = t_1
else if (z <= (-2.6d-234)) then
tmp = x
else if (z <= (-1.85d-259)) then
tmp = y / -(t / x)
else if (z <= (-5.5d-303)) then
tmp = x
else if (z <= 2.5d-240) then
tmp = x * (-y / t)
else if (z <= 3.2d-28) then
tmp = x
else if (z <= 3.4d+18) then
tmp = y * (z / t)
else if (z <= 5.5d+104) then
tmp = x
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 = z / (t / y);
double tmp;
if (z <= -1.1e+59) {
tmp = t_1;
} else if (z <= -2.6e-234) {
tmp = x;
} else if (z <= -1.85e-259) {
tmp = y / -(t / x);
} else if (z <= -5.5e-303) {
tmp = x;
} else if (z <= 2.5e-240) {
tmp = x * (-y / t);
} else if (z <= 3.2e-28) {
tmp = x;
} else if (z <= 3.4e+18) {
tmp = y * (z / t);
} else if (z <= 5.5e+104) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z / (t / y) tmp = 0 if z <= -1.1e+59: tmp = t_1 elif z <= -2.6e-234: tmp = x elif z <= -1.85e-259: tmp = y / -(t / x) elif z <= -5.5e-303: tmp = x elif z <= 2.5e-240: tmp = x * (-y / t) elif z <= 3.2e-28: tmp = x elif z <= 3.4e+18: tmp = y * (z / t) elif z <= 5.5e+104: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z / Float64(t / y)) tmp = 0.0 if (z <= -1.1e+59) tmp = t_1; elseif (z <= -2.6e-234) tmp = x; elseif (z <= -1.85e-259) tmp = Float64(y / Float64(-Float64(t / x))); elseif (z <= -5.5e-303) tmp = x; elseif (z <= 2.5e-240) tmp = Float64(x * Float64(Float64(-y) / t)); elseif (z <= 3.2e-28) tmp = x; elseif (z <= 3.4e+18) tmp = Float64(y * Float64(z / t)); elseif (z <= 5.5e+104) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z / (t / y); tmp = 0.0; if (z <= -1.1e+59) tmp = t_1; elseif (z <= -2.6e-234) tmp = x; elseif (z <= -1.85e-259) tmp = y / -(t / x); elseif (z <= -5.5e-303) tmp = x; elseif (z <= 2.5e-240) tmp = x * (-y / t); elseif (z <= 3.2e-28) tmp = x; elseif (z <= 3.4e+18) tmp = y * (z / t); elseif (z <= 5.5e+104) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+59], t$95$1, If[LessEqual[z, -2.6e-234], x, If[LessEqual[z, -1.85e-259], N[(y / (-N[(t / x), $MachinePrecision])), $MachinePrecision], If[LessEqual[z, -5.5e-303], x, If[LessEqual[z, 2.5e-240], N[(x * N[((-y) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e-28], x, If[LessEqual[z, 3.4e+18], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e+104], x, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{\frac{t}{y}}\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+59}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-234}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{-259}:\\
\;\;\;\;\frac{y}{-\frac{t}{x}}\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-303}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-240}:\\
\;\;\;\;x \cdot \frac{-y}{t}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-28}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+18}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+104}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.1e59 or 5.50000000000000017e104 < z Initial program 92.2%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 67.4%
Taylor expanded in z around inf 67.6%
*-commutative67.6%
associate-/r/75.1%
Applied egg-rr75.1%
if -1.1e59 < z < -2.59999999999999989e-234 or -1.84999999999999996e-259 < z < -5.50000000000000018e-303 or 2.5000000000000002e-240 < z < 3.19999999999999982e-28 or 3.4e18 < z < 5.50000000000000017e104Initial program 94.4%
associate-*l/98.5%
Simplified98.5%
Taylor expanded in y around 0 59.1%
if -2.59999999999999989e-234 < z < -1.84999999999999996e-259Initial program 100.0%
associate-*l/84.2%
Simplified84.2%
Taylor expanded in x around inf 84.2%
mul-1-neg84.2%
unsub-neg84.2%
Simplified84.2%
Taylor expanded in y around inf 84.2%
associate-*r/84.2%
neg-mul-184.2%
Simplified84.2%
*-commutative84.2%
frac-2neg84.2%
remove-double-neg84.2%
associate-*l/100.0%
Applied egg-rr100.0%
neg-mul-1100.0%
times-frac99.2%
Applied egg-rr99.2%
*-commutative99.2%
times-frac100.0%
*-commutative100.0%
associate-/l*99.7%
*-commutative99.7%
neg-mul-199.7%
Simplified99.7%
if -5.50000000000000018e-303 < z < 2.5000000000000002e-240Initial program 99.7%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in x around inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in y around inf 72.3%
associate-*r/72.3%
neg-mul-172.3%
Simplified72.3%
if 3.19999999999999982e-28 < z < 3.4e18Initial program 99.4%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in y around inf 99.8%
Taylor expanded in z around inf 70.0%
Final simplification66.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ z (/ t y))))
(if (<= z -7.2e+59)
t_1
(if (<= z -1.8e-215)
x
(if (<= z -1.6e-259)
(/ (* x y) (- t))
(if (<= z -6e-304)
x
(if (<= z 1.2e-239)
(* x (/ (- y) t))
(if (<= z 2.5e-28)
x
(if (<= z 4.3e+17)
(* y (/ z t))
(if (<= z 7e+104) x t_1))))))))))
double code(double x, double y, double z, double t) {
double t_1 = z / (t / y);
double tmp;
if (z <= -7.2e+59) {
tmp = t_1;
} else if (z <= -1.8e-215) {
tmp = x;
} else if (z <= -1.6e-259) {
tmp = (x * y) / -t;
} else if (z <= -6e-304) {
tmp = x;
} else if (z <= 1.2e-239) {
tmp = x * (-y / t);
} else if (z <= 2.5e-28) {
tmp = x;
} else if (z <= 4.3e+17) {
tmp = y * (z / t);
} else if (z <= 7e+104) {
tmp = x;
} 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 = z / (t / y)
if (z <= (-7.2d+59)) then
tmp = t_1
else if (z <= (-1.8d-215)) then
tmp = x
else if (z <= (-1.6d-259)) then
tmp = (x * y) / -t
else if (z <= (-6d-304)) then
tmp = x
else if (z <= 1.2d-239) then
tmp = x * (-y / t)
else if (z <= 2.5d-28) then
tmp = x
else if (z <= 4.3d+17) then
tmp = y * (z / t)
else if (z <= 7d+104) then
tmp = x
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 = z / (t / y);
double tmp;
if (z <= -7.2e+59) {
tmp = t_1;
} else if (z <= -1.8e-215) {
tmp = x;
} else if (z <= -1.6e-259) {
tmp = (x * y) / -t;
} else if (z <= -6e-304) {
tmp = x;
} else if (z <= 1.2e-239) {
tmp = x * (-y / t);
} else if (z <= 2.5e-28) {
tmp = x;
} else if (z <= 4.3e+17) {
tmp = y * (z / t);
} else if (z <= 7e+104) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z / (t / y) tmp = 0 if z <= -7.2e+59: tmp = t_1 elif z <= -1.8e-215: tmp = x elif z <= -1.6e-259: tmp = (x * y) / -t elif z <= -6e-304: tmp = x elif z <= 1.2e-239: tmp = x * (-y / t) elif z <= 2.5e-28: tmp = x elif z <= 4.3e+17: tmp = y * (z / t) elif z <= 7e+104: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z / Float64(t / y)) tmp = 0.0 if (z <= -7.2e+59) tmp = t_1; elseif (z <= -1.8e-215) tmp = x; elseif (z <= -1.6e-259) tmp = Float64(Float64(x * y) / Float64(-t)); elseif (z <= -6e-304) tmp = x; elseif (z <= 1.2e-239) tmp = Float64(x * Float64(Float64(-y) / t)); elseif (z <= 2.5e-28) tmp = x; elseif (z <= 4.3e+17) tmp = Float64(y * Float64(z / t)); elseif (z <= 7e+104) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z / (t / y); tmp = 0.0; if (z <= -7.2e+59) tmp = t_1; elseif (z <= -1.8e-215) tmp = x; elseif (z <= -1.6e-259) tmp = (x * y) / -t; elseif (z <= -6e-304) tmp = x; elseif (z <= 1.2e-239) tmp = x * (-y / t); elseif (z <= 2.5e-28) tmp = x; elseif (z <= 4.3e+17) tmp = y * (z / t); elseif (z <= 7e+104) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.2e+59], t$95$1, If[LessEqual[z, -1.8e-215], x, If[LessEqual[z, -1.6e-259], N[(N[(x * y), $MachinePrecision] / (-t)), $MachinePrecision], If[LessEqual[z, -6e-304], x, If[LessEqual[z, 1.2e-239], N[(x * N[((-y) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e-28], x, If[LessEqual[z, 4.3e+17], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+104], x, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{\frac{t}{y}}\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{+59}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-215}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-259}:\\
\;\;\;\;\frac{x \cdot y}{-t}\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-304}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-239}:\\
\;\;\;\;x \cdot \frac{-y}{t}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-28}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{+17}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+104}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -7.1999999999999997e59 or 7.0000000000000003e104 < z Initial program 92.2%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 67.4%
Taylor expanded in z around inf 67.6%
*-commutative67.6%
associate-/r/75.1%
Applied egg-rr75.1%
if -7.1999999999999997e59 < z < -1.7999999999999999e-215 or -1.59999999999999994e-259 < z < -6.0000000000000002e-304 or 1.19999999999999996e-239 < z < 2.5000000000000001e-28 or 4.3e17 < z < 7.0000000000000003e104Initial program 94.1%
associate-*l/99.2%
Simplified99.2%
Taylor expanded in y around 0 60.6%
if -1.7999999999999999e-215 < z < -1.59999999999999994e-259Initial program 99.6%
associate-*l/87.2%
Simplified87.2%
Taylor expanded in x around inf 86.9%
mul-1-neg86.9%
unsub-neg86.9%
Simplified86.9%
Taylor expanded in y around inf 61.2%
associate-*r/61.2%
neg-mul-161.2%
Simplified61.2%
*-commutative61.2%
frac-2neg61.2%
remove-double-neg61.2%
associate-*l/67.5%
Applied egg-rr67.5%
if -6.0000000000000002e-304 < z < 1.19999999999999996e-239Initial program 99.7%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in x around inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in y around inf 72.3%
associate-*r/72.3%
neg-mul-172.3%
Simplified72.3%
if 2.5000000000000001e-28 < z < 4.3e17Initial program 99.4%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in y around inf 99.8%
Taylor expanded in z around inf 70.0%
Final simplification66.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ z (/ t y))) (t_2 (* x (- 1.0 (/ y t)))))
(if (<= z -5.6e+94)
t_1
(if (<= z 3.8e-14)
t_2
(if (<= z 1.8e+17) (* y (/ z t)) (if (<= z 3.3e+152) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = z / (t / y);
double t_2 = x * (1.0 - (y / t));
double tmp;
if (z <= -5.6e+94) {
tmp = t_1;
} else if (z <= 3.8e-14) {
tmp = t_2;
} else if (z <= 1.8e+17) {
tmp = y * (z / t);
} else if (z <= 3.3e+152) {
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 = z / (t / y)
t_2 = x * (1.0d0 - (y / t))
if (z <= (-5.6d+94)) then
tmp = t_1
else if (z <= 3.8d-14) then
tmp = t_2
else if (z <= 1.8d+17) then
tmp = y * (z / t)
else if (z <= 3.3d+152) 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 = z / (t / y);
double t_2 = x * (1.0 - (y / t));
double tmp;
if (z <= -5.6e+94) {
tmp = t_1;
} else if (z <= 3.8e-14) {
tmp = t_2;
} else if (z <= 1.8e+17) {
tmp = y * (z / t);
} else if (z <= 3.3e+152) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z / (t / y) t_2 = x * (1.0 - (y / t)) tmp = 0 if z <= -5.6e+94: tmp = t_1 elif z <= 3.8e-14: tmp = t_2 elif z <= 1.8e+17: tmp = y * (z / t) elif z <= 3.3e+152: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z / Float64(t / y)) t_2 = Float64(x * Float64(1.0 - Float64(y / t))) tmp = 0.0 if (z <= -5.6e+94) tmp = t_1; elseif (z <= 3.8e-14) tmp = t_2; elseif (z <= 1.8e+17) tmp = Float64(y * Float64(z / t)); elseif (z <= 3.3e+152) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z / (t / y); t_2 = x * (1.0 - (y / t)); tmp = 0.0; if (z <= -5.6e+94) tmp = t_1; elseif (z <= 3.8e-14) tmp = t_2; elseif (z <= 1.8e+17) tmp = y * (z / t); elseif (z <= 3.3e+152) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.6e+94], t$95$1, If[LessEqual[z, 3.8e-14], t$95$2, If[LessEqual[z, 1.8e+17], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e+152], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{\frac{t}{y}}\\
t_2 := x \cdot \left(1 - \frac{y}{t}\right)\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{+94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-14}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+17}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+152}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.59999999999999997e94 or 3.3000000000000001e152 < z Initial program 92.4%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 68.2%
Taylor expanded in z around inf 69.7%
*-commutative69.7%
associate-/r/78.2%
Applied egg-rr78.2%
if -5.59999999999999997e94 < z < 3.8000000000000002e-14 or 1.8e17 < z < 3.3000000000000001e152Initial program 94.9%
associate-*l/98.2%
Simplified98.2%
Taylor expanded in x around inf 86.1%
mul-1-neg86.1%
unsub-neg86.1%
Simplified86.1%
if 3.8000000000000002e-14 < z < 1.8e17Initial program 99.2%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in y around inf 99.8%
Taylor expanded in z around inf 75.0%
Final simplification83.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y t)))) (t_2 (* y (/ (- z x) t))))
(if (<= z -1.6e+108)
t_2
(if (<= z 7.6e-31)
t_1
(if (<= z 1.05e+18) t_2 (if (<= z 4.6e+152) t_1 (/ z (/ t y))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / t));
double t_2 = y * ((z - x) / t);
double tmp;
if (z <= -1.6e+108) {
tmp = t_2;
} else if (z <= 7.6e-31) {
tmp = t_1;
} else if (z <= 1.05e+18) {
tmp = t_2;
} else if (z <= 4.6e+152) {
tmp = t_1;
} else {
tmp = z / (t / 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (1.0d0 - (y / t))
t_2 = y * ((z - x) / t)
if (z <= (-1.6d+108)) then
tmp = t_2
else if (z <= 7.6d-31) then
tmp = t_1
else if (z <= 1.05d+18) then
tmp = t_2
else if (z <= 4.6d+152) then
tmp = t_1
else
tmp = z / (t / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / t));
double t_2 = y * ((z - x) / t);
double tmp;
if (z <= -1.6e+108) {
tmp = t_2;
} else if (z <= 7.6e-31) {
tmp = t_1;
} else if (z <= 1.05e+18) {
tmp = t_2;
} else if (z <= 4.6e+152) {
tmp = t_1;
} else {
tmp = z / (t / y);
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - (y / t)) t_2 = y * ((z - x) / t) tmp = 0 if z <= -1.6e+108: tmp = t_2 elif z <= 7.6e-31: tmp = t_1 elif z <= 1.05e+18: tmp = t_2 elif z <= 4.6e+152: tmp = t_1 else: tmp = z / (t / y) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - Float64(y / t))) t_2 = Float64(y * Float64(Float64(z - x) / t)) tmp = 0.0 if (z <= -1.6e+108) tmp = t_2; elseif (z <= 7.6e-31) tmp = t_1; elseif (z <= 1.05e+18) tmp = t_2; elseif (z <= 4.6e+152) tmp = t_1; else tmp = Float64(z / Float64(t / y)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - (y / t)); t_2 = y * ((z - x) / t); tmp = 0.0; if (z <= -1.6e+108) tmp = t_2; elseif (z <= 7.6e-31) tmp = t_1; elseif (z <= 1.05e+18) tmp = t_2; elseif (z <= 4.6e+152) tmp = t_1; else tmp = z / (t / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(z - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+108], t$95$2, If[LessEqual[z, 7.6e-31], t$95$1, If[LessEqual[z, 1.05e+18], t$95$2, If[LessEqual[z, 4.6e+152], t$95$1, N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{t}\right)\\
t_2 := y \cdot \frac{z - x}{t}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+108}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-31}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+18}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+152}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{t}{y}}\\
\end{array}
\end{array}
if z < -1.6e108 or 7.5999999999999999e-31 < z < 1.05e18Initial program 93.0%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 76.8%
Taylor expanded in z around 0 76.8%
mul-1-neg76.8%
distribute-frac-neg76.8%
+-commutative76.8%
distribute-frac-neg76.8%
sub-neg76.8%
div-sub84.1%
Simplified84.1%
if -1.6e108 < z < 7.5999999999999999e-31 or 1.05e18 < z < 4.5999999999999997e152Initial program 94.8%
associate-*l/98.2%
Simplified98.2%
Taylor expanded in x around inf 86.4%
mul-1-neg86.4%
unsub-neg86.4%
Simplified86.4%
if 4.5999999999999997e152 < z Initial program 93.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 64.2%
Taylor expanded in z around inf 67.3%
*-commutative67.3%
associate-/r/81.7%
Applied egg-rr81.7%
Final simplification85.3%
(FPCore (x y z t)
:precision binary64
(if (or (<= z -3.8e+67)
(not (or (<= z 2.25e-28) (and (not (<= z 2.7e+17)) (<= z 6.5e+104)))))
(* y (/ z t))
x))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.8e+67) || !((z <= 2.25e-28) || (!(z <= 2.7e+17) && (z <= 6.5e+104)))) {
tmp = y * (z / t);
} 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 ((z <= (-3.8d+67)) .or. (.not. (z <= 2.25d-28) .or. (.not. (z <= 2.7d+17)) .and. (z <= 6.5d+104))) then
tmp = y * (z / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.8e+67) || !((z <= 2.25e-28) || (!(z <= 2.7e+17) && (z <= 6.5e+104)))) {
tmp = y * (z / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.8e+67) or not ((z <= 2.25e-28) or (not (z <= 2.7e+17) and (z <= 6.5e+104))): tmp = y * (z / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.8e+67) || !((z <= 2.25e-28) || (!(z <= 2.7e+17) && (z <= 6.5e+104)))) tmp = Float64(y * Float64(z / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -3.8e+67) || ~(((z <= 2.25e-28) || (~((z <= 2.7e+17)) && (z <= 6.5e+104))))) tmp = y * (z / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.8e+67], N[Not[Or[LessEqual[z, 2.25e-28], And[N[Not[LessEqual[z, 2.7e+17]], $MachinePrecision], LessEqual[z, 6.5e+104]]]], $MachinePrecision]], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+67} \lor \neg \left(z \leq 2.25 \cdot 10^{-28} \lor \neg \left(z \leq 2.7 \cdot 10^{+17}\right) \land z \leq 6.5 \cdot 10^{+104}\right):\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.8000000000000002e67 or 2.2499999999999999e-28 < z < 2.7e17 or 6.5000000000000005e104 < z Initial program 93.0%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 70.8%
Taylor expanded in z around inf 67.8%
if -3.8000000000000002e67 < z < 2.2499999999999999e-28 or 2.7e17 < z < 6.5000000000000005e104Initial program 95.1%
associate-*l/98.1%
Simplified98.1%
Taylor expanded in y around 0 54.5%
Final simplification59.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ y (/ t z))))
(if (<= z -1.4e+69)
t_1
(if (<= z 1.08e-29)
x
(if (<= z 7e+17) (* y (/ z t)) (if (<= z 6.8e+104) x t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = y / (t / z);
double tmp;
if (z <= -1.4e+69) {
tmp = t_1;
} else if (z <= 1.08e-29) {
tmp = x;
} else if (z <= 7e+17) {
tmp = y * (z / t);
} else if (z <= 6.8e+104) {
tmp = x;
} 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 / (t / z)
if (z <= (-1.4d+69)) then
tmp = t_1
else if (z <= 1.08d-29) then
tmp = x
else if (z <= 7d+17) then
tmp = y * (z / t)
else if (z <= 6.8d+104) then
tmp = x
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 / (t / z);
double tmp;
if (z <= -1.4e+69) {
tmp = t_1;
} else if (z <= 1.08e-29) {
tmp = x;
} else if (z <= 7e+17) {
tmp = y * (z / t);
} else if (z <= 6.8e+104) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y / (t / z) tmp = 0 if z <= -1.4e+69: tmp = t_1 elif z <= 1.08e-29: tmp = x elif z <= 7e+17: tmp = y * (z / t) elif z <= 6.8e+104: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y / Float64(t / z)) tmp = 0.0 if (z <= -1.4e+69) tmp = t_1; elseif (z <= 1.08e-29) tmp = x; elseif (z <= 7e+17) tmp = Float64(y * Float64(z / t)); elseif (z <= 6.8e+104) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y / (t / z); tmp = 0.0; if (z <= -1.4e+69) tmp = t_1; elseif (z <= 1.08e-29) tmp = x; elseif (z <= 7e+17) tmp = y * (z / t); elseif (z <= 6.8e+104) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e+69], t$95$1, If[LessEqual[z, 1.08e-29], x, If[LessEqual[z, 7e+17], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+104], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{\frac{t}{z}}\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.08 \cdot 10^{-29}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+17}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+104}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.39999999999999991e69 or 6.7999999999999994e104 < z Initial program 92.2%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 67.4%
Taylor expanded in z around inf 67.6%
clear-num67.5%
un-div-inv68.1%
Applied egg-rr68.1%
if -1.39999999999999991e69 < z < 1.07999999999999995e-29 or 7e17 < z < 6.7999999999999994e104Initial program 95.1%
associate-*l/98.1%
Simplified98.1%
Taylor expanded in y around 0 54.5%
if 1.07999999999999995e-29 < z < 7e17Initial program 99.4%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in y around inf 99.8%
Taylor expanded in z around inf 70.0%
Final simplification59.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ z (/ t y))))
(if (<= z -9e+60)
t_1
(if (<= z 8.2e-30)
x
(if (<= z 4.7e+17) (* y (/ z t)) (if (<= z 2.6e+104) x t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = z / (t / y);
double tmp;
if (z <= -9e+60) {
tmp = t_1;
} else if (z <= 8.2e-30) {
tmp = x;
} else if (z <= 4.7e+17) {
tmp = y * (z / t);
} else if (z <= 2.6e+104) {
tmp = x;
} 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 = z / (t / y)
if (z <= (-9d+60)) then
tmp = t_1
else if (z <= 8.2d-30) then
tmp = x
else if (z <= 4.7d+17) then
tmp = y * (z / t)
else if (z <= 2.6d+104) then
tmp = x
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 = z / (t / y);
double tmp;
if (z <= -9e+60) {
tmp = t_1;
} else if (z <= 8.2e-30) {
tmp = x;
} else if (z <= 4.7e+17) {
tmp = y * (z / t);
} else if (z <= 2.6e+104) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z / (t / y) tmp = 0 if z <= -9e+60: tmp = t_1 elif z <= 8.2e-30: tmp = x elif z <= 4.7e+17: tmp = y * (z / t) elif z <= 2.6e+104: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z / Float64(t / y)) tmp = 0.0 if (z <= -9e+60) tmp = t_1; elseif (z <= 8.2e-30) tmp = x; elseif (z <= 4.7e+17) tmp = Float64(y * Float64(z / t)); elseif (z <= 2.6e+104) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z / (t / y); tmp = 0.0; if (z <= -9e+60) tmp = t_1; elseif (z <= 8.2e-30) tmp = x; elseif (z <= 4.7e+17) tmp = y * (z / t); elseif (z <= 2.6e+104) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e+60], t$95$1, If[LessEqual[z, 8.2e-30], x, If[LessEqual[z, 4.7e+17], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+104], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{\frac{t}{y}}\\
\mathbf{if}\;z \leq -9 \cdot 10^{+60}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-30}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{+17}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+104}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -9.00000000000000026e60 or 2.6e104 < z Initial program 92.2%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 67.4%
Taylor expanded in z around inf 67.6%
*-commutative67.6%
associate-/r/75.1%
Applied egg-rr75.1%
if -9.00000000000000026e60 < z < 8.2000000000000007e-30 or 4.7e17 < z < 2.6e104Initial program 95.1%
associate-*l/98.1%
Simplified98.1%
Taylor expanded in y around 0 54.5%
if 8.2000000000000007e-30 < z < 4.7e17Initial program 99.4%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in y around inf 99.8%
Taylor expanded in z around inf 70.0%
Final simplification62.0%
(FPCore (x y z t) :precision binary64 (if (or (<= z -9.2e-41) (not (<= z 2.05e-22))) (+ x (* y (/ z t))) (* x (- 1.0 (/ y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -9.2e-41) || !(z <= 2.05e-22)) {
tmp = x + (y * (z / t));
} else {
tmp = x * (1.0 - (y / t));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-9.2d-41)) .or. (.not. (z <= 2.05d-22))) then
tmp = x + (y * (z / t))
else
tmp = x * (1.0d0 - (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -9.2e-41) || !(z <= 2.05e-22)) {
tmp = x + (y * (z / t));
} else {
tmp = x * (1.0 - (y / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -9.2e-41) or not (z <= 2.05e-22): tmp = x + (y * (z / t)) else: tmp = x * (1.0 - (y / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -9.2e-41) || !(z <= 2.05e-22)) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(x * Float64(1.0 - Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -9.2e-41) || ~((z <= 2.05e-22))) tmp = x + (y * (z / t)); else tmp = x * (1.0 - (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -9.2e-41], N[Not[LessEqual[z, 2.05e-22]], $MachinePrecision]], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{-41} \lor \neg \left(z \leq 2.05 \cdot 10^{-22}\right):\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
\end{array}
\end{array}
if z < -9.20000000000000041e-41 or 2.05e-22 < z Initial program 92.8%
associate-*l/99.9%
Simplified99.9%
*-commutative99.9%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 87.4%
associate-*r/86.8%
Simplified86.8%
if -9.20000000000000041e-41 < z < 2.05e-22Initial program 96.0%
associate-*l/97.5%
Simplified97.5%
Taylor expanded in x around inf 91.1%
mul-1-neg91.1%
unsub-neg91.1%
Simplified91.1%
Final simplification88.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.4e-44) (not (<= z 1.85e-25))) (+ x (* (/ y t) z)) (* x (- 1.0 (/ y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.4e-44) || !(z <= 1.85e-25)) {
tmp = x + ((y / t) * z);
} else {
tmp = x * (1.0 - (y / t));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-1.4d-44)) .or. (.not. (z <= 1.85d-25))) then
tmp = x + ((y / t) * z)
else
tmp = x * (1.0d0 - (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.4e-44) || !(z <= 1.85e-25)) {
tmp = x + ((y / t) * z);
} else {
tmp = x * (1.0 - (y / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.4e-44) or not (z <= 1.85e-25): tmp = x + ((y / t) * z) else: tmp = x * (1.0 - (y / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.4e-44) || !(z <= 1.85e-25)) tmp = Float64(x + Float64(Float64(y / t) * z)); else tmp = Float64(x * Float64(1.0 - Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.4e-44) || ~((z <= 1.85e-25))) tmp = x + ((y / t) * z); else tmp = x * (1.0 - (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.4e-44], N[Not[LessEqual[z, 1.85e-25]], $MachinePrecision]], N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{-44} \lor \neg \left(z \leq 1.85 \cdot 10^{-25}\right):\\
\;\;\;\;x + \frac{y}{t} \cdot z\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
\end{array}
\end{array}
if z < -1.4e-44 or 1.85000000000000004e-25 < z Initial program 92.8%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 87.4%
associate-*l/91.7%
*-commutative91.7%
Simplified91.7%
if -1.4e-44 < z < 1.85000000000000004e-25Initial program 96.0%
associate-*l/97.5%
Simplified97.5%
Taylor expanded in x around inf 91.1%
mul-1-neg91.1%
unsub-neg91.1%
Simplified91.1%
Final simplification91.4%
(FPCore (x y z t) :precision binary64 (if (or (<= z -5.2e-44) (not (<= z 2.7e-26))) (+ x (* (/ y t) z)) (- x (/ x (/ t y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.2e-44) || !(z <= 2.7e-26)) {
tmp = x + ((y / t) * z);
} else {
tmp = x - (x / (t / 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 ((z <= (-5.2d-44)) .or. (.not. (z <= 2.7d-26))) then
tmp = x + ((y / t) * z)
else
tmp = x - (x / (t / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.2e-44) || !(z <= 2.7e-26)) {
tmp = x + ((y / t) * z);
} else {
tmp = x - (x / (t / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -5.2e-44) or not (z <= 2.7e-26): tmp = x + ((y / t) * z) else: tmp = x - (x / (t / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -5.2e-44) || !(z <= 2.7e-26)) tmp = Float64(x + Float64(Float64(y / t) * z)); else tmp = Float64(x - Float64(x / Float64(t / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -5.2e-44) || ~((z <= 2.7e-26))) tmp = x + ((y / t) * z); else tmp = x - (x / (t / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -5.2e-44], N[Not[LessEqual[z, 2.7e-26]], $MachinePrecision]], N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(x - N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{-44} \lor \neg \left(z \leq 2.7 \cdot 10^{-26}\right):\\
\;\;\;\;x + \frac{y}{t} \cdot z\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x}{\frac{t}{y}}\\
\end{array}
\end{array}
if z < -5.1999999999999996e-44 or 2.69999999999999982e-26 < z Initial program 92.8%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 87.4%
associate-*l/91.7%
*-commutative91.7%
Simplified91.7%
if -5.1999999999999996e-44 < z < 2.69999999999999982e-26Initial program 96.0%
associate-*l/97.5%
Simplified97.5%
Taylor expanded in z around 0 88.1%
mul-1-neg88.1%
associate-/l*91.1%
distribute-neg-frac91.1%
Simplified91.1%
Final simplification91.4%
(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 94.3%
associate-*l/98.8%
Simplified98.8%
Taylor expanded in y around 0 41.3%
Final simplification41.3%
(FPCore (x y z t) :precision binary64 (- x (+ (* x (/ y t)) (* (- z) (/ y t)))))
double code(double x, double y, double z, double t) {
return x - ((x * (y / t)) + (-z * (y / t)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x - ((x * (y / t)) + (-z * (y / t)))
end function
public static double code(double x, double y, double z, double t) {
return x - ((x * (y / t)) + (-z * (y / t)));
}
def code(x, y, z, t): return x - ((x * (y / t)) + (-z * (y / t)))
function code(x, y, z, t) return Float64(x - Float64(Float64(x * Float64(y / t)) + Float64(Float64(-z) * Float64(y / t)))) end
function tmp = code(x, y, z, t) tmp = x - ((x * (y / t)) + (-z * (y / t))); end
code[x_, y_, z_, t_] := N[(x - N[(N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[((-z) * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \left(x \cdot \frac{y}{t} + \left(-z\right) \cdot \frac{y}{t}\right)
\end{array}
herbie shell --seed 2024019
(FPCore (x y z t)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
:precision binary64
:herbie-target
(- x (+ (* x (/ y t)) (* (- z) (/ y t))))
(+ x (/ (* y (- z x)) t)))