
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (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 - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (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 - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (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 - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Initial program 97.2%
Final simplification97.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (/ z (- x y)))) (t_2 (/ t (/ y (- y x)))))
(if (<= y -2.5e-10)
t_2
(if (<= y -3.5e-225)
t_1
(if (<= y 3.8e-241)
(* x (/ t (- z y)))
(if (<= y 1.7e-39)
t_1
(if (<= y 2.25e-17)
(* (- y x) (/ t y))
(if (<= y 1.1e+100) t_1 t_2))))))))
double code(double x, double y, double z, double t) {
double t_1 = t / (z / (x - y));
double t_2 = t / (y / (y - x));
double tmp;
if (y <= -2.5e-10) {
tmp = t_2;
} else if (y <= -3.5e-225) {
tmp = t_1;
} else if (y <= 3.8e-241) {
tmp = x * (t / (z - y));
} else if (y <= 1.7e-39) {
tmp = t_1;
} else if (y <= 2.25e-17) {
tmp = (y - x) * (t / y);
} else if (y <= 1.1e+100) {
tmp = t_1;
} 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 = t / (z / (x - y))
t_2 = t / (y / (y - x))
if (y <= (-2.5d-10)) then
tmp = t_2
else if (y <= (-3.5d-225)) then
tmp = t_1
else if (y <= 3.8d-241) then
tmp = x * (t / (z - y))
else if (y <= 1.7d-39) then
tmp = t_1
else if (y <= 2.25d-17) then
tmp = (y - x) * (t / y)
else if (y <= 1.1d+100) then
tmp = t_1
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 = t / (z / (x - y));
double t_2 = t / (y / (y - x));
double tmp;
if (y <= -2.5e-10) {
tmp = t_2;
} else if (y <= -3.5e-225) {
tmp = t_1;
} else if (y <= 3.8e-241) {
tmp = x * (t / (z - y));
} else if (y <= 1.7e-39) {
tmp = t_1;
} else if (y <= 2.25e-17) {
tmp = (y - x) * (t / y);
} else if (y <= 1.1e+100) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (z / (x - y)) t_2 = t / (y / (y - x)) tmp = 0 if y <= -2.5e-10: tmp = t_2 elif y <= -3.5e-225: tmp = t_1 elif y <= 3.8e-241: tmp = x * (t / (z - y)) elif y <= 1.7e-39: tmp = t_1 elif y <= 2.25e-17: tmp = (y - x) * (t / y) elif y <= 1.1e+100: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(z / Float64(x - y))) t_2 = Float64(t / Float64(y / Float64(y - x))) tmp = 0.0 if (y <= -2.5e-10) tmp = t_2; elseif (y <= -3.5e-225) tmp = t_1; elseif (y <= 3.8e-241) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 1.7e-39) tmp = t_1; elseif (y <= 2.25e-17) tmp = Float64(Float64(y - x) * Float64(t / y)); elseif (y <= 1.1e+100) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (z / (x - y)); t_2 = t / (y / (y - x)); tmp = 0.0; if (y <= -2.5e-10) tmp = t_2; elseif (y <= -3.5e-225) tmp = t_1; elseif (y <= 3.8e-241) tmp = x * (t / (z - y)); elseif (y <= 1.7e-39) tmp = t_1; elseif (y <= 2.25e-17) tmp = (y - x) * (t / y); elseif (y <= 1.1e+100) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(y / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.5e-10], t$95$2, If[LessEqual[y, -3.5e-225], t$95$1, If[LessEqual[y, 3.8e-241], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e-39], t$95$1, If[LessEqual[y, 2.25e-17], N[(N[(y - x), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e+100], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{z}{x - y}}\\
t_2 := \frac{t}{\frac{y}{y - x}}\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{-10}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-225}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{-241}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{-17}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{t}{y}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+100}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -2.50000000000000016e-10 or 1.1e100 < y Initial program 99.9%
Taylor expanded in z around 0 63.0%
associate-*r/63.0%
*-commutative63.0%
neg-mul-163.0%
distribute-lft-neg-in63.0%
*-commutative63.0%
Simplified63.0%
Taylor expanded in t around 0 63.0%
associate-/l*82.6%
Simplified82.6%
if -2.50000000000000016e-10 < y < -3.4999999999999997e-225 or 3.7999999999999999e-241 < y < 1.7e-39 or 2.24999999999999989e-17 < y < 1.1e100Initial program 96.8%
Taylor expanded in z around inf 74.6%
associate-/l*80.6%
Simplified80.6%
if -3.4999999999999997e-225 < y < 3.7999999999999999e-241Initial program 86.2%
Taylor expanded in x around inf 96.5%
*-commutative96.5%
associate-*r/94.3%
Simplified94.3%
if 1.7e-39 < y < 2.24999999999999989e-17Initial program 99.1%
Taylor expanded in z around 0 100.0%
associate-*r/100.0%
*-commutative100.0%
neg-mul-1100.0%
distribute-lft-neg-in100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
associate-/l*99.7%
associate-/r/99.7%
Simplified99.7%
Final simplification83.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (/ z (- x y)))) (t_2 (/ t (/ y (- y x)))))
(if (<= y -3.7e-10)
t_2
(if (<= y -3.8e-225)
t_1
(if (<= y 3.35e-245)
(* x (/ t (- z y)))
(if (<= y 2.25e-57)
t_1
(if (<= y 6.2e+85) (/ t (/ (- z y) x)) t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = t / (z / (x - y));
double t_2 = t / (y / (y - x));
double tmp;
if (y <= -3.7e-10) {
tmp = t_2;
} else if (y <= -3.8e-225) {
tmp = t_1;
} else if (y <= 3.35e-245) {
tmp = x * (t / (z - y));
} else if (y <= 2.25e-57) {
tmp = t_1;
} else if (y <= 6.2e+85) {
tmp = t / ((z - y) / 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 = t / (z / (x - y))
t_2 = t / (y / (y - x))
if (y <= (-3.7d-10)) then
tmp = t_2
else if (y <= (-3.8d-225)) then
tmp = t_1
else if (y <= 3.35d-245) then
tmp = x * (t / (z - y))
else if (y <= 2.25d-57) then
tmp = t_1
else if (y <= 6.2d+85) then
tmp = t / ((z - y) / 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 = t / (z / (x - y));
double t_2 = t / (y / (y - x));
double tmp;
if (y <= -3.7e-10) {
tmp = t_2;
} else if (y <= -3.8e-225) {
tmp = t_1;
} else if (y <= 3.35e-245) {
tmp = x * (t / (z - y));
} else if (y <= 2.25e-57) {
tmp = t_1;
} else if (y <= 6.2e+85) {
tmp = t / ((z - y) / x);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (z / (x - y)) t_2 = t / (y / (y - x)) tmp = 0 if y <= -3.7e-10: tmp = t_2 elif y <= -3.8e-225: tmp = t_1 elif y <= 3.35e-245: tmp = x * (t / (z - y)) elif y <= 2.25e-57: tmp = t_1 elif y <= 6.2e+85: tmp = t / ((z - y) / x) else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(z / Float64(x - y))) t_2 = Float64(t / Float64(y / Float64(y - x))) tmp = 0.0 if (y <= -3.7e-10) tmp = t_2; elseif (y <= -3.8e-225) tmp = t_1; elseif (y <= 3.35e-245) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 2.25e-57) tmp = t_1; elseif (y <= 6.2e+85) tmp = Float64(t / Float64(Float64(z - y) / x)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (z / (x - y)); t_2 = t / (y / (y - x)); tmp = 0.0; if (y <= -3.7e-10) tmp = t_2; elseif (y <= -3.8e-225) tmp = t_1; elseif (y <= 3.35e-245) tmp = x * (t / (z - y)); elseif (y <= 2.25e-57) tmp = t_1; elseif (y <= 6.2e+85) tmp = t / ((z - y) / x); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(y / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.7e-10], t$95$2, If[LessEqual[y, -3.8e-225], t$95$1, If[LessEqual[y, 3.35e-245], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.25e-57], t$95$1, If[LessEqual[y, 6.2e+85], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{z}{x - y}}\\
t_2 := \frac{t}{\frac{y}{y - x}}\\
\mathbf{if}\;y \leq -3.7 \cdot 10^{-10}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-225}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.35 \cdot 10^{-245}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{-57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+85}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -3.70000000000000015e-10 or 6.20000000000000023e85 < y Initial program 99.9%
Taylor expanded in z around 0 62.8%
associate-*r/62.8%
*-commutative62.8%
neg-mul-162.8%
distribute-lft-neg-in62.8%
*-commutative62.8%
Simplified62.8%
Taylor expanded in t around 0 62.8%
associate-/l*82.1%
Simplified82.1%
if -3.70000000000000015e-10 < y < -3.8000000000000003e-225 or 3.35e-245 < y < 2.24999999999999986e-57Initial program 95.7%
Taylor expanded in z around inf 79.7%
associate-/l*85.4%
Simplified85.4%
if -3.8000000000000003e-225 < y < 3.35e-245Initial program 86.2%
Taylor expanded in x around inf 96.5%
*-commutative96.5%
associate-*r/94.3%
Simplified94.3%
if 2.24999999999999986e-57 < y < 6.20000000000000023e85Initial program 99.7%
Taylor expanded in x around inf 64.6%
associate-/l*70.8%
Simplified70.8%
Final simplification83.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (/ z (- x y)))) (t_2 (/ t (/ y (- y x)))))
(if (<= y -3e-11)
t_2
(if (<= y -1.65e-245)
t_1
(if (<= y 2.15e-237)
(/ (* x t) (- z y))
(if (<= y 2.9e-57)
t_1
(if (<= y 4.2e+85) (/ t (/ (- z y) x)) t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = t / (z / (x - y));
double t_2 = t / (y / (y - x));
double tmp;
if (y <= -3e-11) {
tmp = t_2;
} else if (y <= -1.65e-245) {
tmp = t_1;
} else if (y <= 2.15e-237) {
tmp = (x * t) / (z - y);
} else if (y <= 2.9e-57) {
tmp = t_1;
} else if (y <= 4.2e+85) {
tmp = t / ((z - y) / 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 = t / (z / (x - y))
t_2 = t / (y / (y - x))
if (y <= (-3d-11)) then
tmp = t_2
else if (y <= (-1.65d-245)) then
tmp = t_1
else if (y <= 2.15d-237) then
tmp = (x * t) / (z - y)
else if (y <= 2.9d-57) then
tmp = t_1
else if (y <= 4.2d+85) then
tmp = t / ((z - y) / 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 = t / (z / (x - y));
double t_2 = t / (y / (y - x));
double tmp;
if (y <= -3e-11) {
tmp = t_2;
} else if (y <= -1.65e-245) {
tmp = t_1;
} else if (y <= 2.15e-237) {
tmp = (x * t) / (z - y);
} else if (y <= 2.9e-57) {
tmp = t_1;
} else if (y <= 4.2e+85) {
tmp = t / ((z - y) / x);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (z / (x - y)) t_2 = t / (y / (y - x)) tmp = 0 if y <= -3e-11: tmp = t_2 elif y <= -1.65e-245: tmp = t_1 elif y <= 2.15e-237: tmp = (x * t) / (z - y) elif y <= 2.9e-57: tmp = t_1 elif y <= 4.2e+85: tmp = t / ((z - y) / x) else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(z / Float64(x - y))) t_2 = Float64(t / Float64(y / Float64(y - x))) tmp = 0.0 if (y <= -3e-11) tmp = t_2; elseif (y <= -1.65e-245) tmp = t_1; elseif (y <= 2.15e-237) tmp = Float64(Float64(x * t) / Float64(z - y)); elseif (y <= 2.9e-57) tmp = t_1; elseif (y <= 4.2e+85) tmp = Float64(t / Float64(Float64(z - y) / x)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (z / (x - y)); t_2 = t / (y / (y - x)); tmp = 0.0; if (y <= -3e-11) tmp = t_2; elseif (y <= -1.65e-245) tmp = t_1; elseif (y <= 2.15e-237) tmp = (x * t) / (z - y); elseif (y <= 2.9e-57) tmp = t_1; elseif (y <= 4.2e+85) tmp = t / ((z - y) / x); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(y / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3e-11], t$95$2, If[LessEqual[y, -1.65e-245], t$95$1, If[LessEqual[y, 2.15e-237], N[(N[(x * t), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e-57], t$95$1, If[LessEqual[y, 4.2e+85], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{z}{x - y}}\\
t_2 := \frac{t}{\frac{y}{y - x}}\\
\mathbf{if}\;y \leq -3 \cdot 10^{-11}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.65 \cdot 10^{-245}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{-237}:\\
\;\;\;\;\frac{x \cdot t}{z - y}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+85}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -3e-11 or 4.2000000000000002e85 < y Initial program 99.9%
Taylor expanded in z around 0 62.8%
associate-*r/62.8%
*-commutative62.8%
neg-mul-162.8%
distribute-lft-neg-in62.8%
*-commutative62.8%
Simplified62.8%
Taylor expanded in t around 0 62.8%
associate-/l*82.1%
Simplified82.1%
if -3e-11 < y < -1.65e-245 or 2.14999999999999991e-237 < y < 2.90000000000000025e-57Initial program 95.7%
Taylor expanded in z around inf 78.7%
associate-/l*85.5%
Simplified85.5%
if -1.65e-245 < y < 2.14999999999999991e-237Initial program 85.8%
Taylor expanded in x around inf 99.8%
if 2.90000000000000025e-57 < y < 4.2000000000000002e85Initial program 99.7%
Taylor expanded in x around inf 64.6%
associate-/l*70.8%
Simplified70.8%
Final simplification83.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (/ y (- y x)))))
(if (<= y -1.05e-10)
t_1
(if (<= y -5.4e-245)
(/ t (/ z (- x y)))
(if (<= y 4.9e-228)
(/ (* x t) (- z y))
(if (<= y 3.3e-57)
(/ (- x y) (/ z t))
(if (<= y 2.4e+85) (/ t (/ (- z y) x)) t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = t / (y / (y - x));
double tmp;
if (y <= -1.05e-10) {
tmp = t_1;
} else if (y <= -5.4e-245) {
tmp = t / (z / (x - y));
} else if (y <= 4.9e-228) {
tmp = (x * t) / (z - y);
} else if (y <= 3.3e-57) {
tmp = (x - y) / (z / t);
} else if (y <= 2.4e+85) {
tmp = t / ((z - y) / 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 = t / (y / (y - x))
if (y <= (-1.05d-10)) then
tmp = t_1
else if (y <= (-5.4d-245)) then
tmp = t / (z / (x - y))
else if (y <= 4.9d-228) then
tmp = (x * t) / (z - y)
else if (y <= 3.3d-57) then
tmp = (x - y) / (z / t)
else if (y <= 2.4d+85) then
tmp = t / ((z - y) / 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 = t / (y / (y - x));
double tmp;
if (y <= -1.05e-10) {
tmp = t_1;
} else if (y <= -5.4e-245) {
tmp = t / (z / (x - y));
} else if (y <= 4.9e-228) {
tmp = (x * t) / (z - y);
} else if (y <= 3.3e-57) {
tmp = (x - y) / (z / t);
} else if (y <= 2.4e+85) {
tmp = t / ((z - y) / x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (y / (y - x)) tmp = 0 if y <= -1.05e-10: tmp = t_1 elif y <= -5.4e-245: tmp = t / (z / (x - y)) elif y <= 4.9e-228: tmp = (x * t) / (z - y) elif y <= 3.3e-57: tmp = (x - y) / (z / t) elif y <= 2.4e+85: tmp = t / ((z - y) / x) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(y / Float64(y - x))) tmp = 0.0 if (y <= -1.05e-10) tmp = t_1; elseif (y <= -5.4e-245) tmp = Float64(t / Float64(z / Float64(x - y))); elseif (y <= 4.9e-228) tmp = Float64(Float64(x * t) / Float64(z - y)); elseif (y <= 3.3e-57) tmp = Float64(Float64(x - y) / Float64(z / t)); elseif (y <= 2.4e+85) tmp = Float64(t / Float64(Float64(z - y) / x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (y / (y - x)); tmp = 0.0; if (y <= -1.05e-10) tmp = t_1; elseif (y <= -5.4e-245) tmp = t / (z / (x - y)); elseif (y <= 4.9e-228) tmp = (x * t) / (z - y); elseif (y <= 3.3e-57) tmp = (x - y) / (z / t); elseif (y <= 2.4e+85) tmp = t / ((z - y) / x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(y / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.05e-10], t$95$1, If[LessEqual[y, -5.4e-245], N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.9e-228], N[(N[(x * t), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e-57], N[(N[(x - y), $MachinePrecision] / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+85], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{y}{y - x}}\\
\mathbf{if}\;y \leq -1.05 \cdot 10^{-10}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -5.4 \cdot 10^{-245}:\\
\;\;\;\;\frac{t}{\frac{z}{x - y}}\\
\mathbf{elif}\;y \leq 4.9 \cdot 10^{-228}:\\
\;\;\;\;\frac{x \cdot t}{z - y}\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-57}:\\
\;\;\;\;\frac{x - y}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+85}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.05e-10 or 2.39999999999999997e85 < y Initial program 99.9%
Taylor expanded in z around 0 62.8%
associate-*r/62.8%
*-commutative62.8%
neg-mul-162.8%
distribute-lft-neg-in62.8%
*-commutative62.8%
Simplified62.8%
Taylor expanded in t around 0 62.8%
associate-/l*82.1%
Simplified82.1%
if -1.05e-10 < y < -5.39999999999999979e-245Initial program 95.0%
Taylor expanded in z around inf 76.8%
associate-/l*83.4%
Simplified83.4%
if -5.39999999999999979e-245 < y < 4.89999999999999988e-228Initial program 85.8%
Taylor expanded in x around inf 99.8%
if 4.89999999999999988e-228 < y < 3.2999999999999998e-57Initial program 96.6%
associate-/r/97.1%
Simplified97.1%
Taylor expanded in z around inf 90.3%
if 3.2999999999999998e-57 < y < 2.39999999999999997e85Initial program 99.7%
Taylor expanded in x around inf 64.6%
associate-/l*70.8%
Simplified70.8%
Final simplification84.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.55e+118)
t
(if (<= y -1.08e-10)
(* (- y x) (/ t y))
(if (<= y 4.5e-57)
(* (- x y) (/ t z))
(if (<= y 1.7e+91)
(* x (/ t (- z y)))
(if (<= y 4.4e+132) (* t (/ (- y) z)) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.55e+118) {
tmp = t;
} else if (y <= -1.08e-10) {
tmp = (y - x) * (t / y);
} else if (y <= 4.5e-57) {
tmp = (x - y) * (t / z);
} else if (y <= 1.7e+91) {
tmp = x * (t / (z - y));
} else if (y <= 4.4e+132) {
tmp = t * (-y / z);
} else {
tmp = 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 (y <= (-1.55d+118)) then
tmp = t
else if (y <= (-1.08d-10)) then
tmp = (y - x) * (t / y)
else if (y <= 4.5d-57) then
tmp = (x - y) * (t / z)
else if (y <= 1.7d+91) then
tmp = x * (t / (z - y))
else if (y <= 4.4d+132) then
tmp = t * (-y / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.55e+118) {
tmp = t;
} else if (y <= -1.08e-10) {
tmp = (y - x) * (t / y);
} else if (y <= 4.5e-57) {
tmp = (x - y) * (t / z);
} else if (y <= 1.7e+91) {
tmp = x * (t / (z - y));
} else if (y <= 4.4e+132) {
tmp = t * (-y / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.55e+118: tmp = t elif y <= -1.08e-10: tmp = (y - x) * (t / y) elif y <= 4.5e-57: tmp = (x - y) * (t / z) elif y <= 1.7e+91: tmp = x * (t / (z - y)) elif y <= 4.4e+132: tmp = t * (-y / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.55e+118) tmp = t; elseif (y <= -1.08e-10) tmp = Float64(Float64(y - x) * Float64(t / y)); elseif (y <= 4.5e-57) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (y <= 1.7e+91) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 4.4e+132) tmp = Float64(t * Float64(Float64(-y) / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.55e+118) tmp = t; elseif (y <= -1.08e-10) tmp = (y - x) * (t / y); elseif (y <= 4.5e-57) tmp = (x - y) * (t / z); elseif (y <= 1.7e+91) tmp = x * (t / (z - y)); elseif (y <= 4.4e+132) tmp = t * (-y / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.55e+118], t, If[LessEqual[y, -1.08e-10], N[(N[(y - x), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e-57], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e+91], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4e+132], N[(t * N[((-y) / z), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+118}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.08 \cdot 10^{-10}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{t}{y}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-57}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+91}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+132}:\\
\;\;\;\;t \cdot \frac{-y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.54999999999999993e118 or 4.39999999999999977e132 < y Initial program 99.9%
Taylor expanded in y around inf 77.7%
if -1.54999999999999993e118 < y < -1.08000000000000002e-10Initial program 100.0%
Taylor expanded in z around 0 66.8%
associate-*r/66.8%
*-commutative66.8%
neg-mul-166.8%
distribute-lft-neg-in66.8%
*-commutative66.8%
Simplified66.8%
Taylor expanded in t around 0 66.8%
associate-/l*69.8%
associate-/r/69.4%
Simplified69.4%
if -1.08000000000000002e-10 < y < 4.49999999999999973e-57Initial program 93.1%
Taylor expanded in z around inf 80.4%
associate-/l*82.7%
associate-/r/82.1%
Simplified82.1%
if 4.49999999999999973e-57 < y < 1.7e91Initial program 99.7%
Taylor expanded in x around inf 65.7%
*-commutative65.7%
associate-*r/67.9%
Simplified67.9%
if 1.7e91 < y < 4.39999999999999977e132Initial program 100.0%
Taylor expanded in x around 0 79.0%
neg-mul-179.0%
distribute-neg-frac79.0%
Simplified79.0%
Taylor expanded in y around 0 56.4%
mul-1-neg56.4%
distribute-neg-frac56.4%
Simplified56.4%
Final simplification76.5%
(FPCore (x y z t)
:precision binary64
(if (or (<= y -5.2e-11)
(and (not (<= y 3.9e-57)) (or (<= y 1.3e-15) (not (<= y 3.2e+91)))))
(/ t (/ y (- y x)))
(* (- x y) (/ t z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.2e-11) || (!(y <= 3.9e-57) && ((y <= 1.3e-15) || !(y <= 3.2e+91)))) {
tmp = t / (y / (y - x));
} else {
tmp = (x - y) * (t / 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.2d-11)) .or. (.not. (y <= 3.9d-57)) .and. (y <= 1.3d-15) .or. (.not. (y <= 3.2d+91))) then
tmp = t / (y / (y - x))
else
tmp = (x - y) * (t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.2e-11) || (!(y <= 3.9e-57) && ((y <= 1.3e-15) || !(y <= 3.2e+91)))) {
tmp = t / (y / (y - x));
} else {
tmp = (x - y) * (t / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5.2e-11) or (not (y <= 3.9e-57) and ((y <= 1.3e-15) or not (y <= 3.2e+91))): tmp = t / (y / (y - x)) else: tmp = (x - y) * (t / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5.2e-11) || (!(y <= 3.9e-57) && ((y <= 1.3e-15) || !(y <= 3.2e+91)))) tmp = Float64(t / Float64(y / Float64(y - x))); else tmp = Float64(Float64(x - y) * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -5.2e-11) || (~((y <= 3.9e-57)) && ((y <= 1.3e-15) || ~((y <= 3.2e+91))))) tmp = t / (y / (y - x)); else tmp = (x - y) * (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5.2e-11], And[N[Not[LessEqual[y, 3.9e-57]], $MachinePrecision], Or[LessEqual[y, 1.3e-15], N[Not[LessEqual[y, 3.2e+91]], $MachinePrecision]]]], N[(t / N[(y / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-11} \lor \neg \left(y \leq 3.9 \cdot 10^{-57}\right) \land \left(y \leq 1.3 \cdot 10^{-15} \lor \neg \left(y \leq 3.2 \cdot 10^{+91}\right)\right):\\
\;\;\;\;\frac{t}{\frac{y}{y - x}}\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\end{array}
\end{array}
if y < -5.2000000000000001e-11 or 3.90000000000000006e-57 < y < 1.30000000000000002e-15 or 3.19999999999999989e91 < y Initial program 99.9%
Taylor expanded in z around 0 64.3%
associate-*r/64.3%
*-commutative64.3%
neg-mul-164.3%
distribute-lft-neg-in64.3%
*-commutative64.3%
Simplified64.3%
Taylor expanded in t around 0 64.3%
associate-/l*82.7%
Simplified82.7%
if -5.2000000000000001e-11 < y < 3.90000000000000006e-57 or 1.30000000000000002e-15 < y < 3.19999999999999989e91Initial program 94.5%
Taylor expanded in z around inf 76.6%
associate-/l*79.9%
associate-/r/79.4%
Simplified79.4%
Final simplification81.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.2e+71)
t
(if (or (<= y -8200000000.0) (and (not (<= y -7.8e-26)) (<= y 1.05e+88)))
(* x (/ t (- z y)))
t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.2e+71) {
tmp = t;
} else if ((y <= -8200000000.0) || (!(y <= -7.8e-26) && (y <= 1.05e+88))) {
tmp = x * (t / (z - y));
} else {
tmp = 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 (y <= (-2.2d+71)) then
tmp = t
else if ((y <= (-8200000000.0d0)) .or. (.not. (y <= (-7.8d-26))) .and. (y <= 1.05d+88)) then
tmp = x * (t / (z - y))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.2e+71) {
tmp = t;
} else if ((y <= -8200000000.0) || (!(y <= -7.8e-26) && (y <= 1.05e+88))) {
tmp = x * (t / (z - y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.2e+71: tmp = t elif (y <= -8200000000.0) or (not (y <= -7.8e-26) and (y <= 1.05e+88)): tmp = x * (t / (z - y)) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.2e+71) tmp = t; elseif ((y <= -8200000000.0) || (!(y <= -7.8e-26) && (y <= 1.05e+88))) tmp = Float64(x * Float64(t / Float64(z - y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.2e+71) tmp = t; elseif ((y <= -8200000000.0) || (~((y <= -7.8e-26)) && (y <= 1.05e+88))) tmp = x * (t / (z - y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.2e+71], t, If[Or[LessEqual[y, -8200000000.0], And[N[Not[LessEqual[y, -7.8e-26]], $MachinePrecision], LessEqual[y, 1.05e+88]]], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+71}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -8200000000 \lor \neg \left(y \leq -7.8 \cdot 10^{-26}\right) \land y \leq 1.05 \cdot 10^{+88}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.19999999999999995e71 or -8.2e9 < y < -7.79999999999999973e-26 or 1.05e88 < y Initial program 99.9%
Taylor expanded in y around inf 70.8%
if -2.19999999999999995e71 < y < -8.2e9 or -7.79999999999999973e-26 < y < 1.05e88Initial program 95.2%
Taylor expanded in x around inf 71.5%
*-commutative71.5%
associate-*r/74.6%
Simplified74.6%
Final simplification73.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.1e+72)
t
(if (<= y -23000000000.0)
(* x (- (/ t y)))
(if (<= y -2.3e-12) t (if (<= y 4e+87) (* t (/ x z)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.1e+72) {
tmp = t;
} else if (y <= -23000000000.0) {
tmp = x * -(t / y);
} else if (y <= -2.3e-12) {
tmp = t;
} else if (y <= 4e+87) {
tmp = t * (x / z);
} else {
tmp = 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 (y <= (-1.1d+72)) then
tmp = t
else if (y <= (-23000000000.0d0)) then
tmp = x * -(t / y)
else if (y <= (-2.3d-12)) then
tmp = t
else if (y <= 4d+87) then
tmp = t * (x / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.1e+72) {
tmp = t;
} else if (y <= -23000000000.0) {
tmp = x * -(t / y);
} else if (y <= -2.3e-12) {
tmp = t;
} else if (y <= 4e+87) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.1e+72: tmp = t elif y <= -23000000000.0: tmp = x * -(t / y) elif y <= -2.3e-12: tmp = t elif y <= 4e+87: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.1e+72) tmp = t; elseif (y <= -23000000000.0) tmp = Float64(x * Float64(-Float64(t / y))); elseif (y <= -2.3e-12) tmp = t; elseif (y <= 4e+87) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.1e+72) tmp = t; elseif (y <= -23000000000.0) tmp = x * -(t / y); elseif (y <= -2.3e-12) tmp = t; elseif (y <= 4e+87) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.1e+72], t, If[LessEqual[y, -23000000000.0], N[(x * (-N[(t / y), $MachinePrecision])), $MachinePrecision], If[LessEqual[y, -2.3e-12], t, If[LessEqual[y, 4e+87], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+72}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -23000000000:\\
\;\;\;\;x \cdot \left(-\frac{t}{y}\right)\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-12}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+87}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.1e72 or -2.3e10 < y < -2.29999999999999989e-12 or 3.9999999999999998e87 < y Initial program 99.9%
Taylor expanded in y around inf 71.4%
if -1.1e72 < y < -2.3e10Initial program 99.9%
Taylor expanded in x around inf 63.9%
*-commutative63.9%
associate-*r/69.9%
Simplified69.9%
Taylor expanded in z around 0 53.6%
associate-*r/53.6%
neg-mul-153.6%
Simplified53.6%
if -2.29999999999999989e-12 < y < 3.9999999999999998e87Initial program 94.6%
Taylor expanded in y around 0 64.1%
Final simplification66.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.8e+72)
t
(if (<= y -10800000000.0)
(/ x (/ y (- t)))
(if (<= y -8.5e-13) t (if (<= y 5.6e+87) (* t (/ x z)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.8e+72) {
tmp = t;
} else if (y <= -10800000000.0) {
tmp = x / (y / -t);
} else if (y <= -8.5e-13) {
tmp = t;
} else if (y <= 5.6e+87) {
tmp = t * (x / z);
} else {
tmp = 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 (y <= (-2.8d+72)) then
tmp = t
else if (y <= (-10800000000.0d0)) then
tmp = x / (y / -t)
else if (y <= (-8.5d-13)) then
tmp = t
else if (y <= 5.6d+87) then
tmp = t * (x / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.8e+72) {
tmp = t;
} else if (y <= -10800000000.0) {
tmp = x / (y / -t);
} else if (y <= -8.5e-13) {
tmp = t;
} else if (y <= 5.6e+87) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.8e+72: tmp = t elif y <= -10800000000.0: tmp = x / (y / -t) elif y <= -8.5e-13: tmp = t elif y <= 5.6e+87: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.8e+72) tmp = t; elseif (y <= -10800000000.0) tmp = Float64(x / Float64(y / Float64(-t))); elseif (y <= -8.5e-13) tmp = t; elseif (y <= 5.6e+87) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.8e+72) tmp = t; elseif (y <= -10800000000.0) tmp = x / (y / -t); elseif (y <= -8.5e-13) tmp = t; elseif (y <= 5.6e+87) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.8e+72], t, If[LessEqual[y, -10800000000.0], N[(x / N[(y / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8.5e-13], t, If[LessEqual[y, 5.6e+87], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+72}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -10800000000:\\
\;\;\;\;\frac{x}{\frac{y}{-t}}\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{-13}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+87}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.7999999999999999e72 or -1.08e10 < y < -8.5000000000000001e-13 or 5.6000000000000003e87 < y Initial program 99.9%
Taylor expanded in y around inf 71.4%
if -2.7999999999999999e72 < y < -1.08e10Initial program 99.9%
Taylor expanded in x around inf 63.9%
associate-/l*75.7%
Simplified75.7%
Taylor expanded in z around 0 47.8%
associate-*r/47.8%
neg-mul-147.8%
distribute-lft-neg-in47.8%
*-commutative47.8%
associate-/l*53.7%
Simplified53.7%
if -8.5000000000000001e-13 < y < 5.6000000000000003e87Initial program 94.6%
Taylor expanded in y around 0 64.1%
Final simplification66.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -4.3e+117)
t
(if (<= y -1.32e-13)
(* (- y x) (/ t y))
(if (<= y 4.2e+90) (* x (/ t (- z y))) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.3e+117) {
tmp = t;
} else if (y <= -1.32e-13) {
tmp = (y - x) * (t / y);
} else if (y <= 4.2e+90) {
tmp = x * (t / (z - y));
} else {
tmp = 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 (y <= (-4.3d+117)) then
tmp = t
else if (y <= (-1.32d-13)) then
tmp = (y - x) * (t / y)
else if (y <= 4.2d+90) then
tmp = x * (t / (z - y))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.3e+117) {
tmp = t;
} else if (y <= -1.32e-13) {
tmp = (y - x) * (t / y);
} else if (y <= 4.2e+90) {
tmp = x * (t / (z - y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.3e+117: tmp = t elif y <= -1.32e-13: tmp = (y - x) * (t / y) elif y <= 4.2e+90: tmp = x * (t / (z - y)) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.3e+117) tmp = t; elseif (y <= -1.32e-13) tmp = Float64(Float64(y - x) * Float64(t / y)); elseif (y <= 4.2e+90) tmp = Float64(x * Float64(t / Float64(z - y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.3e+117) tmp = t; elseif (y <= -1.32e-13) tmp = (y - x) * (t / y); elseif (y <= 4.2e+90) tmp = x * (t / (z - y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.3e+117], t, If[LessEqual[y, -1.32e-13], N[(N[(y - x), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e+90], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{+117}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.32 \cdot 10^{-13}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{t}{y}\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+90}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -4.29999999999999998e117 or 4.19999999999999961e90 < y Initial program 99.9%
Taylor expanded in y around inf 72.5%
if -4.29999999999999998e117 < y < -1.3199999999999999e-13Initial program 100.0%
Taylor expanded in z around 0 64.9%
associate-*r/64.9%
*-commutative64.9%
neg-mul-164.9%
distribute-lft-neg-in64.9%
*-commutative64.9%
Simplified64.9%
Taylor expanded in t around 0 64.9%
associate-/l*67.8%
associate-/r/67.5%
Simplified67.5%
if -1.3199999999999999e-13 < y < 4.19999999999999961e90Initial program 94.6%
Taylor expanded in x around inf 72.6%
*-commutative72.6%
associate-*r/74.7%
Simplified74.7%
Final simplification73.0%
(FPCore (x y z t) :precision binary64 (if (or (<= x -4.2e+84) (not (<= x 4e+66))) (/ t (/ (- z y) x)) (* t (/ (- y) (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -4.2e+84) || !(x <= 4e+66)) {
tmp = t / ((z - y) / x);
} else {
tmp = t * (-y / (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 ((x <= (-4.2d+84)) .or. (.not. (x <= 4d+66))) then
tmp = t / ((z - y) / x)
else
tmp = t * (-y / (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -4.2e+84) || !(x <= 4e+66)) {
tmp = t / ((z - y) / x);
} else {
tmp = t * (-y / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -4.2e+84) or not (x <= 4e+66): tmp = t / ((z - y) / x) else: tmp = t * (-y / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -4.2e+84) || !(x <= 4e+66)) tmp = Float64(t / Float64(Float64(z - y) / x)); else tmp = Float64(t * Float64(Float64(-y) / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -4.2e+84) || ~((x <= 4e+66))) tmp = t / ((z - y) / x); else tmp = t * (-y / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -4.2e+84], N[Not[LessEqual[x, 4e+66]], $MachinePrecision]], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t * N[((-y) / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{+84} \lor \neg \left(x \leq 4 \cdot 10^{+66}\right):\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{-y}{z - y}\\
\end{array}
\end{array}
if x < -4.20000000000000037e84 or 3.99999999999999978e66 < x Initial program 98.0%
Taylor expanded in x around inf 69.8%
associate-/l*79.8%
Simplified79.8%
if -4.20000000000000037e84 < x < 3.99999999999999978e66Initial program 96.6%
Taylor expanded in x around 0 81.2%
neg-mul-181.2%
distribute-neg-frac81.2%
Simplified81.2%
Final simplification80.6%
(FPCore (x y z t) :precision binary64 (if (<= y -1.5e-32) t (if (<= y 1.35e+88) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.5e-32) {
tmp = t;
} else if (y <= 1.35e+88) {
tmp = x * (t / z);
} else {
tmp = 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 (y <= (-1.5d-32)) then
tmp = t
else if (y <= 1.35d+88) then
tmp = x * (t / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.5e-32) {
tmp = t;
} else if (y <= 1.35e+88) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.5e-32: tmp = t elif y <= 1.35e+88: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.5e-32) tmp = t; elseif (y <= 1.35e+88) tmp = Float64(x * Float64(t / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.5e-32) tmp = t; elseif (y <= 1.35e+88) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.5e-32], t, If[LessEqual[y, 1.35e+88], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{-32}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+88}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.5e-32 or 1.35000000000000008e88 < y Initial program 99.9%
Taylor expanded in y around inf 62.6%
if -1.5e-32 < y < 1.35000000000000008e88Initial program 94.5%
Taylor expanded in y around 0 61.4%
associate-/l*64.8%
associate-/r/63.6%
Simplified63.6%
Final simplification63.1%
(FPCore (x y z t) :precision binary64 (if (<= y -5.5e-12) t (if (<= y 1.45e+87) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.5e-12) {
tmp = t;
} else if (y <= 1.45e+87) {
tmp = t * (x / z);
} else {
tmp = 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 (y <= (-5.5d-12)) then
tmp = t
else if (y <= 1.45d+87) then
tmp = t * (x / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.5e-12) {
tmp = t;
} else if (y <= 1.45e+87) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.5e-12: tmp = t elif y <= 1.45e+87: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.5e-12) tmp = t; elseif (y <= 1.45e+87) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.5e-12) tmp = t; elseif (y <= 1.45e+87) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.5e-12], t, If[LessEqual[y, 1.45e+87], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{-12}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+87}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -5.5000000000000004e-12 or 1.4499999999999999e87 < y Initial program 99.9%
Taylor expanded in y around inf 64.1%
if -5.5000000000000004e-12 < y < 1.4499999999999999e87Initial program 94.6%
Taylor expanded in y around 0 64.1%
Final simplification64.1%
(FPCore (x y z t) :precision binary64 (if (<= z 1.82e+127) t (* t (/ y z))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= 1.82e+127) {
tmp = t;
} else {
tmp = t * (y / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= 1.82d+127) then
tmp = t
else
tmp = t * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= 1.82e+127) {
tmp = t;
} else {
tmp = t * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= 1.82e+127: tmp = t else: tmp = t * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= 1.82e+127) tmp = t; else tmp = Float64(t * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= 1.82e+127) tmp = t; else tmp = t * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, 1.82e+127], t, N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.82 \cdot 10^{+127}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{z}\\
\end{array}
\end{array}
if z < 1.82000000000000009e127Initial program 98.4%
Taylor expanded in y around inf 41.8%
if 1.82000000000000009e127 < z Initial program 91.4%
Taylor expanded in x around 0 52.5%
neg-mul-152.5%
distribute-neg-frac52.5%
Simplified52.5%
Taylor expanded in y around 0 48.3%
mul-1-neg48.3%
distribute-neg-frac48.3%
Simplified48.3%
expm1-log1p-u45.7%
expm1-udef36.4%
*-commutative36.4%
div-inv36.4%
div-inv36.4%
add-sqr-sqrt15.3%
sqrt-unprod34.3%
sqr-neg34.3%
sqrt-unprod21.2%
add-sqr-sqrt34.5%
Applied egg-rr34.5%
expm1-def34.7%
expm1-log1p34.8%
Simplified34.8%
Final simplification40.5%
(FPCore (x y z t) :precision binary64 t)
double code(double x, double y, double z, double t) {
return 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 = t
end function
public static double code(double x, double y, double z, double t) {
return t;
}
def code(x, y, z, t): return t
function code(x, y, z, t) return t end
function tmp = code(x, y, z, t) tmp = t; end
code[x_, y_, z_, t_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 97.2%
Taylor expanded in y around inf 35.8%
Final simplification35.8%
(FPCore (x y z t) :precision binary64 (/ t (/ (- z y) (- x y))))
double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - 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 = t / ((z - y) / (x - y))
end function
public static double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
def code(x, y, z, t): return t / ((z - y) / (x - y))
function code(x, y, z, t) return Float64(t / Float64(Float64(z - y) / Float64(x - y))) end
function tmp = code(x, y, z, t) tmp = t / ((z - y) / (x - y)); end
code[x_, y_, z_, t_] := N[(t / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{\frac{z - y}{x - y}}
\end{array}
herbie shell --seed 2024010
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))