
(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 (- (* z a) t))
(t_2 (- x (* y z)))
(t_3 (- (/ (* y z) t_1) (/ x t_1)))
(t_4 (- t (* z a)))
(t_5 (* y (+ (/ z t_1) (/ x (* y t_4)))))
(t_6 (/ t_2 t_4)))
(if (<= t_6 -1e+270)
t_5
(if (<= t_6 -2e-218)
t_3
(if (<= t_6 0.0)
(/ (/ t_2 (- (/ t a) z)) a)
(if (<= t_6 1e+247) t_3 (if (<= t_6 INFINITY) t_5 (/ 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 = ((y * z) / t_1) - (x / t_1);
double t_4 = t - (z * a);
double t_5 = y * ((z / t_1) + (x / (y * t_4)));
double t_6 = t_2 / t_4;
double tmp;
if (t_6 <= -1e+270) {
tmp = t_5;
} else if (t_6 <= -2e-218) {
tmp = t_3;
} else if (t_6 <= 0.0) {
tmp = (t_2 / ((t / a) - z)) / a;
} else if (t_6 <= 1e+247) {
tmp = t_3;
} else if (t_6 <= ((double) INFINITY)) {
tmp = t_5;
} 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 = ((y * z) / t_1) - (x / t_1);
double t_4 = t - (z * a);
double t_5 = y * ((z / t_1) + (x / (y * t_4)));
double t_6 = t_2 / t_4;
double tmp;
if (t_6 <= -1e+270) {
tmp = t_5;
} else if (t_6 <= -2e-218) {
tmp = t_3;
} else if (t_6 <= 0.0) {
tmp = (t_2 / ((t / a) - z)) / a;
} else if (t_6 <= 1e+247) {
tmp = t_3;
} else if (t_6 <= Double.POSITIVE_INFINITY) {
tmp = t_5;
} 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 = ((y * z) / t_1) - (x / t_1) t_4 = t - (z * a) t_5 = y * ((z / t_1) + (x / (y * t_4))) t_6 = t_2 / t_4 tmp = 0 if t_6 <= -1e+270: tmp = t_5 elif t_6 <= -2e-218: tmp = t_3 elif t_6 <= 0.0: tmp = (t_2 / ((t / a) - z)) / a elif t_6 <= 1e+247: tmp = t_3 elif t_6 <= math.inf: tmp = t_5 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(Float64(Float64(y * z) / t_1) - Float64(x / t_1)) t_4 = Float64(t - Float64(z * a)) t_5 = Float64(y * Float64(Float64(z / t_1) + Float64(x / Float64(y * t_4)))) t_6 = Float64(t_2 / t_4) tmp = 0.0 if (t_6 <= -1e+270) tmp = t_5; elseif (t_6 <= -2e-218) tmp = t_3; elseif (t_6 <= 0.0) tmp = Float64(Float64(t_2 / Float64(Float64(t / a) - z)) / a); elseif (t_6 <= 1e+247) tmp = t_3; elseif (t_6 <= Inf) tmp = t_5; 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 = ((y * z) / t_1) - (x / t_1); t_4 = t - (z * a); t_5 = y * ((z / t_1) + (x / (y * t_4))); t_6 = t_2 / t_4; tmp = 0.0; if (t_6 <= -1e+270) tmp = t_5; elseif (t_6 <= -2e-218) tmp = t_3; elseif (t_6 <= 0.0) tmp = (t_2 / ((t / a) - z)) / a; elseif (t_6 <= 1e+247) tmp = t_3; elseif (t_6 <= Inf) tmp = t_5; 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[(N[(N[(y * z), $MachinePrecision] / t$95$1), $MachinePrecision] - N[(x / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(y * N[(N[(z / t$95$1), $MachinePrecision] + N[(x / N[(y * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$2 / t$95$4), $MachinePrecision]}, If[LessEqual[t$95$6, -1e+270], t$95$5, If[LessEqual[t$95$6, -2e-218], t$95$3, If[LessEqual[t$95$6, 0.0], N[(N[(t$95$2 / N[(N[(t / a), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t$95$6, 1e+247], t$95$3, If[LessEqual[t$95$6, Infinity], t$95$5, N[(y / a), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot a - t\\
t_2 := x - y \cdot z\\
t_3 := \frac{y \cdot z}{t\_1} - \frac{x}{t\_1}\\
t_4 := t - z \cdot a\\
t_5 := y \cdot \left(\frac{z}{t\_1} + \frac{x}{y \cdot t\_4}\right)\\
t_6 := \frac{t\_2}{t\_4}\\
\mathbf{if}\;t\_6 \leq -1 \cdot 10^{+270}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_6 \leq -2 \cdot 10^{-218}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_6 \leq 0:\\
\;\;\;\;\frac{\frac{t\_2}{\frac{t}{a} - z}}{a}\\
\mathbf{elif}\;t\_6 \leq 10^{+247}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_6 \leq \infty:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -1e270 or 9.99999999999999952e246 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < +inf.0Initial program 71.1%
*-commutative71.1%
Simplified71.1%
Taylor expanded in y around inf 99.9%
mul-1-neg99.9%
distribute-neg-frac299.9%
cancel-sign-sub-inv99.9%
*-commutative99.9%
+-commutative99.9%
*-commutative99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
fma-undefine99.9%
neg-sub099.9%
fma-undefine99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
associate--r+99.9%
neg-sub099.9%
distribute-rgt-neg-out99.9%
remove-double-neg99.9%
Simplified99.9%
if -1e270 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -2.0000000000000001e-218 or -0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 9.99999999999999952e246Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
if -2.0000000000000001e-218 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -0.0Initial program 69.4%
*-commutative69.4%
Simplified69.4%
Taylor expanded in a around inf 69.4%
*-un-lft-identity69.4%
times-frac99.6%
*-commutative99.6%
Applied egg-rr99.6%
associate-*l/99.8%
*-un-lft-identity99.8%
Applied egg-rr99.8%
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.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* z a) t))
(t_2 (/ z t_1))
(t_3 (- x (* y z)))
(t_4 (- t (* z a)))
(t_5 (/ t_3 t_4))
(t_6 (cbrt t_4)))
(if (<= t_5 -1e+270)
(* y (+ t_2 (/ x (* y t_4))))
(if (<= t_5 -2e-218)
(- (/ (* y z) t_1) (/ x t_1))
(if (<= t_5 1e-296)
(/ (/ t_3 (- (/ t a) z)) a)
(if (<= t_5 INFINITY)
(fma (/ 1.0 (pow t_6 2.0)) (/ x t_6) (* y t_2))
(/ y a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z * a) - t;
double t_2 = z / t_1;
double t_3 = x - (y * z);
double t_4 = t - (z * a);
double t_5 = t_3 / t_4;
double t_6 = cbrt(t_4);
double tmp;
if (t_5 <= -1e+270) {
tmp = y * (t_2 + (x / (y * t_4)));
} else if (t_5 <= -2e-218) {
tmp = ((y * z) / t_1) - (x / t_1);
} else if (t_5 <= 1e-296) {
tmp = (t_3 / ((t / a) - z)) / a;
} else if (t_5 <= ((double) INFINITY)) {
tmp = fma((1.0 / pow(t_6, 2.0)), (x / t_6), (y * t_2));
} else {
tmp = y / a;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z * a) - t) t_2 = Float64(z / t_1) t_3 = Float64(x - Float64(y * z)) t_4 = Float64(t - Float64(z * a)) t_5 = Float64(t_3 / t_4) t_6 = cbrt(t_4) tmp = 0.0 if (t_5 <= -1e+270) tmp = Float64(y * Float64(t_2 + Float64(x / Float64(y * t_4)))); elseif (t_5 <= -2e-218) tmp = Float64(Float64(Float64(y * z) / t_1) - Float64(x / t_1)); elseif (t_5 <= 1e-296) tmp = Float64(Float64(t_3 / Float64(Float64(t / a) - z)) / a); elseif (t_5 <= Inf) tmp = fma(Float64(1.0 / (t_6 ^ 2.0)), Float64(x / t_6), Float64(y * t_2)); else tmp = Float64(y / a); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]}, Block[{t$95$2 = N[(z / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$3 / t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[Power[t$95$4, 1/3], $MachinePrecision]}, If[LessEqual[t$95$5, -1e+270], N[(y * N[(t$95$2 + N[(x / N[(y * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, -2e-218], N[(N[(N[(y * z), $MachinePrecision] / t$95$1), $MachinePrecision] - N[(x / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 1e-296], N[(N[(t$95$3 / N[(N[(t / a), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t$95$5, Infinity], N[(N[(1.0 / N[Power[t$95$6, 2.0], $MachinePrecision]), $MachinePrecision] * N[(x / t$95$6), $MachinePrecision] + N[(y * t$95$2), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot a - t\\
t_2 := \frac{z}{t\_1}\\
t_3 := x - y \cdot z\\
t_4 := t - z \cdot a\\
t_5 := \frac{t\_3}{t\_4}\\
t_6 := \sqrt[3]{t\_4}\\
\mathbf{if}\;t\_5 \leq -1 \cdot 10^{+270}:\\
\;\;\;\;y \cdot \left(t\_2 + \frac{x}{y \cdot t\_4}\right)\\
\mathbf{elif}\;t\_5 \leq -2 \cdot 10^{-218}:\\
\;\;\;\;\frac{y \cdot z}{t\_1} - \frac{x}{t\_1}\\
\mathbf{elif}\;t\_5 \leq 10^{-296}:\\
\;\;\;\;\frac{\frac{t\_3}{\frac{t}{a} - z}}{a}\\
\mathbf{elif}\;t\_5 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(\frac{1}{{t\_6}^{2}}, \frac{x}{t\_6}, y \cdot t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -1e270Initial program 71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in y around inf 99.8%
mul-1-neg99.8%
distribute-neg-frac299.8%
cancel-sign-sub-inv99.8%
*-commutative99.8%
+-commutative99.8%
*-commutative99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
fma-undefine99.8%
neg-sub099.8%
fma-undefine99.8%
distribute-rgt-neg-in99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
associate--r+99.8%
neg-sub099.8%
distribute-rgt-neg-out99.8%
remove-double-neg99.8%
Simplified99.8%
if -1e270 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -2.0000000000000001e-218Initial program 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 99.7%
if -2.0000000000000001e-218 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 1e-296Initial program 70.1%
*-commutative70.1%
Simplified70.1%
Taylor expanded in a around inf 70.1%
*-un-lft-identity70.1%
times-frac99.6%
*-commutative99.6%
Applied egg-rr99.6%
associate-*l/99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
if 1e-296 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < +inf.0Initial program 95.7%
*-commutative95.7%
Simplified95.7%
div-sub95.8%
*-un-lft-identity95.8%
add-cube-cbrt94.9%
times-frac94.8%
fmm-def94.9%
Applied egg-rr94.9%
Simplified97.8%
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.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y z)))
(t_2 (- t (* z a)))
(t_3 (* y (+ (/ z (- (* z a) t)) (/ x (* y t_2)))))
(t_4 (/ t_1 t_2)))
(if (<= t_4 -1e+270)
t_3
(if (<= t_4 -2e-218)
t_4
(if (<= t_4 0.0)
(/ (/ t_1 (- (/ t a) z)) a)
(if (<= t_4 1e+247) t_4 (if (<= t_4 INFINITY) t_3 (/ 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 = y * ((z / ((z * a) - t)) + (x / (y * t_2)));
double t_4 = t_1 / t_2;
double tmp;
if (t_4 <= -1e+270) {
tmp = t_3;
} else if (t_4 <= -2e-218) {
tmp = t_4;
} else if (t_4 <= 0.0) {
tmp = (t_1 / ((t / a) - z)) / a;
} else if (t_4 <= 1e+247) {
tmp = t_4;
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_3;
} 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 = y * ((z / ((z * a) - t)) + (x / (y * t_2)));
double t_4 = t_1 / t_2;
double tmp;
if (t_4 <= -1e+270) {
tmp = t_3;
} else if (t_4 <= -2e-218) {
tmp = t_4;
} else if (t_4 <= 0.0) {
tmp = (t_1 / ((t / a) - z)) / a;
} else if (t_4 <= 1e+247) {
tmp = t_4;
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} 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 = y * ((z / ((z * a) - t)) + (x / (y * t_2))) t_4 = t_1 / t_2 tmp = 0 if t_4 <= -1e+270: tmp = t_3 elif t_4 <= -2e-218: tmp = t_4 elif t_4 <= 0.0: tmp = (t_1 / ((t / a) - z)) / a elif t_4 <= 1e+247: tmp = t_4 elif t_4 <= math.inf: tmp = t_3 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(y * Float64(Float64(z / Float64(Float64(z * a) - t)) + Float64(x / Float64(y * t_2)))) t_4 = Float64(t_1 / t_2) tmp = 0.0 if (t_4 <= -1e+270) tmp = t_3; elseif (t_4 <= -2e-218) tmp = t_4; elseif (t_4 <= 0.0) tmp = Float64(Float64(t_1 / Float64(Float64(t / a) - z)) / a); elseif (t_4 <= 1e+247) tmp = t_4; elseif (t_4 <= Inf) tmp = t_3; 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 = y * ((z / ((z * a) - t)) + (x / (y * t_2))); t_4 = t_1 / t_2; tmp = 0.0; if (t_4 <= -1e+270) tmp = t_3; elseif (t_4 <= -2e-218) tmp = t_4; elseif (t_4 <= 0.0) tmp = (t_1 / ((t / a) - z)) / a; elseif (t_4 <= 1e+247) tmp = t_4; elseif (t_4 <= Inf) tmp = t_3; 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[(y * N[(N[(z / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(x / N[(y * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 / t$95$2), $MachinePrecision]}, If[LessEqual[t$95$4, -1e+270], t$95$3, If[LessEqual[t$95$4, -2e-218], t$95$4, If[LessEqual[t$95$4, 0.0], N[(N[(t$95$1 / N[(N[(t / a), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t$95$4, 1e+247], t$95$4, If[LessEqual[t$95$4, Infinity], t$95$3, N[(y / a), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot z\\
t_2 := t - z \cdot a\\
t_3 := y \cdot \left(\frac{z}{z \cdot a - t} + \frac{x}{y \cdot t\_2}\right)\\
t_4 := \frac{t\_1}{t\_2}\\
\mathbf{if}\;t\_4 \leq -1 \cdot 10^{+270}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_4 \leq -2 \cdot 10^{-218}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;\frac{\frac{t\_1}{\frac{t}{a} - z}}{a}\\
\mathbf{elif}\;t\_4 \leq 10^{+247}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -1e270 or 9.99999999999999952e246 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < +inf.0Initial program 71.1%
*-commutative71.1%
Simplified71.1%
Taylor expanded in y around inf 99.9%
mul-1-neg99.9%
distribute-neg-frac299.9%
cancel-sign-sub-inv99.9%
*-commutative99.9%
+-commutative99.9%
*-commutative99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
fma-undefine99.9%
neg-sub099.9%
fma-undefine99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
associate--r+99.9%
neg-sub099.9%
distribute-rgt-neg-out99.9%
remove-double-neg99.9%
Simplified99.9%
if -1e270 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -2.0000000000000001e-218 or -0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 9.99999999999999952e246Initial program 99.7%
if -2.0000000000000001e-218 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -0.0Initial program 69.4%
*-commutative69.4%
Simplified69.4%
Taylor expanded in a around inf 69.4%
*-un-lft-identity69.4%
times-frac99.6%
*-commutative99.6%
Applied egg-rr99.6%
associate-*l/99.8%
*-un-lft-identity99.8%
Applied egg-rr99.8%
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_1 (- t (* z a)))))
(if (<= t_2 -2e-218)
t_2
(if (<= t_2 0.0)
(/ (/ t_1 (- (/ t a) z)) a)
(if (<= t_2 5e+277)
t_2
(if (<= t_2 INFINITY) (* z (/ y (- (* z a) t))) (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * z);
double t_2 = t_1 / (t - (z * a));
double tmp;
if (t_2 <= -2e-218) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (t_1 / ((t / a) - z)) / a;
} else if (t_2 <= 5e+277) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = z * (y / ((z * a) - t));
} 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_1 / (t - (z * a));
double tmp;
if (t_2 <= -2e-218) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (t_1 / ((t / a) - z)) / a;
} else if (t_2 <= 5e+277) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = z * (y / ((z * a) - t));
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * z) t_2 = t_1 / (t - (z * a)) tmp = 0 if t_2 <= -2e-218: tmp = t_2 elif t_2 <= 0.0: tmp = (t_1 / ((t / a) - z)) / a elif t_2 <= 5e+277: tmp = t_2 elif t_2 <= math.inf: tmp = z * (y / ((z * a) - t)) else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * z)) t_2 = Float64(t_1 / Float64(t - Float64(z * a))) tmp = 0.0 if (t_2 <= -2e-218) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(t_1 / Float64(Float64(t / a) - z)) / a); elseif (t_2 <= 5e+277) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(z * Float64(y / Float64(Float64(z * a) - t))); 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_1 / (t - (z * a)); tmp = 0.0; if (t_2 <= -2e-218) tmp = t_2; elseif (t_2 <= 0.0) tmp = (t_1 / ((t / a) - z)) / a; elseif (t_2 <= 5e+277) tmp = t_2; elseif (t_2 <= Inf) tmp = z * (y / ((z * a) - t)); 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$95$1 / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-218], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(t$95$1 / N[(N[(t / a), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t$95$2, 5e+277], t$95$2, If[LessEqual[t$95$2, Infinity], N[(z * N[(y / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot z\\
t_2 := \frac{t\_1}{t - z \cdot a}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-218}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{\frac{t\_1}{\frac{t}{a} - z}}{a}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+277}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;z \cdot \frac{y}{z \cdot a - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -2.0000000000000001e-218 or -0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 4.99999999999999982e277Initial program 96.3%
if -2.0000000000000001e-218 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -0.0Initial program 69.4%
*-commutative69.4%
Simplified69.4%
Taylor expanded in a around inf 69.4%
*-un-lft-identity69.4%
times-frac99.6%
*-commutative99.6%
Applied egg-rr99.6%
associate-*l/99.8%
*-un-lft-identity99.8%
Applied egg-rr99.8%
if 4.99999999999999982e277 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < +inf.0Initial program 66.2%
*-commutative66.2%
Simplified66.2%
Taylor expanded in x around 0 52.7%
mul-1-neg52.7%
associate-/l*86.5%
distribute-rgt-neg-in86.5%
distribute-neg-frac286.5%
cancel-sign-sub-inv86.5%
*-commutative86.5%
+-commutative86.5%
*-commutative86.5%
distribute-lft-neg-in86.5%
distribute-rgt-neg-in86.5%
fma-undefine86.5%
neg-sub086.5%
fma-undefine86.5%
distribute-rgt-neg-in86.5%
distribute-lft-neg-in86.5%
*-commutative86.5%
associate--r+86.5%
neg-sub086.5%
distribute-rgt-neg-out86.5%
remove-double-neg86.5%
Simplified86.5%
clear-num86.4%
un-div-inv86.5%
fmm-def86.5%
Applied egg-rr86.5%
associate-/r/99.9%
fmm-undef99.9%
*-commutative99.9%
Simplified99.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 simplification97.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -7.5e+42)
(/ y a)
(if (<= z -1.6e-132)
(/ (* y z) (- t))
(if (<= z -7.5e-202)
(/ x (* z (- a)))
(if (<= z 1.8e-172)
(/ x t)
(if (<= z 1.3e+46) (* (* y z) (/ -1.0 t)) (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.5e+42) {
tmp = y / a;
} else if (z <= -1.6e-132) {
tmp = (y * z) / -t;
} else if (z <= -7.5e-202) {
tmp = x / (z * -a);
} else if (z <= 1.8e-172) {
tmp = x / t;
} else if (z <= 1.3e+46) {
tmp = (y * z) * (-1.0 / 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 <= (-7.5d+42)) then
tmp = y / a
else if (z <= (-1.6d-132)) then
tmp = (y * z) / -t
else if (z <= (-7.5d-202)) then
tmp = x / (z * -a)
else if (z <= 1.8d-172) then
tmp = x / t
else if (z <= 1.3d+46) then
tmp = (y * z) * ((-1.0d0) / 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 <= -7.5e+42) {
tmp = y / a;
} else if (z <= -1.6e-132) {
tmp = (y * z) / -t;
} else if (z <= -7.5e-202) {
tmp = x / (z * -a);
} else if (z <= 1.8e-172) {
tmp = x / t;
} else if (z <= 1.3e+46) {
tmp = (y * z) * (-1.0 / t);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.5e+42: tmp = y / a elif z <= -1.6e-132: tmp = (y * z) / -t elif z <= -7.5e-202: tmp = x / (z * -a) elif z <= 1.8e-172: tmp = x / t elif z <= 1.3e+46: tmp = (y * z) * (-1.0 / t) else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.5e+42) tmp = Float64(y / a); elseif (z <= -1.6e-132) tmp = Float64(Float64(y * z) / Float64(-t)); elseif (z <= -7.5e-202) tmp = Float64(x / Float64(z * Float64(-a))); elseif (z <= 1.8e-172) tmp = Float64(x / t); elseif (z <= 1.3e+46) tmp = Float64(Float64(y * z) * Float64(-1.0 / t)); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7.5e+42) tmp = y / a; elseif (z <= -1.6e-132) tmp = (y * z) / -t; elseif (z <= -7.5e-202) tmp = x / (z * -a); elseif (z <= 1.8e-172) tmp = x / t; elseif (z <= 1.3e+46) tmp = (y * z) * (-1.0 / t); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.5e+42], N[(y / a), $MachinePrecision], If[LessEqual[z, -1.6e-132], N[(N[(y * z), $MachinePrecision] / (-t)), $MachinePrecision], If[LessEqual[z, -7.5e-202], N[(x / N[(z * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e-172], N[(x / t), $MachinePrecision], If[LessEqual[z, 1.3e+46], N[(N[(y * z), $MachinePrecision] * N[(-1.0 / t), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+42}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-132}:\\
\;\;\;\;\frac{y \cdot z}{-t}\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-202}:\\
\;\;\;\;\frac{x}{z \cdot \left(-a\right)}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-172}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+46}:\\
\;\;\;\;\left(y \cdot z\right) \cdot \frac{-1}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -7.50000000000000041e42 or 1.30000000000000007e46 < z Initial program 71.7%
*-commutative71.7%
Simplified71.7%
Taylor expanded in z around inf 62.2%
if -7.50000000000000041e42 < z < -1.6000000000000001e-132Initial program 97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in x around 0 49.3%
mul-1-neg49.3%
associate-/l*46.3%
distribute-rgt-neg-in46.3%
distribute-neg-frac246.3%
cancel-sign-sub-inv46.3%
*-commutative46.3%
+-commutative46.3%
*-commutative46.3%
distribute-lft-neg-in46.3%
distribute-rgt-neg-in46.3%
fma-undefine46.3%
neg-sub046.3%
fma-undefine46.3%
distribute-rgt-neg-in46.3%
distribute-lft-neg-in46.3%
*-commutative46.3%
associate--r+46.3%
neg-sub046.3%
distribute-rgt-neg-out46.3%
remove-double-neg46.3%
Simplified46.3%
Taylor expanded in z around 0 42.0%
associate-*r/42.0%
associate-*r*42.0%
neg-mul-142.0%
*-commutative42.0%
Simplified42.0%
if -1.6000000000000001e-132 < z < -7.50000000000000005e-202Initial program 99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in t around 0 81.6%
associate-*r/81.6%
neg-mul-181.6%
neg-sub081.6%
sub-neg81.6%
distribute-rgt-neg-out81.6%
+-commutative81.6%
associate--r+81.6%
neg-sub081.6%
distribute-rgt-neg-out81.6%
remove-double-neg81.6%
*-commutative81.6%
Simplified81.6%
Taylor expanded in y around 0 63.9%
neg-mul-163.9%
Simplified63.9%
if -7.50000000000000005e-202 < z < 1.80000000000000007e-172Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around 0 72.7%
if 1.80000000000000007e-172 < z < 1.30000000000000007e46Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 57.2%
mul-1-neg57.2%
associate-/l*50.4%
distribute-rgt-neg-in50.4%
distribute-neg-frac250.4%
cancel-sign-sub-inv50.4%
*-commutative50.4%
+-commutative50.4%
*-commutative50.4%
distribute-lft-neg-in50.4%
distribute-rgt-neg-in50.4%
fma-undefine50.4%
neg-sub050.4%
fma-undefine50.4%
distribute-rgt-neg-in50.4%
distribute-lft-neg-in50.4%
*-commutative50.4%
associate--r+50.4%
neg-sub050.4%
distribute-rgt-neg-out50.4%
remove-double-neg50.4%
Simplified50.4%
associate-*r/57.2%
clear-num57.2%
fmm-def57.2%
*-commutative57.2%
Applied egg-rr57.2%
associate-/r/57.3%
fmm-undef57.3%
*-commutative57.3%
Simplified57.3%
Taylor expanded in a around 0 45.2%
Final simplification58.3%
(FPCore (x y z t a)
:precision binary64
(if (<= t -9.5e+164)
(* y (/ z (- t)))
(if (<= t -7.2e-87)
(/ x t)
(if (<= t 1.25e-66)
(/ y a)
(if (or (<= t 2.9e+22) (not (<= t 2.9e+125)))
(/ x t)
(* z (/ (- y) t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.5e+164) {
tmp = y * (z / -t);
} else if (t <= -7.2e-87) {
tmp = x / t;
} else if (t <= 1.25e-66) {
tmp = y / a;
} else if ((t <= 2.9e+22) || !(t <= 2.9e+125)) {
tmp = x / t;
} else {
tmp = z * (-y / 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 <= (-9.5d+164)) then
tmp = y * (z / -t)
else if (t <= (-7.2d-87)) then
tmp = x / t
else if (t <= 1.25d-66) then
tmp = y / a
else if ((t <= 2.9d+22) .or. (.not. (t <= 2.9d+125))) then
tmp = x / t
else
tmp = z * (-y / 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 <= -9.5e+164) {
tmp = y * (z / -t);
} else if (t <= -7.2e-87) {
tmp = x / t;
} else if (t <= 1.25e-66) {
tmp = y / a;
} else if ((t <= 2.9e+22) || !(t <= 2.9e+125)) {
tmp = x / t;
} else {
tmp = z * (-y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -9.5e+164: tmp = y * (z / -t) elif t <= -7.2e-87: tmp = x / t elif t <= 1.25e-66: tmp = y / a elif (t <= 2.9e+22) or not (t <= 2.9e+125): tmp = x / t else: tmp = z * (-y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9.5e+164) tmp = Float64(y * Float64(z / Float64(-t))); elseif (t <= -7.2e-87) tmp = Float64(x / t); elseif (t <= 1.25e-66) tmp = Float64(y / a); elseif ((t <= 2.9e+22) || !(t <= 2.9e+125)) tmp = Float64(x / t); else tmp = Float64(z * Float64(Float64(-y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -9.5e+164) tmp = y * (z / -t); elseif (t <= -7.2e-87) tmp = x / t; elseif (t <= 1.25e-66) tmp = y / a; elseif ((t <= 2.9e+22) || ~((t <= 2.9e+125))) tmp = x / t; else tmp = z * (-y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.5e+164], N[(y * N[(z / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.2e-87], N[(x / t), $MachinePrecision], If[LessEqual[t, 1.25e-66], N[(y / a), $MachinePrecision], If[Or[LessEqual[t, 2.9e+22], N[Not[LessEqual[t, 2.9e+125]], $MachinePrecision]], N[(x / t), $MachinePrecision], N[(z * N[((-y) / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+164}:\\
\;\;\;\;y \cdot \frac{z}{-t}\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-87}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-66}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{+22} \lor \neg \left(t \leq 2.9 \cdot 10^{+125}\right):\\
\;\;\;\;\frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{-y}{t}\\
\end{array}
\end{array}
if t < -9.49999999999999976e164Initial program 86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in x around 0 63.0%
mul-1-neg63.0%
associate-/l*64.0%
distribute-rgt-neg-in64.0%
distribute-neg-frac264.0%
cancel-sign-sub-inv64.0%
*-commutative64.0%
+-commutative64.0%
*-commutative64.0%
distribute-lft-neg-in64.0%
distribute-rgt-neg-in64.0%
fma-undefine64.0%
neg-sub064.0%
fma-undefine64.0%
distribute-rgt-neg-in64.0%
distribute-lft-neg-in64.0%
*-commutative64.0%
associate--r+64.0%
neg-sub064.0%
distribute-rgt-neg-out64.0%
remove-double-neg64.0%
Simplified64.0%
Taylor expanded in z around 0 58.3%
associate-*r/58.3%
neg-mul-158.3%
Simplified58.3%
if -9.49999999999999976e164 < t < -7.19999999999999986e-87 or 1.2499999999999999e-66 < t < 2.9e22 or 2.89999999999999993e125 < t Initial program 92.6%
*-commutative92.6%
Simplified92.6%
Taylor expanded in z around 0 55.5%
if -7.19999999999999986e-87 < t < 1.2499999999999999e-66Initial program 85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in z around inf 59.5%
if 2.9e22 < t < 2.89999999999999993e125Initial program 84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in a around inf 71.9%
Taylor expanded in a around 0 55.7%
*-commutative55.7%
Simplified55.7%
Taylor expanded in x around 0 39.9%
mul-1-neg39.9%
*-commutative39.9%
associate-/l*51.7%
distribute-rgt-neg-in51.7%
mul-1-neg51.7%
associate-*r/51.7%
neg-mul-151.7%
Simplified51.7%
Final simplification57.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y z) (- t))))
(if (<= z -1e+40)
(/ y a)
(if (<= z -7.2e-135)
t_1
(if (<= z -7.5e-202)
(/ x (* z (- a)))
(if (<= z 2.5e-169) (/ x t) (if (<= z 3.2e+47) t_1 (/ y a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * z) / -t;
double tmp;
if (z <= -1e+40) {
tmp = y / a;
} else if (z <= -7.2e-135) {
tmp = t_1;
} else if (z <= -7.5e-202) {
tmp = x / (z * -a);
} else if (z <= 2.5e-169) {
tmp = x / t;
} else if (z <= 3.2e+47) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (y * z) / -t
if (z <= (-1d+40)) then
tmp = y / a
else if (z <= (-7.2d-135)) then
tmp = t_1
else if (z <= (-7.5d-202)) then
tmp = x / (z * -a)
else if (z <= 2.5d-169) then
tmp = x / t
else if (z <= 3.2d+47) then
tmp = t_1
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 t_1 = (y * z) / -t;
double tmp;
if (z <= -1e+40) {
tmp = y / a;
} else if (z <= -7.2e-135) {
tmp = t_1;
} else if (z <= -7.5e-202) {
tmp = x / (z * -a);
} else if (z <= 2.5e-169) {
tmp = x / t;
} else if (z <= 3.2e+47) {
tmp = t_1;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * z) / -t tmp = 0 if z <= -1e+40: tmp = y / a elif z <= -7.2e-135: tmp = t_1 elif z <= -7.5e-202: tmp = x / (z * -a) elif z <= 2.5e-169: tmp = x / t elif z <= 3.2e+47: tmp = t_1 else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * z) / Float64(-t)) tmp = 0.0 if (z <= -1e+40) tmp = Float64(y / a); elseif (z <= -7.2e-135) tmp = t_1; elseif (z <= -7.5e-202) tmp = Float64(x / Float64(z * Float64(-a))); elseif (z <= 2.5e-169) tmp = Float64(x / t); elseif (z <= 3.2e+47) tmp = t_1; else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * z) / -t; tmp = 0.0; if (z <= -1e+40) tmp = y / a; elseif (z <= -7.2e-135) tmp = t_1; elseif (z <= -7.5e-202) tmp = x / (z * -a); elseif (z <= 2.5e-169) tmp = x / t; elseif (z <= 3.2e+47) tmp = t_1; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * z), $MachinePrecision] / (-t)), $MachinePrecision]}, If[LessEqual[z, -1e+40], N[(y / a), $MachinePrecision], If[LessEqual[z, -7.2e-135], t$95$1, If[LessEqual[z, -7.5e-202], N[(x / N[(z * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e-169], N[(x / t), $MachinePrecision], If[LessEqual[z, 3.2e+47], t$95$1, N[(y / a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot z}{-t}\\
\mathbf{if}\;z \leq -1 \cdot 10^{+40}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-135}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-202}:\\
\;\;\;\;\frac{x}{z \cdot \left(-a\right)}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-169}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -1.00000000000000003e40 or 3.2e47 < z Initial program 71.7%
*-commutative71.7%
Simplified71.7%
Taylor expanded in z around inf 62.2%
if -1.00000000000000003e40 < z < -7.19999999999999955e-135 or 2.5000000000000001e-169 < z < 3.2e47Initial program 98.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in x around 0 53.7%
mul-1-neg53.7%
associate-/l*48.6%
distribute-rgt-neg-in48.6%
distribute-neg-frac248.6%
cancel-sign-sub-inv48.6%
*-commutative48.6%
+-commutative48.6%
*-commutative48.6%
distribute-lft-neg-in48.6%
distribute-rgt-neg-in48.6%
fma-undefine48.6%
neg-sub048.6%
fma-undefine48.6%
distribute-rgt-neg-in48.6%
distribute-lft-neg-in48.6%
*-commutative48.6%
associate--r+48.6%
neg-sub048.6%
distribute-rgt-neg-out48.6%
remove-double-neg48.6%
Simplified48.6%
Taylor expanded in z around 0 43.8%
associate-*r/43.8%
associate-*r*43.8%
neg-mul-143.8%
*-commutative43.8%
Simplified43.8%
if -7.19999999999999955e-135 < z < -7.50000000000000005e-202Initial program 99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in t around 0 81.6%
associate-*r/81.6%
neg-mul-181.6%
neg-sub081.6%
sub-neg81.6%
distribute-rgt-neg-out81.6%
+-commutative81.6%
associate--r+81.6%
neg-sub081.6%
distribute-rgt-neg-out81.6%
remove-double-neg81.6%
*-commutative81.6%
Simplified81.6%
Taylor expanded in y around 0 63.9%
neg-mul-163.9%
Simplified63.9%
if -7.50000000000000005e-202 < z < 2.5000000000000001e-169Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around 0 72.7%
Final simplification58.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x (* y z)) t)))
(if (<= z -4.6e+41)
(/ y a)
(if (<= z -5.6e-132)
t_1
(if (<= z -2.15e-204)
(/ x (- t (* z a)))
(if (<= z 2.9e+47) t_1 (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - (y * z)) / t;
double tmp;
if (z <= -4.6e+41) {
tmp = y / a;
} else if (z <= -5.6e-132) {
tmp = t_1;
} else if (z <= -2.15e-204) {
tmp = x / (t - (z * a));
} else if (z <= 2.9e+47) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (x - (y * z)) / t
if (z <= (-4.6d+41)) then
tmp = y / a
else if (z <= (-5.6d-132)) then
tmp = t_1
else if (z <= (-2.15d-204)) then
tmp = x / (t - (z * a))
else if (z <= 2.9d+47) then
tmp = t_1
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 t_1 = (x - (y * z)) / t;
double tmp;
if (z <= -4.6e+41) {
tmp = y / a;
} else if (z <= -5.6e-132) {
tmp = t_1;
} else if (z <= -2.15e-204) {
tmp = x / (t - (z * a));
} else if (z <= 2.9e+47) {
tmp = t_1;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - (y * z)) / t tmp = 0 if z <= -4.6e+41: tmp = y / a elif z <= -5.6e-132: tmp = t_1 elif z <= -2.15e-204: tmp = x / (t - (z * a)) elif z <= 2.9e+47: tmp = t_1 else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - Float64(y * z)) / t) tmp = 0.0 if (z <= -4.6e+41) tmp = Float64(y / a); elseif (z <= -5.6e-132) tmp = t_1; elseif (z <= -2.15e-204) tmp = Float64(x / Float64(t - Float64(z * a))); elseif (z <= 2.9e+47) tmp = t_1; else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - (y * z)) / t; tmp = 0.0; if (z <= -4.6e+41) tmp = y / a; elseif (z <= -5.6e-132) tmp = t_1; elseif (z <= -2.15e-204) tmp = x / (t - (z * a)); elseif (z <= 2.9e+47) tmp = t_1; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -4.6e+41], N[(y / a), $MachinePrecision], If[LessEqual[z, -5.6e-132], t$95$1, If[LessEqual[z, -2.15e-204], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e+47], t$95$1, N[(y / a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y \cdot z}{t}\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{+41}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-132}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.15 \cdot 10^{-204}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -4.5999999999999997e41 or 2.8999999999999998e47 < z Initial program 71.7%
*-commutative71.7%
Simplified71.7%
Taylor expanded in z around inf 62.2%
if -4.5999999999999997e41 < z < -5.60000000000000005e-132 or -2.1500000000000001e-204 < z < 2.8999999999999998e47Initial program 99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in t around inf 76.1%
if -5.60000000000000005e-132 < z < -2.1500000000000001e-204Initial program 99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x around inf 81.6%
*-commutative81.6%
Simplified81.6%
Final simplification70.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.3e+34)
(/ y a)
(if (<= z 4.3e-134)
(/ x t)
(if (<= z 9e-54)
(* y (/ z (- t)))
(if (<= z 1.12e+46) (/ x t) (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.3e+34) {
tmp = y / a;
} else if (z <= 4.3e-134) {
tmp = x / t;
} else if (z <= 9e-54) {
tmp = y * (z / -t);
} else if (z <= 1.12e+46) {
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.3d+34)) then
tmp = y / a
else if (z <= 4.3d-134) then
tmp = x / t
else if (z <= 9d-54) then
tmp = y * (z / -t)
else if (z <= 1.12d+46) 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.3e+34) {
tmp = y / a;
} else if (z <= 4.3e-134) {
tmp = x / t;
} else if (z <= 9e-54) {
tmp = y * (z / -t);
} else if (z <= 1.12e+46) {
tmp = x / t;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.3e+34: tmp = y / a elif z <= 4.3e-134: tmp = x / t elif z <= 9e-54: tmp = y * (z / -t) elif z <= 1.12e+46: tmp = x / t else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.3e+34) tmp = Float64(y / a); elseif (z <= 4.3e-134) tmp = Float64(x / t); elseif (z <= 9e-54) tmp = Float64(y * Float64(z / Float64(-t))); elseif (z <= 1.12e+46) 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.3e+34) tmp = y / a; elseif (z <= 4.3e-134) tmp = x / t; elseif (z <= 9e-54) tmp = y * (z / -t); elseif (z <= 1.12e+46) tmp = x / t; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.3e+34], N[(y / a), $MachinePrecision], If[LessEqual[z, 4.3e-134], N[(x / t), $MachinePrecision], If[LessEqual[z, 9e-54], N[(y * N[(z / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.12e+46], N[(x / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+34}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{-134}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-54}:\\
\;\;\;\;y \cdot \frac{z}{-t}\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{+46}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -1.29999999999999999e34 or 1.12e46 < z Initial program 72.2%
*-commutative72.2%
Simplified72.2%
Taylor expanded in z around inf 61.0%
if -1.29999999999999999e34 < z < 4.29999999999999987e-134 or 8.9999999999999997e-54 < z < 1.12e46Initial program 99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in z around 0 52.5%
if 4.29999999999999987e-134 < z < 8.9999999999999997e-54Initial program 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 70.1%
mul-1-neg70.1%
associate-/l*64.2%
distribute-rgt-neg-in64.2%
distribute-neg-frac264.2%
cancel-sign-sub-inv64.2%
*-commutative64.2%
+-commutative64.2%
*-commutative64.2%
distribute-lft-neg-in64.2%
distribute-rgt-neg-in64.2%
fma-undefine64.2%
neg-sub064.2%
fma-undefine64.2%
distribute-rgt-neg-in64.2%
distribute-lft-neg-in64.2%
*-commutative64.2%
associate--r+64.2%
neg-sub064.2%
distribute-rgt-neg-out64.2%
remove-double-neg64.2%
Simplified64.2%
Taylor expanded in z around 0 52.4%
associate-*r/52.4%
neg-mul-152.4%
Simplified52.4%
Final simplification56.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x (* y z)) t)))
(if (<= t -3.7e-83)
t_1
(if (<= t 1.4e-73)
(/ (- y (/ x z)) a)
(if (<= t 4.5e-21) (/ x (- t (* z a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - (y * z)) / t;
double tmp;
if (t <= -3.7e-83) {
tmp = t_1;
} else if (t <= 1.4e-73) {
tmp = (y - (x / z)) / a;
} else if (t <= 4.5e-21) {
tmp = x / (t - (z * a));
} else {
tmp = t_1;
}
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) :: tmp
t_1 = (x - (y * z)) / t
if (t <= (-3.7d-83)) then
tmp = t_1
else if (t <= 1.4d-73) then
tmp = (y - (x / z)) / a
else if (t <= 4.5d-21) then
tmp = x / (t - (z * a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x - (y * z)) / t;
double tmp;
if (t <= -3.7e-83) {
tmp = t_1;
} else if (t <= 1.4e-73) {
tmp = (y - (x / z)) / a;
} else if (t <= 4.5e-21) {
tmp = x / (t - (z * a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - (y * z)) / t tmp = 0 if t <= -3.7e-83: tmp = t_1 elif t <= 1.4e-73: tmp = (y - (x / z)) / a elif t <= 4.5e-21: tmp = x / (t - (z * a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - Float64(y * z)) / t) tmp = 0.0 if (t <= -3.7e-83) tmp = t_1; elseif (t <= 1.4e-73) tmp = Float64(Float64(y - Float64(x / z)) / a); elseif (t <= 4.5e-21) tmp = Float64(x / Float64(t - Float64(z * a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - (y * z)) / t; tmp = 0.0; if (t <= -3.7e-83) tmp = t_1; elseif (t <= 1.4e-73) tmp = (y - (x / z)) / a; elseif (t <= 4.5e-21) tmp = x / (t - (z * a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[t, -3.7e-83], t$95$1, If[LessEqual[t, 1.4e-73], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 4.5e-21], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y \cdot z}{t}\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{-83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-73}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-21}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.69999999999999995e-83 or 4.49999999999999968e-21 < t Initial program 88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in t around inf 73.8%
if -3.69999999999999995e-83 < t < 1.40000000000000006e-73Initial program 86.0%
*-commutative86.0%
Simplified86.0%
Taylor expanded in z around inf 81.6%
Taylor expanded in t around 0 76.6%
associate-*r/76.6%
distribute-lft-out--76.6%
sub-neg76.6%
neg-mul-176.6%
remove-double-neg76.6%
+-commutative76.6%
mul-1-neg76.6%
unsub-neg76.6%
Simplified76.6%
if 1.40000000000000006e-73 < t < 4.49999999999999968e-21Initial program 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around inf 86.0%
*-commutative86.0%
Simplified86.0%
Final simplification75.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x (* y z)) t)))
(if (<= t -4e-83)
t_1
(if (<= t 3.3e-68)
(- (/ y a) (/ x (* z a)))
(if (<= t 4.5e-21) (/ x (- t (* z a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - (y * z)) / t;
double tmp;
if (t <= -4e-83) {
tmp = t_1;
} else if (t <= 3.3e-68) {
tmp = (y / a) - (x / (z * a));
} else if (t <= 4.5e-21) {
tmp = x / (t - (z * a));
} else {
tmp = t_1;
}
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) :: tmp
t_1 = (x - (y * z)) / t
if (t <= (-4d-83)) then
tmp = t_1
else if (t <= 3.3d-68) then
tmp = (y / a) - (x / (z * a))
else if (t <= 4.5d-21) then
tmp = x / (t - (z * a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x - (y * z)) / t;
double tmp;
if (t <= -4e-83) {
tmp = t_1;
} else if (t <= 3.3e-68) {
tmp = (y / a) - (x / (z * a));
} else if (t <= 4.5e-21) {
tmp = x / (t - (z * a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - (y * z)) / t tmp = 0 if t <= -4e-83: tmp = t_1 elif t <= 3.3e-68: tmp = (y / a) - (x / (z * a)) elif t <= 4.5e-21: tmp = x / (t - (z * a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - Float64(y * z)) / t) tmp = 0.0 if (t <= -4e-83) tmp = t_1; elseif (t <= 3.3e-68) tmp = Float64(Float64(y / a) - Float64(x / Float64(z * a))); elseif (t <= 4.5e-21) tmp = Float64(x / Float64(t - Float64(z * a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - (y * z)) / t; tmp = 0.0; if (t <= -4e-83) tmp = t_1; elseif (t <= 3.3e-68) tmp = (y / a) - (x / (z * a)); elseif (t <= 4.5e-21) tmp = x / (t - (z * a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[t, -4e-83], t$95$1, If[LessEqual[t, 3.3e-68], N[(N[(y / a), $MachinePrecision] - N[(x / N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e-21], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y \cdot z}{t}\\
\mathbf{if}\;t \leq -4 \cdot 10^{-83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-68}:\\
\;\;\;\;\frac{y}{a} - \frac{x}{z \cdot a}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-21}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.0000000000000001e-83 or 4.49999999999999968e-21 < t Initial program 88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in t around inf 73.8%
if -4.0000000000000001e-83 < t < 3.2999999999999998e-68Initial program 86.0%
*-commutative86.0%
Simplified86.0%
Taylor expanded in t around 0 67.1%
associate-*r/67.1%
neg-mul-167.1%
neg-sub067.1%
sub-neg67.1%
distribute-rgt-neg-out67.1%
+-commutative67.1%
associate--r+67.1%
neg-sub067.1%
distribute-rgt-neg-out67.1%
remove-double-neg67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in y around 0 77.8%
+-commutative77.8%
mul-1-neg77.8%
unsub-neg77.8%
*-commutative77.8%
Simplified77.8%
if 3.2999999999999998e-68 < t < 4.49999999999999968e-21Initial program 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around inf 86.0%
*-commutative86.0%
Simplified86.0%
Final simplification76.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8.5e+216) (not (<= z 5.2e+158))) (/ (- 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.5e+216) || !(z <= 5.2e+158)) {
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.5d+216)) .or. (.not. (z <= 5.2d+158))) 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.5e+216) || !(z <= 5.2e+158)) {
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.5e+216) or not (z <= 5.2e+158): 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.5e+216) || !(z <= 5.2e+158)) 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.5e+216) || ~((z <= 5.2e+158))) 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.5e+216], N[Not[LessEqual[z, 5.2e+158]], $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.5 \cdot 10^{+216} \lor \neg \left(z \leq 5.2 \cdot 10^{+158}\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.4999999999999997e216 or 5.2e158 < z Initial program 62.3%
*-commutative62.3%
Simplified62.3%
Taylor expanded in z around inf 62.3%
Taylor expanded in t around 0 83.7%
associate-*r/83.7%
distribute-lft-out--83.7%
sub-neg83.7%
neg-mul-183.7%
remove-double-neg83.7%
+-commutative83.7%
mul-1-neg83.7%
unsub-neg83.7%
Simplified83.7%
if -8.4999999999999997e216 < z < 5.2e158Initial program 94.9%
Final simplification92.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.8e+37) (not (<= z 3.5e+46))) (/ y a) (/ x (- t (* z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.8e+37) || !(z <= 3.5e+46)) {
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 <= (-2.8d+37)) .or. (.not. (z <= 3.5d+46))) 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 <= -2.8e+37) || !(z <= 3.5e+46)) {
tmp = y / a;
} else {
tmp = x / (t - (z * a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.8e+37) or not (z <= 3.5e+46): tmp = y / a else: tmp = x / (t - (z * a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.8e+37) || !(z <= 3.5e+46)) 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 <= -2.8e+37) || ~((z <= 3.5e+46))) tmp = y / a; else tmp = x / (t - (z * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.8e+37], N[Not[LessEqual[z, 3.5e+46]], $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 -2.8 \cdot 10^{+37} \lor \neg \left(z \leq 3.5 \cdot 10^{+46}\right):\\
\;\;\;\;\frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\end{array}
\end{array}
if z < -2.7999999999999998e37 or 3.49999999999999985e46 < z Initial program 71.7%
*-commutative71.7%
Simplified71.7%
Taylor expanded in z around inf 62.2%
if -2.7999999999999998e37 < z < 3.49999999999999985e46Initial program 99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in x around inf 63.7%
*-commutative63.7%
Simplified63.7%
Final simplification63.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.7e+32) (not (<= z 5e+46))) (/ y a) (/ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.7e+32) || !(z <= 5e+46)) {
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 <= (-4.7d+32)) .or. (.not. (z <= 5d+46))) 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 <= -4.7e+32) || !(z <= 5e+46)) {
tmp = y / a;
} else {
tmp = x / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.7e+32) or not (z <= 5e+46): tmp = y / a else: tmp = x / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.7e+32) || !(z <= 5e+46)) 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 <= -4.7e+32) || ~((z <= 5e+46))) tmp = y / a; else tmp = x / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.7e+32], N[Not[LessEqual[z, 5e+46]], $MachinePrecision]], N[(y / a), $MachinePrecision], N[(x / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.7 \cdot 10^{+32} \lor \neg \left(z \leq 5 \cdot 10^{+46}\right):\\
\;\;\;\;\frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t}\\
\end{array}
\end{array}
if z < -4.70000000000000023e32 or 5.0000000000000002e46 < z Initial program 72.2%
*-commutative72.2%
Simplified72.2%
Taylor expanded in z around inf 61.0%
if -4.70000000000000023e32 < z < 5.0000000000000002e46Initial program 99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in z around 0 49.4%
Final simplification54.1%
(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 88.2%
*-commutative88.2%
Simplified88.2%
Taylor expanded in z around 0 35.5%
Final simplification35.5%
(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 2024130
(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))))