
(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 14 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 (- (* z a) t)) (t_2 (- t (* z a))) (t_3 (/ (- x (* y z)) t_2)))
(if (<= t_3 (- INFINITY))
(* y (+ (/ z t_1) (/ x (* y t_2))))
(if (<= t_3 -1e-320)
(+ (/ (* y z) t_1) (/ x t_2))
(if (<= t_3 0.0)
(/ y (- a (/ t z)))
(if (<= t_3 5e+294) t_3 (/ (- y (/ x z)) a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z * a) - t;
double t_2 = t - (z * a);
double t_3 = (x - (y * z)) / t_2;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = y * ((z / t_1) + (x / (y * t_2)));
} else if (t_3 <= -1e-320) {
tmp = ((y * z) / t_1) + (x / t_2);
} else if (t_3 <= 0.0) {
tmp = y / (a - (t / z));
} else if (t_3 <= 5e+294) {
tmp = t_3;
} else {
tmp = (y - (x / z)) / 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 = t - (z * a);
double t_3 = (x - (y * z)) / t_2;
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = y * ((z / t_1) + (x / (y * t_2)));
} else if (t_3 <= -1e-320) {
tmp = ((y * z) / t_1) + (x / t_2);
} else if (t_3 <= 0.0) {
tmp = y / (a - (t / z));
} else if (t_3 <= 5e+294) {
tmp = t_3;
} else {
tmp = (y - (x / z)) / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z * a) - t t_2 = t - (z * a) t_3 = (x - (y * z)) / t_2 tmp = 0 if t_3 <= -math.inf: tmp = y * ((z / t_1) + (x / (y * t_2))) elif t_3 <= -1e-320: tmp = ((y * z) / t_1) + (x / t_2) elif t_3 <= 0.0: tmp = y / (a - (t / z)) elif t_3 <= 5e+294: tmp = t_3 else: tmp = (y - (x / z)) / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z * a) - t) 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(y * Float64(Float64(z / t_1) + Float64(x / Float64(y * t_2)))); elseif (t_3 <= -1e-320) tmp = Float64(Float64(Float64(y * z) / t_1) + Float64(x / t_2)); elseif (t_3 <= 0.0) tmp = Float64(y / Float64(a - Float64(t / z))); elseif (t_3 <= 5e+294) tmp = t_3; else tmp = Float64(Float64(y - Float64(x / z)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z * a) - t; t_2 = t - (z * a); t_3 = (x - (y * z)) / t_2; tmp = 0.0; if (t_3 <= -Inf) tmp = y * ((z / t_1) + (x / (y * t_2))); elseif (t_3 <= -1e-320) tmp = ((y * z) / t_1) + (x / t_2); elseif (t_3 <= 0.0) tmp = y / (a - (t / z)); elseif (t_3 <= 5e+294) tmp = t_3; else tmp = (y - (x / z)) / 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[(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[(y * N[(N[(z / t$95$1), $MachinePrecision] + N[(x / N[(y * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -1e-320], N[(N[(N[(y * z), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(x / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(y / N[(a - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e+294], t$95$3, N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot a - t\\
t_2 := t - z \cdot a\\
t_3 := \frac{x - y \cdot z}{t\_2}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;y \cdot \left(\frac{z}{t\_1} + \frac{x}{y \cdot t\_2}\right)\\
\mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-320}:\\
\;\;\;\;\frac{y \cdot z}{t\_1} + \frac{x}{t\_2}\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{y}{a - \frac{t}{z}}\\
\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+294}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\end{array}
\end{array}
if (/.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 99.8%
Simplified99.8%
if -inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -9.99989e-321Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
if -9.99989e-321 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 0.0Initial program 54.8%
*-commutative54.8%
Simplified54.8%
Taylor expanded in z around inf 54.8%
Taylor expanded in x around 0 85.4%
associate-*r/85.4%
mul-1-neg85.4%
Simplified85.4%
if 0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 4.9999999999999999e294Initial program 99.8%
if 4.9999999999999999e294 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) Initial program 38.3%
*-commutative38.3%
Simplified38.3%
Taylor expanded in y around -inf 64.8%
Simplified64.8%
Taylor expanded in a around inf 90.0%
associate-*r/90.0%
associate-*r*90.0%
mul-1-neg90.0%
sub-neg90.0%
metadata-eval90.0%
Simplified90.0%
Taylor expanded in y around 0 90.0%
mul-1-neg90.0%
unsub-neg90.0%
Simplified90.0%
Final simplification97.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* z a))) (t_2 (/ (- x (* y z)) t_1)))
(if (<= t_2 (- INFINITY))
(* y (+ (/ z (- (* z a) t)) (/ x (* y t_1))))
(if (<= t_2 -1e-320)
t_2
(if (<= t_2 0.0)
(/ y (- a (/ t z)))
(if (<= t_2 5e+294) t_2 (/ (- y (/ x z)) a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (z * a);
double t_2 = (x - (y * z)) / t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = y * ((z / ((z * a) - t)) + (x / (y * t_1)));
} else if (t_2 <= -1e-320) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y / (a - (t / z));
} else if (t_2 <= 5e+294) {
tmp = t_2;
} else {
tmp = (y - (x / z)) / 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 = (x - (y * z)) / t_1;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = y * ((z / ((z * a) - t)) + (x / (y * t_1)));
} else if (t_2 <= -1e-320) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y / (a - (t / z));
} else if (t_2 <= 5e+294) {
tmp = t_2;
} else {
tmp = (y - (x / z)) / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (z * a) t_2 = (x - (y * z)) / t_1 tmp = 0 if t_2 <= -math.inf: tmp = y * ((z / ((z * a) - t)) + (x / (y * t_1))) elif t_2 <= -1e-320: tmp = t_2 elif t_2 <= 0.0: tmp = y / (a - (t / z)) elif t_2 <= 5e+294: tmp = t_2 else: tmp = (y - (x / z)) / a return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(z * a)) t_2 = Float64(Float64(x - Float64(y * z)) / t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(y * Float64(Float64(z / Float64(Float64(z * a) - t)) + Float64(x / Float64(y * t_1)))); elseif (t_2 <= -1e-320) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(y / Float64(a - Float64(t / z))); elseif (t_2 <= 5e+294) tmp = t_2; else tmp = Float64(Float64(y - Float64(x / z)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (z * a); t_2 = (x - (y * z)) / t_1; tmp = 0.0; if (t_2 <= -Inf) tmp = y * ((z / ((z * a) - t)) + (x / (y * t_1))); elseif (t_2 <= -1e-320) tmp = t_2; elseif (t_2 <= 0.0) tmp = y / (a - (t / z)); elseif (t_2 <= 5e+294) tmp = t_2; else tmp = (y - (x / z)) / 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[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(y * N[(N[(z / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(x / N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e-320], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y / N[(a - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+294], t$95$2, N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - z \cdot a\\
t_2 := \frac{x - y \cdot z}{t\_1}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;y \cdot \left(\frac{z}{z \cdot a - t} + \frac{x}{y \cdot t\_1}\right)\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-320}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{y}{a - \frac{t}{z}}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+294}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\end{array}
\end{array}
if (/.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 99.8%
Simplified99.8%
if -inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -9.99989e-321 or 0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 4.9999999999999999e294Initial program 99.7%
if -9.99989e-321 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 0.0Initial program 54.8%
*-commutative54.8%
Simplified54.8%
Taylor expanded in z around inf 54.8%
Taylor expanded in x around 0 85.4%
associate-*r/85.4%
mul-1-neg85.4%
Simplified85.4%
if 4.9999999999999999e294 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) Initial program 38.3%
*-commutative38.3%
Simplified38.3%
Taylor expanded in y around -inf 64.8%
Simplified64.8%
Taylor expanded in a around inf 90.0%
associate-*r/90.0%
associate-*r*90.0%
mul-1-neg90.0%
sub-neg90.0%
metadata-eval90.0%
Simplified90.0%
Taylor expanded in y around 0 90.0%
mul-1-neg90.0%
unsub-neg90.0%
Simplified90.0%
Final simplification97.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ y (- a (/ t z))))
(t_2 (/ (- y (/ x z)) a))
(t_3 (/ x (- t (* z a)))))
(if (<= z -2.8e+130)
t_2
(if (<= z -9.2e+63)
t_1
(if (<= z -4.1e-16)
t_2
(if (<= z -2.1e-69)
t_1
(if (<= z -4.5e-201)
t_3
(if (<= z 1.32e-275)
(/ (- x (* y z)) t)
(if (<= z 6.5e+18) t_3 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y / (a - (t / z));
double t_2 = (y - (x / z)) / a;
double t_3 = x / (t - (z * a));
double tmp;
if (z <= -2.8e+130) {
tmp = t_2;
} else if (z <= -9.2e+63) {
tmp = t_1;
} else if (z <= -4.1e-16) {
tmp = t_2;
} else if (z <= -2.1e-69) {
tmp = t_1;
} else if (z <= -4.5e-201) {
tmp = t_3;
} else if (z <= 1.32e-275) {
tmp = (x - (y * z)) / t;
} else if (z <= 6.5e+18) {
tmp = t_3;
} 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) :: t_3
real(8) :: tmp
t_1 = y / (a - (t / z))
t_2 = (y - (x / z)) / a
t_3 = x / (t - (z * a))
if (z <= (-2.8d+130)) then
tmp = t_2
else if (z <= (-9.2d+63)) then
tmp = t_1
else if (z <= (-4.1d-16)) then
tmp = t_2
else if (z <= (-2.1d-69)) then
tmp = t_1
else if (z <= (-4.5d-201)) then
tmp = t_3
else if (z <= 1.32d-275) then
tmp = (x - (y * z)) / t
else if (z <= 6.5d+18) then
tmp = t_3
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 = y / (a - (t / z));
double t_2 = (y - (x / z)) / a;
double t_3 = x / (t - (z * a));
double tmp;
if (z <= -2.8e+130) {
tmp = t_2;
} else if (z <= -9.2e+63) {
tmp = t_1;
} else if (z <= -4.1e-16) {
tmp = t_2;
} else if (z <= -2.1e-69) {
tmp = t_1;
} else if (z <= -4.5e-201) {
tmp = t_3;
} else if (z <= 1.32e-275) {
tmp = (x - (y * z)) / t;
} else if (z <= 6.5e+18) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y / (a - (t / z)) t_2 = (y - (x / z)) / a t_3 = x / (t - (z * a)) tmp = 0 if z <= -2.8e+130: tmp = t_2 elif z <= -9.2e+63: tmp = t_1 elif z <= -4.1e-16: tmp = t_2 elif z <= -2.1e-69: tmp = t_1 elif z <= -4.5e-201: tmp = t_3 elif z <= 1.32e-275: tmp = (x - (y * z)) / t elif z <= 6.5e+18: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(y / Float64(a - Float64(t / z))) t_2 = Float64(Float64(y - Float64(x / z)) / a) t_3 = Float64(x / Float64(t - Float64(z * a))) tmp = 0.0 if (z <= -2.8e+130) tmp = t_2; elseif (z <= -9.2e+63) tmp = t_1; elseif (z <= -4.1e-16) tmp = t_2; elseif (z <= -2.1e-69) tmp = t_1; elseif (z <= -4.5e-201) tmp = t_3; elseif (z <= 1.32e-275) tmp = Float64(Float64(x - Float64(y * z)) / t); elseif (z <= 6.5e+18) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y / (a - (t / z)); t_2 = (y - (x / z)) / a; t_3 = x / (t - (z * a)); tmp = 0.0; if (z <= -2.8e+130) tmp = t_2; elseif (z <= -9.2e+63) tmp = t_1; elseif (z <= -4.1e-16) tmp = t_2; elseif (z <= -2.1e-69) tmp = t_1; elseif (z <= -4.5e-201) tmp = t_3; elseif (z <= 1.32e-275) tmp = (x - (y * z)) / t; elseif (z <= 6.5e+18) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(a - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e+130], t$95$2, If[LessEqual[z, -9.2e+63], t$95$1, If[LessEqual[z, -4.1e-16], t$95$2, If[LessEqual[z, -2.1e-69], t$95$1, If[LessEqual[z, -4.5e-201], t$95$3, If[LessEqual[z, 1.32e-275], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 6.5e+18], t$95$3, t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a - \frac{t}{z}}\\
t_2 := \frac{y - \frac{x}{z}}{a}\\
t_3 := \frac{x}{t - z \cdot a}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+130}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -9.2 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{-16}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-201}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{-275}:\\
\;\;\;\;\frac{x - y \cdot z}{t}\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+18}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.7999999999999999e130 or -9.19999999999999973e63 < z < -4.10000000000000006e-16 or 6.5e18 < z Initial program 70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in y around -inf 76.3%
Simplified70.6%
Taylor expanded in a around inf 80.1%
associate-*r/80.1%
associate-*r*80.1%
mul-1-neg80.1%
sub-neg80.1%
metadata-eval80.1%
Simplified80.1%
Taylor expanded in y around 0 82.6%
mul-1-neg82.6%
unsub-neg82.6%
Simplified82.6%
if -2.7999999999999999e130 < z < -9.19999999999999973e63 or -4.10000000000000006e-16 < z < -2.1e-69Initial program 80.8%
*-commutative80.8%
Simplified80.8%
Taylor expanded in z around inf 77.5%
Taylor expanded in x around 0 80.8%
associate-*r/80.8%
mul-1-neg80.8%
Simplified80.8%
if -2.1e-69 < z < -4.5000000000000002e-201 or 1.31999999999999996e-275 < z < 6.5e18Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 81.3%
*-commutative81.3%
Simplified81.3%
if -4.5000000000000002e-201 < z < 1.31999999999999996e-275Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 90.1%
Final simplification83.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ x (- t (* z a)))) (t_2 (/ (- y (/ x z)) a)))
(if (<= z -5.2e+130)
t_2
(if (<= z -1.15e+60)
(/ y (- a (/ t z)))
(if (<= z -1.9e-16)
t_2
(if (<= z -1.95e-69)
(* y (/ z (- (* z a) t)))
(if (<= z -2.7e-201)
t_1
(if (<= z 9.2e-273)
(/ (- x (* y z)) t)
(if (<= z 1.5e+21) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x / (t - (z * a));
double t_2 = (y - (x / z)) / a;
double tmp;
if (z <= -5.2e+130) {
tmp = t_2;
} else if (z <= -1.15e+60) {
tmp = y / (a - (t / z));
} else if (z <= -1.9e-16) {
tmp = t_2;
} else if (z <= -1.95e-69) {
tmp = y * (z / ((z * a) - t));
} else if (z <= -2.7e-201) {
tmp = t_1;
} else if (z <= 9.2e-273) {
tmp = (x - (y * z)) / t;
} else if (z <= 1.5e+21) {
tmp = 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 = x / (t - (z * a))
t_2 = (y - (x / z)) / a
if (z <= (-5.2d+130)) then
tmp = t_2
else if (z <= (-1.15d+60)) then
tmp = y / (a - (t / z))
else if (z <= (-1.9d-16)) then
tmp = t_2
else if (z <= (-1.95d-69)) then
tmp = y * (z / ((z * a) - t))
else if (z <= (-2.7d-201)) then
tmp = t_1
else if (z <= 9.2d-273) then
tmp = (x - (y * z)) / t
else if (z <= 1.5d+21) 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 a) {
double t_1 = x / (t - (z * a));
double t_2 = (y - (x / z)) / a;
double tmp;
if (z <= -5.2e+130) {
tmp = t_2;
} else if (z <= -1.15e+60) {
tmp = y / (a - (t / z));
} else if (z <= -1.9e-16) {
tmp = t_2;
} else if (z <= -1.95e-69) {
tmp = y * (z / ((z * a) - t));
} else if (z <= -2.7e-201) {
tmp = t_1;
} else if (z <= 9.2e-273) {
tmp = (x - (y * z)) / t;
} else if (z <= 1.5e+21) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x / (t - (z * a)) t_2 = (y - (x / z)) / a tmp = 0 if z <= -5.2e+130: tmp = t_2 elif z <= -1.15e+60: tmp = y / (a - (t / z)) elif z <= -1.9e-16: tmp = t_2 elif z <= -1.95e-69: tmp = y * (z / ((z * a) - t)) elif z <= -2.7e-201: tmp = t_1 elif z <= 9.2e-273: tmp = (x - (y * z)) / t elif z <= 1.5e+21: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x / Float64(t - Float64(z * a))) t_2 = Float64(Float64(y - Float64(x / z)) / a) tmp = 0.0 if (z <= -5.2e+130) tmp = t_2; elseif (z <= -1.15e+60) tmp = Float64(y / Float64(a - Float64(t / z))); elseif (z <= -1.9e-16) tmp = t_2; elseif (z <= -1.95e-69) tmp = Float64(y * Float64(z / Float64(Float64(z * a) - t))); elseif (z <= -2.7e-201) tmp = t_1; elseif (z <= 9.2e-273) tmp = Float64(Float64(x - Float64(y * z)) / t); elseif (z <= 1.5e+21) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x / (t - (z * a)); t_2 = (y - (x / z)) / a; tmp = 0.0; if (z <= -5.2e+130) tmp = t_2; elseif (z <= -1.15e+60) tmp = y / (a - (t / z)); elseif (z <= -1.9e-16) tmp = t_2; elseif (z <= -1.95e-69) tmp = y * (z / ((z * a) - t)); elseif (z <= -2.7e-201) tmp = t_1; elseif (z <= 9.2e-273) tmp = (x - (y * z)) / t; elseif (z <= 1.5e+21) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[z, -5.2e+130], t$95$2, If[LessEqual[z, -1.15e+60], N[(y / N[(a - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.9e-16], t$95$2, If[LessEqual[z, -1.95e-69], N[(y * N[(z / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.7e-201], t$95$1, If[LessEqual[z, 9.2e-273], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 1.5e+21], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{t - z \cdot a}\\
t_2 := \frac{y - \frac{x}{z}}{a}\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+130}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{+60}:\\
\;\;\;\;\frac{y}{a - \frac{t}{z}}\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-16}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{-69}:\\
\;\;\;\;y \cdot \frac{z}{z \cdot a - t}\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-201}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-273}:\\
\;\;\;\;\frac{x - y \cdot z}{t}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -5.1999999999999996e130 or -1.15000000000000008e60 < z < -1.90000000000000006e-16 or 1.5e21 < z Initial program 70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in y around -inf 76.3%
Simplified70.6%
Taylor expanded in a around inf 80.1%
associate-*r/80.1%
associate-*r*80.1%
mul-1-neg80.1%
sub-neg80.1%
metadata-eval80.1%
Simplified80.1%
Taylor expanded in y around 0 82.6%
mul-1-neg82.6%
unsub-neg82.6%
Simplified82.6%
if -5.1999999999999996e130 < z < -1.15000000000000008e60Initial program 68.2%
*-commutative68.2%
Simplified68.2%
Taylor expanded in z around inf 68.2%
Taylor expanded in x around 0 83.9%
associate-*r/83.9%
mul-1-neg83.9%
Simplified83.9%
if -1.90000000000000006e-16 < z < -1.9499999999999999e-69Initial program 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 84.0%
mul-1-neg84.0%
associate-/l*82.8%
distribute-rgt-neg-in82.8%
distribute-neg-frac282.8%
cancel-sign-sub-inv82.8%
*-commutative82.8%
+-commutative82.8%
distribute-rgt-neg-out82.8%
distribute-lft-neg-in82.8%
*-commutative82.8%
fma-undefine82.8%
neg-sub082.8%
fma-undefine82.8%
distribute-rgt-neg-in82.8%
mul-1-neg82.8%
associate-*r*82.8%
neg-mul-182.8%
*-commutative82.8%
associate--r+82.8%
neg-sub082.8%
distribute-rgt-neg-out82.8%
remove-double-neg82.8%
Simplified82.8%
if -1.9499999999999999e-69 < z < -2.70000000000000005e-201 or 9.19999999999999923e-273 < z < 1.5e21Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 81.3%
*-commutative81.3%
Simplified81.3%
if -2.70000000000000005e-201 < z < 9.19999999999999923e-273Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 90.1%
Final simplification83.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ x (- t (* z a))))
(t_2 (/ (- y (/ x z)) a))
(t_3 (- x (* y z))))
(if (<= z -4.7e+129)
t_2
(if (<= z -3.2e+56)
(/ y (- a (/ t z)))
(if (<= z -3.1e-16)
(* t_3 (/ -1.0 (* z a)))
(if (<= z -1.65e-69)
(* y (/ z (- (* z a) t)))
(if (<= z -5.2e-201)
t_1
(if (<= z 3.1e-276) (/ t_3 t) (if (<= z 4.4e+18) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x / (t - (z * a));
double t_2 = (y - (x / z)) / a;
double t_3 = x - (y * z);
double tmp;
if (z <= -4.7e+129) {
tmp = t_2;
} else if (z <= -3.2e+56) {
tmp = y / (a - (t / z));
} else if (z <= -3.1e-16) {
tmp = t_3 * (-1.0 / (z * a));
} else if (z <= -1.65e-69) {
tmp = y * (z / ((z * a) - t));
} else if (z <= -5.2e-201) {
tmp = t_1;
} else if (z <= 3.1e-276) {
tmp = t_3 / t;
} else if (z <= 4.4e+18) {
tmp = 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) :: t_3
real(8) :: tmp
t_1 = x / (t - (z * a))
t_2 = (y - (x / z)) / a
t_3 = x - (y * z)
if (z <= (-4.7d+129)) then
tmp = t_2
else if (z <= (-3.2d+56)) then
tmp = y / (a - (t / z))
else if (z <= (-3.1d-16)) then
tmp = t_3 * ((-1.0d0) / (z * a))
else if (z <= (-1.65d-69)) then
tmp = y * (z / ((z * a) - t))
else if (z <= (-5.2d-201)) then
tmp = t_1
else if (z <= 3.1d-276) then
tmp = t_3 / t
else if (z <= 4.4d+18) 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 a) {
double t_1 = x / (t - (z * a));
double t_2 = (y - (x / z)) / a;
double t_3 = x - (y * z);
double tmp;
if (z <= -4.7e+129) {
tmp = t_2;
} else if (z <= -3.2e+56) {
tmp = y / (a - (t / z));
} else if (z <= -3.1e-16) {
tmp = t_3 * (-1.0 / (z * a));
} else if (z <= -1.65e-69) {
tmp = y * (z / ((z * a) - t));
} else if (z <= -5.2e-201) {
tmp = t_1;
} else if (z <= 3.1e-276) {
tmp = t_3 / t;
} else if (z <= 4.4e+18) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x / (t - (z * a)) t_2 = (y - (x / z)) / a t_3 = x - (y * z) tmp = 0 if z <= -4.7e+129: tmp = t_2 elif z <= -3.2e+56: tmp = y / (a - (t / z)) elif z <= -3.1e-16: tmp = t_3 * (-1.0 / (z * a)) elif z <= -1.65e-69: tmp = y * (z / ((z * a) - t)) elif z <= -5.2e-201: tmp = t_1 elif z <= 3.1e-276: tmp = t_3 / t elif z <= 4.4e+18: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x / Float64(t - Float64(z * a))) t_2 = Float64(Float64(y - Float64(x / z)) / a) t_3 = Float64(x - Float64(y * z)) tmp = 0.0 if (z <= -4.7e+129) tmp = t_2; elseif (z <= -3.2e+56) tmp = Float64(y / Float64(a - Float64(t / z))); elseif (z <= -3.1e-16) tmp = Float64(t_3 * Float64(-1.0 / Float64(z * a))); elseif (z <= -1.65e-69) tmp = Float64(y * Float64(z / Float64(Float64(z * a) - t))); elseif (z <= -5.2e-201) tmp = t_1; elseif (z <= 3.1e-276) tmp = Float64(t_3 / t); elseif (z <= 4.4e+18) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x / (t - (z * a)); t_2 = (y - (x / z)) / a; t_3 = x - (y * z); tmp = 0.0; if (z <= -4.7e+129) tmp = t_2; elseif (z <= -3.2e+56) tmp = y / (a - (t / z)); elseif (z <= -3.1e-16) tmp = t_3 * (-1.0 / (z * a)); elseif (z <= -1.65e-69) tmp = y * (z / ((z * a) - t)); elseif (z <= -5.2e-201) tmp = t_1; elseif (z <= 3.1e-276) tmp = t_3 / t; elseif (z <= 4.4e+18) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.7e+129], t$95$2, If[LessEqual[z, -3.2e+56], N[(y / N[(a - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.1e-16], N[(t$95$3 * N[(-1.0 / N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.65e-69], N[(y * N[(z / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.2e-201], t$95$1, If[LessEqual[z, 3.1e-276], N[(t$95$3 / t), $MachinePrecision], If[LessEqual[z, 4.4e+18], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{t - z \cdot a}\\
t_2 := \frac{y - \frac{x}{z}}{a}\\
t_3 := x - y \cdot z\\
\mathbf{if}\;z \leq -4.7 \cdot 10^{+129}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{+56}:\\
\;\;\;\;\frac{y}{a - \frac{t}{z}}\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-16}:\\
\;\;\;\;t\_3 \cdot \frac{-1}{z \cdot a}\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-69}:\\
\;\;\;\;y \cdot \frac{z}{z \cdot a - t}\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-201}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-276}:\\
\;\;\;\;\frac{t\_3}{t}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -4.70000000000000008e129 or 4.4e18 < z Initial program 66.2%
*-commutative66.2%
Simplified66.2%
Taylor expanded in y around -inf 74.0%
Simplified67.5%
Taylor expanded in a around inf 81.1%
associate-*r/81.1%
associate-*r*81.1%
mul-1-neg81.1%
sub-neg81.1%
metadata-eval81.1%
Simplified81.1%
Taylor expanded in y around 0 84.0%
mul-1-neg84.0%
unsub-neg84.0%
Simplified84.0%
if -4.70000000000000008e129 < z < -3.20000000000000003e56Initial program 68.2%
*-commutative68.2%
Simplified68.2%
Taylor expanded in z around inf 68.2%
Taylor expanded in x around 0 83.9%
associate-*r/83.9%
mul-1-neg83.9%
Simplified83.9%
if -3.20000000000000003e56 < z < -3.1000000000000001e-16Initial program 99.8%
*-commutative99.8%
Simplified99.8%
clear-num99.8%
associate-/r/99.8%
sub-neg99.8%
+-commutative99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in a around inf 72.8%
*-commutative72.8%
Simplified72.8%
if -3.1000000000000001e-16 < z < -1.65e-69Initial program 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 84.0%
mul-1-neg84.0%
associate-/l*82.8%
distribute-rgt-neg-in82.8%
distribute-neg-frac282.8%
cancel-sign-sub-inv82.8%
*-commutative82.8%
+-commutative82.8%
distribute-rgt-neg-out82.8%
distribute-lft-neg-in82.8%
*-commutative82.8%
fma-undefine82.8%
neg-sub082.8%
fma-undefine82.8%
distribute-rgt-neg-in82.8%
mul-1-neg82.8%
associate-*r*82.8%
neg-mul-182.8%
*-commutative82.8%
associate--r+82.8%
neg-sub082.8%
distribute-rgt-neg-out82.8%
remove-double-neg82.8%
Simplified82.8%
if -1.65e-69 < z < -5.19999999999999965e-201 or 3.09999999999999989e-276 < z < 4.4e18Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 81.3%
*-commutative81.3%
Simplified81.3%
if -5.19999999999999965e-201 < z < 3.09999999999999989e-276Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 90.1%
Final simplification83.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.8e-16)
(/ y a)
(if (<= z -6.1e-80)
(* z (/ (- y) t))
(if (<= z 9e+19)
(/ x t)
(if (or (<= z 1.02e+197) (not (<= z 5.5e+237)))
(/ y a)
(/ (/ (- x) z) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.8e-16) {
tmp = y / a;
} else if (z <= -6.1e-80) {
tmp = z * (-y / t);
} else if (z <= 9e+19) {
tmp = x / t;
} else if ((z <= 1.02e+197) || !(z <= 5.5e+237)) {
tmp = y / a;
} else {
tmp = (-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 <= (-6.8d-16)) then
tmp = y / a
else if (z <= (-6.1d-80)) then
tmp = z * (-y / t)
else if (z <= 9d+19) then
tmp = x / t
else if ((z <= 1.02d+197) .or. (.not. (z <= 5.5d+237))) then
tmp = y / a
else
tmp = (-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 <= -6.8e-16) {
tmp = y / a;
} else if (z <= -6.1e-80) {
tmp = z * (-y / t);
} else if (z <= 9e+19) {
tmp = x / t;
} else if ((z <= 1.02e+197) || !(z <= 5.5e+237)) {
tmp = y / a;
} else {
tmp = (-x / z) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.8e-16: tmp = y / a elif z <= -6.1e-80: tmp = z * (-y / t) elif z <= 9e+19: tmp = x / t elif (z <= 1.02e+197) or not (z <= 5.5e+237): tmp = y / a else: tmp = (-x / z) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.8e-16) tmp = Float64(y / a); elseif (z <= -6.1e-80) tmp = Float64(z * Float64(Float64(-y) / t)); elseif (z <= 9e+19) tmp = Float64(x / t); elseif ((z <= 1.02e+197) || !(z <= 5.5e+237)) tmp = Float64(y / a); else tmp = Float64(Float64(Float64(-x) / z) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.8e-16) tmp = y / a; elseif (z <= -6.1e-80) tmp = z * (-y / t); elseif (z <= 9e+19) tmp = x / t; elseif ((z <= 1.02e+197) || ~((z <= 5.5e+237))) tmp = y / a; else tmp = (-x / z) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.8e-16], N[(y / a), $MachinePrecision], If[LessEqual[z, -6.1e-80], N[(z * N[((-y) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e+19], N[(x / t), $MachinePrecision], If[Or[LessEqual[z, 1.02e+197], N[Not[LessEqual[z, 5.5e+237]], $MachinePrecision]], N[(y / a), $MachinePrecision], N[(N[((-x) / z), $MachinePrecision] / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{-16}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -6.1 \cdot 10^{-80}:\\
\;\;\;\;z \cdot \frac{-y}{t}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+19}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{+197} \lor \neg \left(z \leq 5.5 \cdot 10^{+237}\right):\\
\;\;\;\;\frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-x}{z}}{a}\\
\end{array}
\end{array}
if z < -6.8e-16 or 9e19 < z < 1.02000000000000008e197 or 5.5000000000000001e237 < z Initial program 68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in z around inf 57.4%
if -6.8e-16 < z < -6.1000000000000002e-80Initial program 99.7%
*-commutative99.7%
Simplified99.7%
clear-num99.5%
associate-/r/99.5%
sub-neg99.5%
+-commutative99.5%
*-commutative99.5%
distribute-rgt-neg-in99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in a around 0 60.7%
Taylor expanded in x around 0 61.7%
mul-1-neg61.7%
*-commutative61.7%
associate-/l*61.7%
distribute-rgt-neg-in61.7%
distribute-neg-frac261.7%
Simplified61.7%
if -6.1000000000000002e-80 < z < 9e19Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 61.1%
if 1.02000000000000008e197 < z < 5.5000000000000001e237Initial program 86.9%
*-commutative86.9%
Simplified86.9%
Taylor expanded in y around -inf 86.6%
Simplified60.3%
Taylor expanded in a around inf 80.5%
associate-*r/80.5%
associate-*r*80.5%
mul-1-neg80.5%
sub-neg80.5%
metadata-eval80.5%
Simplified80.5%
Taylor expanded in y around 0 79.8%
associate-*r/79.8%
neg-mul-179.8%
Simplified79.8%
Final simplification60.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.12e+55)
(/ y a)
(if (<= z 8.2e+62)
(/ x (- t (* z a)))
(if (or (<= z 1.02e+197) (not (<= z 9e+237)))
(/ y a)
(/ (/ (- x) z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.12e+55) {
tmp = y / a;
} else if (z <= 8.2e+62) {
tmp = x / (t - (z * a));
} else if ((z <= 1.02e+197) || !(z <= 9e+237)) {
tmp = y / a;
} else {
tmp = (-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.12d+55)) then
tmp = y / a
else if (z <= 8.2d+62) then
tmp = x / (t - (z * a))
else if ((z <= 1.02d+197) .or. (.not. (z <= 9d+237))) then
tmp = y / a
else
tmp = (-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.12e+55) {
tmp = y / a;
} else if (z <= 8.2e+62) {
tmp = x / (t - (z * a));
} else if ((z <= 1.02e+197) || !(z <= 9e+237)) {
tmp = y / a;
} else {
tmp = (-x / z) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.12e+55: tmp = y / a elif z <= 8.2e+62: tmp = x / (t - (z * a)) elif (z <= 1.02e+197) or not (z <= 9e+237): tmp = y / a else: tmp = (-x / z) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.12e+55) tmp = Float64(y / a); elseif (z <= 8.2e+62) tmp = Float64(x / Float64(t - Float64(z * a))); elseif ((z <= 1.02e+197) || !(z <= 9e+237)) tmp = Float64(y / a); else tmp = Float64(Float64(Float64(-x) / z) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.12e+55) tmp = y / a; elseif (z <= 8.2e+62) tmp = x / (t - (z * a)); elseif ((z <= 1.02e+197) || ~((z <= 9e+237))) tmp = y / a; else tmp = (-x / z) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.12e+55], N[(y / a), $MachinePrecision], If[LessEqual[z, 8.2e+62], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 1.02e+197], N[Not[LessEqual[z, 9e+237]], $MachinePrecision]], N[(y / a), $MachinePrecision], N[(N[((-x) / z), $MachinePrecision] / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.12 \cdot 10^{+55}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+62}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{+197} \lor \neg \left(z \leq 9 \cdot 10^{+237}\right):\\
\;\;\;\;\frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-x}{z}}{a}\\
\end{array}
\end{array}
if z < -1.12000000000000006e55 or 8.19999999999999967e62 < z < 1.02000000000000008e197 or 8.99999999999999928e237 < z Initial program 61.1%
*-commutative61.1%
Simplified61.1%
Taylor expanded in z around inf 62.0%
if -1.12000000000000006e55 < z < 8.19999999999999967e62Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 73.9%
*-commutative73.9%
Simplified73.9%
if 1.02000000000000008e197 < z < 8.99999999999999928e237Initial program 86.9%
*-commutative86.9%
Simplified86.9%
Taylor expanded in y around -inf 86.6%
Simplified60.3%
Taylor expanded in a around inf 80.5%
associate-*r/80.5%
associate-*r*80.5%
mul-1-neg80.5%
sub-neg80.5%
metadata-eval80.5%
Simplified80.5%
Taylor expanded in y around 0 79.8%
associate-*r/79.8%
neg-mul-179.8%
Simplified79.8%
Final simplification69.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8.6e+132) (not (<= z 5.6e+79))) (/ (- y (/ x z)) a) (/ (- x (* y z)) (- t (* z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.6e+132) || !(z <= 5.6e+79)) {
tmp = (y - (x / z)) / a;
} else {
tmp = (x - (y * z)) / (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 <= (-8.6d+132)) .or. (.not. (z <= 5.6d+79))) then
tmp = (y - (x / z)) / a
else
tmp = (x - (y * z)) / (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 <= -8.6e+132) || !(z <= 5.6e+79)) {
tmp = (y - (x / z)) / a;
} else {
tmp = (x - (y * z)) / (t - (z * a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8.6e+132) or not (z <= 5.6e+79): tmp = (y - (x / z)) / a else: tmp = (x - (y * z)) / (t - (z * a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8.6e+132) || !(z <= 5.6e+79)) tmp = Float64(Float64(y - Float64(x / z)) / a); else tmp = Float64(Float64(x - Float64(y * z)) / Float64(t - Float64(z * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8.6e+132) || ~((z <= 5.6e+79))) tmp = (y - (x / z)) / a; else tmp = (x - (y * z)) / (t - (z * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.6e+132], N[Not[LessEqual[z, 5.6e+79]], $MachinePrecision]], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{+132} \lor \neg \left(z \leq 5.6 \cdot 10^{+79}\right):\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y \cdot z}{t - z \cdot a}\\
\end{array}
\end{array}
if z < -8.59999999999999964e132 or 5.6000000000000002e79 < z Initial program 61.2%
*-commutative61.2%
Simplified61.2%
Taylor expanded in y around -inf 72.4%
Simplified66.0%
Taylor expanded in a around inf 83.8%
associate-*r/83.8%
associate-*r*83.8%
mul-1-neg83.8%
sub-neg83.8%
metadata-eval83.8%
Simplified83.8%
Taylor expanded in y around 0 84.9%
mul-1-neg84.9%
unsub-neg84.9%
Simplified84.9%
if -8.59999999999999964e132 < z < 5.6000000000000002e79Initial program 96.4%
Final simplification92.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.8e+131) (/ (* y (- (- -1.0) (/ x (* y z)))) a) (if (<= z 5.2e+80) (/ (- x (* y z)) (- t (* z a))) (/ (- y (/ x z)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.8e+131) {
tmp = (y * (-(-1.0) - (x / (y * z)))) / a;
} else if (z <= 5.2e+80) {
tmp = (x - (y * z)) / (t - (z * a));
} 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 (z <= (-4.8d+131)) then
tmp = (y * (-(-1.0d0) - (x / (y * z)))) / a
else if (z <= 5.2d+80) then
tmp = (x - (y * z)) / (t - (z * a))
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 (z <= -4.8e+131) {
tmp = (y * (-(-1.0) - (x / (y * z)))) / a;
} else if (z <= 5.2e+80) {
tmp = (x - (y * z)) / (t - (z * a));
} else {
tmp = (y - (x / z)) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.8e+131: tmp = (y * (-(-1.0) - (x / (y * z)))) / a elif z <= 5.2e+80: tmp = (x - (y * z)) / (t - (z * a)) else: tmp = (y - (x / z)) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.8e+131) tmp = Float64(Float64(y * Float64(Float64(-(-1.0)) - Float64(x / Float64(y * z)))) / a); elseif (z <= 5.2e+80) tmp = Float64(Float64(x - Float64(y * z)) / Float64(t - Float64(z * a))); 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 (z <= -4.8e+131) tmp = (y * (-(-1.0) - (x / (y * z)))) / a; elseif (z <= 5.2e+80) tmp = (x - (y * z)) / (t - (z * a)); else tmp = (y - (x / z)) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.8e+131], N[(N[(y * N[((--1.0) - N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 5.2e+80], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+131}:\\
\;\;\;\;\frac{y \cdot \left(\left(--1\right) - \frac{x}{y \cdot z}\right)}{a}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+80}:\\
\;\;\;\;\frac{x - y \cdot z}{t - z \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\end{array}
\end{array}
if z < -4.7999999999999999e131Initial program 59.8%
*-commutative59.8%
Simplified59.8%
Taylor expanded in y around -inf 69.6%
Simplified67.5%
Taylor expanded in a around inf 84.3%
associate-*r/84.3%
associate-*r*84.3%
mul-1-neg84.3%
sub-neg84.3%
metadata-eval84.3%
Simplified84.3%
if -4.7999999999999999e131 < z < 5.19999999999999963e80Initial program 96.4%
if 5.19999999999999963e80 < z Initial program 63.1%
*-commutative63.1%
Simplified63.1%
Taylor expanded in y around -inf 76.1%
Simplified64.1%
Taylor expanded in a around inf 83.2%
associate-*r/83.2%
associate-*r*83.2%
mul-1-neg83.2%
sub-neg83.2%
metadata-eval83.2%
Simplified83.2%
Taylor expanded in y around 0 85.7%
mul-1-neg85.7%
unsub-neg85.7%
Simplified85.7%
Final simplification92.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.5e+123) (/ y a) (if (<= z -1.6e-75) (* y (/ (- z) t)) (if (<= z 7.5e+19) (/ x t) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.5e+123) {
tmp = y / a;
} else if (z <= -1.6e-75) {
tmp = y * (-z / t);
} else if (z <= 7.5e+19) {
tmp = x / t;
} 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 (z <= (-3.5d+123)) then
tmp = y / a
else if (z <= (-1.6d-75)) then
tmp = y * (-z / t)
else if (z <= 7.5d+19) then
tmp = x / t
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 (z <= -3.5e+123) {
tmp = y / a;
} else if (z <= -1.6e-75) {
tmp = y * (-z / t);
} else if (z <= 7.5e+19) {
tmp = x / t;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.5e+123: tmp = y / a elif z <= -1.6e-75: tmp = y * (-z / t) elif z <= 7.5e+19: tmp = x / t else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.5e+123) tmp = Float64(y / a); elseif (z <= -1.6e-75) tmp = Float64(y * Float64(Float64(-z) / t)); elseif (z <= 7.5e+19) tmp = Float64(x / t); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.5e+123) tmp = y / a; elseif (z <= -1.6e-75) tmp = y * (-z / t); elseif (z <= 7.5e+19) tmp = x / t; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.5e+123], N[(y / a), $MachinePrecision], If[LessEqual[z, -1.6e-75], N[(y * N[((-z) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+19], N[(x / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+123}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-75}:\\
\;\;\;\;y \cdot \frac{-z}{t}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+19}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -3.5e123 or 7.5e19 < z Initial program 66.8%
*-commutative66.8%
Simplified66.8%
Taylor expanded in z around inf 61.9%
if -3.5e123 < z < -1.59999999999999988e-75Initial program 86.5%
*-commutative86.5%
Simplified86.5%
Taylor expanded in x around 0 53.9%
mul-1-neg53.9%
associate-/l*64.6%
distribute-rgt-neg-in64.6%
distribute-neg-frac264.6%
cancel-sign-sub-inv64.6%
*-commutative64.6%
+-commutative64.6%
distribute-rgt-neg-out64.6%
distribute-lft-neg-in64.6%
*-commutative64.6%
fma-undefine64.6%
neg-sub064.6%
fma-undefine64.6%
distribute-rgt-neg-in64.6%
mul-1-neg64.6%
associate-*r*64.6%
neg-mul-164.6%
*-commutative64.6%
associate--r+64.6%
neg-sub064.6%
distribute-rgt-neg-out64.6%
remove-double-neg64.6%
Simplified64.6%
Taylor expanded in z around 0 42.2%
associate-*r/42.2%
mul-1-neg42.2%
Simplified42.2%
if -1.59999999999999988e-75 < z < 7.5e19Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 60.5%
Final simplification58.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.5e-15)
(/ y a)
(if (<= z -3.15e-80)
(* z (/ (- y) t))
(if (<= z 1.35e+21) (/ x t) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.5e-15) {
tmp = y / a;
} else if (z <= -3.15e-80) {
tmp = z * (-y / t);
} else if (z <= 1.35e+21) {
tmp = x / t;
} 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 (z <= (-1.5d-15)) then
tmp = y / a
else if (z <= (-3.15d-80)) then
tmp = z * (-y / t)
else if (z <= 1.35d+21) then
tmp = x / t
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 (z <= -1.5e-15) {
tmp = y / a;
} else if (z <= -3.15e-80) {
tmp = z * (-y / t);
} else if (z <= 1.35e+21) {
tmp = x / t;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.5e-15: tmp = y / a elif z <= -3.15e-80: tmp = z * (-y / t) elif z <= 1.35e+21: tmp = x / t else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.5e-15) tmp = Float64(y / a); elseif (z <= -3.15e-80) tmp = Float64(z * Float64(Float64(-y) / t)); elseif (z <= 1.35e+21) tmp = Float64(x / t); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.5e-15) tmp = y / a; elseif (z <= -3.15e-80) tmp = z * (-y / t); elseif (z <= 1.35e+21) tmp = x / t; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.5e-15], N[(y / a), $MachinePrecision], If[LessEqual[z, -3.15e-80], N[(z * N[((-y) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+21], N[(x / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{-15}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -3.15 \cdot 10^{-80}:\\
\;\;\;\;z \cdot \frac{-y}{t}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+21}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -1.5e-15 or 1.35e21 < z Initial program 69.8%
*-commutative69.8%
Simplified69.8%
Taylor expanded in z around inf 55.6%
if -1.5e-15 < z < -3.14999999999999983e-80Initial program 99.7%
*-commutative99.7%
Simplified99.7%
clear-num99.5%
associate-/r/99.5%
sub-neg99.5%
+-commutative99.5%
*-commutative99.5%
distribute-rgt-neg-in99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in a around 0 60.7%
Taylor expanded in x around 0 61.7%
mul-1-neg61.7%
*-commutative61.7%
associate-/l*61.7%
distribute-rgt-neg-in61.7%
distribute-neg-frac261.7%
Simplified61.7%
if -3.14999999999999983e-80 < z < 1.35e21Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 61.1%
Final simplification58.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.4e-16) (not (<= z 2e-72))) (/ (- y (/ x z)) a) (/ (- x (* y z)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.4e-16) || !(z <= 2e-72)) {
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 ((z <= (-4.4d-16)) .or. (.not. (z <= 2d-72))) 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 ((z <= -4.4e-16) || !(z <= 2e-72)) {
tmp = (y - (x / z)) / a;
} else {
tmp = (x - (y * z)) / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.4e-16) or not (z <= 2e-72): tmp = (y - (x / z)) / a else: tmp = (x - (y * z)) / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.4e-16) || !(z <= 2e-72)) 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 ((z <= -4.4e-16) || ~((z <= 2e-72))) tmp = (y - (x / z)) / a; else tmp = (x - (y * z)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.4e-16], N[Not[LessEqual[z, 2e-72]], $MachinePrecision]], 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}\;z \leq -4.4 \cdot 10^{-16} \lor \neg \left(z \leq 2 \cdot 10^{-72}\right):\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y \cdot z}{t}\\
\end{array}
\end{array}
if z < -4.40000000000000001e-16 or 1.9999999999999999e-72 < z Initial program 72.8%
*-commutative72.8%
Simplified72.8%
Taylor expanded in y around -inf 78.2%
Simplified73.7%
Taylor expanded in a around inf 73.1%
associate-*r/73.1%
associate-*r*73.1%
mul-1-neg73.1%
sub-neg73.1%
metadata-eval73.1%
Simplified73.1%
Taylor expanded in y around 0 77.7%
mul-1-neg77.7%
unsub-neg77.7%
Simplified77.7%
if -4.40000000000000001e-16 < z < 1.9999999999999999e-72Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 77.7%
Final simplification77.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.5e-36) (not (<= z 4.6e+18))) (/ y a) (/ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.5e-36) || !(z <= 4.6e+18)) {
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 <= (-2.5d-36)) .or. (.not. (z <= 4.6d+18))) 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 <= -2.5e-36) || !(z <= 4.6e+18)) {
tmp = y / a;
} else {
tmp = x / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.5e-36) or not (z <= 4.6e+18): tmp = y / a else: tmp = x / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.5e-36) || !(z <= 4.6e+18)) 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 <= -2.5e-36) || ~((z <= 4.6e+18))) tmp = y / a; else tmp = x / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.5e-36], N[Not[LessEqual[z, 4.6e+18]], $MachinePrecision]], N[(y / a), $MachinePrecision], N[(x / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{-36} \lor \neg \left(z \leq 4.6 \cdot 10^{+18}\right):\\
\;\;\;\;\frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t}\\
\end{array}
\end{array}
if z < -2.50000000000000002e-36 or 4.6e18 < z Initial program 71.7%
*-commutative71.7%
Simplified71.7%
Taylor expanded in z around inf 53.6%
if -2.50000000000000002e-36 < z < 4.6e18Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 58.0%
Final simplification55.6%
(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.3%
*-commutative84.3%
Simplified84.3%
Taylor expanded in z around 0 32.8%
Final simplification32.8%
(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 2024096
(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))))