
(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 13 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 (/ 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}
Initial program 96.3%
associate-*l/85.2%
associate-*r/86.6%
Simplified86.6%
associate-*r/85.2%
associate-*l/96.3%
*-commutative96.3%
clear-num96.1%
un-div-inv96.4%
Applied egg-rr96.4%
Final simplification96.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- x y) (/ t z))) (t_2 (* x (/ t (- z y)))))
(if (<= y -7e+66)
t
(if (<= y -4.3e-38)
t_2
(if (<= y -1.95e-252)
t_1
(if (<= y 8e-31)
t_2
(if (<= y 4.5e+21)
t_1
(if (<= y 3.5e+47) t (if (<= y 5e+85) t_2 t)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - y) * (t / z);
double t_2 = x * (t / (z - y));
double tmp;
if (y <= -7e+66) {
tmp = t;
} else if (y <= -4.3e-38) {
tmp = t_2;
} else if (y <= -1.95e-252) {
tmp = t_1;
} else if (y <= 8e-31) {
tmp = t_2;
} else if (y <= 4.5e+21) {
tmp = t_1;
} else if (y <= 3.5e+47) {
tmp = t;
} else if (y <= 5e+85) {
tmp = t_2;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x - y) * (t / z)
t_2 = x * (t / (z - y))
if (y <= (-7d+66)) then
tmp = t
else if (y <= (-4.3d-38)) then
tmp = t_2
else if (y <= (-1.95d-252)) then
tmp = t_1
else if (y <= 8d-31) then
tmp = t_2
else if (y <= 4.5d+21) then
tmp = t_1
else if (y <= 3.5d+47) then
tmp = t
else if (y <= 5d+85) then
tmp = t_2
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x - y) * (t / z);
double t_2 = x * (t / (z - y));
double tmp;
if (y <= -7e+66) {
tmp = t;
} else if (y <= -4.3e-38) {
tmp = t_2;
} else if (y <= -1.95e-252) {
tmp = t_1;
} else if (y <= 8e-31) {
tmp = t_2;
} else if (y <= 4.5e+21) {
tmp = t_1;
} else if (y <= 3.5e+47) {
tmp = t;
} else if (y <= 5e+85) {
tmp = t_2;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - y) * (t / z) t_2 = x * (t / (z - y)) tmp = 0 if y <= -7e+66: tmp = t elif y <= -4.3e-38: tmp = t_2 elif y <= -1.95e-252: tmp = t_1 elif y <= 8e-31: tmp = t_2 elif y <= 4.5e+21: tmp = t_1 elif y <= 3.5e+47: tmp = t elif y <= 5e+85: tmp = t_2 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - y) * Float64(t / z)) t_2 = Float64(x * Float64(t / Float64(z - y))) tmp = 0.0 if (y <= -7e+66) tmp = t; elseif (y <= -4.3e-38) tmp = t_2; elseif (y <= -1.95e-252) tmp = t_1; elseif (y <= 8e-31) tmp = t_2; elseif (y <= 4.5e+21) tmp = t_1; elseif (y <= 3.5e+47) tmp = t; elseif (y <= 5e+85) tmp = t_2; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - y) * (t / z); t_2 = x * (t / (z - y)); tmp = 0.0; if (y <= -7e+66) tmp = t; elseif (y <= -4.3e-38) tmp = t_2; elseif (y <= -1.95e-252) tmp = t_1; elseif (y <= 8e-31) tmp = t_2; elseif (y <= 4.5e+21) tmp = t_1; elseif (y <= 3.5e+47) tmp = t; elseif (y <= 5e+85) tmp = t_2; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7e+66], t, If[LessEqual[y, -4.3e-38], t$95$2, If[LessEqual[y, -1.95e-252], t$95$1, If[LessEqual[y, 8e-31], t$95$2, If[LessEqual[y, 4.5e+21], t$95$1, If[LessEqual[y, 3.5e+47], t, If[LessEqual[y, 5e+85], t$95$2, t]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{t}{z}\\
t_2 := x \cdot \frac{t}{z - y}\\
\mathbf{if}\;y \leq -7 \cdot 10^{+66}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -4.3 \cdot 10^{-38}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.95 \cdot 10^{-252}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-31}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+47}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+85}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -6.9999999999999994e66 or 4.5e21 < y < 3.50000000000000015e47 or 5.0000000000000001e85 < y Initial program 99.8%
associate-*l/76.0%
associate-*r/77.4%
Simplified77.4%
Taylor expanded in y around inf 71.1%
if -6.9999999999999994e66 < y < -4.3000000000000002e-38 or -1.9499999999999999e-252 < y < 8.000000000000001e-31 or 3.50000000000000015e47 < y < 5.0000000000000001e85Initial program 94.2%
associate-*l/90.9%
associate-*r/95.7%
Simplified95.7%
Taylor expanded in x around inf 72.2%
associate-*l/75.1%
*-commutative75.1%
Simplified75.1%
if -4.3000000000000002e-38 < y < -1.9499999999999999e-252 or 8.000000000000001e-31 < y < 4.5e21Initial program 93.3%
associate-*l/93.1%
associate-*r/90.1%
Simplified90.1%
Taylor expanded in z around inf 76.8%
Final simplification73.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- x y) (/ t z))) (t_2 (* x (/ t (- z y)))))
(if (<= y -1.65e+66)
t
(if (<= y -1.32e-42)
(* t (/ x (- z y)))
(if (<= y -9.5e-251)
t_1
(if (<= y 2.6e-31)
t_2
(if (<= y 7.8e+31)
t_1
(if (<= y 3.3e+47) t (if (<= y 5.5e+84) t_2 t)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - y) * (t / z);
double t_2 = x * (t / (z - y));
double tmp;
if (y <= -1.65e+66) {
tmp = t;
} else if (y <= -1.32e-42) {
tmp = t * (x / (z - y));
} else if (y <= -9.5e-251) {
tmp = t_1;
} else if (y <= 2.6e-31) {
tmp = t_2;
} else if (y <= 7.8e+31) {
tmp = t_1;
} else if (y <= 3.3e+47) {
tmp = t;
} else if (y <= 5.5e+84) {
tmp = t_2;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x - y) * (t / z)
t_2 = x * (t / (z - y))
if (y <= (-1.65d+66)) then
tmp = t
else if (y <= (-1.32d-42)) then
tmp = t * (x / (z - y))
else if (y <= (-9.5d-251)) then
tmp = t_1
else if (y <= 2.6d-31) then
tmp = t_2
else if (y <= 7.8d+31) then
tmp = t_1
else if (y <= 3.3d+47) then
tmp = t
else if (y <= 5.5d+84) then
tmp = t_2
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x - y) * (t / z);
double t_2 = x * (t / (z - y));
double tmp;
if (y <= -1.65e+66) {
tmp = t;
} else if (y <= -1.32e-42) {
tmp = t * (x / (z - y));
} else if (y <= -9.5e-251) {
tmp = t_1;
} else if (y <= 2.6e-31) {
tmp = t_2;
} else if (y <= 7.8e+31) {
tmp = t_1;
} else if (y <= 3.3e+47) {
tmp = t;
} else if (y <= 5.5e+84) {
tmp = t_2;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - y) * (t / z) t_2 = x * (t / (z - y)) tmp = 0 if y <= -1.65e+66: tmp = t elif y <= -1.32e-42: tmp = t * (x / (z - y)) elif y <= -9.5e-251: tmp = t_1 elif y <= 2.6e-31: tmp = t_2 elif y <= 7.8e+31: tmp = t_1 elif y <= 3.3e+47: tmp = t elif y <= 5.5e+84: tmp = t_2 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - y) * Float64(t / z)) t_2 = Float64(x * Float64(t / Float64(z - y))) tmp = 0.0 if (y <= -1.65e+66) tmp = t; elseif (y <= -1.32e-42) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (y <= -9.5e-251) tmp = t_1; elseif (y <= 2.6e-31) tmp = t_2; elseif (y <= 7.8e+31) tmp = t_1; elseif (y <= 3.3e+47) tmp = t; elseif (y <= 5.5e+84) tmp = t_2; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - y) * (t / z); t_2 = x * (t / (z - y)); tmp = 0.0; if (y <= -1.65e+66) tmp = t; elseif (y <= -1.32e-42) tmp = t * (x / (z - y)); elseif (y <= -9.5e-251) tmp = t_1; elseif (y <= 2.6e-31) tmp = t_2; elseif (y <= 7.8e+31) tmp = t_1; elseif (y <= 3.3e+47) tmp = t; elseif (y <= 5.5e+84) tmp = t_2; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.65e+66], t, If[LessEqual[y, -1.32e-42], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9.5e-251], t$95$1, If[LessEqual[y, 2.6e-31], t$95$2, If[LessEqual[y, 7.8e+31], t$95$1, If[LessEqual[y, 3.3e+47], t, If[LessEqual[y, 5.5e+84], t$95$2, t]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{t}{z}\\
t_2 := x \cdot \frac{t}{z - y}\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+66}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.32 \cdot 10^{-42}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;y \leq -9.5 \cdot 10^{-251}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-31}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+31}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{+47}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+84}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.6500000000000001e66 or 7.79999999999999999e31 < y < 3.2999999999999999e47 or 5.5000000000000004e84 < y Initial program 99.8%
associate-*l/76.0%
associate-*r/77.4%
Simplified77.4%
Taylor expanded in y around inf 71.1%
if -1.6500000000000001e66 < y < -1.32000000000000006e-42Initial program 99.7%
Taylor expanded in x around inf 67.5%
if -1.32000000000000006e-42 < y < -9.49999999999999927e-251 or 2.59999999999999995e-31 < y < 7.79999999999999999e31Initial program 93.1%
associate-*l/92.9%
associate-*r/91.0%
Simplified91.0%
Taylor expanded in z around inf 77.3%
if -9.49999999999999927e-251 < y < 2.59999999999999995e-31 or 3.2999999999999999e47 < y < 5.5000000000000004e84Initial program 92.2%
associate-*l/92.2%
associate-*r/94.2%
Simplified94.2%
Taylor expanded in x around inf 78.1%
associate-*l/78.9%
*-commutative78.9%
Simplified78.9%
Final simplification74.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ (- x y) z))))
(if (<= y -3.4e+72)
t
(if (<= y -3e-36)
(* t (/ x (- z y)))
(if (<= y 1.02e-271)
t_1
(if (<= y 2.8e-147)
(* x (/ t (- z y)))
(if (<= y 3.6e+33) t_1 t)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * ((x - y) / z);
double tmp;
if (y <= -3.4e+72) {
tmp = t;
} else if (y <= -3e-36) {
tmp = t * (x / (z - y));
} else if (y <= 1.02e-271) {
tmp = t_1;
} else if (y <= 2.8e-147) {
tmp = x * (t / (z - y));
} else if (y <= 3.6e+33) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t * ((x - y) / z)
if (y <= (-3.4d+72)) then
tmp = t
else if (y <= (-3d-36)) then
tmp = t * (x / (z - y))
else if (y <= 1.02d-271) then
tmp = t_1
else if (y <= 2.8d-147) then
tmp = x * (t / (z - y))
else if (y <= 3.6d+33) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * ((x - y) / z);
double tmp;
if (y <= -3.4e+72) {
tmp = t;
} else if (y <= -3e-36) {
tmp = t * (x / (z - y));
} else if (y <= 1.02e-271) {
tmp = t_1;
} else if (y <= 2.8e-147) {
tmp = x * (t / (z - y));
} else if (y <= 3.6e+33) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * ((x - y) / z) tmp = 0 if y <= -3.4e+72: tmp = t elif y <= -3e-36: tmp = t * (x / (z - y)) elif y <= 1.02e-271: tmp = t_1 elif y <= 2.8e-147: tmp = x * (t / (z - y)) elif y <= 3.6e+33: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(Float64(x - y) / z)) tmp = 0.0 if (y <= -3.4e+72) tmp = t; elseif (y <= -3e-36) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (y <= 1.02e-271) tmp = t_1; elseif (y <= 2.8e-147) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 3.6e+33) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * ((x - y) / z); tmp = 0.0; if (y <= -3.4e+72) tmp = t; elseif (y <= -3e-36) tmp = t * (x / (z - y)); elseif (y <= 1.02e-271) tmp = t_1; elseif (y <= 2.8e-147) tmp = x * (t / (z - y)); elseif (y <= 3.6e+33) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.4e+72], t, If[LessEqual[y, -3e-36], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.02e-271], t$95$1, If[LessEqual[y, 2.8e-147], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e+33], t$95$1, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x - y}{z}\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{+72}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -3 \cdot 10^{-36}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{-271}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-147}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+33}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.3999999999999998e72 or 3.6000000000000003e33 < y Initial program 99.8%
associate-*l/76.4%
associate-*r/78.6%
Simplified78.6%
Taylor expanded in y around inf 68.4%
if -3.3999999999999998e72 < y < -3.0000000000000002e-36Initial program 99.8%
Taylor expanded in x around inf 64.6%
if -3.0000000000000002e-36 < y < 1.02e-271 or 2.8e-147 < y < 3.6000000000000003e33Initial program 94.4%
Taylor expanded in z around inf 78.6%
if 1.02e-271 < y < 2.8e-147Initial program 84.4%
associate-*l/95.9%
associate-*r/97.3%
Simplified97.3%
Taylor expanded in x around inf 91.9%
associate-*l/93.4%
*-commutative93.4%
Simplified93.4%
Final simplification74.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ (- x y) z))) (t_2 (- t (* t (/ x y)))))
(if (<= y -1.3e-35)
t_2
(if (<= y 1e-272)
t_1
(if (<= y 1.85e-147)
(* x (/ t (- z y)))
(if (<= y 9.2e+25) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = t * ((x - y) / z);
double t_2 = t - (t * (x / y));
double tmp;
if (y <= -1.3e-35) {
tmp = t_2;
} else if (y <= 1e-272) {
tmp = t_1;
} else if (y <= 1.85e-147) {
tmp = x * (t / (z - y));
} else if (y <= 9.2e+25) {
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 * ((x - y) / z)
t_2 = t - (t * (x / y))
if (y <= (-1.3d-35)) then
tmp = t_2
else if (y <= 1d-272) then
tmp = t_1
else if (y <= 1.85d-147) then
tmp = x * (t / (z - y))
else if (y <= 9.2d+25) 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 * ((x - y) / z);
double t_2 = t - (t * (x / y));
double tmp;
if (y <= -1.3e-35) {
tmp = t_2;
} else if (y <= 1e-272) {
tmp = t_1;
} else if (y <= 1.85e-147) {
tmp = x * (t / (z - y));
} else if (y <= 9.2e+25) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * ((x - y) / z) t_2 = t - (t * (x / y)) tmp = 0 if y <= -1.3e-35: tmp = t_2 elif y <= 1e-272: tmp = t_1 elif y <= 1.85e-147: tmp = x * (t / (z - y)) elif y <= 9.2e+25: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(Float64(x - y) / z)) t_2 = Float64(t - Float64(t * Float64(x / y))) tmp = 0.0 if (y <= -1.3e-35) tmp = t_2; elseif (y <= 1e-272) tmp = t_1; elseif (y <= 1.85e-147) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 9.2e+25) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * ((x - y) / z); t_2 = t - (t * (x / y)); tmp = 0.0; if (y <= -1.3e-35) tmp = t_2; elseif (y <= 1e-272) tmp = t_1; elseif (y <= 1.85e-147) tmp = x * (t / (z - y)); elseif (y <= 9.2e+25) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.3e-35], t$95$2, If[LessEqual[y, 1e-272], t$95$1, If[LessEqual[y, 1.85e-147], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.2e+25], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x - y}{z}\\
t_2 := t - t \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -1.3 \cdot 10^{-35}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 10^{-272}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-147}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{+25}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.30000000000000002e-35 or 9.1999999999999992e25 < y Initial program 99.8%
associate-*l/78.2%
associate-*r/82.0%
Simplified82.0%
Taylor expanded in z around 0 61.0%
associate-*r/61.0%
*-commutative61.0%
neg-mul-161.0%
distribute-rgt-neg-in61.0%
Simplified61.0%
Taylor expanded in x around 0 72.0%
mul-1-neg72.0%
unsub-neg72.0%
*-commutative72.0%
associate-*l/78.7%
Simplified78.7%
if -1.30000000000000002e-35 < y < 9.9999999999999993e-273 or 1.8500000000000001e-147 < y < 9.1999999999999992e25Initial program 94.4%
Taylor expanded in z around inf 78.6%
if 9.9999999999999993e-273 < y < 1.8500000000000001e-147Initial program 84.4%
associate-*l/95.9%
associate-*r/97.3%
Simplified97.3%
Taylor expanded in x around inf 91.9%
associate-*l/93.4%
*-commutative93.4%
Simplified93.4%
Final simplification80.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (- 1.0 (/ z y)))))
(if (<= y -3.4e+75)
t_1
(if (<= y -2.8e-33)
(- t (* t (/ x y)))
(if (<= y 1.1e-272)
(* t (/ (- x y) z))
(if (<= y 5.8e-29) (* x (/ t (- z y))) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = t / (1.0 - (z / y));
double tmp;
if (y <= -3.4e+75) {
tmp = t_1;
} else if (y <= -2.8e-33) {
tmp = t - (t * (x / y));
} else if (y <= 1.1e-272) {
tmp = t * ((x - y) / z);
} else if (y <= 5.8e-29) {
tmp = x * (t / (z - y));
} 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 / (1.0d0 - (z / y))
if (y <= (-3.4d+75)) then
tmp = t_1
else if (y <= (-2.8d-33)) then
tmp = t - (t * (x / y))
else if (y <= 1.1d-272) then
tmp = t * ((x - y) / z)
else if (y <= 5.8d-29) then
tmp = x * (t / (z - y))
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 / (1.0 - (z / y));
double tmp;
if (y <= -3.4e+75) {
tmp = t_1;
} else if (y <= -2.8e-33) {
tmp = t - (t * (x / y));
} else if (y <= 1.1e-272) {
tmp = t * ((x - y) / z);
} else if (y <= 5.8e-29) {
tmp = x * (t / (z - y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (1.0 - (z / y)) tmp = 0 if y <= -3.4e+75: tmp = t_1 elif y <= -2.8e-33: tmp = t - (t * (x / y)) elif y <= 1.1e-272: tmp = t * ((x - y) / z) elif y <= 5.8e-29: tmp = x * (t / (z - y)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(1.0 - Float64(z / y))) tmp = 0.0 if (y <= -3.4e+75) tmp = t_1; elseif (y <= -2.8e-33) tmp = Float64(t - Float64(t * Float64(x / y))); elseif (y <= 1.1e-272) tmp = Float64(t * Float64(Float64(x - y) / z)); elseif (y <= 5.8e-29) tmp = Float64(x * Float64(t / Float64(z - y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (1.0 - (z / y)); tmp = 0.0; if (y <= -3.4e+75) tmp = t_1; elseif (y <= -2.8e-33) tmp = t - (t * (x / y)); elseif (y <= 1.1e-272) tmp = t * ((x - y) / z); elseif (y <= 5.8e-29) tmp = x * (t / (z - y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.4e+75], t$95$1, If[LessEqual[y, -2.8e-33], N[(t - N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e-272], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.8e-29], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{+75}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-33}:\\
\;\;\;\;t - t \cdot \frac{x}{y}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-272}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-29}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -3.40000000000000011e75 or 5.80000000000000048e-29 < y Initial program 99.8%
associate-*l/76.6%
associate-*r/79.8%
Simplified79.8%
associate-*r/76.6%
associate-*l/99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 83.8%
associate-*r/83.8%
neg-mul-183.8%
neg-sub083.8%
associate--r-83.8%
neg-sub083.8%
Simplified83.8%
Taylor expanded in z around 0 83.8%
mul-1-neg83.8%
unsub-neg83.8%
Simplified83.8%
if -3.40000000000000011e75 < y < -2.8e-33Initial program 99.8%
associate-*l/88.3%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in z around 0 64.6%
associate-*r/64.6%
*-commutative64.6%
neg-mul-164.6%
distribute-rgt-neg-in64.6%
Simplified64.6%
Taylor expanded in x around 0 68.2%
mul-1-neg68.2%
unsub-neg68.2%
*-commutative68.2%
associate-*l/71.1%
Simplified71.1%
if -2.8e-33 < y < 1.09999999999999994e-272Initial program 93.7%
Taylor expanded in z around inf 85.4%
if 1.09999999999999994e-272 < y < 5.80000000000000048e-29Initial program 88.8%
associate-*l/90.8%
associate-*r/93.9%
Simplified93.9%
Taylor expanded in x around inf 75.0%
associate-*l/76.3%
*-commutative76.3%
Simplified76.3%
Final simplification81.8%
(FPCore (x y z t) :precision binary64 (if (<= y -7.6e+239) (- t (* t (/ x y))) (if (<= y 5.9e+85) (* (- x y) (/ t (- z y))) (/ t (- 1.0 (/ z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.6e+239) {
tmp = t - (t * (x / y));
} else if (y <= 5.9e+85) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = t / (1.0 - (z / y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-7.6d+239)) then
tmp = t - (t * (x / y))
else if (y <= 5.9d+85) then
tmp = (x - y) * (t / (z - y))
else
tmp = t / (1.0d0 - (z / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.6e+239) {
tmp = t - (t * (x / y));
} else if (y <= 5.9e+85) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = t / (1.0 - (z / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.6e+239: tmp = t - (t * (x / y)) elif y <= 5.9e+85: tmp = (x - y) * (t / (z - y)) else: tmp = t / (1.0 - (z / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.6e+239) tmp = Float64(t - Float64(t * Float64(x / y))); elseif (y <= 5.9e+85) tmp = Float64(Float64(x - y) * Float64(t / Float64(z - y))); else tmp = Float64(t / Float64(1.0 - Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.6e+239) tmp = t - (t * (x / y)); elseif (y <= 5.9e+85) tmp = (x - y) * (t / (z - y)); else tmp = t / (1.0 - (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.6e+239], N[(t - N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.9e+85], N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.6 \cdot 10^{+239}:\\
\;\;\;\;t - t \cdot \frac{x}{y}\\
\mathbf{elif}\;y \leq 5.9 \cdot 10^{+85}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\end{array}
\end{array}
if y < -7.6000000000000003e239Initial program 100.0%
associate-*l/66.0%
associate-*r/63.7%
Simplified63.7%
Taylor expanded in z around 0 66.0%
associate-*r/66.0%
*-commutative66.0%
neg-mul-166.0%
distribute-rgt-neg-in66.0%
Simplified66.0%
Taylor expanded in x around 0 86.6%
mul-1-neg86.6%
unsub-neg86.6%
*-commutative86.6%
associate-*l/100.0%
Simplified100.0%
if -7.6000000000000003e239 < y < 5.9e85Initial program 95.1%
associate-*l/88.6%
associate-*r/91.9%
Simplified91.9%
if 5.9e85 < y Initial program 99.8%
associate-*l/78.1%
associate-*r/73.3%
Simplified73.3%
associate-*r/78.1%
associate-*l/99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 90.6%
associate-*r/90.6%
neg-mul-190.6%
neg-sub090.6%
associate--r-90.6%
neg-sub090.6%
Simplified90.6%
Taylor expanded in z around 0 90.6%
mul-1-neg90.6%
unsub-neg90.6%
Simplified90.6%
Final simplification92.1%
(FPCore (x y z t) :precision binary64 (if (<= y -3.35e+69) t (if (<= y 2.3e+85) (* x (/ t (- z y))) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.35e+69) {
tmp = t;
} else if (y <= 2.3e+85) {
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 <= (-3.35d+69)) then
tmp = t
else if (y <= 2.3d+85) 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 <= -3.35e+69) {
tmp = t;
} else if (y <= 2.3e+85) {
tmp = x * (t / (z - y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.35e+69: tmp = t elif y <= 2.3e+85: tmp = x * (t / (z - y)) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.35e+69) tmp = t; elseif (y <= 2.3e+85) 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 <= -3.35e+69) tmp = t; elseif (y <= 2.3e+85) tmp = x * (t / (z - y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.35e+69], t, If[LessEqual[y, 2.3e+85], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.35 \cdot 10^{+69}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+85}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.35000000000000005e69 or 2.2999999999999999e85 < y Initial program 99.8%
associate-*l/75.3%
associate-*r/76.8%
Simplified76.8%
Taylor expanded in y around inf 71.2%
if -3.35000000000000005e69 < y < 2.2999999999999999e85Initial program 93.9%
associate-*l/92.0%
associate-*r/93.3%
Simplified93.3%
Taylor expanded in x around inf 68.5%
associate-*l/69.0%
*-commutative69.0%
Simplified69.0%
Final simplification69.9%
(FPCore (x y z t) :precision binary64 (if (<= y -3.3e-18) t (if (<= y 1.15e-26) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.3e-18) {
tmp = t;
} else if (y <= 1.15e-26) {
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 <= (-3.3d-18)) then
tmp = t
else if (y <= 1.15d-26) 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 <= -3.3e-18) {
tmp = t;
} else if (y <= 1.15e-26) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.3e-18: tmp = t elif y <= 1.15e-26: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.3e-18) tmp = t; elseif (y <= 1.15e-26) 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 <= -3.3e-18) tmp = t; elseif (y <= 1.15e-26) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.3e-18], t, If[LessEqual[y, 1.15e-26], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{-18}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-26}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.3000000000000002e-18 or 1.15000000000000004e-26 < y Initial program 99.8%
associate-*l/77.8%
associate-*r/82.5%
Simplified82.5%
Taylor expanded in y around inf 63.2%
if -3.3000000000000002e-18 < y < 1.15000000000000004e-26Initial program 92.2%
associate-*l/94.0%
associate-*r/91.4%
Simplified91.4%
associate-*r/94.0%
associate-*l/92.2%
*-commutative92.2%
clear-num91.6%
un-div-inv92.2%
Applied egg-rr92.2%
Taylor expanded in y around 0 61.6%
associate-*l/60.3%
*-commutative60.3%
Simplified60.3%
Final simplification61.9%
(FPCore (x y z t) :precision binary64 (if (<= y -2.6e-18) t (if (<= y 9.2e-27) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.6e-18) {
tmp = t;
} else if (y <= 9.2e-27) {
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.6d-18)) then
tmp = t
else if (y <= 9.2d-27) 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.6e-18) {
tmp = t;
} else if (y <= 9.2e-27) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.6e-18: tmp = t elif y <= 9.2e-27: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.6e-18) tmp = t; elseif (y <= 9.2e-27) 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.6e-18) tmp = t; elseif (y <= 9.2e-27) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.6e-18], t, If[LessEqual[y, 9.2e-27], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{-18}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{-27}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.6e-18 or 9.1999999999999998e-27 < y Initial program 99.8%
associate-*l/77.8%
associate-*r/82.5%
Simplified82.5%
Taylor expanded in y around inf 63.2%
if -2.6e-18 < y < 9.1999999999999998e-27Initial program 92.2%
Taylor expanded in y around 0 63.8%
Final simplification63.5%
(FPCore (x y z t) :precision binary64 (if (<= y -3.3e-18) t (if (<= y 1.2e-26) (/ t (/ z x)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.3e-18) {
tmp = t;
} else if (y <= 1.2e-26) {
tmp = t / (z / x);
} 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 <= (-3.3d-18)) then
tmp = t
else if (y <= 1.2d-26) then
tmp = t / (z / x)
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 <= -3.3e-18) {
tmp = t;
} else if (y <= 1.2e-26) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.3e-18: tmp = t elif y <= 1.2e-26: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.3e-18) tmp = t; elseif (y <= 1.2e-26) tmp = Float64(t / Float64(z / x)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.3e-18) tmp = t; elseif (y <= 1.2e-26) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.3e-18], t, If[LessEqual[y, 1.2e-26], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{-18}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-26}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.3000000000000002e-18 or 1.2e-26 < y Initial program 99.8%
associate-*l/77.8%
associate-*r/82.5%
Simplified82.5%
Taylor expanded in y around inf 63.2%
if -3.3000000000000002e-18 < y < 1.2e-26Initial program 92.2%
associate-*l/94.0%
associate-*r/91.4%
Simplified91.4%
Taylor expanded in y around 0 61.6%
associate-/l*63.8%
Simplified63.8%
Final simplification63.5%
(FPCore (x y z t) :precision binary64 (* t (/ (- x y) (- z y))))
double code(double x, double y, double z, double t) {
return t * ((x - y) / (z - 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 * ((x - y) / (z - y))
end function
public static double code(double x, double y, double z, double t) {
return t * ((x - y) / (z - y));
}
def code(x, y, z, t): return t * ((x - y) / (z - y))
function code(x, y, z, t) return Float64(t * Float64(Float64(x - y) / Float64(z - y))) end
function tmp = code(x, y, z, t) tmp = t * ((x - y) / (z - y)); end
code[x_, y_, z_, t_] := N[(t * N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t \cdot \frac{x - y}{z - y}
\end{array}
Initial program 96.3%
Final simplification96.3%
(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 96.3%
associate-*l/85.2%
associate-*r/86.6%
Simplified86.6%
Taylor expanded in y around inf 37.7%
Final simplification37.7%
(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 2023174
(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))