
(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 18 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 97.9%
associate-*l/86.4%
associate-/l*80.4%
Simplified80.4%
associate-*r/86.4%
associate-*l/97.9%
*-commutative97.9%
clear-num97.9%
un-div-inv98.2%
Applied egg-rr98.2%
Final simplification98.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ x y)))))
(if (<= y -2.5e+38)
t_1
(if (<= y -1.25e-7)
(* t (/ y (- z)))
(if (or (<= y -4.4e-157) (not (<= y 7.5e-35))) t_1 (/ t (/ z x)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -2.5e+38) {
tmp = t_1;
} else if (y <= -1.25e-7) {
tmp = t * (y / -z);
} else if ((y <= -4.4e-157) || !(y <= 7.5e-35)) {
tmp = t_1;
} else {
tmp = t / (z / 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) :: t_1
real(8) :: tmp
t_1 = t * (1.0d0 - (x / y))
if (y <= (-2.5d+38)) then
tmp = t_1
else if (y <= (-1.25d-7)) then
tmp = t * (y / -z)
else if ((y <= (-4.4d-157)) .or. (.not. (y <= 7.5d-35))) then
tmp = t_1
else
tmp = t / (z / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -2.5e+38) {
tmp = t_1;
} else if (y <= -1.25e-7) {
tmp = t * (y / -z);
} else if ((y <= -4.4e-157) || !(y <= 7.5e-35)) {
tmp = t_1;
} else {
tmp = t / (z / x);
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (1.0 - (x / y)) tmp = 0 if y <= -2.5e+38: tmp = t_1 elif y <= -1.25e-7: tmp = t * (y / -z) elif (y <= -4.4e-157) or not (y <= 7.5e-35): tmp = t_1 else: tmp = t / (z / x) return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -2.5e+38) tmp = t_1; elseif (y <= -1.25e-7) tmp = Float64(t * Float64(y / Float64(-z))); elseif ((y <= -4.4e-157) || !(y <= 7.5e-35)) tmp = t_1; else tmp = Float64(t / Float64(z / x)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (1.0 - (x / y)); tmp = 0.0; if (y <= -2.5e+38) tmp = t_1; elseif (y <= -1.25e-7) tmp = t * (y / -z); elseif ((y <= -4.4e-157) || ~((y <= 7.5e-35))) tmp = t_1; else tmp = t / (z / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.5e+38], t$95$1, If[LessEqual[y, -1.25e-7], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -4.4e-157], N[Not[LessEqual[y, 7.5e-35]], $MachinePrecision]], t$95$1, N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.25 \cdot 10^{-7}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\
\mathbf{elif}\;y \leq -4.4 \cdot 10^{-157} \lor \neg \left(y \leq 7.5 \cdot 10^{-35}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\end{array}
\end{array}
if y < -2.49999999999999985e38 or -1.24999999999999994e-7 < y < -4.4000000000000002e-157 or 7.5e-35 < y Initial program 99.2%
Taylor expanded in z around 0 75.1%
mul-1-neg75.1%
div-sub75.2%
sub-neg75.2%
*-inverses75.2%
metadata-eval75.2%
Simplified75.2%
Taylor expanded in x around 0 71.3%
*-rgt-identity71.3%
mul-1-neg71.3%
associate-/l*75.2%
distribute-rgt-neg-in75.2%
distribute-frac-neg275.2%
distribute-lft-in75.2%
distribute-frac-neg275.2%
sub-neg75.2%
Simplified75.2%
if -2.49999999999999985e38 < y < -1.24999999999999994e-7Initial program 100.0%
associate-*l/99.7%
associate-/l*91.0%
Simplified91.0%
Taylor expanded in z around inf 72.8%
Taylor expanded in x around 0 64.3%
mul-1-neg64.3%
associate-/l*64.3%
distribute-rgt-neg-in64.3%
Simplified64.3%
if -4.4000000000000002e-157 < y < 7.5e-35Initial program 95.7%
associate-*l/95.8%
associate-/l*89.9%
Simplified89.9%
associate-*r/95.8%
associate-*l/95.7%
*-commutative95.7%
clear-num95.6%
un-div-inv95.8%
Applied egg-rr95.8%
Taylor expanded in y around 0 72.6%
Final simplification73.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.05e+88)
t
(if (<= y -8.5e-7)
(* y (/ t (- z)))
(if (<= y -1.4e-188) (/ x (/ z t)) (if (<= y 5.4e-26) (/ t (/ z x)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.05e+88) {
tmp = t;
} else if (y <= -8.5e-7) {
tmp = y * (t / -z);
} else if (y <= -1.4e-188) {
tmp = x / (z / t);
} else if (y <= 5.4e-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.05d+88)) then
tmp = t
else if (y <= (-8.5d-7)) then
tmp = y * (t / -z)
else if (y <= (-1.4d-188)) then
tmp = x / (z / t)
else if (y <= 5.4d-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.05e+88) {
tmp = t;
} else if (y <= -8.5e-7) {
tmp = y * (t / -z);
} else if (y <= -1.4e-188) {
tmp = x / (z / t);
} else if (y <= 5.4e-26) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.05e+88: tmp = t elif y <= -8.5e-7: tmp = y * (t / -z) elif y <= -1.4e-188: tmp = x / (z / t) elif y <= 5.4e-26: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.05e+88) tmp = t; elseif (y <= -8.5e-7) tmp = Float64(y * Float64(t / Float64(-z))); elseif (y <= -1.4e-188) tmp = Float64(x / Float64(z / t)); elseif (y <= 5.4e-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.05e+88) tmp = t; elseif (y <= -8.5e-7) tmp = y * (t / -z); elseif (y <= -1.4e-188) tmp = x / (z / t); elseif (y <= 5.4e-26) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.05e+88], t, If[LessEqual[y, -8.5e-7], N[(y * N[(t / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.4e-188], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.4e-26], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.05 \cdot 10^{+88}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{-7}:\\
\;\;\;\;y \cdot \frac{t}{-z}\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{-188}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{-26}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.0499999999999999e88 or 5.39999999999999963e-26 < y Initial program 99.8%
associate-*l/75.3%
associate-/l*68.1%
Simplified68.1%
Taylor expanded in y around inf 69.5%
if -3.0499999999999999e88 < y < -8.50000000000000014e-7Initial program 99.8%
associate-*l/99.6%
associate-/l*88.5%
Simplified88.5%
Taylor expanded in z around inf 59.8%
Taylor expanded in x around 0 59.8%
mul-1-neg59.8%
*-commutative59.8%
associate-*r/59.6%
Simplified59.6%
if -8.50000000000000014e-7 < y < -1.4000000000000001e-188Initial program 92.7%
associate-*l/94.1%
associate-/l*94.9%
Simplified94.9%
Taylor expanded in y around 0 52.3%
*-commutative52.3%
associate-/l*54.4%
Simplified54.4%
clear-num54.3%
un-div-inv54.6%
Applied egg-rr54.6%
if -1.4000000000000001e-188 < y < 5.39999999999999963e-26Initial program 97.4%
associate-*l/95.3%
associate-/l*88.8%
Simplified88.8%
associate-*r/95.3%
associate-*l/97.4%
*-commutative97.4%
clear-num97.4%
un-div-inv97.6%
Applied egg-rr97.6%
Taylor expanded in y around 0 71.7%
Final simplification67.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.5e+72)
t
(if (<= y -8e-6)
(/ y (/ z (- t)))
(if (<= y -7e-190) (/ x (/ z t)) (if (<= y 1.85e-28) (/ t (/ z x)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.5e+72) {
tmp = t;
} else if (y <= -8e-6) {
tmp = y / (z / -t);
} else if (y <= -7e-190) {
tmp = x / (z / t);
} else if (y <= 1.85e-28) {
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 <= (-1.5d+72)) then
tmp = t
else if (y <= (-8d-6)) then
tmp = y / (z / -t)
else if (y <= (-7d-190)) then
tmp = x / (z / t)
else if (y <= 1.85d-28) 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 <= -1.5e+72) {
tmp = t;
} else if (y <= -8e-6) {
tmp = y / (z / -t);
} else if (y <= -7e-190) {
tmp = x / (z / t);
} else if (y <= 1.85e-28) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.5e+72: tmp = t elif y <= -8e-6: tmp = y / (z / -t) elif y <= -7e-190: tmp = x / (z / t) elif y <= 1.85e-28: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.5e+72) tmp = t; elseif (y <= -8e-6) tmp = Float64(y / Float64(z / Float64(-t))); elseif (y <= -7e-190) tmp = Float64(x / Float64(z / t)); elseif (y <= 1.85e-28) 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 <= -1.5e+72) tmp = t; elseif (y <= -8e-6) tmp = y / (z / -t); elseif (y <= -7e-190) tmp = x / (z / t); elseif (y <= 1.85e-28) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.5e+72], t, If[LessEqual[y, -8e-6], N[(y / N[(z / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7e-190], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.85e-28], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+72}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -8 \cdot 10^{-6}:\\
\;\;\;\;\frac{y}{\frac{z}{-t}}\\
\mathbf{elif}\;y \leq -7 \cdot 10^{-190}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-28}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.50000000000000001e72 or 1.8500000000000001e-28 < y Initial program 99.8%
associate-*l/75.3%
associate-/l*68.1%
Simplified68.1%
Taylor expanded in y around inf 69.5%
if -1.50000000000000001e72 < y < -7.99999999999999964e-6Initial program 99.8%
associate-*l/99.6%
associate-/l*88.5%
Simplified88.5%
Taylor expanded in z around inf 71.2%
Taylor expanded in x around 0 59.8%
mul-1-neg59.8%
distribute-rgt-neg-out59.8%
Simplified59.8%
associate-/l*59.6%
add-sqr-sqrt59.5%
sqrt-unprod59.6%
sqr-neg59.6%
sqrt-unprod0.0%
add-sqr-sqrt26.2%
Applied egg-rr26.2%
*-commutative26.2%
associate-*l/26.3%
associate-*r/26.3%
Simplified26.3%
add-sqr-sqrt25.0%
sqrt-unprod37.2%
sqr-neg37.2%
sqrt-unprod36.0%
add-sqr-sqrt59.6%
distribute-rgt-neg-out59.6%
clear-num59.7%
un-div-inv59.7%
Applied egg-rr59.7%
if -7.99999999999999964e-6 < y < -6.9999999999999999e-190Initial program 92.7%
associate-*l/94.1%
associate-/l*94.9%
Simplified94.9%
Taylor expanded in y around 0 52.3%
*-commutative52.3%
associate-/l*54.4%
Simplified54.4%
clear-num54.3%
un-div-inv54.6%
Applied egg-rr54.6%
if -6.9999999999999999e-190 < y < 1.8500000000000001e-28Initial program 97.4%
associate-*l/95.3%
associate-/l*88.8%
Simplified88.8%
associate-*r/95.3%
associate-*l/97.4%
*-commutative97.4%
clear-num97.4%
un-div-inv97.6%
Applied egg-rr97.6%
Taylor expanded in y around 0 71.7%
Final simplification67.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.8e+73)
t
(if (<= y -0.0036)
(/ (* t (- y)) z)
(if (<= y -2.4e-193) (/ x (/ z t)) (if (<= y 5.9e-25) (/ t (/ z x)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.8e+73) {
tmp = t;
} else if (y <= -0.0036) {
tmp = (t * -y) / z;
} else if (y <= -2.4e-193) {
tmp = x / (z / t);
} else if (y <= 5.9e-25) {
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 <= (-2.8d+73)) then
tmp = t
else if (y <= (-0.0036d0)) then
tmp = (t * -y) / z
else if (y <= (-2.4d-193)) then
tmp = x / (z / t)
else if (y <= 5.9d-25) 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 <= -2.8e+73) {
tmp = t;
} else if (y <= -0.0036) {
tmp = (t * -y) / z;
} else if (y <= -2.4e-193) {
tmp = x / (z / t);
} else if (y <= 5.9e-25) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.8e+73: tmp = t elif y <= -0.0036: tmp = (t * -y) / z elif y <= -2.4e-193: tmp = x / (z / t) elif y <= 5.9e-25: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.8e+73) tmp = t; elseif (y <= -0.0036) tmp = Float64(Float64(t * Float64(-y)) / z); elseif (y <= -2.4e-193) tmp = Float64(x / Float64(z / t)); elseif (y <= 5.9e-25) 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 <= -2.8e+73) tmp = t; elseif (y <= -0.0036) tmp = (t * -y) / z; elseif (y <= -2.4e-193) tmp = x / (z / t); elseif (y <= 5.9e-25) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.8e+73], t, If[LessEqual[y, -0.0036], N[(N[(t * (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -2.4e-193], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.9e-25], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+73}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -0.0036:\\
\;\;\;\;\frac{t \cdot \left(-y\right)}{z}\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{-193}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 5.9 \cdot 10^{-25}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.80000000000000008e73 or 5.8999999999999998e-25 < y Initial program 99.8%
associate-*l/75.3%
associate-/l*68.1%
Simplified68.1%
Taylor expanded in y around inf 69.5%
if -2.80000000000000008e73 < y < -0.0035999999999999999Initial program 99.8%
associate-*l/99.6%
associate-/l*88.5%
Simplified88.5%
Taylor expanded in z around inf 71.2%
Taylor expanded in x around 0 59.8%
mul-1-neg59.8%
distribute-rgt-neg-out59.8%
Simplified59.8%
if -0.0035999999999999999 < y < -2.4e-193Initial program 92.7%
associate-*l/94.1%
associate-/l*94.9%
Simplified94.9%
Taylor expanded in y around 0 52.3%
*-commutative52.3%
associate-/l*54.4%
Simplified54.4%
clear-num54.3%
un-div-inv54.6%
Applied egg-rr54.6%
if -2.4e-193 < y < 5.8999999999999998e-25Initial program 97.4%
associate-*l/95.3%
associate-/l*88.8%
Simplified88.8%
associate-*r/95.3%
associate-*l/97.4%
*-commutative97.4%
clear-num97.4%
un-div-inv97.6%
Applied egg-rr97.6%
Taylor expanded in y around 0 71.7%
Final simplification67.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ x y)))))
(if (<= y -3.7e+77)
t_1
(if (<= y 1.75e-151)
(* t (/ x (- z y)))
(if (<= y 7.2e-34) (* t (/ (- x y) z)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -3.7e+77) {
tmp = t_1;
} else if (y <= 1.75e-151) {
tmp = t * (x / (z - y));
} else if (y <= 7.2e-34) {
tmp = t * ((x - y) / z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = t * (1.0d0 - (x / y))
if (y <= (-3.7d+77)) then
tmp = t_1
else if (y <= 1.75d-151) then
tmp = t * (x / (z - y))
else if (y <= 7.2d-34) then
tmp = t * ((x - y) / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -3.7e+77) {
tmp = t_1;
} else if (y <= 1.75e-151) {
tmp = t * (x / (z - y));
} else if (y <= 7.2e-34) {
tmp = t * ((x - y) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (1.0 - (x / y)) tmp = 0 if y <= -3.7e+77: tmp = t_1 elif y <= 1.75e-151: tmp = t * (x / (z - y)) elif y <= 7.2e-34: tmp = t * ((x - y) / z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -3.7e+77) tmp = t_1; elseif (y <= 1.75e-151) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (y <= 7.2e-34) tmp = Float64(t * Float64(Float64(x - y) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (1.0 - (x / y)); tmp = 0.0; if (y <= -3.7e+77) tmp = t_1; elseif (y <= 1.75e-151) tmp = t * (x / (z - y)); elseif (y <= 7.2e-34) tmp = t * ((x - y) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.7e+77], t$95$1, If[LessEqual[y, 1.75e-151], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e-34], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -3.7 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-151}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-34}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.69999999999999995e77 or 7.20000000000000016e-34 < y Initial program 99.8%
Taylor expanded in z around 0 82.5%
mul-1-neg82.5%
div-sub82.6%
sub-neg82.6%
*-inverses82.6%
metadata-eval82.6%
Simplified82.6%
Taylor expanded in x around 0 76.7%
*-rgt-identity76.7%
mul-1-neg76.7%
associate-/l*82.6%
distribute-rgt-neg-in82.6%
distribute-frac-neg282.6%
distribute-lft-in82.6%
distribute-frac-neg282.6%
sub-neg82.6%
Simplified82.6%
if -3.69999999999999995e77 < y < 1.74999999999999998e-151Initial program 96.5%
Taylor expanded in x around inf 82.0%
if 1.74999999999999998e-151 < y < 7.20000000000000016e-34Initial program 95.5%
Taylor expanded in z around inf 73.8%
Final simplification81.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -4.8e+35)
(/ t (- 1.0 (/ z y)))
(if (<= y 1.45e-151)
(* t (/ x (- z y)))
(if (<= y 6.5e-40) (* t (/ (- x y) z)) (* t (- 1.0 (/ x y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.8e+35) {
tmp = t / (1.0 - (z / y));
} else if (y <= 1.45e-151) {
tmp = t * (x / (z - y));
} else if (y <= 6.5e-40) {
tmp = t * ((x - y) / z);
} else {
tmp = t * (1.0 - (x / 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 <= (-4.8d+35)) then
tmp = t / (1.0d0 - (z / y))
else if (y <= 1.45d-151) then
tmp = t * (x / (z - y))
else if (y <= 6.5d-40) then
tmp = t * ((x - y) / z)
else
tmp = t * (1.0d0 - (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.8e+35) {
tmp = t / (1.0 - (z / y));
} else if (y <= 1.45e-151) {
tmp = t * (x / (z - y));
} else if (y <= 6.5e-40) {
tmp = t * ((x - y) / z);
} else {
tmp = t * (1.0 - (x / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.8e+35: tmp = t / (1.0 - (z / y)) elif y <= 1.45e-151: tmp = t * (x / (z - y)) elif y <= 6.5e-40: tmp = t * ((x - y) / z) else: tmp = t * (1.0 - (x / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.8e+35) tmp = Float64(t / Float64(1.0 - Float64(z / y))); elseif (y <= 1.45e-151) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (y <= 6.5e-40) tmp = Float64(t * Float64(Float64(x - y) / z)); else tmp = Float64(t * Float64(1.0 - Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.8e+35) tmp = t / (1.0 - (z / y)); elseif (y <= 1.45e-151) tmp = t * (x / (z - y)); elseif (y <= 6.5e-40) tmp = t * ((x - y) / z); else tmp = t * (1.0 - (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.8e+35], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e-151], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e-40], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+35}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-151}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-40}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\end{array}
\end{array}
if y < -4.80000000000000029e35Initial program 99.8%
associate-*l/69.1%
associate-/l*67.2%
Simplified67.2%
associate-*r/69.1%
associate-*l/99.8%
*-commutative99.8%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 88.0%
mul-1-neg88.0%
div-sub88.0%
sub-neg88.0%
*-inverses88.0%
metadata-eval88.0%
Simplified88.0%
Taylor expanded in t around 0 88.0%
if -4.80000000000000029e35 < y < 1.45000000000000006e-151Initial program 96.2%
Taylor expanded in x around inf 84.8%
if 1.45000000000000006e-151 < y < 6.4999999999999999e-40Initial program 95.5%
Taylor expanded in z around inf 73.8%
if 6.4999999999999999e-40 < y Initial program 99.8%
Taylor expanded in z around 0 77.8%
mul-1-neg77.8%
div-sub77.8%
sub-neg77.8%
*-inverses77.8%
metadata-eval77.8%
Simplified77.8%
Taylor expanded in x around 0 69.6%
*-rgt-identity69.6%
mul-1-neg69.6%
associate-/l*77.8%
distribute-rgt-neg-in77.8%
distribute-frac-neg277.8%
distribute-lft-in77.8%
distribute-frac-neg277.8%
sub-neg77.8%
Simplified77.8%
Final simplification82.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.65e+37)
(/ t (- 1.0 (/ z y)))
(if (<= y 1.95e-151)
(* t (/ x (- z y)))
(if (<= y 6.2e-53) (/ t (/ z (- x y))) (* t (- 1.0 (/ x y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.65e+37) {
tmp = t / (1.0 - (z / y));
} else if (y <= 1.95e-151) {
tmp = t * (x / (z - y));
} else if (y <= 6.2e-53) {
tmp = t / (z / (x - y));
} else {
tmp = t * (1.0 - (x / y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.65d+37)) then
tmp = t / (1.0d0 - (z / y))
else if (y <= 1.95d-151) then
tmp = t * (x / (z - y))
else if (y <= 6.2d-53) then
tmp = t / (z / (x - y))
else
tmp = t * (1.0d0 - (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.65e+37) {
tmp = t / (1.0 - (z / y));
} else if (y <= 1.95e-151) {
tmp = t * (x / (z - y));
} else if (y <= 6.2e-53) {
tmp = t / (z / (x - y));
} else {
tmp = t * (1.0 - (x / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.65e+37: tmp = t / (1.0 - (z / y)) elif y <= 1.95e-151: tmp = t * (x / (z - y)) elif y <= 6.2e-53: tmp = t / (z / (x - y)) else: tmp = t * (1.0 - (x / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.65e+37) tmp = Float64(t / Float64(1.0 - Float64(z / y))); elseif (y <= 1.95e-151) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (y <= 6.2e-53) tmp = Float64(t / Float64(z / Float64(x - y))); else tmp = Float64(t * Float64(1.0 - Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.65e+37) tmp = t / (1.0 - (z / y)); elseif (y <= 1.95e-151) tmp = t * (x / (z - y)); elseif (y <= 6.2e-53) tmp = t / (z / (x - y)); else tmp = t * (1.0 - (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.65e+37], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.95e-151], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e-53], N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{+37}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-151}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-53}:\\
\;\;\;\;\frac{t}{\frac{z}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\end{array}
\end{array}
if y < -1.65e37Initial program 99.8%
associate-*l/69.1%
associate-/l*67.2%
Simplified67.2%
associate-*r/69.1%
associate-*l/99.8%
*-commutative99.8%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 88.0%
mul-1-neg88.0%
div-sub88.0%
sub-neg88.0%
*-inverses88.0%
metadata-eval88.0%
Simplified88.0%
Taylor expanded in t around 0 88.0%
if -1.65e37 < y < 1.95000000000000003e-151Initial program 96.2%
Taylor expanded in x around inf 84.8%
if 1.95000000000000003e-151 < y < 6.20000000000000031e-53Initial program 95.5%
associate-*l/91.4%
associate-/l*82.9%
Simplified82.9%
associate-*r/91.4%
associate-*l/95.5%
*-commutative95.5%
clear-num95.4%
un-div-inv95.5%
Applied egg-rr95.5%
Taylor expanded in z around inf 73.8%
if 6.20000000000000031e-53 < y Initial program 99.8%
Taylor expanded in z around 0 77.8%
mul-1-neg77.8%
div-sub77.8%
sub-neg77.8%
*-inverses77.8%
metadata-eval77.8%
Simplified77.8%
Taylor expanded in x around 0 69.6%
*-rgt-identity69.6%
mul-1-neg69.6%
associate-/l*77.8%
distribute-rgt-neg-in77.8%
distribute-frac-neg277.8%
distribute-lft-in77.8%
distribute-frac-neg277.8%
sub-neg77.8%
Simplified77.8%
Final simplification82.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -4.8e+35)
(/ t (- 1.0 (/ z y)))
(if (<= y 7.6e-152)
(/ (* t x) (- z y))
(if (<= y 1.55e-34) (/ t (/ z (- x y))) (* t (- 1.0 (/ x y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.8e+35) {
tmp = t / (1.0 - (z / y));
} else if (y <= 7.6e-152) {
tmp = (t * x) / (z - y);
} else if (y <= 1.55e-34) {
tmp = t / (z / (x - y));
} else {
tmp = t * (1.0 - (x / 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 <= (-4.8d+35)) then
tmp = t / (1.0d0 - (z / y))
else if (y <= 7.6d-152) then
tmp = (t * x) / (z - y)
else if (y <= 1.55d-34) then
tmp = t / (z / (x - y))
else
tmp = t * (1.0d0 - (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.8e+35) {
tmp = t / (1.0 - (z / y));
} else if (y <= 7.6e-152) {
tmp = (t * x) / (z - y);
} else if (y <= 1.55e-34) {
tmp = t / (z / (x - y));
} else {
tmp = t * (1.0 - (x / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.8e+35: tmp = t / (1.0 - (z / y)) elif y <= 7.6e-152: tmp = (t * x) / (z - y) elif y <= 1.55e-34: tmp = t / (z / (x - y)) else: tmp = t * (1.0 - (x / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.8e+35) tmp = Float64(t / Float64(1.0 - Float64(z / y))); elseif (y <= 7.6e-152) tmp = Float64(Float64(t * x) / Float64(z - y)); elseif (y <= 1.55e-34) tmp = Float64(t / Float64(z / Float64(x - y))); else tmp = Float64(t * Float64(1.0 - Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.8e+35) tmp = t / (1.0 - (z / y)); elseif (y <= 7.6e-152) tmp = (t * x) / (z - y); elseif (y <= 1.55e-34) tmp = t / (z / (x - y)); else tmp = t * (1.0 - (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.8e+35], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.6e-152], N[(N[(t * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e-34], N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+35}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{-152}:\\
\;\;\;\;\frac{t \cdot x}{z - y}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-34}:\\
\;\;\;\;\frac{t}{\frac{z}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\end{array}
\end{array}
if y < -4.80000000000000029e35Initial program 99.8%
associate-*l/69.1%
associate-/l*67.2%
Simplified67.2%
associate-*r/69.1%
associate-*l/99.8%
*-commutative99.8%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 88.0%
mul-1-neg88.0%
div-sub88.0%
sub-neg88.0%
*-inverses88.0%
metadata-eval88.0%
Simplified88.0%
Taylor expanded in t around 0 88.0%
if -4.80000000000000029e35 < y < 7.60000000000000024e-152Initial program 96.2%
associate-*l/95.9%
associate-/l*91.9%
Simplified91.9%
Taylor expanded in x around inf 85.7%
if 7.60000000000000024e-152 < y < 1.5499999999999999e-34Initial program 95.5%
associate-*l/91.4%
associate-/l*82.9%
Simplified82.9%
associate-*r/91.4%
associate-*l/95.5%
*-commutative95.5%
clear-num95.4%
un-div-inv95.5%
Applied egg-rr95.5%
Taylor expanded in z around inf 73.8%
if 1.5499999999999999e-34 < y Initial program 99.8%
Taylor expanded in z around 0 77.8%
mul-1-neg77.8%
div-sub77.8%
sub-neg77.8%
*-inverses77.8%
metadata-eval77.8%
Simplified77.8%
Taylor expanded in x around 0 69.6%
*-rgt-identity69.6%
mul-1-neg69.6%
associate-/l*77.8%
distribute-rgt-neg-in77.8%
distribute-frac-neg277.8%
distribute-lft-in77.8%
distribute-frac-neg277.8%
sub-neg77.8%
Simplified77.8%
Final simplification83.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -8e+36)
(/ t (- 1.0 (/ z y)))
(if (<= y 1.9e-151)
(/ (* t x) (- z y))
(if (<= y 6e-37) (/ (* t (- x y)) z) (* t (- 1.0 (/ x y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e+36) {
tmp = t / (1.0 - (z / y));
} else if (y <= 1.9e-151) {
tmp = (t * x) / (z - y);
} else if (y <= 6e-37) {
tmp = (t * (x - y)) / z;
} else {
tmp = t * (1.0 - (x / 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 <= (-8d+36)) then
tmp = t / (1.0d0 - (z / y))
else if (y <= 1.9d-151) then
tmp = (t * x) / (z - y)
else if (y <= 6d-37) then
tmp = (t * (x - y)) / z
else
tmp = t * (1.0d0 - (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e+36) {
tmp = t / (1.0 - (z / y));
} else if (y <= 1.9e-151) {
tmp = (t * x) / (z - y);
} else if (y <= 6e-37) {
tmp = (t * (x - y)) / z;
} else {
tmp = t * (1.0 - (x / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8e+36: tmp = t / (1.0 - (z / y)) elif y <= 1.9e-151: tmp = (t * x) / (z - y) elif y <= 6e-37: tmp = (t * (x - y)) / z else: tmp = t * (1.0 - (x / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8e+36) tmp = Float64(t / Float64(1.0 - Float64(z / y))); elseif (y <= 1.9e-151) tmp = Float64(Float64(t * x) / Float64(z - y)); elseif (y <= 6e-37) tmp = Float64(Float64(t * Float64(x - y)) / z); else tmp = Float64(t * Float64(1.0 - Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8e+36) tmp = t / (1.0 - (z / y)); elseif (y <= 1.9e-151) tmp = (t * x) / (z - y); elseif (y <= 6e-37) tmp = (t * (x - y)) / z; else tmp = t * (1.0 - (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8e+36], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e-151], N[(N[(t * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e-37], N[(N[(t * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+36}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-151}:\\
\;\;\;\;\frac{t \cdot x}{z - y}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-37}:\\
\;\;\;\;\frac{t \cdot \left(x - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\end{array}
\end{array}
if y < -8.00000000000000034e36Initial program 99.8%
associate-*l/69.1%
associate-/l*67.2%
Simplified67.2%
associate-*r/69.1%
associate-*l/99.8%
*-commutative99.8%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 88.0%
mul-1-neg88.0%
div-sub88.0%
sub-neg88.0%
*-inverses88.0%
metadata-eval88.0%
Simplified88.0%
Taylor expanded in t around 0 88.0%
if -8.00000000000000034e36 < y < 1.89999999999999985e-151Initial program 96.2%
associate-*l/95.9%
associate-/l*91.9%
Simplified91.9%
Taylor expanded in x around inf 85.7%
if 1.89999999999999985e-151 < y < 6e-37Initial program 95.5%
associate-*l/91.4%
associate-/l*82.9%
Simplified82.9%
Taylor expanded in z around inf 74.0%
if 6e-37 < y Initial program 99.8%
Taylor expanded in z around 0 77.8%
mul-1-neg77.8%
div-sub77.8%
sub-neg77.8%
*-inverses77.8%
metadata-eval77.8%
Simplified77.8%
Taylor expanded in x around 0 69.6%
*-rgt-identity69.6%
mul-1-neg69.6%
associate-/l*77.8%
distribute-rgt-neg-in77.8%
distribute-frac-neg277.8%
distribute-lft-in77.8%
distribute-frac-neg277.8%
sub-neg77.8%
Simplified77.8%
Final simplification83.0%
(FPCore (x y z t) :precision binary64 (if (<= y -5.8e+130) (/ t (- 1.0 (/ z y))) (if (<= y 2.2e+197) (* (- x y) (/ t (- z y))) (* t (- 1.0 (/ x y))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.8e+130) {
tmp = t / (1.0 - (z / y));
} else if (y <= 2.2e+197) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = t * (1.0 - (x / 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 <= (-5.8d+130)) then
tmp = t / (1.0d0 - (z / y))
else if (y <= 2.2d+197) then
tmp = (x - y) * (t / (z - y))
else
tmp = t * (1.0d0 - (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.8e+130) {
tmp = t / (1.0 - (z / y));
} else if (y <= 2.2e+197) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = t * (1.0 - (x / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.8e+130: tmp = t / (1.0 - (z / y)) elif y <= 2.2e+197: tmp = (x - y) * (t / (z - y)) else: tmp = t * (1.0 - (x / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.8e+130) tmp = Float64(t / Float64(1.0 - Float64(z / y))); elseif (y <= 2.2e+197) tmp = Float64(Float64(x - y) * Float64(t / Float64(z - y))); else tmp = Float64(t * Float64(1.0 - Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.8e+130) tmp = t / (1.0 - (z / y)); elseif (y <= 2.2e+197) tmp = (x - y) * (t / (z - y)); else tmp = t * (1.0 - (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.8e+130], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+197], N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+130}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+197}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\end{array}
\end{array}
if y < -5.7999999999999998e130Initial program 99.9%
associate-*l/57.7%
associate-/l*57.3%
Simplified57.3%
associate-*r/57.7%
associate-*l/99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 93.2%
mul-1-neg93.2%
div-sub93.2%
sub-neg93.2%
*-inverses93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in t around 0 93.2%
if -5.7999999999999998e130 < y < 2.19999999999999989e197Initial program 97.2%
associate-*l/94.6%
associate-/l*89.2%
Simplified89.2%
if 2.19999999999999989e197 < y Initial program 99.9%
Taylor expanded in z around 0 99.9%
mul-1-neg99.9%
div-sub100.0%
sub-neg100.0%
*-inverses100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0 79.6%
*-rgt-identity79.6%
mul-1-neg79.6%
associate-/l*100.0%
distribute-rgt-neg-in100.0%
distribute-frac-neg2100.0%
distribute-lft-in100.0%
distribute-frac-neg2100.0%
sub-neg100.0%
Simplified100.0%
Final simplification90.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.95e+79) (not (<= z 9.4e-23))) (* (- x y) (/ t z)) (* t (- 1.0 (/ x y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.95e+79) || !(z <= 9.4e-23)) {
tmp = (x - y) * (t / z);
} else {
tmp = t * (1.0 - (x / 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 <= (-1.95d+79)) .or. (.not. (z <= 9.4d-23))) then
tmp = (x - y) * (t / z)
else
tmp = t * (1.0d0 - (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.95e+79) || !(z <= 9.4e-23)) {
tmp = (x - y) * (t / z);
} else {
tmp = t * (1.0 - (x / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.95e+79) or not (z <= 9.4e-23): tmp = (x - y) * (t / z) else: tmp = t * (1.0 - (x / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.95e+79) || !(z <= 9.4e-23)) tmp = Float64(Float64(x - y) * Float64(t / z)); else tmp = Float64(t * Float64(1.0 - Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.95e+79) || ~((z <= 9.4e-23))) tmp = (x - y) * (t / z); else tmp = t * (1.0 - (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.95e+79], N[Not[LessEqual[z, 9.4e-23]], $MachinePrecision]], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+79} \lor \neg \left(z \leq 9.4 \cdot 10^{-23}\right):\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\end{array}
\end{array}
if z < -1.9499999999999999e79 or 9.4000000000000001e-23 < z Initial program 97.9%
associate-*l/86.7%
associate-/l*78.1%
Simplified78.1%
Taylor expanded in z around inf 68.4%
if -1.9499999999999999e79 < z < 9.4000000000000001e-23Initial program 97.9%
Taylor expanded in z around 0 78.4%
mul-1-neg78.4%
div-sub78.4%
sub-neg78.4%
*-inverses78.4%
metadata-eval78.4%
Simplified78.4%
Taylor expanded in x around 0 76.4%
*-rgt-identity76.4%
mul-1-neg76.4%
associate-/l*78.4%
distribute-rgt-neg-in78.4%
distribute-frac-neg278.4%
distribute-lft-in78.4%
distribute-frac-neg278.4%
sub-neg78.4%
Simplified78.4%
Final simplification74.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.7e+77) (not (<= y 9.5e-46))) (* t (- 1.0 (/ x y))) (* t (/ x (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.7e+77) || !(y <= 9.5e-46)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = t * (x / (z - y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-3.7d+77)) .or. (.not. (y <= 9.5d-46))) then
tmp = t * (1.0d0 - (x / y))
else
tmp = t * (x / (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.7e+77) || !(y <= 9.5e-46)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = t * (x / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.7e+77) or not (y <= 9.5e-46): tmp = t * (1.0 - (x / y)) else: tmp = t * (x / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.7e+77) || !(y <= 9.5e-46)) tmp = Float64(t * Float64(1.0 - Float64(x / y))); else tmp = Float64(t * Float64(x / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.7e+77) || ~((y <= 9.5e-46))) tmp = t * (1.0 - (x / y)); else tmp = t * (x / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.7e+77], N[Not[LessEqual[y, 9.5e-46]], $MachinePrecision]], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{+77} \lor \neg \left(y \leq 9.5 \cdot 10^{-46}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\end{array}
\end{array}
if y < -3.69999999999999995e77 or 9.49999999999999993e-46 < y Initial program 99.8%
Taylor expanded in z around 0 82.5%
mul-1-neg82.5%
div-sub82.6%
sub-neg82.6%
*-inverses82.6%
metadata-eval82.6%
Simplified82.6%
Taylor expanded in x around 0 76.7%
*-rgt-identity76.7%
mul-1-neg76.7%
associate-/l*82.6%
distribute-rgt-neg-in82.6%
distribute-frac-neg282.6%
distribute-lft-in82.6%
distribute-frac-neg282.6%
sub-neg82.6%
Simplified82.6%
if -3.69999999999999995e77 < y < 9.49999999999999993e-46Initial program 96.3%
Taylor expanded in x around inf 77.7%
Final simplification79.9%
(FPCore (x y z t) :precision binary64 (if (<= y -1.1e+50) t (if (<= y 4.9e-29) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.1e+50) {
tmp = t;
} else if (y <= 4.9e-29) {
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.1d+50)) then
tmp = t
else if (y <= 4.9d-29) 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.1e+50) {
tmp = t;
} else if (y <= 4.9e-29) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.1e+50: tmp = t elif y <= 4.9e-29: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.1e+50) tmp = t; elseif (y <= 4.9e-29) 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.1e+50) tmp = t; elseif (y <= 4.9e-29) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.1e+50], t, If[LessEqual[y, 4.9e-29], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+50}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 4.9 \cdot 10^{-29}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.10000000000000008e50 or 4.8999999999999998e-29 < y Initial program 99.8%
associate-*l/76.3%
associate-/l*68.6%
Simplified68.6%
Taylor expanded in y around inf 67.7%
if -1.10000000000000008e50 < y < 4.8999999999999998e-29Initial program 96.2%
associate-*l/95.3%
associate-/l*90.8%
Simplified90.8%
Taylor expanded in y around 0 60.7%
*-commutative60.7%
associate-/l*57.9%
Simplified57.9%
Final simplification62.5%
(FPCore (x y z t) :precision binary64 (if (<= y -1.25e+72) t (if (<= y 3.6e-25) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.25e+72) {
tmp = t;
} else if (y <= 3.6e-25) {
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.25d+72)) then
tmp = t
else if (y <= 3.6d-25) 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.25e+72) {
tmp = t;
} else if (y <= 3.6e-25) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.25e+72: tmp = t elif y <= 3.6e-25: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.25e+72) tmp = t; elseif (y <= 3.6e-25) 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.25e+72) tmp = t; elseif (y <= 3.6e-25) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.25e+72], t, If[LessEqual[y, 3.6e-25], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+72}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-25}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.24999999999999998e72 or 3.5999999999999999e-25 < y Initial program 99.8%
associate-*l/75.3%
associate-/l*68.1%
Simplified68.1%
Taylor expanded in y around inf 69.5%
if -1.24999999999999998e72 < y < 3.5999999999999999e-25Initial program 96.4%
Taylor expanded in y around 0 61.2%
Final simplification65.0%
(FPCore (x y z t) :precision binary64 (if (<= y -1.25e+72) t (if (<= y 8.5e-25) (/ t (/ z x)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.25e+72) {
tmp = t;
} else if (y <= 8.5e-25) {
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 <= (-1.25d+72)) then
tmp = t
else if (y <= 8.5d-25) 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 <= -1.25e+72) {
tmp = t;
} else if (y <= 8.5e-25) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.25e+72: tmp = t elif y <= 8.5e-25: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.25e+72) tmp = t; elseif (y <= 8.5e-25) 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 <= -1.25e+72) tmp = t; elseif (y <= 8.5e-25) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.25e+72], t, If[LessEqual[y, 8.5e-25], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+72}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-25}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.24999999999999998e72 or 8.49999999999999981e-25 < y Initial program 99.8%
associate-*l/75.3%
associate-/l*68.1%
Simplified68.1%
Taylor expanded in y around inf 69.5%
if -1.24999999999999998e72 < y < 8.49999999999999981e-25Initial program 96.4%
associate-*l/95.5%
associate-/l*90.5%
Simplified90.5%
associate-*r/95.5%
associate-*l/96.4%
*-commutative96.4%
clear-num96.3%
un-div-inv96.8%
Applied egg-rr96.8%
Taylor expanded in y around 0 61.3%
Final simplification65.0%
(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 97.9%
Final simplification97.9%
(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.9%
associate-*l/86.4%
associate-/l*80.4%
Simplified80.4%
Taylor expanded in y around inf 37.1%
Final simplification37.1%
(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 2024043
(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))