
(FPCore (x y z t a) :precision binary64 (/ (- x (* y z)) (- t (* a z))))
double code(double x, double y, double z, double t, double a) {
return (x - (y * z)) / (t - (a * z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x - (y * z)) / (t - (a * z))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x - (y * z)) / (t - (a * z));
}
def code(x, y, z, t, a): return (x - (y * z)) / (t - (a * z))
function code(x, y, z, t, a) return Float64(Float64(x - Float64(y * z)) / Float64(t - Float64(a * z))) end
function tmp = code(x, y, z, t, a) tmp = (x - (y * z)) / (t - (a * z)); end
code[x_, y_, z_, t_, a_] := N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(t - N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y \cdot z}{t - a \cdot z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (/ (- x (* y z)) (- t (* a z))))
double code(double x, double y, double z, double t, double a) {
return (x - (y * z)) / (t - (a * z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x - (y * z)) / (t - (a * z))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x - (y * z)) / (t - (a * z));
}
def code(x, y, z, t, a): return (x - (y * z)) / (t - (a * z))
function code(x, y, z, t, a) return Float64(Float64(x - Float64(y * z)) / Float64(t - Float64(a * z))) end
function tmp = code(x, y, z, t, a) tmp = (x - (y * z)) / (t - (a * z)); end
code[x_, y_, z_, t_, a_] := N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(t - N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y \cdot z}{t - a \cdot z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (/ x y) z))
(t_2 (- x (* y z)))
(t_3 (- t (* z a)))
(t_4 (/ t_2 t_3)))
(if (<= t_4 (- INFINITY))
(* (/ y t_3) t_1)
(if (<= t_4 -2e-308)
t_4
(if (<= t_4 0.0)
(* (/ t_2 a) (/ -1.0 (- z (/ t a))))
(if (<= t_4 2e+306)
t_4
(if (<= t_4 INFINITY) (/ t_1 (/ t_3 y)) (/ y a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x / y) - z;
double t_2 = x - (y * z);
double t_3 = t - (z * a);
double t_4 = t_2 / t_3;
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = (y / t_3) * t_1;
} else if (t_4 <= -2e-308) {
tmp = t_4;
} else if (t_4 <= 0.0) {
tmp = (t_2 / a) * (-1.0 / (z - (t / a)));
} else if (t_4 <= 2e+306) {
tmp = t_4;
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_1 / (t_3 / y);
} else {
tmp = y / a;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x / y) - z;
double t_2 = x - (y * z);
double t_3 = t - (z * a);
double t_4 = t_2 / t_3;
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = (y / t_3) * t_1;
} else if (t_4 <= -2e-308) {
tmp = t_4;
} else if (t_4 <= 0.0) {
tmp = (t_2 / a) * (-1.0 / (z - (t / a)));
} else if (t_4 <= 2e+306) {
tmp = t_4;
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = t_1 / (t_3 / y);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x / y) - z t_2 = x - (y * z) t_3 = t - (z * a) t_4 = t_2 / t_3 tmp = 0 if t_4 <= -math.inf: tmp = (y / t_3) * t_1 elif t_4 <= -2e-308: tmp = t_4 elif t_4 <= 0.0: tmp = (t_2 / a) * (-1.0 / (z - (t / a))) elif t_4 <= 2e+306: tmp = t_4 elif t_4 <= math.inf: tmp = t_1 / (t_3 / y) else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x / y) - z) t_2 = Float64(x - Float64(y * z)) t_3 = Float64(t - Float64(z * a)) t_4 = Float64(t_2 / t_3) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = Float64(Float64(y / t_3) * t_1); elseif (t_4 <= -2e-308) tmp = t_4; elseif (t_4 <= 0.0) tmp = Float64(Float64(t_2 / a) * Float64(-1.0 / Float64(z - Float64(t / a)))); elseif (t_4 <= 2e+306) tmp = t_4; elseif (t_4 <= Inf) tmp = Float64(t_1 / Float64(t_3 / y)); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x / y) - z; t_2 = x - (y * z); t_3 = t - (z * a); t_4 = t_2 / t_3; tmp = 0.0; if (t_4 <= -Inf) tmp = (y / t_3) * t_1; elseif (t_4 <= -2e-308) tmp = t_4; elseif (t_4 <= 0.0) tmp = (t_2 / a) * (-1.0 / (z - (t / a))); elseif (t_4 <= 2e+306) tmp = t_4; elseif (t_4 <= Inf) tmp = t_1 / (t_3 / y); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] - z), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 / t$95$3), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], N[(N[(y / t$95$3), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[t$95$4, -2e-308], t$95$4, If[LessEqual[t$95$4, 0.0], N[(N[(t$95$2 / a), $MachinePrecision] * N[(-1.0 / N[(z - N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 2e+306], t$95$4, If[LessEqual[t$95$4, Infinity], N[(t$95$1 / N[(t$95$3 / y), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} - z\\
t_2 := x - y \cdot z\\
t_3 := t - z \cdot a\\
t_4 := \frac{t\_2}{t\_3}\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;\frac{y}{t\_3} \cdot t\_1\\
\mathbf{elif}\;t\_4 \leq -2 \cdot 10^{-308}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;\frac{t\_2}{a} \cdot \frac{-1}{z - \frac{t}{a}}\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\frac{t\_1}{\frac{t\_3}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -inf.0Initial program 44.3%
*-commutative44.3%
Simplified44.3%
Taylor expanded in y around inf 44.3%
div-inv44.3%
*-commutative44.3%
associate-*l*99.7%
div-inv99.8%
Applied egg-rr99.8%
if -inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -1.9999999999999998e-308 or 0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 2.00000000000000003e306Initial program 99.7%
if -1.9999999999999998e-308 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 0.0Initial program 71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in a around inf 71.9%
associate-/r*99.8%
div-inv99.9%
Applied egg-rr99.9%
if 2.00000000000000003e306 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < +inf.0Initial program 67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in y around inf 67.2%
div-inv67.2%
*-commutative67.2%
associate-*l*99.7%
div-inv99.8%
Applied egg-rr99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if +inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) Initial program 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in z around inf 100.0%
Final simplification99.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (/ x y) z))
(t_2 (- x (* y z)))
(t_3 (- t (* z a)))
(t_4 (/ t_2 t_3)))
(if (<= t_4 (- INFINITY))
(* (/ y t_3) t_1)
(if (<= t_4 -2e-308)
t_4
(if (<= t_4 0.0)
(* (/ 1.0 a) (/ t_2 (- (/ t a) z)))
(if (<= t_4 2e+306)
t_4
(if (<= t_4 INFINITY) (/ t_1 (/ t_3 y)) (/ y a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x / y) - z;
double t_2 = x - (y * z);
double t_3 = t - (z * a);
double t_4 = t_2 / t_3;
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = (y / t_3) * t_1;
} else if (t_4 <= -2e-308) {
tmp = t_4;
} else if (t_4 <= 0.0) {
tmp = (1.0 / a) * (t_2 / ((t / a) - z));
} else if (t_4 <= 2e+306) {
tmp = t_4;
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_1 / (t_3 / y);
} else {
tmp = y / a;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x / y) - z;
double t_2 = x - (y * z);
double t_3 = t - (z * a);
double t_4 = t_2 / t_3;
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = (y / t_3) * t_1;
} else if (t_4 <= -2e-308) {
tmp = t_4;
} else if (t_4 <= 0.0) {
tmp = (1.0 / a) * (t_2 / ((t / a) - z));
} else if (t_4 <= 2e+306) {
tmp = t_4;
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = t_1 / (t_3 / y);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x / y) - z t_2 = x - (y * z) t_3 = t - (z * a) t_4 = t_2 / t_3 tmp = 0 if t_4 <= -math.inf: tmp = (y / t_3) * t_1 elif t_4 <= -2e-308: tmp = t_4 elif t_4 <= 0.0: tmp = (1.0 / a) * (t_2 / ((t / a) - z)) elif t_4 <= 2e+306: tmp = t_4 elif t_4 <= math.inf: tmp = t_1 / (t_3 / y) else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x / y) - z) t_2 = Float64(x - Float64(y * z)) t_3 = Float64(t - Float64(z * a)) t_4 = Float64(t_2 / t_3) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = Float64(Float64(y / t_3) * t_1); elseif (t_4 <= -2e-308) tmp = t_4; elseif (t_4 <= 0.0) tmp = Float64(Float64(1.0 / a) * Float64(t_2 / Float64(Float64(t / a) - z))); elseif (t_4 <= 2e+306) tmp = t_4; elseif (t_4 <= Inf) tmp = Float64(t_1 / Float64(t_3 / y)); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x / y) - z; t_2 = x - (y * z); t_3 = t - (z * a); t_4 = t_2 / t_3; tmp = 0.0; if (t_4 <= -Inf) tmp = (y / t_3) * t_1; elseif (t_4 <= -2e-308) tmp = t_4; elseif (t_4 <= 0.0) tmp = (1.0 / a) * (t_2 / ((t / a) - z)); elseif (t_4 <= 2e+306) tmp = t_4; elseif (t_4 <= Inf) tmp = t_1 / (t_3 / y); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] - z), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 / t$95$3), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], N[(N[(y / t$95$3), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[t$95$4, -2e-308], t$95$4, If[LessEqual[t$95$4, 0.0], N[(N[(1.0 / a), $MachinePrecision] * N[(t$95$2 / N[(N[(t / a), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 2e+306], t$95$4, If[LessEqual[t$95$4, Infinity], N[(t$95$1 / N[(t$95$3 / y), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} - z\\
t_2 := x - y \cdot z\\
t_3 := t - z \cdot a\\
t_4 := \frac{t\_2}{t\_3}\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;\frac{y}{t\_3} \cdot t\_1\\
\mathbf{elif}\;t\_4 \leq -2 \cdot 10^{-308}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;\frac{1}{a} \cdot \frac{t\_2}{\frac{t}{a} - z}\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\frac{t\_1}{\frac{t\_3}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -inf.0Initial program 44.3%
*-commutative44.3%
Simplified44.3%
Taylor expanded in y around inf 44.3%
div-inv44.3%
*-commutative44.3%
associate-*l*99.7%
div-inv99.8%
Applied egg-rr99.8%
if -inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -1.9999999999999998e-308 or 0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 2.00000000000000003e306Initial program 99.7%
if -1.9999999999999998e-308 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 0.0Initial program 71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in a around inf 71.9%
*-un-lft-identity71.9%
times-frac99.8%
Applied egg-rr99.8%
if 2.00000000000000003e306 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < +inf.0Initial program 67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in y around inf 67.2%
div-inv67.2%
*-commutative67.2%
associate-*l*99.7%
div-inv99.8%
Applied egg-rr99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if +inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) Initial program 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in z around inf 100.0%
Final simplification99.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (/ x y) z)) (t_2 (- t (* z a))) (t_3 (/ (- x (* y z)) t_2)))
(if (<= t_3 (- INFINITY))
(* (/ y t_2) t_1)
(if (<= t_3 -4e-311)
t_3
(if (<= t_3 0.0)
(* y (/ (/ z a) (- z (/ t a))))
(if (<= t_3 2e+306)
t_3
(if (<= t_3 INFINITY) (/ t_1 (/ t_2 y)) (/ y a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x / y) - z;
double t_2 = t - (z * a);
double t_3 = (x - (y * z)) / t_2;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = (y / t_2) * t_1;
} else if (t_3 <= -4e-311) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = y * ((z / a) / (z - (t / a)));
} else if (t_3 <= 2e+306) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_1 / (t_2 / y);
} else {
tmp = y / a;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x / y) - z;
double t_2 = t - (z * a);
double t_3 = (x - (y * z)) / t_2;
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = (y / t_2) * t_1;
} else if (t_3 <= -4e-311) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = y * ((z / a) / (z - (t / a)));
} else if (t_3 <= 2e+306) {
tmp = t_3;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_1 / (t_2 / y);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x / y) - z t_2 = t - (z * a) t_3 = (x - (y * z)) / t_2 tmp = 0 if t_3 <= -math.inf: tmp = (y / t_2) * t_1 elif t_3 <= -4e-311: tmp = t_3 elif t_3 <= 0.0: tmp = y * ((z / a) / (z - (t / a))) elif t_3 <= 2e+306: tmp = t_3 elif t_3 <= math.inf: tmp = t_1 / (t_2 / y) else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x / y) - z) t_2 = Float64(t - Float64(z * a)) t_3 = Float64(Float64(x - Float64(y * z)) / t_2) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(Float64(y / t_2) * t_1); elseif (t_3 <= -4e-311) tmp = t_3; elseif (t_3 <= 0.0) tmp = Float64(y * Float64(Float64(z / a) / Float64(z - Float64(t / a)))); elseif (t_3 <= 2e+306) tmp = t_3; elseif (t_3 <= Inf) tmp = Float64(t_1 / Float64(t_2 / y)); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x / y) - z; t_2 = t - (z * a); t_3 = (x - (y * z)) / t_2; tmp = 0.0; if (t_3 <= -Inf) tmp = (y / t_2) * t_1; elseif (t_3 <= -4e-311) tmp = t_3; elseif (t_3 <= 0.0) tmp = y * ((z / a) / (z - (t / a))); elseif (t_3 <= 2e+306) tmp = t_3; elseif (t_3 <= Inf) tmp = t_1 / (t_2 / y); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] - z), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(N[(y / t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[t$95$3, -4e-311], t$95$3, If[LessEqual[t$95$3, 0.0], N[(y * N[(N[(z / a), $MachinePrecision] / N[(z - N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+306], t$95$3, If[LessEqual[t$95$3, Infinity], N[(t$95$1 / N[(t$95$2 / y), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} - z\\
t_2 := t - z \cdot a\\
t_3 := \frac{x - y \cdot z}{t\_2}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;\frac{y}{t\_2} \cdot t\_1\\
\mathbf{elif}\;t\_3 \leq -4 \cdot 10^{-311}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;y \cdot \frac{\frac{z}{a}}{z - \frac{t}{a}}\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{t\_1}{\frac{t\_2}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -inf.0Initial program 44.3%
*-commutative44.3%
Simplified44.3%
Taylor expanded in y around inf 44.3%
div-inv44.3%
*-commutative44.3%
associate-*l*99.7%
div-inv99.8%
Applied egg-rr99.8%
if -inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -3.99999999999979e-311 or 0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 2.00000000000000003e306Initial program 99.7%
if -3.99999999999979e-311 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 0.0Initial program 70.9%
*-commutative70.9%
Simplified70.9%
Taylor expanded in a around inf 70.9%
Taylor expanded in x around 0 70.9%
neg-mul-170.9%
associate-/l*70.9%
distribute-rgt-neg-in70.9%
associate-/r*90.3%
distribute-neg-frac290.3%
Simplified90.3%
if 2.00000000000000003e306 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < +inf.0Initial program 67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in y around inf 67.2%
div-inv67.2%
*-commutative67.2%
associate-*l*99.7%
div-inv99.8%
Applied egg-rr99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if +inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) Initial program 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in z around inf 100.0%
Final simplification98.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* z a)))
(t_2 (* (/ y t_1) (- (/ x y) z)))
(t_3 (/ (- x (* y z)) t_1)))
(if (<= t_3 (- INFINITY))
t_2
(if (<= t_3 -4e-311)
t_3
(if (<= t_3 0.0)
(* y (/ (/ z a) (- z (/ t a))))
(if (<= t_3 2e+306) t_3 (if (<= t_3 INFINITY) t_2 (/ y a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (z * a);
double t_2 = (y / t_1) * ((x / y) - z);
double t_3 = (x - (y * z)) / t_1;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_3 <= -4e-311) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = y * ((z / a) / (z - (t / a)));
} else if (t_3 <= 2e+306) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = y / a;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - (z * a);
double t_2 = (y / t_1) * ((x / y) - z);
double t_3 = (x - (y * z)) / t_1;
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_2;
} else if (t_3 <= -4e-311) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = y * ((z / a) / (z - (t / a)));
} else if (t_3 <= 2e+306) {
tmp = t_3;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (z * a) t_2 = (y / t_1) * ((x / y) - z) t_3 = (x - (y * z)) / t_1 tmp = 0 if t_3 <= -math.inf: tmp = t_2 elif t_3 <= -4e-311: tmp = t_3 elif t_3 <= 0.0: tmp = y * ((z / a) / (z - (t / a))) elif t_3 <= 2e+306: tmp = t_3 elif t_3 <= math.inf: tmp = t_2 else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(z * a)) t_2 = Float64(Float64(y / t_1) * Float64(Float64(x / y) - z)) t_3 = Float64(Float64(x - Float64(y * z)) / t_1) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_2; elseif (t_3 <= -4e-311) tmp = t_3; elseif (t_3 <= 0.0) tmp = Float64(y * Float64(Float64(z / a) / Float64(z - Float64(t / a)))); elseif (t_3 <= 2e+306) tmp = t_3; elseif (t_3 <= Inf) tmp = t_2; else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (z * a); t_2 = (y / t_1) * ((x / y) - z); t_3 = (x - (y * z)) / t_1; tmp = 0.0; if (t_3 <= -Inf) tmp = t_2; elseif (t_3 <= -4e-311) tmp = t_3; elseif (t_3 <= 0.0) tmp = y * ((z / a) / (z - (t / a))); elseif (t_3 <= 2e+306) tmp = t_3; elseif (t_3 <= Inf) tmp = t_2; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / t$95$1), $MachinePrecision] * N[(N[(x / y), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$2, If[LessEqual[t$95$3, -4e-311], t$95$3, If[LessEqual[t$95$3, 0.0], N[(y * N[(N[(z / a), $MachinePrecision] / N[(z - N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+306], t$95$3, If[LessEqual[t$95$3, Infinity], t$95$2, N[(y / a), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - z \cdot a\\
t_2 := \frac{y}{t\_1} \cdot \left(\frac{x}{y} - z\right)\\
t_3 := \frac{x - y \cdot z}{t\_1}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq -4 \cdot 10^{-311}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;y \cdot \frac{\frac{z}{a}}{z - \frac{t}{a}}\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -inf.0 or 2.00000000000000003e306 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < +inf.0Initial program 57.5%
*-commutative57.5%
Simplified57.5%
Taylor expanded in y around inf 57.5%
div-inv57.5%
*-commutative57.5%
associate-*l*99.7%
div-inv99.8%
Applied egg-rr99.8%
if -inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -3.99999999999979e-311 or 0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 2.00000000000000003e306Initial program 99.7%
if -3.99999999999979e-311 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 0.0Initial program 70.9%
*-commutative70.9%
Simplified70.9%
Taylor expanded in a around inf 70.9%
Taylor expanded in x around 0 70.9%
neg-mul-170.9%
associate-/l*70.9%
distribute-rgt-neg-in70.9%
associate-/r*90.3%
distribute-neg-frac290.3%
Simplified90.3%
if +inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) Initial program 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in z around inf 100.0%
Final simplification98.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* z a) t))
(t_2 (- x (* y z)))
(t_3 (- t (* z a)))
(t_4 (/ x t_3))
(t_5 (/ t_2 t_3)))
(if (<= t_5 -2e-308)
(+ (* z (/ y t_1)) t_4)
(if (<= t_5 0.0)
(* (/ t_2 a) (/ -1.0 (- z (/ t a))))
(if (<= t_5 2e+306)
(+ (/ (* y z) t_1) t_4)
(if (<= t_5 INFINITY) (/ (- (/ x y) z) (/ t_3 y)) (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z * a) - t;
double t_2 = x - (y * z);
double t_3 = t - (z * a);
double t_4 = x / t_3;
double t_5 = t_2 / t_3;
double tmp;
if (t_5 <= -2e-308) {
tmp = (z * (y / t_1)) + t_4;
} else if (t_5 <= 0.0) {
tmp = (t_2 / a) * (-1.0 / (z - (t / a)));
} else if (t_5 <= 2e+306) {
tmp = ((y * z) / t_1) + t_4;
} else if (t_5 <= ((double) INFINITY)) {
tmp = ((x / y) - z) / (t_3 / y);
} else {
tmp = y / a;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (z * a) - t;
double t_2 = x - (y * z);
double t_3 = t - (z * a);
double t_4 = x / t_3;
double t_5 = t_2 / t_3;
double tmp;
if (t_5 <= -2e-308) {
tmp = (z * (y / t_1)) + t_4;
} else if (t_5 <= 0.0) {
tmp = (t_2 / a) * (-1.0 / (z - (t / a)));
} else if (t_5 <= 2e+306) {
tmp = ((y * z) / t_1) + t_4;
} else if (t_5 <= Double.POSITIVE_INFINITY) {
tmp = ((x / y) - z) / (t_3 / y);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z * a) - t t_2 = x - (y * z) t_3 = t - (z * a) t_4 = x / t_3 t_5 = t_2 / t_3 tmp = 0 if t_5 <= -2e-308: tmp = (z * (y / t_1)) + t_4 elif t_5 <= 0.0: tmp = (t_2 / a) * (-1.0 / (z - (t / a))) elif t_5 <= 2e+306: tmp = ((y * z) / t_1) + t_4 elif t_5 <= math.inf: tmp = ((x / y) - z) / (t_3 / y) else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z * a) - t) t_2 = Float64(x - Float64(y * z)) t_3 = Float64(t - Float64(z * a)) t_4 = Float64(x / t_3) t_5 = Float64(t_2 / t_3) tmp = 0.0 if (t_5 <= -2e-308) tmp = Float64(Float64(z * Float64(y / t_1)) + t_4); elseif (t_5 <= 0.0) tmp = Float64(Float64(t_2 / a) * Float64(-1.0 / Float64(z - Float64(t / a)))); elseif (t_5 <= 2e+306) tmp = Float64(Float64(Float64(y * z) / t_1) + t_4); elseif (t_5 <= Inf) tmp = Float64(Float64(Float64(x / y) - z) / Float64(t_3 / y)); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z * a) - t; t_2 = x - (y * z); t_3 = t - (z * a); t_4 = x / t_3; t_5 = t_2 / t_3; tmp = 0.0; if (t_5 <= -2e-308) tmp = (z * (y / t_1)) + t_4; elseif (t_5 <= 0.0) tmp = (t_2 / a) * (-1.0 / (z - (t / a))); elseif (t_5 <= 2e+306) tmp = ((y * z) / t_1) + t_4; elseif (t_5 <= Inf) tmp = ((x / y) - z) / (t_3 / y); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 / t$95$3), $MachinePrecision]}, If[LessEqual[t$95$5, -2e-308], N[(N[(z * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision], If[LessEqual[t$95$5, 0.0], N[(N[(t$95$2 / a), $MachinePrecision] * N[(-1.0 / N[(z - N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 2e+306], N[(N[(N[(y * z), $MachinePrecision] / t$95$1), $MachinePrecision] + t$95$4), $MachinePrecision], If[LessEqual[t$95$5, Infinity], N[(N[(N[(x / y), $MachinePrecision] - z), $MachinePrecision] / N[(t$95$3 / y), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot a - t\\
t_2 := x - y \cdot z\\
t_3 := t - z \cdot a\\
t_4 := \frac{x}{t\_3}\\
t_5 := \frac{t\_2}{t\_3}\\
\mathbf{if}\;t\_5 \leq -2 \cdot 10^{-308}:\\
\;\;\;\;z \cdot \frac{y}{t\_1} + t\_4\\
\mathbf{elif}\;t\_5 \leq 0:\\
\;\;\;\;\frac{t\_2}{a} \cdot \frac{-1}{z - \frac{t}{a}}\\
\mathbf{elif}\;t\_5 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;\frac{y \cdot z}{t\_1} + t\_4\\
\mathbf{elif}\;t\_5 \leq \infty:\\
\;\;\;\;\frac{\frac{x}{y} - z}{\frac{t\_3}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -1.9999999999999998e-308Initial program 90.1%
*-commutative90.1%
Simplified90.1%
Taylor expanded in x around 0 90.1%
*-commutative90.1%
associate-/l*97.8%
*-commutative97.8%
Applied egg-rr97.8%
if -1.9999999999999998e-308 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 0.0Initial program 71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in a around inf 71.9%
associate-/r*99.8%
div-inv99.9%
Applied egg-rr99.9%
if 0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 2.00000000000000003e306Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
if 2.00000000000000003e306 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < +inf.0Initial program 67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in y around inf 67.2%
div-inv67.2%
*-commutative67.2%
associate-*l*99.7%
div-inv99.8%
Applied egg-rr99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if +inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) Initial program 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in z around inf 100.0%
Final simplification99.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y z))) (t_2 (- t (* z a))) (t_3 (/ t_1 t_2)))
(if (<= t_3 -2e-308)
(+ (* z (/ y (- (* z a) t))) (/ x t_2))
(if (<= t_3 0.0)
(* (/ t_1 a) (/ -1.0 (- z (/ t a))))
(if (<= t_3 2e+306)
t_3
(if (<= t_3 INFINITY) (/ (- (/ x y) z) (/ t_2 y)) (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * z);
double t_2 = t - (z * a);
double t_3 = t_1 / t_2;
double tmp;
if (t_3 <= -2e-308) {
tmp = (z * (y / ((z * a) - t))) + (x / t_2);
} else if (t_3 <= 0.0) {
tmp = (t_1 / a) * (-1.0 / (z - (t / a)));
} else if (t_3 <= 2e+306) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = ((x / y) - z) / (t_2 / y);
} else {
tmp = y / a;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * z);
double t_2 = t - (z * a);
double t_3 = t_1 / t_2;
double tmp;
if (t_3 <= -2e-308) {
tmp = (z * (y / ((z * a) - t))) + (x / t_2);
} else if (t_3 <= 0.0) {
tmp = (t_1 / a) * (-1.0 / (z - (t / a)));
} else if (t_3 <= 2e+306) {
tmp = t_3;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = ((x / y) - z) / (t_2 / y);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * z) t_2 = t - (z * a) t_3 = t_1 / t_2 tmp = 0 if t_3 <= -2e-308: tmp = (z * (y / ((z * a) - t))) + (x / t_2) elif t_3 <= 0.0: tmp = (t_1 / a) * (-1.0 / (z - (t / a))) elif t_3 <= 2e+306: tmp = t_3 elif t_3 <= math.inf: tmp = ((x / y) - z) / (t_2 / y) else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * z)) t_2 = Float64(t - Float64(z * a)) t_3 = Float64(t_1 / t_2) tmp = 0.0 if (t_3 <= -2e-308) tmp = Float64(Float64(z * Float64(y / Float64(Float64(z * a) - t))) + Float64(x / t_2)); elseif (t_3 <= 0.0) tmp = Float64(Float64(t_1 / a) * Float64(-1.0 / Float64(z - Float64(t / a)))); elseif (t_3 <= 2e+306) tmp = t_3; elseif (t_3 <= Inf) tmp = Float64(Float64(Float64(x / y) - z) / Float64(t_2 / y)); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * z); t_2 = t - (z * a); t_3 = t_1 / t_2; tmp = 0.0; if (t_3 <= -2e-308) tmp = (z * (y / ((z * a) - t))) + (x / t_2); elseif (t_3 <= 0.0) tmp = (t_1 / a) * (-1.0 / (z - (t / a))); elseif (t_3 <= 2e+306) tmp = t_3; elseif (t_3 <= Inf) tmp = ((x / y) - z) / (t_2 / y); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / t$95$2), $MachinePrecision]}, If[LessEqual[t$95$3, -2e-308], N[(N[(z * N[(y / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(N[(t$95$1 / a), $MachinePrecision] * N[(-1.0 / N[(z - N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+306], t$95$3, If[LessEqual[t$95$3, Infinity], N[(N[(N[(x / y), $MachinePrecision] - z), $MachinePrecision] / N[(t$95$2 / y), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot z\\
t_2 := t - z \cdot a\\
t_3 := \frac{t\_1}{t\_2}\\
\mathbf{if}\;t\_3 \leq -2 \cdot 10^{-308}:\\
\;\;\;\;z \cdot \frac{y}{z \cdot a - t} + \frac{x}{t\_2}\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{t\_1}{a} \cdot \frac{-1}{z - \frac{t}{a}}\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{\frac{x}{y} - z}{\frac{t\_2}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -1.9999999999999998e-308Initial program 90.1%
*-commutative90.1%
Simplified90.1%
Taylor expanded in x around 0 90.1%
*-commutative90.1%
associate-/l*97.8%
*-commutative97.8%
Applied egg-rr97.8%
if -1.9999999999999998e-308 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 0.0Initial program 71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in a around inf 71.9%
associate-/r*99.8%
div-inv99.9%
Applied egg-rr99.9%
if 0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 2.00000000000000003e306Initial program 99.7%
if 2.00000000000000003e306 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < +inf.0Initial program 67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in y around inf 67.2%
div-inv67.2%
*-commutative67.2%
associate-*l*99.7%
div-inv99.8%
Applied egg-rr99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if +inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) Initial program 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in z around inf 100.0%
Final simplification99.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y z))) (t_2 (- t (* z a))) (t_3 (/ t_1 t_2)))
(if (<= t_3 -2e-308)
(+ (/ x t_2) (/ z (/ (- (* z a) t) y)))
(if (<= t_3 0.0)
(* (/ t_1 a) (/ -1.0 (- z (/ t a))))
(if (<= t_3 2e+306)
t_3
(if (<= t_3 INFINITY) (/ (- (/ x y) z) (/ t_2 y)) (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * z);
double t_2 = t - (z * a);
double t_3 = t_1 / t_2;
double tmp;
if (t_3 <= -2e-308) {
tmp = (x / t_2) + (z / (((z * a) - t) / y));
} else if (t_3 <= 0.0) {
tmp = (t_1 / a) * (-1.0 / (z - (t / a)));
} else if (t_3 <= 2e+306) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = ((x / y) - z) / (t_2 / y);
} else {
tmp = y / a;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * z);
double t_2 = t - (z * a);
double t_3 = t_1 / t_2;
double tmp;
if (t_3 <= -2e-308) {
tmp = (x / t_2) + (z / (((z * a) - t) / y));
} else if (t_3 <= 0.0) {
tmp = (t_1 / a) * (-1.0 / (z - (t / a)));
} else if (t_3 <= 2e+306) {
tmp = t_3;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = ((x / y) - z) / (t_2 / y);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * z) t_2 = t - (z * a) t_3 = t_1 / t_2 tmp = 0 if t_3 <= -2e-308: tmp = (x / t_2) + (z / (((z * a) - t) / y)) elif t_3 <= 0.0: tmp = (t_1 / a) * (-1.0 / (z - (t / a))) elif t_3 <= 2e+306: tmp = t_3 elif t_3 <= math.inf: tmp = ((x / y) - z) / (t_2 / y) else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * z)) t_2 = Float64(t - Float64(z * a)) t_3 = Float64(t_1 / t_2) tmp = 0.0 if (t_3 <= -2e-308) tmp = Float64(Float64(x / t_2) + Float64(z / Float64(Float64(Float64(z * a) - t) / y))); elseif (t_3 <= 0.0) tmp = Float64(Float64(t_1 / a) * Float64(-1.0 / Float64(z - Float64(t / a)))); elseif (t_3 <= 2e+306) tmp = t_3; elseif (t_3 <= Inf) tmp = Float64(Float64(Float64(x / y) - z) / Float64(t_2 / y)); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * z); t_2 = t - (z * a); t_3 = t_1 / t_2; tmp = 0.0; if (t_3 <= -2e-308) tmp = (x / t_2) + (z / (((z * a) - t) / y)); elseif (t_3 <= 0.0) tmp = (t_1 / a) * (-1.0 / (z - (t / a))); elseif (t_3 <= 2e+306) tmp = t_3; elseif (t_3 <= Inf) tmp = ((x / y) - z) / (t_2 / y); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / t$95$2), $MachinePrecision]}, If[LessEqual[t$95$3, -2e-308], N[(N[(x / t$95$2), $MachinePrecision] + N[(z / N[(N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(N[(t$95$1 / a), $MachinePrecision] * N[(-1.0 / N[(z - N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+306], t$95$3, If[LessEqual[t$95$3, Infinity], N[(N[(N[(x / y), $MachinePrecision] - z), $MachinePrecision] / N[(t$95$2 / y), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot z\\
t_2 := t - z \cdot a\\
t_3 := \frac{t\_1}{t\_2}\\
\mathbf{if}\;t\_3 \leq -2 \cdot 10^{-308}:\\
\;\;\;\;\frac{x}{t\_2} + \frac{z}{\frac{z \cdot a - t}{y}}\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{t\_1}{a} \cdot \frac{-1}{z - \frac{t}{a}}\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{\frac{x}{y} - z}{\frac{t\_2}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -1.9999999999999998e-308Initial program 90.1%
*-commutative90.1%
Simplified90.1%
Taylor expanded in x around 0 90.1%
*-commutative90.1%
associate-/l*97.8%
*-commutative97.8%
Applied egg-rr97.8%
+-commutative97.8%
mul-1-neg97.8%
unsub-neg97.8%
*-commutative97.8%
clear-num97.7%
un-div-inv97.8%
Applied egg-rr97.8%
if -1.9999999999999998e-308 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 0.0Initial program 71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in a around inf 71.9%
associate-/r*99.8%
div-inv99.9%
Applied egg-rr99.9%
if 0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 2.00000000000000003e306Initial program 99.7%
if 2.00000000000000003e306 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < +inf.0Initial program 67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in y around inf 67.2%
div-inv67.2%
*-commutative67.2%
associate-*l*99.7%
div-inv99.8%
Applied egg-rr99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if +inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) Initial program 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in z around inf 100.0%
Final simplification99.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.36e+101)
(/ (- y (/ x z)) a)
(if (<= z 1.75e+117)
(/ (- x (* y z)) (- t (* z a)))
(- (/ y a) (/ x (* z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.36e+101) {
tmp = (y - (x / z)) / a;
} else if (z <= 1.75e+117) {
tmp = (x - (y * z)) / (t - (z * a));
} else {
tmp = (y / a) - (x / (z * a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.36d+101)) then
tmp = (y - (x / z)) / a
else if (z <= 1.75d+117) then
tmp = (x - (y * z)) / (t - (z * a))
else
tmp = (y / a) - (x / (z * a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.36e+101) {
tmp = (y - (x / z)) / a;
} else if (z <= 1.75e+117) {
tmp = (x - (y * z)) / (t - (z * a));
} else {
tmp = (y / a) - (x / (z * a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.36e+101: tmp = (y - (x / z)) / a elif z <= 1.75e+117: tmp = (x - (y * z)) / (t - (z * a)) else: tmp = (y / a) - (x / (z * a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.36e+101) tmp = Float64(Float64(y - Float64(x / z)) / a); elseif (z <= 1.75e+117) tmp = Float64(Float64(x - Float64(y * z)) / Float64(t - Float64(z * a))); else tmp = Float64(Float64(y / a) - Float64(x / Float64(z * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.36e+101) tmp = (y - (x / z)) / a; elseif (z <= 1.75e+117) tmp = (x - (y * z)) / (t - (z * a)); else tmp = (y / a) - (x / (z * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.36e+101], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 1.75e+117], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] - N[(x / N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.36 \cdot 10^{+101}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+117}:\\
\;\;\;\;\frac{x - y \cdot z}{t - z \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} - \frac{x}{z \cdot a}\\
\end{array}
\end{array}
if z < -1.35999999999999998e101Initial program 55.8%
*-commutative55.8%
Simplified55.8%
Taylor expanded in x around 0 55.8%
*-commutative55.8%
associate-/l*74.1%
*-commutative74.1%
Applied egg-rr74.1%
Taylor expanded in a around inf 79.8%
mul-1-neg79.8%
unsub-neg79.8%
Simplified79.8%
if -1.35999999999999998e101 < z < 1.74999999999999991e117Initial program 95.7%
if 1.74999999999999991e117 < z Initial program 50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in x around 0 50.0%
*-commutative50.0%
associate-/l*63.5%
*-commutative63.5%
Applied egg-rr63.5%
Taylor expanded in t around 0 79.9%
+-commutative79.9%
mul-1-neg79.9%
unsub-neg79.9%
*-commutative79.9%
Simplified79.9%
Final simplification91.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -8e-48) (- (/ x t) (* y (/ z t))) (if (<= t 0.105) (- (/ y a) (/ x (* z a))) (/ (- x (* y z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8e-48) {
tmp = (x / t) - (y * (z / t));
} else if (t <= 0.105) {
tmp = (y / a) - (x / (z * a));
} else {
tmp = (x - (y * z)) / t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-8d-48)) then
tmp = (x / t) - (y * (z / t))
else if (t <= 0.105d0) then
tmp = (y / a) - (x / (z * a))
else
tmp = (x - (y * z)) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8e-48) {
tmp = (x / t) - (y * (z / t));
} else if (t <= 0.105) {
tmp = (y / a) - (x / (z * a));
} else {
tmp = (x - (y * z)) / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -8e-48: tmp = (x / t) - (y * (z / t)) elif t <= 0.105: tmp = (y / a) - (x / (z * a)) else: tmp = (x - (y * z)) / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8e-48) tmp = Float64(Float64(x / t) - Float64(y * Float64(z / t))); elseif (t <= 0.105) tmp = Float64(Float64(y / a) - Float64(x / Float64(z * a))); else tmp = Float64(Float64(x - Float64(y * z)) / t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -8e-48) tmp = (x / t) - (y * (z / t)); elseif (t <= 0.105) tmp = (y / a) - (x / (z * a)); else tmp = (x - (y * z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8e-48], N[(N[(x / t), $MachinePrecision] - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.105], N[(N[(y / a), $MachinePrecision] - N[(x / N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{-48}:\\
\;\;\;\;\frac{x}{t} - y \cdot \frac{z}{t}\\
\mathbf{elif}\;t \leq 0.105:\\
\;\;\;\;\frac{y}{a} - \frac{x}{z \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y \cdot z}{t}\\
\end{array}
\end{array}
if t < -7.9999999999999998e-48Initial program 83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in x around 0 83.6%
*-commutative83.6%
associate-/l*90.0%
*-commutative90.0%
Applied egg-rr90.0%
Taylor expanded in a around 0 71.6%
+-commutative71.6%
mul-1-neg71.6%
unsub-neg71.6%
associate-/l*75.3%
Simplified75.3%
if -7.9999999999999998e-48 < t < 0.104999999999999996Initial program 82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in x around 0 82.0%
*-commutative82.0%
associate-/l*84.9%
*-commutative84.9%
Applied egg-rr84.9%
Taylor expanded in t around 0 74.1%
+-commutative74.1%
mul-1-neg74.1%
unsub-neg74.1%
*-commutative74.1%
Simplified74.1%
if 0.104999999999999996 < t Initial program 89.7%
*-commutative89.7%
Simplified89.7%
Taylor expanded in t around inf 77.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.85e-26) (not (<= t 0.23))) (/ (- x (* y z)) t) (/ (- y (/ x z)) a)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.85e-26) || !(t <= 0.23)) {
tmp = (x - (y * z)) / t;
} else {
tmp = (y - (x / z)) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.85d-26)) .or. (.not. (t <= 0.23d0))) then
tmp = (x - (y * z)) / t
else
tmp = (y - (x / z)) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.85e-26) || !(t <= 0.23)) {
tmp = (x - (y * z)) / t;
} else {
tmp = (y - (x / z)) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.85e-26) or not (t <= 0.23): tmp = (x - (y * z)) / t else: tmp = (y - (x / z)) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.85e-26) || !(t <= 0.23)) tmp = Float64(Float64(x - Float64(y * z)) / t); else tmp = Float64(Float64(y - Float64(x / z)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.85e-26) || ~((t <= 0.23))) tmp = (x - (y * z)) / t; else tmp = (y - (x / z)) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.85e-26], N[Not[LessEqual[t, 0.23]], $MachinePrecision]], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{-26} \lor \neg \left(t \leq 0.23\right):\\
\;\;\;\;\frac{x - y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\end{array}
\end{array}
if t < -1.8499999999999999e-26 or 0.23000000000000001 < t Initial program 86.9%
*-commutative86.9%
Simplified86.9%
Taylor expanded in t around inf 74.8%
if -1.8499999999999999e-26 < t < 0.23000000000000001Initial program 81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in x around 0 81.7%
*-commutative81.7%
associate-/l*84.5%
*-commutative84.5%
Applied egg-rr84.5%
Taylor expanded in a around inf 71.5%
mul-1-neg71.5%
unsub-neg71.5%
Simplified71.5%
Final simplification73.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.4e+101) (not (<= z 1.95e+90))) (/ y a) (/ x (- t (* z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.4e+101) || !(z <= 1.95e+90)) {
tmp = y / a;
} else {
tmp = x / (t - (z * a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.4d+101)) .or. (.not. (z <= 1.95d+90))) then
tmp = y / a
else
tmp = x / (t - (z * a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.4e+101) || !(z <= 1.95e+90)) {
tmp = y / a;
} else {
tmp = x / (t - (z * a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.4e+101) or not (z <= 1.95e+90): tmp = y / a else: tmp = x / (t - (z * a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.4e+101) || !(z <= 1.95e+90)) tmp = Float64(y / a); else tmp = Float64(x / Float64(t - Float64(z * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.4e+101) || ~((z <= 1.95e+90))) tmp = y / a; else tmp = x / (t - (z * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.4e+101], N[Not[LessEqual[z, 1.95e+90]], $MachinePrecision]], N[(y / a), $MachinePrecision], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+101} \lor \neg \left(z \leq 1.95 \cdot 10^{+90}\right):\\
\;\;\;\;\frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\end{array}
\end{array}
if z < -1.39999999999999991e101 or 1.9500000000000001e90 < z Initial program 54.4%
*-commutative54.4%
Simplified54.4%
Taylor expanded in z around inf 66.8%
if -1.39999999999999991e101 < z < 1.9500000000000001e90Initial program 97.6%
*-commutative97.6%
Simplified97.6%
Taylor expanded in x around inf 68.6%
*-commutative68.6%
Simplified68.6%
Final simplification68.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -7.4e-28) (- (/ x t) (* y (/ z t))) (if (<= t 0.7) (/ (- y (/ x z)) a) (/ (- x (* y z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7.4e-28) {
tmp = (x / t) - (y * (z / t));
} else if (t <= 0.7) {
tmp = (y - (x / z)) / a;
} else {
tmp = (x - (y * z)) / t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-7.4d-28)) then
tmp = (x / t) - (y * (z / t))
else if (t <= 0.7d0) then
tmp = (y - (x / z)) / a
else
tmp = (x - (y * z)) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7.4e-28) {
tmp = (x / t) - (y * (z / t));
} else if (t <= 0.7) {
tmp = (y - (x / z)) / a;
} else {
tmp = (x - (y * z)) / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -7.4e-28: tmp = (x / t) - (y * (z / t)) elif t <= 0.7: tmp = (y - (x / z)) / a else: tmp = (x - (y * z)) / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7.4e-28) tmp = Float64(Float64(x / t) - Float64(y * Float64(z / t))); elseif (t <= 0.7) tmp = Float64(Float64(y - Float64(x / z)) / a); else tmp = Float64(Float64(x - Float64(y * z)) / t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -7.4e-28) tmp = (x / t) - (y * (z / t)); elseif (t <= 0.7) tmp = (y - (x / z)) / a; else tmp = (x - (y * z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7.4e-28], N[(N[(x / t), $MachinePrecision] - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.7], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.4 \cdot 10^{-28}:\\
\;\;\;\;\frac{x}{t} - y \cdot \frac{z}{t}\\
\mathbf{elif}\;t \leq 0.7:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y \cdot z}{t}\\
\end{array}
\end{array}
if t < -7.40000000000000039e-28Initial program 84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in x around 0 84.1%
*-commutative84.1%
associate-/l*90.8%
*-commutative90.8%
Applied egg-rr90.8%
Taylor expanded in a around 0 72.7%
+-commutative72.7%
mul-1-neg72.7%
unsub-neg72.7%
associate-/l*76.6%
Simplified76.6%
if -7.40000000000000039e-28 < t < 0.69999999999999996Initial program 81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in x around 0 81.7%
*-commutative81.7%
associate-/l*84.5%
*-commutative84.5%
Applied egg-rr84.5%
Taylor expanded in a around inf 71.5%
mul-1-neg71.5%
unsub-neg71.5%
Simplified71.5%
if 0.69999999999999996 < t Initial program 89.7%
*-commutative89.7%
Simplified89.7%
Taylor expanded in t around inf 77.0%
(FPCore (x y z t a) :precision binary64 (if (<= y -2.15e-137) (/ (- x (* y z)) t) (if (<= y 7.2e-19) (/ x (- t (* z a))) (/ y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.15e-137) {
tmp = (x - (y * z)) / t;
} else if (y <= 7.2e-19) {
tmp = x / (t - (z * a));
} else {
tmp = y / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-2.15d-137)) then
tmp = (x - (y * z)) / t
else if (y <= 7.2d-19) then
tmp = x / (t - (z * a))
else
tmp = y / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.15e-137) {
tmp = (x - (y * z)) / t;
} else if (y <= 7.2e-19) {
tmp = x / (t - (z * a));
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.15e-137: tmp = (x - (y * z)) / t elif y <= 7.2e-19: tmp = x / (t - (z * a)) else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.15e-137) tmp = Float64(Float64(x - Float64(y * z)) / t); elseif (y <= 7.2e-19) tmp = Float64(x / Float64(t - Float64(z * a))); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.15e-137) tmp = (x - (y * z)) / t; elseif (y <= 7.2e-19) tmp = x / (t - (z * a)); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.15e-137], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 7.2e-19], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{-137}:\\
\;\;\;\;\frac{x - y \cdot z}{t}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-19}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if y < -2.1499999999999999e-137Initial program 81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in t around inf 58.9%
if -2.1499999999999999e-137 < y < 7.2000000000000002e-19Initial program 97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in x around inf 88.1%
*-commutative88.1%
Simplified88.1%
if 7.2000000000000002e-19 < y Initial program 69.5%
*-commutative69.5%
Simplified69.5%
Taylor expanded in z around inf 52.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -7.5e+87) (not (<= z 2.2e+68))) (/ y a) (/ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7.5e+87) || !(z <= 2.2e+68)) {
tmp = y / a;
} else {
tmp = x / t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-7.5d+87)) .or. (.not. (z <= 2.2d+68))) then
tmp = y / a
else
tmp = x / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7.5e+87) || !(z <= 2.2e+68)) {
tmp = y / a;
} else {
tmp = x / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -7.5e+87) or not (z <= 2.2e+68): tmp = y / a else: tmp = x / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -7.5e+87) || !(z <= 2.2e+68)) tmp = Float64(y / a); else tmp = Float64(x / t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -7.5e+87) || ~((z <= 2.2e+68))) tmp = y / a; else tmp = x / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7.5e+87], N[Not[LessEqual[z, 2.2e+68]], $MachinePrecision]], N[(y / a), $MachinePrecision], N[(x / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+87} \lor \neg \left(z \leq 2.2 \cdot 10^{+68}\right):\\
\;\;\;\;\frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t}\\
\end{array}
\end{array}
if z < -7.50000000000000014e87 or 2.19999999999999987e68 < z Initial program 57.1%
*-commutative57.1%
Simplified57.1%
Taylor expanded in z around inf 64.2%
if -7.50000000000000014e87 < z < 2.19999999999999987e68Initial program 97.5%
*-commutative97.5%
Simplified97.5%
Taylor expanded in z around 0 52.8%
Final simplification56.4%
(FPCore (x y z t a) :precision binary64 (/ x t))
double code(double x, double y, double z, double t, double a) {
return x / t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x / t
end function
public static double code(double x, double y, double z, double t, double a) {
return x / t;
}
def code(x, y, z, t, a): return x / t
function code(x, y, z, t, a) return Float64(x / t) end
function tmp = code(x, y, z, t, a) tmp = x / t; end
code[x_, y_, z_, t_, a_] := N[(x / t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{t}
\end{array}
Initial program 84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in z around 0 40.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* a z))) (t_2 (- (/ x t_1) (/ y (- (/ t z) a)))))
(if (< z -32113435955957344.0)
t_2
(if (< z 3.5139522372978296e-86) (* (- x (* y z)) (/ 1.0 t_1)) t_2))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (a * z);
double t_2 = (x / t_1) - (y / ((t / z) - a));
double tmp;
if (z < -32113435955957344.0) {
tmp = t_2;
} else if (z < 3.5139522372978296e-86) {
tmp = (x - (y * z)) * (1.0 / t_1);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t - (a * z)
t_2 = (x / t_1) - (y / ((t / z) - a))
if (z < (-32113435955957344.0d0)) then
tmp = t_2
else if (z < 3.5139522372978296d-86) then
tmp = (x - (y * z)) * (1.0d0 / 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 a) {
double t_1 = t - (a * z);
double t_2 = (x / t_1) - (y / ((t / z) - a));
double tmp;
if (z < -32113435955957344.0) {
tmp = t_2;
} else if (z < 3.5139522372978296e-86) {
tmp = (x - (y * z)) * (1.0 / t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (a * z) t_2 = (x / t_1) - (y / ((t / z) - a)) tmp = 0 if z < -32113435955957344.0: tmp = t_2 elif z < 3.5139522372978296e-86: tmp = (x - (y * z)) * (1.0 / t_1) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(a * z)) t_2 = Float64(Float64(x / t_1) - Float64(y / Float64(Float64(t / z) - a))) tmp = 0.0 if (z < -32113435955957344.0) tmp = t_2; elseif (z < 3.5139522372978296e-86) tmp = Float64(Float64(x - Float64(y * z)) * Float64(1.0 / t_1)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (a * z); t_2 = (x / t_1) - (y / ((t / z) - a)); tmp = 0.0; if (z < -32113435955957344.0) tmp = t_2; elseif (z < 3.5139522372978296e-86) tmp = (x - (y * z)) * (1.0 / t_1); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(a * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / t$95$1), $MachinePrecision] - N[(y / N[(N[(t / z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -32113435955957344.0], t$95$2, If[Less[z, 3.5139522372978296e-86], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - a \cdot z\\
t_2 := \frac{x}{t\_1} - \frac{y}{\frac{t}{z} - a}\\
\mathbf{if}\;z < -32113435955957344:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z < 3.5139522372978296 \cdot 10^{-86}:\\
\;\;\;\;\left(x - y \cdot z\right) \cdot \frac{1}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024111
(FPCore (x y z t a)
:name "Diagrams.Solve.Tridiagonal:solveTriDiagonal from diagrams-solve-0.1, A"
:precision binary64
:alt
(if (< z -32113435955957344.0) (- (/ x (- t (* a z))) (/ y (- (/ t z) a))) (if (< z 3.5139522372978296e-86) (* (- x (* y z)) (/ 1.0 (- t (* a z)))) (- (/ x (- t (* a z))) (/ y (- (/ t z) a)))))
(/ (- x (* y z)) (- t (* a z))))