
(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 14 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.0%
Final simplification97.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ (- y x) y))) (t_2 (* t (/ y (- y z)))))
(if (<= y -1.75e+84)
t_2
(if (<= y -2e+29)
t_1
(if (<= y -1.85e+26)
(* (- x y) (/ t z))
(if (<= y -2.8e-44)
(* x (/ t (- z y)))
(if (<= y -3.65e-87)
t_2
(if (<= y -8.5e-109)
(/ t (/ z (- x y)))
(if (<= y -4.7e-194)
(* t (/ x (- z y)))
(if (<= y 1.1e+38) (/ (* (- x y) t) z) t_1))))))))))
double code(double x, double y, double z, double t) {
double t_1 = t * ((y - x) / y);
double t_2 = t * (y / (y - z));
double tmp;
if (y <= -1.75e+84) {
tmp = t_2;
} else if (y <= -2e+29) {
tmp = t_1;
} else if (y <= -1.85e+26) {
tmp = (x - y) * (t / z);
} else if (y <= -2.8e-44) {
tmp = x * (t / (z - y));
} else if (y <= -3.65e-87) {
tmp = t_2;
} else if (y <= -8.5e-109) {
tmp = t / (z / (x - y));
} else if (y <= -4.7e-194) {
tmp = t * (x / (z - y));
} else if (y <= 1.1e+38) {
tmp = ((x - y) * t) / 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) :: t_2
real(8) :: tmp
t_1 = t * ((y - x) / y)
t_2 = t * (y / (y - z))
if (y <= (-1.75d+84)) then
tmp = t_2
else if (y <= (-2d+29)) then
tmp = t_1
else if (y <= (-1.85d+26)) then
tmp = (x - y) * (t / z)
else if (y <= (-2.8d-44)) then
tmp = x * (t / (z - y))
else if (y <= (-3.65d-87)) then
tmp = t_2
else if (y <= (-8.5d-109)) then
tmp = t / (z / (x - y))
else if (y <= (-4.7d-194)) then
tmp = t * (x / (z - y))
else if (y <= 1.1d+38) then
tmp = ((x - y) * t) / 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 * ((y - x) / y);
double t_2 = t * (y / (y - z));
double tmp;
if (y <= -1.75e+84) {
tmp = t_2;
} else if (y <= -2e+29) {
tmp = t_1;
} else if (y <= -1.85e+26) {
tmp = (x - y) * (t / z);
} else if (y <= -2.8e-44) {
tmp = x * (t / (z - y));
} else if (y <= -3.65e-87) {
tmp = t_2;
} else if (y <= -8.5e-109) {
tmp = t / (z / (x - y));
} else if (y <= -4.7e-194) {
tmp = t * (x / (z - y));
} else if (y <= 1.1e+38) {
tmp = ((x - y) * t) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * ((y - x) / y) t_2 = t * (y / (y - z)) tmp = 0 if y <= -1.75e+84: tmp = t_2 elif y <= -2e+29: tmp = t_1 elif y <= -1.85e+26: tmp = (x - y) * (t / z) elif y <= -2.8e-44: tmp = x * (t / (z - y)) elif y <= -3.65e-87: tmp = t_2 elif y <= -8.5e-109: tmp = t / (z / (x - y)) elif y <= -4.7e-194: tmp = t * (x / (z - y)) elif y <= 1.1e+38: tmp = ((x - y) * t) / z else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(Float64(y - x) / y)) t_2 = Float64(t * Float64(y / Float64(y - z))) tmp = 0.0 if (y <= -1.75e+84) tmp = t_2; elseif (y <= -2e+29) tmp = t_1; elseif (y <= -1.85e+26) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (y <= -2.8e-44) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= -3.65e-87) tmp = t_2; elseif (y <= -8.5e-109) tmp = Float64(t / Float64(z / Float64(x - y))); elseif (y <= -4.7e-194) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (y <= 1.1e+38) tmp = Float64(Float64(Float64(x - y) * t) / z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * ((y - x) / y); t_2 = t * (y / (y - z)); tmp = 0.0; if (y <= -1.75e+84) tmp = t_2; elseif (y <= -2e+29) tmp = t_1; elseif (y <= -1.85e+26) tmp = (x - y) * (t / z); elseif (y <= -2.8e-44) tmp = x * (t / (z - y)); elseif (y <= -3.65e-87) tmp = t_2; elseif (y <= -8.5e-109) tmp = t / (z / (x - y)); elseif (y <= -4.7e-194) tmp = t * (x / (z - y)); elseif (y <= 1.1e+38) tmp = ((x - y) * t) / z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.75e+84], t$95$2, If[LessEqual[y, -2e+29], t$95$1, If[LessEqual[y, -1.85e+26], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.8e-44], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.65e-87], t$95$2, If[LessEqual[y, -8.5e-109], N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.7e-194], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e+38], N[(N[(N[(x - y), $MachinePrecision] * t), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - x}{y}\\
t_2 := t \cdot \frac{y}{y - z}\\
\mathbf{if}\;y \leq -1.75 \cdot 10^{+84}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -2 \cdot 10^{+29}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{+26}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-44}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq -3.65 \cdot 10^{-87}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{-109}:\\
\;\;\;\;\frac{t}{\frac{z}{x - y}}\\
\mathbf{elif}\;y \leq -4.7 \cdot 10^{-194}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+38}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.7499999999999999e84 or -2.8e-44 < y < -3.64999999999999984e-87Initial program 99.9%
Taylor expanded in x around 0 86.1%
neg-mul-186.1%
distribute-neg-frac86.1%
Simplified86.1%
frac-2neg86.1%
div-inv85.9%
remove-double-neg85.9%
sub-neg85.9%
distribute-neg-in85.9%
remove-double-neg85.9%
+-commutative85.9%
sub-neg85.9%
Applied egg-rr85.9%
associate-*r/86.1%
*-rgt-identity86.1%
Simplified86.1%
if -1.7499999999999999e84 < y < -1.99999999999999983e29 or 1.10000000000000003e38 < y Initial program 99.9%
Taylor expanded in z around 0 87.2%
associate-*r/87.2%
neg-mul-187.2%
neg-sub087.2%
associate--r-87.2%
neg-sub087.2%
Simplified87.2%
if -1.99999999999999983e29 < y < -1.84999999999999994e26Initial program 99.6%
associate-*l/52.9%
associate-*r/99.2%
Simplified99.2%
Taylor expanded in z around inf 99.2%
if -1.84999999999999994e26 < y < -2.8e-44Initial program 89.8%
associate-*l/90.3%
associate-*r/99.5%
Simplified99.5%
Taylor expanded in x around inf 71.5%
associate-*l/80.9%
*-commutative80.9%
Simplified80.9%
if -3.64999999999999984e-87 < y < -8.50000000000000005e-109Initial program 99.1%
associate-*l/81.0%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in z around inf 81.0%
associate-/l*100.0%
Simplified100.0%
if -8.50000000000000005e-109 < y < -4.7000000000000003e-194Initial program 95.8%
Taylor expanded in x around inf 91.9%
if -4.7000000000000003e-194 < y < 1.10000000000000003e38Initial program 92.9%
associate-*l/97.3%
associate-*r/91.9%
Simplified91.9%
Taylor expanded in z around inf 86.5%
Final simplification87.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ x (- z y)))) (t_2 (* t (/ y (- y z)))))
(if (<= y -7.5e+78)
t_2
(if (<= y -9.8e-230)
t_1
(if (<= y 8.8e-304)
(* (- x y) (/ t z))
(if (<= y 2.7e-205)
(/ (* x t) (- z y))
(if (<= y 2.6e-110)
(/ t (/ z (- x y)))
(if (<= y 7.5e+73) t_1 t_2))))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (x / (z - y));
double t_2 = t * (y / (y - z));
double tmp;
if (y <= -7.5e+78) {
tmp = t_2;
} else if (y <= -9.8e-230) {
tmp = t_1;
} else if (y <= 8.8e-304) {
tmp = (x - y) * (t / z);
} else if (y <= 2.7e-205) {
tmp = (x * t) / (z - y);
} else if (y <= 2.6e-110) {
tmp = t / (z / (x - y));
} else if (y <= 7.5e+73) {
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 / (z - y))
t_2 = t * (y / (y - z))
if (y <= (-7.5d+78)) then
tmp = t_2
else if (y <= (-9.8d-230)) then
tmp = t_1
else if (y <= 8.8d-304) then
tmp = (x - y) * (t / z)
else if (y <= 2.7d-205) then
tmp = (x * t) / (z - y)
else if (y <= 2.6d-110) then
tmp = t / (z / (x - y))
else if (y <= 7.5d+73) 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 / (z - y));
double t_2 = t * (y / (y - z));
double tmp;
if (y <= -7.5e+78) {
tmp = t_2;
} else if (y <= -9.8e-230) {
tmp = t_1;
} else if (y <= 8.8e-304) {
tmp = (x - y) * (t / z);
} else if (y <= 2.7e-205) {
tmp = (x * t) / (z - y);
} else if (y <= 2.6e-110) {
tmp = t / (z / (x - y));
} else if (y <= 7.5e+73) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (x / (z - y)) t_2 = t * (y / (y - z)) tmp = 0 if y <= -7.5e+78: tmp = t_2 elif y <= -9.8e-230: tmp = t_1 elif y <= 8.8e-304: tmp = (x - y) * (t / z) elif y <= 2.7e-205: tmp = (x * t) / (z - y) elif y <= 2.6e-110: tmp = t / (z / (x - y)) elif y <= 7.5e+73: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(x / Float64(z - y))) t_2 = Float64(t * Float64(y / Float64(y - z))) tmp = 0.0 if (y <= -7.5e+78) tmp = t_2; elseif (y <= -9.8e-230) tmp = t_1; elseif (y <= 8.8e-304) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (y <= 2.7e-205) tmp = Float64(Float64(x * t) / Float64(z - y)); elseif (y <= 2.6e-110) tmp = Float64(t / Float64(z / Float64(x - y))); elseif (y <= 7.5e+73) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (x / (z - y)); t_2 = t * (y / (y - z)); tmp = 0.0; if (y <= -7.5e+78) tmp = t_2; elseif (y <= -9.8e-230) tmp = t_1; elseif (y <= 8.8e-304) tmp = (x - y) * (t / z); elseif (y <= 2.7e-205) tmp = (x * t) / (z - y); elseif (y <= 2.6e-110) tmp = t / (z / (x - y)); elseif (y <= 7.5e+73) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.5e+78], t$95$2, If[LessEqual[y, -9.8e-230], t$95$1, If[LessEqual[y, 8.8e-304], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e-205], N[(N[(x * t), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e-110], N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+73], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x}{z - y}\\
t_2 := t \cdot \frac{y}{y - z}\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{+78}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -9.8 \cdot 10^{-230}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{-304}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-205}:\\
\;\;\;\;\frac{x \cdot t}{z - y}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-110}:\\
\;\;\;\;\frac{t}{\frac{z}{x - y}}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+73}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -7.49999999999999934e78 or 7.5e73 < y Initial program 99.9%
Taylor expanded in x around 0 84.1%
neg-mul-184.1%
distribute-neg-frac84.1%
Simplified84.1%
frac-2neg84.1%
div-inv83.9%
remove-double-neg83.9%
sub-neg83.9%
distribute-neg-in83.9%
remove-double-neg83.9%
+-commutative83.9%
sub-neg83.9%
Applied egg-rr83.9%
associate-*r/84.1%
*-rgt-identity84.1%
Simplified84.1%
if -7.49999999999999934e78 < y < -9.79999999999999984e-230 or 2.5999999999999999e-110 < y < 7.5e73Initial program 96.9%
Taylor expanded in x around inf 69.7%
if -9.79999999999999984e-230 < y < 8.799999999999999e-304Initial program 85.0%
associate-*l/99.4%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in z around inf 99.8%
if 8.799999999999999e-304 < y < 2.7000000000000001e-205Initial program 85.2%
associate-*l/99.4%
associate-*r/92.5%
Simplified92.5%
Taylor expanded in x around inf 99.4%
if 2.7000000000000001e-205 < y < 2.5999999999999999e-110Initial program 99.9%
associate-*l/95.4%
associate-*r/87.1%
Simplified87.1%
Taylor expanded in z around inf 91.2%
associate-/l*94.6%
Simplified94.6%
Final simplification82.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ x (- z y)))))
(if (<= y -4.5e+92)
t
(if (<= y -8.5e-229)
t_1
(if (<= y 8e-110) (* (- x y) (/ t z)) (if (<= y 2.2e+75) t_1 t))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (x / (z - y));
double tmp;
if (y <= -4.5e+92) {
tmp = t;
} else if (y <= -8.5e-229) {
tmp = t_1;
} else if (y <= 8e-110) {
tmp = (x - y) * (t / z);
} else if (y <= 2.2e+75) {
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 / (z - y))
if (y <= (-4.5d+92)) then
tmp = t
else if (y <= (-8.5d-229)) then
tmp = t_1
else if (y <= 8d-110) then
tmp = (x - y) * (t / z)
else if (y <= 2.2d+75) 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 / (z - y));
double tmp;
if (y <= -4.5e+92) {
tmp = t;
} else if (y <= -8.5e-229) {
tmp = t_1;
} else if (y <= 8e-110) {
tmp = (x - y) * (t / z);
} else if (y <= 2.2e+75) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (x / (z - y)) tmp = 0 if y <= -4.5e+92: tmp = t elif y <= -8.5e-229: tmp = t_1 elif y <= 8e-110: tmp = (x - y) * (t / z) elif y <= 2.2e+75: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(x / Float64(z - y))) tmp = 0.0 if (y <= -4.5e+92) tmp = t; elseif (y <= -8.5e-229) tmp = t_1; elseif (y <= 8e-110) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (y <= 2.2e+75) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (x / (z - y)); tmp = 0.0; if (y <= -4.5e+92) tmp = t; elseif (y <= -8.5e-229) tmp = t_1; elseif (y <= 8e-110) tmp = (x - y) * (t / z); elseif (y <= 2.2e+75) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.5e+92], t, If[LessEqual[y, -8.5e-229], t$95$1, If[LessEqual[y, 8e-110], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+75], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x}{z - y}\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{+92}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{-229}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-110}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+75}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -4.4999999999999999e92 or 2.20000000000000012e75 < y Initial program 99.9%
associate-*l/72.1%
associate-*r/72.3%
Simplified72.3%
Taylor expanded in y around inf 71.9%
if -4.4999999999999999e92 < y < -8.49999999999999977e-229 or 8.0000000000000004e-110 < y < 2.20000000000000012e75Initial program 97.0%
Taylor expanded in x around inf 69.3%
if -8.49999999999999977e-229 < y < 8.0000000000000004e-110Initial program 91.1%
associate-*l/97.8%
associate-*r/92.9%
Simplified92.9%
Taylor expanded in z around inf 90.0%
Final simplification74.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ x (- z y)))) (t_2 (* t (/ y (- y z)))))
(if (<= y -1e+79)
t_2
(if (<= y -2.4e-228)
t_1
(if (<= y 9e-108) (* (- x y) (/ t z)) (if (<= y 5.4e+73) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (x / (z - y));
double t_2 = t * (y / (y - z));
double tmp;
if (y <= -1e+79) {
tmp = t_2;
} else if (y <= -2.4e-228) {
tmp = t_1;
} else if (y <= 9e-108) {
tmp = (x - y) * (t / z);
} else if (y <= 5.4e+73) {
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 / (z - y))
t_2 = t * (y / (y - z))
if (y <= (-1d+79)) then
tmp = t_2
else if (y <= (-2.4d-228)) then
tmp = t_1
else if (y <= 9d-108) then
tmp = (x - y) * (t / z)
else if (y <= 5.4d+73) 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 / (z - y));
double t_2 = t * (y / (y - z));
double tmp;
if (y <= -1e+79) {
tmp = t_2;
} else if (y <= -2.4e-228) {
tmp = t_1;
} else if (y <= 9e-108) {
tmp = (x - y) * (t / z);
} else if (y <= 5.4e+73) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (x / (z - y)) t_2 = t * (y / (y - z)) tmp = 0 if y <= -1e+79: tmp = t_2 elif y <= -2.4e-228: tmp = t_1 elif y <= 9e-108: tmp = (x - y) * (t / z) elif y <= 5.4e+73: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(x / Float64(z - y))) t_2 = Float64(t * Float64(y / Float64(y - z))) tmp = 0.0 if (y <= -1e+79) tmp = t_2; elseif (y <= -2.4e-228) tmp = t_1; elseif (y <= 9e-108) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (y <= 5.4e+73) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (x / (z - y)); t_2 = t * (y / (y - z)); tmp = 0.0; if (y <= -1e+79) tmp = t_2; elseif (y <= -2.4e-228) tmp = t_1; elseif (y <= 9e-108) tmp = (x - y) * (t / z); elseif (y <= 5.4e+73) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1e+79], t$95$2, If[LessEqual[y, -2.4e-228], t$95$1, If[LessEqual[y, 9e-108], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.4e+73], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x}{z - y}\\
t_2 := t \cdot \frac{y}{y - z}\\
\mathbf{if}\;y \leq -1 \cdot 10^{+79}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{-228}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-108}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{+73}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -9.99999999999999967e78 or 5.3999999999999998e73 < y Initial program 99.9%
Taylor expanded in x around 0 84.1%
neg-mul-184.1%
distribute-neg-frac84.1%
Simplified84.1%
frac-2neg84.1%
div-inv83.9%
remove-double-neg83.9%
sub-neg83.9%
distribute-neg-in83.9%
remove-double-neg83.9%
+-commutative83.9%
sub-neg83.9%
Applied egg-rr83.9%
associate-*r/84.1%
*-rgt-identity84.1%
Simplified84.1%
if -9.99999999999999967e78 < y < -2.40000000000000002e-228 or 8.99999999999999941e-108 < y < 5.3999999999999998e73Initial program 96.9%
Taylor expanded in x around inf 69.7%
if -2.40000000000000002e-228 < y < 8.99999999999999941e-108Initial program 91.1%
associate-*l/97.8%
associate-*r/92.9%
Simplified92.9%
Taylor expanded in z around inf 90.0%
Final simplification80.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.2e+30)
t
(if (<= y -1.7e-217)
(/ t (/ z x))
(if (<= y 7e-206) (/ (* x t) z) (if (<= y 1.45e+38) (* t (/ x z)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.2e+30) {
tmp = t;
} else if (y <= -1.7e-217) {
tmp = t / (z / x);
} else if (y <= 7e-206) {
tmp = (x * t) / z;
} else if (y <= 1.45e+38) {
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 <= (-3.2d+30)) then
tmp = t
else if (y <= (-1.7d-217)) then
tmp = t / (z / x)
else if (y <= 7d-206) then
tmp = (x * t) / z
else if (y <= 1.45d+38) 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 <= -3.2e+30) {
tmp = t;
} else if (y <= -1.7e-217) {
tmp = t / (z / x);
} else if (y <= 7e-206) {
tmp = (x * t) / z;
} else if (y <= 1.45e+38) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.2e+30: tmp = t elif y <= -1.7e-217: tmp = t / (z / x) elif y <= 7e-206: tmp = (x * t) / z elif y <= 1.45e+38: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.2e+30) tmp = t; elseif (y <= -1.7e-217) tmp = Float64(t / Float64(z / x)); elseif (y <= 7e-206) tmp = Float64(Float64(x * t) / z); elseif (y <= 1.45e+38) 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 <= -3.2e+30) tmp = t; elseif (y <= -1.7e-217) tmp = t / (z / x); elseif (y <= 7e-206) tmp = (x * t) / z; elseif (y <= 1.45e+38) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.2e+30], t, If[LessEqual[y, -1.7e-217], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e-206], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.45e+38], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+30}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-217}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-206}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+38}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.19999999999999973e30 or 1.45000000000000003e38 < y Initial program 99.9%
associate-*l/73.3%
associate-*r/75.3%
Simplified75.3%
Taylor expanded in y around inf 66.0%
if -3.19999999999999973e30 < y < -1.70000000000000008e-217Initial program 94.1%
associate-*l/87.1%
associate-*r/91.5%
Simplified91.5%
Taylor expanded in y around 0 44.2%
associate-/l*54.9%
Simplified54.9%
if -1.70000000000000008e-217 < y < 6.99999999999999979e-206Initial program 85.9%
associate-*l/99.4%
associate-*r/94.2%
Simplified94.2%
Taylor expanded in y around 0 87.4%
if 6.99999999999999979e-206 < y < 1.45000000000000003e38Initial program 99.8%
Taylor expanded in y around 0 69.3%
Final simplification67.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.2e+30)
t
(if (<= y -3.8e-30)
(/ x (/ z t))
(if (<= y -5.5e-57)
(* x (/ (- t) y))
(if (<= y 1.4e+38) (/ (* x t) z) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.2e+30) {
tmp = t;
} else if (y <= -3.8e-30) {
tmp = x / (z / t);
} else if (y <= -5.5e-57) {
tmp = x * (-t / y);
} else if (y <= 1.4e+38) {
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.2d+30)) then
tmp = t
else if (y <= (-3.8d-30)) then
tmp = x / (z / t)
else if (y <= (-5.5d-57)) then
tmp = x * (-t / y)
else if (y <= 1.4d+38) 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.2e+30) {
tmp = t;
} else if (y <= -3.8e-30) {
tmp = x / (z / t);
} else if (y <= -5.5e-57) {
tmp = x * (-t / y);
} else if (y <= 1.4e+38) {
tmp = (x * t) / z;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.2e+30: tmp = t elif y <= -3.8e-30: tmp = x / (z / t) elif y <= -5.5e-57: tmp = x * (-t / y) elif y <= 1.4e+38: tmp = (x * t) / z else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.2e+30) tmp = t; elseif (y <= -3.8e-30) tmp = Float64(x / Float64(z / t)); elseif (y <= -5.5e-57) tmp = Float64(x * Float64(Float64(-t) / y)); elseif (y <= 1.4e+38) tmp = Float64(Float64(x * t) / z); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.2e+30) tmp = t; elseif (y <= -3.8e-30) tmp = x / (z / t); elseif (y <= -5.5e-57) tmp = x * (-t / y); elseif (y <= 1.4e+38) tmp = (x * t) / z; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.2e+30], t, If[LessEqual[y, -3.8e-30], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.5e-57], N[(x * N[((-t) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e+38], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+30}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-30}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{-57}:\\
\;\;\;\;x \cdot \frac{-t}{y}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+38}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.19999999999999973e30 or 1.4e38 < y Initial program 99.9%
associate-*l/73.3%
associate-*r/75.3%
Simplified75.3%
Taylor expanded in y around inf 66.0%
if -3.19999999999999973e30 < y < -3.8000000000000003e-30Initial program 99.6%
Taylor expanded in y around 0 65.1%
associate-*l/39.6%
associate-/l*65.3%
Applied egg-rr65.3%
if -3.8000000000000003e-30 < y < -5.50000000000000011e-57Initial program 83.5%
associate-*l/84.8%
associate-*r/99.5%
Simplified99.5%
Taylor expanded in x around inf 52.8%
associate-*l/52.5%
*-commutative52.5%
Simplified52.5%
Taylor expanded in z around 0 52.6%
associate-*r/52.6%
neg-mul-152.6%
Simplified52.6%
if -5.50000000000000011e-57 < y < 1.4e38Initial program 93.9%
associate-*l/96.1%
associate-*r/91.0%
Simplified91.0%
Taylor expanded in y around 0 70.7%
Final simplification67.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.2e+31)
t
(if (<= y -4.8e-30)
(/ x (/ z t))
(if (<= y -3.9e-53)
(/ (* x (- t)) y)
(if (<= y 1.45e+38) (/ (* x t) z) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.2e+31) {
tmp = t;
} else if (y <= -4.8e-30) {
tmp = x / (z / t);
} else if (y <= -3.9e-53) {
tmp = (x * -t) / y;
} else if (y <= 1.45e+38) {
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 <= (-2.2d+31)) then
tmp = t
else if (y <= (-4.8d-30)) then
tmp = x / (z / t)
else if (y <= (-3.9d-53)) then
tmp = (x * -t) / y
else if (y <= 1.45d+38) 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 <= -2.2e+31) {
tmp = t;
} else if (y <= -4.8e-30) {
tmp = x / (z / t);
} else if (y <= -3.9e-53) {
tmp = (x * -t) / y;
} else if (y <= 1.45e+38) {
tmp = (x * t) / z;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.2e+31: tmp = t elif y <= -4.8e-30: tmp = x / (z / t) elif y <= -3.9e-53: tmp = (x * -t) / y elif y <= 1.45e+38: tmp = (x * t) / z else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.2e+31) tmp = t; elseif (y <= -4.8e-30) tmp = Float64(x / Float64(z / t)); elseif (y <= -3.9e-53) tmp = Float64(Float64(x * Float64(-t)) / y); elseif (y <= 1.45e+38) tmp = Float64(Float64(x * t) / z); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.2e+31) tmp = t; elseif (y <= -4.8e-30) tmp = x / (z / t); elseif (y <= -3.9e-53) tmp = (x * -t) / y; elseif (y <= 1.45e+38) tmp = (x * t) / z; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.2e+31], t, If[LessEqual[y, -4.8e-30], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.9e-53], N[(N[(x * (-t)), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 1.45e+38], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+31}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -4.8 \cdot 10^{-30}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq -3.9 \cdot 10^{-53}:\\
\;\;\;\;\frac{x \cdot \left(-t\right)}{y}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+38}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.2000000000000001e31 or 1.45000000000000003e38 < y Initial program 99.9%
associate-*l/73.3%
associate-*r/75.3%
Simplified75.3%
Taylor expanded in y around inf 66.0%
if -2.2000000000000001e31 < y < -4.7999999999999997e-30Initial program 99.6%
Taylor expanded in y around 0 65.1%
associate-*l/39.6%
associate-/l*65.3%
Applied egg-rr65.3%
if -4.7999999999999997e-30 < y < -3.9000000000000002e-53Initial program 83.5%
associate-*l/84.8%
associate-*r/99.5%
Simplified99.5%
Taylor expanded in x around inf 52.8%
associate-*l/52.5%
*-commutative52.5%
Simplified52.5%
Taylor expanded in z around 0 52.9%
mul-1-neg52.9%
distribute-neg-frac52.9%
distribute-rgt-neg-out52.9%
Simplified52.9%
if -3.9000000000000002e-53 < y < 1.45000000000000003e38Initial program 93.9%
associate-*l/96.1%
associate-*r/91.0%
Simplified91.0%
Taylor expanded in y around 0 70.7%
Final simplification67.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))))
(if (<= y -8e+78)
t_1
(if (<= y -1.4e-195)
(* t (/ x (- z y)))
(if (<= y 1.4e+38) (/ (* (- x y) t) z) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double tmp;
if (y <= -8e+78) {
tmp = t_1;
} else if (y <= -1.4e-195) {
tmp = t * (x / (z - y));
} else if (y <= 1.4e+38) {
tmp = ((x - y) * t) / 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 * (y / (y - z))
if (y <= (-8d+78)) then
tmp = t_1
else if (y <= (-1.4d-195)) then
tmp = t * (x / (z - y))
else if (y <= 1.4d+38) then
tmp = ((x - y) * t) / 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 * (y / (y - z));
double tmp;
if (y <= -8e+78) {
tmp = t_1;
} else if (y <= -1.4e-195) {
tmp = t * (x / (z - y));
} else if (y <= 1.4e+38) {
tmp = ((x - y) * t) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / (y - z)) tmp = 0 if y <= -8e+78: tmp = t_1 elif y <= -1.4e-195: tmp = t * (x / (z - y)) elif y <= 1.4e+38: tmp = ((x - y) * t) / z else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(y - z))) tmp = 0.0 if (y <= -8e+78) tmp = t_1; elseif (y <= -1.4e-195) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (y <= 1.4e+38) tmp = Float64(Float64(Float64(x - y) * t) / z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y / (y - z)); tmp = 0.0; if (y <= -8e+78) tmp = t_1; elseif (y <= -1.4e-195) tmp = t * (x / (z - y)); elseif (y <= 1.4e+38) tmp = ((x - y) * t) / z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8e+78], t$95$1, If[LessEqual[y, -1.4e-195], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e+38], N[(N[(N[(x - y), $MachinePrecision] * t), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{y - z}\\
\mathbf{if}\;y \leq -8 \cdot 10^{+78}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{-195}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+38}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -8.00000000000000007e78 or 1.4e38 < y Initial program 99.9%
Taylor expanded in x around 0 80.9%
neg-mul-180.9%
distribute-neg-frac80.9%
Simplified80.9%
frac-2neg80.9%
div-inv80.7%
remove-double-neg80.7%
sub-neg80.7%
distribute-neg-in80.7%
remove-double-neg80.7%
+-commutative80.7%
sub-neg80.7%
Applied egg-rr80.7%
associate-*r/80.9%
*-rgt-identity80.9%
Simplified80.9%
if -8.00000000000000007e78 < y < -1.40000000000000002e-195Initial program 96.6%
Taylor expanded in x around inf 67.9%
if -1.40000000000000002e-195 < y < 1.4e38Initial program 93.0%
associate-*l/97.3%
associate-*r/92.0%
Simplified92.0%
Taylor expanded in z around inf 85.6%
Final simplification80.1%
(FPCore (x y z t) :precision binary64 (if (<= y -3e+102) (* t (/ y (- y z))) (if (<= y 2.8e+152) (* (- x y) (/ t (- z y))) (* t (/ (- y x) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3e+102) {
tmp = t * (y / (y - z));
} else if (y <= 2.8e+152) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = t * ((y - 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 <= (-3d+102)) then
tmp = t * (y / (y - z))
else if (y <= 2.8d+152) then
tmp = (x - y) * (t / (z - y))
else
tmp = t * ((y - x) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3e+102) {
tmp = t * (y / (y - z));
} else if (y <= 2.8e+152) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = t * ((y - x) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3e+102: tmp = t * (y / (y - z)) elif y <= 2.8e+152: tmp = (x - y) * (t / (z - y)) else: tmp = t * ((y - x) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3e+102) tmp = Float64(t * Float64(y / Float64(y - z))); elseif (y <= 2.8e+152) tmp = Float64(Float64(x - y) * Float64(t / Float64(z - y))); else tmp = Float64(t * Float64(Float64(y - x) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3e+102) tmp = t * (y / (y - z)); elseif (y <= 2.8e+152) tmp = (x - y) * (t / (z - y)); else tmp = t * ((y - x) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3e+102], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e+152], N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+102}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+152}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\end{array}
\end{array}
if y < -2.9999999999999998e102Initial program 99.9%
Taylor expanded in x around 0 86.9%
neg-mul-186.9%
distribute-neg-frac86.9%
Simplified86.9%
frac-2neg86.9%
div-inv86.7%
remove-double-neg86.7%
sub-neg86.7%
distribute-neg-in86.7%
remove-double-neg86.7%
+-commutative86.7%
sub-neg86.7%
Applied egg-rr86.7%
associate-*r/86.9%
*-rgt-identity86.9%
Simplified86.9%
if -2.9999999999999998e102 < y < 2.8000000000000002e152Initial program 95.3%
associate-*l/91.7%
associate-*r/92.2%
Simplified92.2%
if 2.8000000000000002e152 < y Initial program 99.8%
Taylor expanded in z around 0 92.7%
associate-*r/92.7%
neg-mul-192.7%
neg-sub092.7%
associate--r-92.7%
neg-sub092.7%
Simplified92.7%
Final simplification91.1%
(FPCore (x y z t) :precision binary64 (if (<= y -3.55e+92) t (if (<= y 1.45e+74) (* x (/ t (- z y))) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.55e+92) {
tmp = t;
} else if (y <= 1.45e+74) {
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.55d+92)) then
tmp = t
else if (y <= 1.45d+74) 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.55e+92) {
tmp = t;
} else if (y <= 1.45e+74) {
tmp = x * (t / (z - y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.55e+92: tmp = t elif y <= 1.45e+74: tmp = x * (t / (z - y)) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.55e+92) tmp = t; elseif (y <= 1.45e+74) 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.55e+92) tmp = t; elseif (y <= 1.45e+74) tmp = x * (t / (z - y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.55e+92], t, If[LessEqual[y, 1.45e+74], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.55 \cdot 10^{+92}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+74}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.55e92 or 1.4500000000000001e74 < y Initial program 99.9%
associate-*l/72.1%
associate-*r/72.3%
Simplified72.3%
Taylor expanded in y around inf 71.9%
if -3.55e92 < y < 1.4500000000000001e74Initial program 94.8%
associate-*l/91.4%
associate-*r/92.0%
Simplified92.0%
Taylor expanded in x around inf 71.6%
associate-*l/69.8%
*-commutative69.8%
Simplified69.8%
Final simplification70.7%
(FPCore (x y z t) :precision binary64 (if (<= y -3e+31) t (if (<= y 1.4e+38) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3e+31) {
tmp = t;
} else if (y <= 1.4e+38) {
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 <= (-3d+31)) then
tmp = t
else if (y <= 1.4d+38) 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 <= -3e+31) {
tmp = t;
} else if (y <= 1.4e+38) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3e+31: tmp = t elif y <= 1.4e+38: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3e+31) tmp = t; elseif (y <= 1.4e+38) 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 <= -3e+31) tmp = t; elseif (y <= 1.4e+38) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3e+31], t, If[LessEqual[y, 1.4e+38], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+31}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+38}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.99999999999999989e31 or 1.4e38 < y Initial program 99.9%
associate-*l/73.3%
associate-*r/75.3%
Simplified75.3%
Taylor expanded in y around inf 66.0%
if -2.99999999999999989e31 < y < 1.4e38Initial program 93.9%
Taylor expanded in y around 0 65.3%
Final simplification65.7%
(FPCore (x y z t) :precision binary64 (if (<= y -2.9e+30) t (if (<= y 1.6e+38) (/ t (/ z x)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.9e+30) {
tmp = t;
} else if (y <= 1.6e+38) {
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.9d+30)) then
tmp = t
else if (y <= 1.6d+38) 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.9e+30) {
tmp = t;
} else if (y <= 1.6e+38) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.9e+30: tmp = t elif y <= 1.6e+38: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.9e+30) tmp = t; elseif (y <= 1.6e+38) 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.9e+30) tmp = t; elseif (y <= 1.6e+38) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.9e+30], t, If[LessEqual[y, 1.6e+38], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+30}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+38}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.8999999999999998e30 or 1.59999999999999993e38 < y Initial program 99.9%
associate-*l/73.3%
associate-*r/75.3%
Simplified75.3%
Taylor expanded in y around inf 66.0%
if -2.8999999999999998e30 < y < 1.59999999999999993e38Initial program 93.9%
associate-*l/93.5%
associate-*r/92.2%
Simplified92.2%
Taylor expanded in y around 0 64.6%
associate-/l*65.3%
Simplified65.3%
Final simplification65.7%
(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.0%
associate-*l/83.0%
associate-*r/83.4%
Simplified83.4%
Taylor expanded in y around inf 39.4%
Final simplification39.4%
(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 2023238
(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))