
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2
(+
(* (/ y (- b y)) (/ x z))
(-
(/ t (- b y))
(+ (/ a (- b y)) (* (/ (- t a) z) (/ y (pow (- b y) 2.0))))))))
(if (<= z -1.55e+16)
t_2
(if (<= z -1.4e-306)
(/ (fma x y t_1) (fma z (- b y) y))
(if (<= z 8.5e-127)
(+ x (/ t_1 y))
(if (<= z 7000000.0) (/ (+ t_1 (* y x)) (- y (* z (- y b)))) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = ((y / (b - y)) * (x / z)) + ((t / (b - y)) - ((a / (b - y)) + (((t - a) / z) * (y / pow((b - y), 2.0)))));
double tmp;
if (z <= -1.55e+16) {
tmp = t_2;
} else if (z <= -1.4e-306) {
tmp = fma(x, y, t_1) / fma(z, (b - y), y);
} else if (z <= 8.5e-127) {
tmp = x + (t_1 / y);
} else if (z <= 7000000.0) {
tmp = (t_1 + (y * x)) / (y - (z * (y - b)));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(Float64(y / Float64(b - y)) * Float64(x / z)) + Float64(Float64(t / Float64(b - y)) - Float64(Float64(a / Float64(b - y)) + Float64(Float64(Float64(t - a) / z) * Float64(y / (Float64(b - y) ^ 2.0)))))) tmp = 0.0 if (z <= -1.55e+16) tmp = t_2; elseif (z <= -1.4e-306) tmp = Float64(fma(x, y, t_1) / fma(z, Float64(b - y), y)); elseif (z <= 8.5e-127) tmp = Float64(x + Float64(t_1 / y)); elseif (z <= 7000000.0) tmp = Float64(Float64(t_1 + Float64(y * x)) / Float64(y - Float64(z * Float64(y - b)))); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t - a), $MachinePrecision] / z), $MachinePrecision] * N[(y / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.55e+16], t$95$2, If[LessEqual[z, -1.4e-306], N[(N[(x * y + t$95$1), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e-127], N[(x + N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7000000.0], N[(N[(t$95$1 + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{y}{b - y} \cdot \frac{x}{z} + \left(\frac{t}{b - y} - \left(\frac{a}{b - y} + \frac{t - a}{z} \cdot \frac{y}{{\left(b - y\right)}^{2}}\right)\right)\\
\mathbf{if}\;z \leq -1.55 \cdot 10^{+16}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-306}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t_1\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-127}:\\
\;\;\;\;x + \frac{t_1}{y}\\
\mathbf{elif}\;z \leq 7000000:\\
\;\;\;\;\frac{t_1 + y \cdot x}{y - z \cdot \left(y - b\right)}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.55e16 or 7e6 < z Initial program 36.6%
Taylor expanded in z around inf 66.3%
associate--l+66.3%
*-commutative66.3%
times-frac75.3%
+-commutative75.3%
times-frac95.1%
Simplified95.1%
if -1.55e16 < z < -1.4000000000000001e-306Initial program 90.4%
fma-def90.4%
+-commutative90.4%
fma-def90.5%
Simplified90.5%
if -1.4000000000000001e-306 < z < 8.5e-127Initial program 79.0%
Taylor expanded in b around inf 79.0%
Taylor expanded in y around inf 77.1%
associate--l+77.1%
associate-/l*75.0%
associate-/l*75.0%
Simplified75.0%
Taylor expanded in b around 0 89.8%
if 8.5e-127 < z < 7e6Initial program 89.0%
Final simplification92.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- y (* z (- y b))))
(t_2 (* z (- t a)))
(t_3 (/ (+ t_2 (* y x)) t_1))
(t_4 (/ (- t a) (- b y))))
(if (<= t_3 (- INFINITY))
(- (/ (- a t) y) (/ x (+ z -1.0)))
(if (<= t_3 -5e-320)
(/ (fma x y t_2) t_1)
(if (<= t_3 0.0)
(+
(/ (+ (/ (* y x) (- b y)) (/ (- a t) (/ (pow (- b y) 2.0) y))) z)
t_4)
(if (<= t_3 2e+162) t_3 t_4))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y - (z * (y - b));
double t_2 = z * (t - a);
double t_3 = (t_2 + (y * x)) / t_1;
double t_4 = (t - a) / (b - y);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if (t_3 <= -5e-320) {
tmp = fma(x, y, t_2) / t_1;
} else if (t_3 <= 0.0) {
tmp = ((((y * x) / (b - y)) + ((a - t) / (pow((b - y), 2.0) / y))) / z) + t_4;
} else if (t_3 <= 2e+162) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y - Float64(z * Float64(y - b))) t_2 = Float64(z * Float64(t - a)) t_3 = Float64(Float64(t_2 + Float64(y * x)) / t_1) t_4 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))); elseif (t_3 <= -5e-320) tmp = Float64(fma(x, y, t_2) / t_1); elseif (t_3 <= 0.0) tmp = Float64(Float64(Float64(Float64(Float64(y * x) / Float64(b - y)) + Float64(Float64(a - t) / Float64((Float64(b - y) ^ 2.0) / y))) / z) + t_4); elseif (t_3 <= 2e+162) tmp = t_3; else tmp = t_4; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -5e-320], N[(N[(x * y + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(N[(N[(N[(N[(y * x), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(a - t), $MachinePrecision] / N[(N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + t$95$4), $MachinePrecision], If[LessEqual[t$95$3, 2e+162], t$95$3, t$95$4]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - z \cdot \left(y - b\right)\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := \frac{t_2 + y \cdot x}{t_1}\\
t_4 := \frac{t - a}{b - y}\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{elif}\;t_3 \leq -5 \cdot 10^{-320}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t_2\right)}{t_1}\\
\mathbf{elif}\;t_3 \leq 0:\\
\;\;\;\;\frac{\frac{y \cdot x}{b - y} + \frac{a - t}{\frac{{\left(b - y\right)}^{2}}{y}}}{z} + t_4\\
\mathbf{elif}\;t_3 \leq 2 \cdot 10^{+162}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 36.0%
Taylor expanded in y around -inf 53.6%
mul-1-neg53.6%
unsub-neg53.6%
mul-1-neg53.6%
distribute-neg-frac53.6%
cancel-sign-sub-inv53.6%
associate-/l*61.5%
metadata-eval61.5%
*-lft-identity61.5%
associate-/l*61.9%
Simplified61.9%
Taylor expanded in z around inf 73.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.99994e-320Initial program 99.2%
fma-def99.2%
Simplified99.2%
if -4.99994e-320 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 11.5%
Taylor expanded in z around -inf 78.9%
+-commutative78.9%
associate--l+78.9%
Simplified85.8%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.9999999999999999e162Initial program 99.5%
if 1.9999999999999999e162 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 13.2%
Taylor expanded in z around inf 66.8%
Final simplification86.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- y (* z (- y b))))
(t_2 (* z (- t a)))
(t_3 (/ (+ t_2 (* y x)) t_1)))
(if (<= t_3 (- INFINITY))
(- (/ (- a t) y) (/ x (+ z -1.0)))
(if (<= t_3 -5e-320)
(/ (fma x y t_2) t_1)
(if (or (<= t_3 0.0) (not (<= t_3 2e+162))) (/ (- t a) (- b y)) t_3)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y - (z * (y - b));
double t_2 = z * (t - a);
double t_3 = (t_2 + (y * x)) / t_1;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if (t_3 <= -5e-320) {
tmp = fma(x, y, t_2) / t_1;
} else if ((t_3 <= 0.0) || !(t_3 <= 2e+162)) {
tmp = (t - a) / (b - y);
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y - Float64(z * Float64(y - b))) t_2 = Float64(z * Float64(t - a)) t_3 = Float64(Float64(t_2 + Float64(y * x)) / t_1) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))); elseif (t_3 <= -5e-320) tmp = Float64(fma(x, y, t_2) / t_1); elseif ((t_3 <= 0.0) || !(t_3 <= 2e+162)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -5e-320], N[(N[(x * y + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision], If[Or[LessEqual[t$95$3, 0.0], N[Not[LessEqual[t$95$3, 2e+162]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - z \cdot \left(y - b\right)\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := \frac{t_2 + y \cdot x}{t_1}\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{elif}\;t_3 \leq -5 \cdot 10^{-320}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t_2\right)}{t_1}\\
\mathbf{elif}\;t_3 \leq 0 \lor \neg \left(t_3 \leq 2 \cdot 10^{+162}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 36.0%
Taylor expanded in y around -inf 53.6%
mul-1-neg53.6%
unsub-neg53.6%
mul-1-neg53.6%
distribute-neg-frac53.6%
cancel-sign-sub-inv53.6%
associate-/l*61.5%
metadata-eval61.5%
*-lft-identity61.5%
associate-/l*61.9%
Simplified61.9%
Taylor expanded in z around inf 73.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.99994e-320Initial program 99.2%
fma-def99.2%
Simplified99.2%
if -4.99994e-320 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or 1.9999999999999999e162 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 12.9%
Taylor expanded in z around inf 68.8%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.9999999999999999e162Initial program 99.5%
Final simplification86.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (/ (+ t_1 (* y x)) (- y (* z (- y b)))))
(t_3
(+
(* (/ y (- b y)) (/ x z))
(-
(/ t (- b y))
(+ (/ a (- b y)) (* (/ (- t a) z) (/ y (pow (- b y) 2.0))))))))
(if (<= z -37000000000000.0)
t_3
(if (<= z -2.6e-306)
t_2
(if (<= z 5.5e-127) (+ x (/ t_1 y)) (if (<= z 47000000.0) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (t_1 + (y * x)) / (y - (z * (y - b)));
double t_3 = ((y / (b - y)) * (x / z)) + ((t / (b - y)) - ((a / (b - y)) + (((t - a) / z) * (y / pow((b - y), 2.0)))));
double tmp;
if (z <= -37000000000000.0) {
tmp = t_3;
} else if (z <= -2.6e-306) {
tmp = t_2;
} else if (z <= 5.5e-127) {
tmp = x + (t_1 / y);
} else if (z <= 47000000.0) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = z * (t - a)
t_2 = (t_1 + (y * x)) / (y - (z * (y - b)))
t_3 = ((y / (b - y)) * (x / z)) + ((t / (b - y)) - ((a / (b - y)) + (((t - a) / z) * (y / ((b - y) ** 2.0d0)))))
if (z <= (-37000000000000.0d0)) then
tmp = t_3
else if (z <= (-2.6d-306)) then
tmp = t_2
else if (z <= 5.5d-127) then
tmp = x + (t_1 / y)
else if (z <= 47000000.0d0) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (t_1 + (y * x)) / (y - (z * (y - b)));
double t_3 = ((y / (b - y)) * (x / z)) + ((t / (b - y)) - ((a / (b - y)) + (((t - a) / z) * (y / Math.pow((b - y), 2.0)))));
double tmp;
if (z <= -37000000000000.0) {
tmp = t_3;
} else if (z <= -2.6e-306) {
tmp = t_2;
} else if (z <= 5.5e-127) {
tmp = x + (t_1 / y);
} else if (z <= 47000000.0) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = (t_1 + (y * x)) / (y - (z * (y - b))) t_3 = ((y / (b - y)) * (x / z)) + ((t / (b - y)) - ((a / (b - y)) + (((t - a) / z) * (y / math.pow((b - y), 2.0))))) tmp = 0 if z <= -37000000000000.0: tmp = t_3 elif z <= -2.6e-306: tmp = t_2 elif z <= 5.5e-127: tmp = x + (t_1 / y) elif z <= 47000000.0: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(t_1 + Float64(y * x)) / Float64(y - Float64(z * Float64(y - b)))) t_3 = Float64(Float64(Float64(y / Float64(b - y)) * Float64(x / z)) + Float64(Float64(t / Float64(b - y)) - Float64(Float64(a / Float64(b - y)) + Float64(Float64(Float64(t - a) / z) * Float64(y / (Float64(b - y) ^ 2.0)))))) tmp = 0.0 if (z <= -37000000000000.0) tmp = t_3; elseif (z <= -2.6e-306) tmp = t_2; elseif (z <= 5.5e-127) tmp = Float64(x + Float64(t_1 / y)); elseif (z <= 47000000.0) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = (t_1 + (y * x)) / (y - (z * (y - b))); t_3 = ((y / (b - y)) * (x / z)) + ((t / (b - y)) - ((a / (b - y)) + (((t - a) / z) * (y / ((b - y) ^ 2.0))))); tmp = 0.0; if (z <= -37000000000000.0) tmp = t_3; elseif (z <= -2.6e-306) tmp = t_2; elseif (z <= 5.5e-127) tmp = x + (t_1 / y); elseif (z <= 47000000.0) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t - a), $MachinePrecision] / z), $MachinePrecision] * N[(y / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -37000000000000.0], t$95$3, If[LessEqual[z, -2.6e-306], t$95$2, If[LessEqual[z, 5.5e-127], N[(x + N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 47000000.0], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{t_1 + y \cdot x}{y - z \cdot \left(y - b\right)}\\
t_3 := \frac{y}{b - y} \cdot \frac{x}{z} + \left(\frac{t}{b - y} - \left(\frac{a}{b - y} + \frac{t - a}{z} \cdot \frac{y}{{\left(b - y\right)}^{2}}\right)\right)\\
\mathbf{if}\;z \leq -37000000000000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-306}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-127}:\\
\;\;\;\;x + \frac{t_1}{y}\\
\mathbf{elif}\;z \leq 47000000:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -3.7e13 or 4.7e7 < z Initial program 37.2%
Taylor expanded in z around inf 66.6%
associate--l+66.6%
*-commutative66.6%
times-frac75.5%
+-commutative75.5%
times-frac95.2%
Simplified95.2%
if -3.7e13 < z < -2.6e-306 or 5.50000000000000036e-127 < z < 4.7e7Initial program 89.9%
if -2.6e-306 < z < 5.50000000000000036e-127Initial program 79.0%
Taylor expanded in b around inf 79.0%
Taylor expanded in y around inf 77.1%
associate--l+77.1%
associate-/l*75.0%
associate-/l*75.0%
Simplified75.0%
Taylor expanded in b around 0 89.8%
Final simplification92.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* z (- t a)) (* y x)) (- y (* z (- y b))))))
(if (<= t_1 (- INFINITY))
(- (/ (- a t) y) (/ x (+ z -1.0)))
(if (or (<= t_1 -5e-320) (and (not (<= t_1 0.0)) (<= t_1 2e+162)))
t_1
(/ (- t a) (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((z * (t - a)) + (y * x)) / (y - (z * (y - b)));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if ((t_1 <= -5e-320) || (!(t_1 <= 0.0) && (t_1 <= 2e+162))) {
tmp = t_1;
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((z * (t - a)) + (y * x)) / (y - (z * (y - b)));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = ((a - t) / y) - (x / (z + -1.0));
} else if ((t_1 <= -5e-320) || (!(t_1 <= 0.0) && (t_1 <= 2e+162))) {
tmp = t_1;
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((z * (t - a)) + (y * x)) / (y - (z * (y - b))) tmp = 0 if t_1 <= -math.inf: tmp = ((a - t) / y) - (x / (z + -1.0)) elif (t_1 <= -5e-320) or (not (t_1 <= 0.0) and (t_1 <= 2e+162)): tmp = t_1 else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / Float64(y - Float64(z * Float64(y - b)))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))); elseif ((t_1 <= -5e-320) || (!(t_1 <= 0.0) && (t_1 <= 2e+162))) tmp = t_1; else tmp = Float64(Float64(t - a) / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((z * (t - a)) + (y * x)) / (y - (z * (y - b))); tmp = 0.0; if (t_1 <= -Inf) tmp = ((a - t) / y) - (x / (z + -1.0)); elseif ((t_1 <= -5e-320) || (~((t_1 <= 0.0)) && (t_1 <= 2e+162))) tmp = t_1; else tmp = (t - a) / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, -5e-320], And[N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision], LessEqual[t$95$1, 2e+162]]], t$95$1, N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(t - a\right) + y \cdot x}{y - z \cdot \left(y - b\right)}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-320} \lor \neg \left(t_1 \leq 0\right) \land t_1 \leq 2 \cdot 10^{+162}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 36.0%
Taylor expanded in y around -inf 53.6%
mul-1-neg53.6%
unsub-neg53.6%
mul-1-neg53.6%
distribute-neg-frac53.6%
cancel-sign-sub-inv53.6%
associate-/l*61.5%
metadata-eval61.5%
*-lft-identity61.5%
associate-/l*61.9%
Simplified61.9%
Taylor expanded in z around inf 73.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.99994e-320 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.9999999999999999e162Initial program 99.3%
if -4.99994e-320 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or 1.9999999999999999e162 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 12.9%
Taylor expanded in z around inf 68.8%
Final simplification86.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a))) (t_2 (+ x (/ t_1 y))) (t_3 (/ (- t a) (- b y))))
(if (<= z -3.15e-46)
t_3
(if (<= z -6.6e-84)
t_2
(if (<= z -3.4e-120)
(/ (- t a) b)
(if (<= z 5.2e-99)
t_2
(if (<= z 1e+15) (/ t_1 (- y (* z (- y b)))) t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = x + (t_1 / y);
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -3.15e-46) {
tmp = t_3;
} else if (z <= -6.6e-84) {
tmp = t_2;
} else if (z <= -3.4e-120) {
tmp = (t - a) / b;
} else if (z <= 5.2e-99) {
tmp = t_2;
} else if (z <= 1e+15) {
tmp = t_1 / (y - (z * (y - b)));
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = z * (t - a)
t_2 = x + (t_1 / y)
t_3 = (t - a) / (b - y)
if (z <= (-3.15d-46)) then
tmp = t_3
else if (z <= (-6.6d-84)) then
tmp = t_2
else if (z <= (-3.4d-120)) then
tmp = (t - a) / b
else if (z <= 5.2d-99) then
tmp = t_2
else if (z <= 1d+15) then
tmp = t_1 / (y - (z * (y - b)))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = x + (t_1 / y);
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -3.15e-46) {
tmp = t_3;
} else if (z <= -6.6e-84) {
tmp = t_2;
} else if (z <= -3.4e-120) {
tmp = (t - a) / b;
} else if (z <= 5.2e-99) {
tmp = t_2;
} else if (z <= 1e+15) {
tmp = t_1 / (y - (z * (y - b)));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = x + (t_1 / y) t_3 = (t - a) / (b - y) tmp = 0 if z <= -3.15e-46: tmp = t_3 elif z <= -6.6e-84: tmp = t_2 elif z <= -3.4e-120: tmp = (t - a) / b elif z <= 5.2e-99: tmp = t_2 elif z <= 1e+15: tmp = t_1 / (y - (z * (y - b))) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(x + Float64(t_1 / y)) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3.15e-46) tmp = t_3; elseif (z <= -6.6e-84) tmp = t_2; elseif (z <= -3.4e-120) tmp = Float64(Float64(t - a) / b); elseif (z <= 5.2e-99) tmp = t_2; elseif (z <= 1e+15) tmp = Float64(t_1 / Float64(y - Float64(z * Float64(y - b)))); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = x + (t_1 / y); t_3 = (t - a) / (b - y); tmp = 0.0; if (z <= -3.15e-46) tmp = t_3; elseif (z <= -6.6e-84) tmp = t_2; elseif (z <= -3.4e-120) tmp = (t - a) / b; elseif (z <= 5.2e-99) tmp = t_2; elseif (z <= 1e+15) tmp = t_1 / (y - (z * (y - b))); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.15e-46], t$95$3, If[LessEqual[z, -6.6e-84], t$95$2, If[LessEqual[z, -3.4e-120], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 5.2e-99], t$95$2, If[LessEqual[z, 1e+15], N[(t$95$1 / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := x + \frac{t_1}{y}\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.15 \cdot 10^{-46}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -6.6 \cdot 10^{-84}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{-120}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-99}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 10^{+15}:\\
\;\;\;\;\frac{t_1}{y - z \cdot \left(y - b\right)}\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -3.15e-46 or 1e15 < z Initial program 40.3%
Taylor expanded in z around inf 77.4%
if -3.15e-46 < z < -6.59999999999999968e-84 or -3.4000000000000001e-120 < z < 5.2000000000000001e-99Initial program 85.0%
Taylor expanded in b around inf 85.0%
Taylor expanded in y around inf 72.0%
associate--l+72.0%
associate-/l*71.1%
associate-/l*70.1%
Simplified70.1%
Taylor expanded in b around 0 78.2%
if -6.59999999999999968e-84 < z < -3.4000000000000001e-120Initial program 85.8%
Taylor expanded in y around 0 72.3%
if 5.2000000000000001e-99 < z < 1e15Initial program 90.5%
fma-def90.5%
+-commutative90.5%
fma-def90.5%
Simplified90.5%
Taylor expanded in x around 0 70.8%
Final simplification77.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (/ (+ t_1 (* y x)) (+ y (* z b))))
(t_3 (/ (- t a) (- b y))))
(if (<= z -46000.0)
t_3
(if (<= z -1.32e-306)
t_2
(if (<= z 3.2e-122) (+ x (/ t_1 y)) (if (<= z 3.3e+17) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (t_1 + (y * x)) / (y + (z * b));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -46000.0) {
tmp = t_3;
} else if (z <= -1.32e-306) {
tmp = t_2;
} else if (z <= 3.2e-122) {
tmp = x + (t_1 / y);
} else if (z <= 3.3e+17) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = z * (t - a)
t_2 = (t_1 + (y * x)) / (y + (z * b))
t_3 = (t - a) / (b - y)
if (z <= (-46000.0d0)) then
tmp = t_3
else if (z <= (-1.32d-306)) then
tmp = t_2
else if (z <= 3.2d-122) then
tmp = x + (t_1 / y)
else if (z <= 3.3d+17) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (t_1 + (y * x)) / (y + (z * b));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -46000.0) {
tmp = t_3;
} else if (z <= -1.32e-306) {
tmp = t_2;
} else if (z <= 3.2e-122) {
tmp = x + (t_1 / y);
} else if (z <= 3.3e+17) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = (t_1 + (y * x)) / (y + (z * b)) t_3 = (t - a) / (b - y) tmp = 0 if z <= -46000.0: tmp = t_3 elif z <= -1.32e-306: tmp = t_2 elif z <= 3.2e-122: tmp = x + (t_1 / y) elif z <= 3.3e+17: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(t_1 + Float64(y * x)) / Float64(y + Float64(z * b))) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -46000.0) tmp = t_3; elseif (z <= -1.32e-306) tmp = t_2; elseif (z <= 3.2e-122) tmp = Float64(x + Float64(t_1 / y)); elseif (z <= 3.3e+17) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = (t_1 + (y * x)) / (y + (z * b)); t_3 = (t - a) / (b - y); tmp = 0.0; if (z <= -46000.0) tmp = t_3; elseif (z <= -1.32e-306) tmp = t_2; elseif (z <= 3.2e-122) tmp = x + (t_1 / y); elseif (z <= 3.3e+17) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -46000.0], t$95$3, If[LessEqual[z, -1.32e-306], t$95$2, If[LessEqual[z, 3.2e-122], N[(x + N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e+17], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{t_1 + y \cdot x}{y + z \cdot b}\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -46000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -1.32 \cdot 10^{-306}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-122}:\\
\;\;\;\;x + \frac{t_1}{y}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+17}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -46000 or 3.3e17 < z Initial program 38.9%
Taylor expanded in z around inf 78.6%
if -46000 < z < -1.32e-306 or 3.2000000000000002e-122 < z < 3.3e17Initial program 88.6%
Taylor expanded in b around inf 88.4%
if -1.32e-306 < z < 3.2000000000000002e-122Initial program 79.0%
Taylor expanded in b around inf 79.0%
Taylor expanded in y around inf 77.1%
associate--l+77.1%
associate-/l*75.0%
associate-/l*75.0%
Simplified75.0%
Taylor expanded in b around 0 89.8%
Final simplification83.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a))) (t_2 (/ (- t a) (- b y))))
(if (<= z -5.2e-31)
t_2
(if (<= z -8.2e-303)
(/ (- (* y x) (* z a)) (+ y (* z b)))
(if (<= z 4.7e-99)
(+ x (/ t_1 y))
(if (<= z 13500000000000.0) (/ t_1 (- y (* z (- y b)))) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -5.2e-31) {
tmp = t_2;
} else if (z <= -8.2e-303) {
tmp = ((y * x) - (z * a)) / (y + (z * b));
} else if (z <= 4.7e-99) {
tmp = x + (t_1 / y);
} else if (z <= 13500000000000.0) {
tmp = t_1 / (y - (z * (y - b)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * (t - a)
t_2 = (t - a) / (b - y)
if (z <= (-5.2d-31)) then
tmp = t_2
else if (z <= (-8.2d-303)) then
tmp = ((y * x) - (z * a)) / (y + (z * b))
else if (z <= 4.7d-99) then
tmp = x + (t_1 / y)
else if (z <= 13500000000000.0d0) then
tmp = t_1 / (y - (z * (y - b)))
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 b) {
double t_1 = z * (t - a);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -5.2e-31) {
tmp = t_2;
} else if (z <= -8.2e-303) {
tmp = ((y * x) - (z * a)) / (y + (z * b));
} else if (z <= 4.7e-99) {
tmp = x + (t_1 / y);
} else if (z <= 13500000000000.0) {
tmp = t_1 / (y - (z * (y - b)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = (t - a) / (b - y) tmp = 0 if z <= -5.2e-31: tmp = t_2 elif z <= -8.2e-303: tmp = ((y * x) - (z * a)) / (y + (z * b)) elif z <= 4.7e-99: tmp = x + (t_1 / y) elif z <= 13500000000000.0: tmp = t_1 / (y - (z * (y - b))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -5.2e-31) tmp = t_2; elseif (z <= -8.2e-303) tmp = Float64(Float64(Float64(y * x) - Float64(z * a)) / Float64(y + Float64(z * b))); elseif (z <= 4.7e-99) tmp = Float64(x + Float64(t_1 / y)); elseif (z <= 13500000000000.0) tmp = Float64(t_1 / Float64(y - Float64(z * Float64(y - b)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -5.2e-31) tmp = t_2; elseif (z <= -8.2e-303) tmp = ((y * x) - (z * a)) / (y + (z * b)); elseif (z <= 4.7e-99) tmp = x + (t_1 / y); elseif (z <= 13500000000000.0) tmp = t_1 / (y - (z * (y - b))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e-31], t$95$2, If[LessEqual[z, -8.2e-303], N[(N[(N[(y * x), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.7e-99], N[(x + N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 13500000000000.0], N[(t$95$1 / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{-31}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-303}:\\
\;\;\;\;\frac{y \cdot x - z \cdot a}{y + z \cdot b}\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-99}:\\
\;\;\;\;x + \frac{t_1}{y}\\
\mathbf{elif}\;z \leq 13500000000000:\\
\;\;\;\;\frac{t_1}{y - z \cdot \left(y - b\right)}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -5.19999999999999991e-31 or 1.35e13 < z Initial program 39.8%
Taylor expanded in z around inf 77.2%
if -5.19999999999999991e-31 < z < -8.20000000000000037e-303Initial program 90.8%
Taylor expanded in t around 0 74.7%
*-commutative74.7%
mul-1-neg74.7%
unsub-neg74.7%
*-commutative74.7%
Simplified74.7%
Taylor expanded in b around inf 74.7%
if -8.20000000000000037e-303 < z < 4.69999999999999989e-99Initial program 79.6%
Taylor expanded in b around inf 79.6%
Taylor expanded in y around inf 72.2%
associate--l+72.2%
associate-/l*72.2%
associate-/l*72.2%
Simplified72.2%
Taylor expanded in b around 0 83.4%
if 4.69999999999999989e-99 < z < 1.35e13Initial program 90.5%
fma-def90.5%
+-commutative90.5%
fma-def90.5%
Simplified90.5%
Taylor expanded in x around 0 70.8%
Final simplification77.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* z (- t a)) y))) (t_2 (/ (- t a) (- b y))))
(if (<= z -4.2e-46)
t_2
(if (<= z -3.3e-84)
t_1
(if (<= z -3.4e-120) (/ (- t a) b) (if (<= z 5.2e-99) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((z * (t - a)) / y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -4.2e-46) {
tmp = t_2;
} else if (z <= -3.3e-84) {
tmp = t_1;
} else if (z <= -3.4e-120) {
tmp = (t - a) / b;
} else if (z <= 5.2e-99) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((z * (t - a)) / y)
t_2 = (t - a) / (b - y)
if (z <= (-4.2d-46)) then
tmp = t_2
else if (z <= (-3.3d-84)) then
tmp = t_1
else if (z <= (-3.4d-120)) then
tmp = (t - a) / b
else if (z <= 5.2d-99) 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 b) {
double t_1 = x + ((z * (t - a)) / y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -4.2e-46) {
tmp = t_2;
} else if (z <= -3.3e-84) {
tmp = t_1;
} else if (z <= -3.4e-120) {
tmp = (t - a) / b;
} else if (z <= 5.2e-99) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((z * (t - a)) / y) t_2 = (t - a) / (b - y) tmp = 0 if z <= -4.2e-46: tmp = t_2 elif z <= -3.3e-84: tmp = t_1 elif z <= -3.4e-120: tmp = (t - a) / b elif z <= 5.2e-99: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(z * Float64(t - a)) / y)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -4.2e-46) tmp = t_2; elseif (z <= -3.3e-84) tmp = t_1; elseif (z <= -3.4e-120) tmp = Float64(Float64(t - a) / b); elseif (z <= 5.2e-99) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((z * (t - a)) / y); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -4.2e-46) tmp = t_2; elseif (z <= -3.3e-84) tmp = t_1; elseif (z <= -3.4e-120) tmp = (t - a) / b; elseif (z <= 5.2e-99) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e-46], t$95$2, If[LessEqual[z, -3.3e-84], t$95$1, If[LessEqual[z, -3.4e-120], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 5.2e-99], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z \cdot \left(t - a\right)}{y}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{-46}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-84}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{-120}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-99}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -4.19999999999999975e-46 or 5.2000000000000001e-99 < z Initial program 47.3%
Taylor expanded in z around inf 73.6%
if -4.19999999999999975e-46 < z < -3.29999999999999984e-84 or -3.4000000000000001e-120 < z < 5.2000000000000001e-99Initial program 85.0%
Taylor expanded in b around inf 85.0%
Taylor expanded in y around inf 72.0%
associate--l+72.0%
associate-/l*71.1%
associate-/l*70.1%
Simplified70.1%
Taylor expanded in b around 0 78.2%
if -3.29999999999999984e-84 < z < -3.4000000000000001e-120Initial program 85.8%
Taylor expanded in y around 0 72.3%
Final simplification75.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a) b)))
(if (<= y -1.15e+38)
x
(if (<= y -3e-45)
t_1
(if (<= y -6.6e-62)
(* t (/ z y))
(if (<= y 8.2e-269) (/ t b) (if (<= y 2.2e-27) t_1 x)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (y <= -1.15e+38) {
tmp = x;
} else if (y <= -3e-45) {
tmp = t_1;
} else if (y <= -6.6e-62) {
tmp = t * (z / y);
} else if (y <= 8.2e-269) {
tmp = t / b;
} else if (y <= 2.2e-27) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = -a / b
if (y <= (-1.15d+38)) then
tmp = x
else if (y <= (-3d-45)) then
tmp = t_1
else if (y <= (-6.6d-62)) then
tmp = t * (z / y)
else if (y <= 8.2d-269) then
tmp = t / b
else if (y <= 2.2d-27) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (y <= -1.15e+38) {
tmp = x;
} else if (y <= -3e-45) {
tmp = t_1;
} else if (y <= -6.6e-62) {
tmp = t * (z / y);
} else if (y <= 8.2e-269) {
tmp = t / b;
} else if (y <= 2.2e-27) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -a / b tmp = 0 if y <= -1.15e+38: tmp = x elif y <= -3e-45: tmp = t_1 elif y <= -6.6e-62: tmp = t * (z / y) elif y <= 8.2e-269: tmp = t / b elif y <= 2.2e-27: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-a) / b) tmp = 0.0 if (y <= -1.15e+38) tmp = x; elseif (y <= -3e-45) tmp = t_1; elseif (y <= -6.6e-62) tmp = Float64(t * Float64(z / y)); elseif (y <= 8.2e-269) tmp = Float64(t / b); elseif (y <= 2.2e-27) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -a / b; tmp = 0.0; if (y <= -1.15e+38) tmp = x; elseif (y <= -3e-45) tmp = t_1; elseif (y <= -6.6e-62) tmp = t * (z / y); elseif (y <= 8.2e-269) tmp = t / b; elseif (y <= 2.2e-27) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) / b), $MachinePrecision]}, If[LessEqual[y, -1.15e+38], x, If[LessEqual[y, -3e-45], t$95$1, If[LessEqual[y, -6.6e-62], N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.2e-269], N[(t / b), $MachinePrecision], If[LessEqual[y, 2.2e-27], t$95$1, x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-a}{b}\\
\mathbf{if}\;y \leq -1.15 \cdot 10^{+38}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -3 \cdot 10^{-45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -6.6 \cdot 10^{-62}:\\
\;\;\;\;t \cdot \frac{z}{y}\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-269}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-27}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.1500000000000001e38 or 2.19999999999999987e-27 < y Initial program 51.9%
Taylor expanded in z around 0 41.3%
if -1.1500000000000001e38 < y < -3.00000000000000011e-45 or 8.2000000000000006e-269 < y < 2.19999999999999987e-27Initial program 72.1%
Taylor expanded in t around 0 50.0%
*-commutative50.0%
mul-1-neg50.0%
unsub-neg50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in y around 0 44.8%
associate-*r/44.8%
neg-mul-144.8%
Simplified44.8%
if -3.00000000000000011e-45 < y < -6.60000000000000009e-62Initial program 100.0%
Taylor expanded in t around inf 57.9%
associate-/l*57.9%
+-commutative57.9%
*-commutative57.9%
fma-def57.9%
Simplified57.9%
Taylor expanded in z around 0 57.9%
Taylor expanded in t around 0 57.9%
associate-/l*57.9%
*-rgt-identity57.9%
associate-*r/57.3%
associate-/r/57.9%
associate-*l/57.9%
associate-*r/57.9%
*-lft-identity57.9%
Simplified57.9%
if -6.60000000000000009e-62 < y < 8.2000000000000006e-269Initial program 74.7%
Taylor expanded in t around inf 44.3%
associate-/l*50.0%
+-commutative50.0%
*-commutative50.0%
fma-def50.0%
Simplified50.0%
Taylor expanded in b around inf 48.3%
Final simplification44.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a) b)))
(if (<= y -6.2e+38)
(+ x (* z x))
(if (<= y -3.8e-45)
t_1
(if (<= y -6.4e-62)
(* t (/ z y))
(if (<= y 6.5e-269) (/ t b) (if (<= y 1.1e-27) t_1 x)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (y <= -6.2e+38) {
tmp = x + (z * x);
} else if (y <= -3.8e-45) {
tmp = t_1;
} else if (y <= -6.4e-62) {
tmp = t * (z / y);
} else if (y <= 6.5e-269) {
tmp = t / b;
} else if (y <= 1.1e-27) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = -a / b
if (y <= (-6.2d+38)) then
tmp = x + (z * x)
else if (y <= (-3.8d-45)) then
tmp = t_1
else if (y <= (-6.4d-62)) then
tmp = t * (z / y)
else if (y <= 6.5d-269) then
tmp = t / b
else if (y <= 1.1d-27) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (y <= -6.2e+38) {
tmp = x + (z * x);
} else if (y <= -3.8e-45) {
tmp = t_1;
} else if (y <= -6.4e-62) {
tmp = t * (z / y);
} else if (y <= 6.5e-269) {
tmp = t / b;
} else if (y <= 1.1e-27) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -a / b tmp = 0 if y <= -6.2e+38: tmp = x + (z * x) elif y <= -3.8e-45: tmp = t_1 elif y <= -6.4e-62: tmp = t * (z / y) elif y <= 6.5e-269: tmp = t / b elif y <= 1.1e-27: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-a) / b) tmp = 0.0 if (y <= -6.2e+38) tmp = Float64(x + Float64(z * x)); elseif (y <= -3.8e-45) tmp = t_1; elseif (y <= -6.4e-62) tmp = Float64(t * Float64(z / y)); elseif (y <= 6.5e-269) tmp = Float64(t / b); elseif (y <= 1.1e-27) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -a / b; tmp = 0.0; if (y <= -6.2e+38) tmp = x + (z * x); elseif (y <= -3.8e-45) tmp = t_1; elseif (y <= -6.4e-62) tmp = t * (z / y); elseif (y <= 6.5e-269) tmp = t / b; elseif (y <= 1.1e-27) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) / b), $MachinePrecision]}, If[LessEqual[y, -6.2e+38], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.8e-45], t$95$1, If[LessEqual[y, -6.4e-62], N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e-269], N[(t / b), $MachinePrecision], If[LessEqual[y, 1.1e-27], t$95$1, x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-a}{b}\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{+38}:\\
\;\;\;\;x + z \cdot x\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -6.4 \cdot 10^{-62}:\\
\;\;\;\;t \cdot \frac{z}{y}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-269}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-27}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.20000000000000035e38Initial program 47.1%
Taylor expanded in y around inf 52.9%
+-commutative52.9%
mul-1-neg52.9%
unsub-neg52.9%
Simplified52.9%
Taylor expanded in z around 0 44.3%
if -6.20000000000000035e38 < y < -3.79999999999999997e-45 or 6.50000000000000006e-269 < y < 1.09999999999999993e-27Initial program 72.1%
Taylor expanded in t around 0 50.0%
*-commutative50.0%
mul-1-neg50.0%
unsub-neg50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in y around 0 44.8%
associate-*r/44.8%
neg-mul-144.8%
Simplified44.8%
if -3.79999999999999997e-45 < y < -6.40000000000000043e-62Initial program 100.0%
Taylor expanded in t around inf 57.9%
associate-/l*57.9%
+-commutative57.9%
*-commutative57.9%
fma-def57.9%
Simplified57.9%
Taylor expanded in z around 0 57.9%
Taylor expanded in t around 0 57.9%
associate-/l*57.9%
*-rgt-identity57.9%
associate-*r/57.3%
associate-/r/57.9%
associate-*l/57.9%
associate-*r/57.9%
*-lft-identity57.9%
Simplified57.9%
if -6.40000000000000043e-62 < y < 6.50000000000000006e-269Initial program 74.7%
Taylor expanded in t around inf 44.3%
associate-/l*50.0%
+-commutative50.0%
*-commutative50.0%
fma-def50.0%
Simplified50.0%
Taylor expanded in b around inf 48.3%
if 1.09999999999999993e-27 < y Initial program 55.9%
Taylor expanded in z around 0 39.0%
Final simplification44.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -5.5e+27)
t_1
(if (<= y 7e-269) (/ t (- b y)) (if (<= y 1.3e-27) (/ (- a) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -5.5e+27) {
tmp = t_1;
} else if (y <= 7e-269) {
tmp = t / (b - y);
} else if (y <= 1.3e-27) {
tmp = -a / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-5.5d+27)) then
tmp = t_1
else if (y <= 7d-269) then
tmp = t / (b - y)
else if (y <= 1.3d-27) then
tmp = -a / b
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 b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -5.5e+27) {
tmp = t_1;
} else if (y <= 7e-269) {
tmp = t / (b - y);
} else if (y <= 1.3e-27) {
tmp = -a / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -5.5e+27: tmp = t_1 elif y <= 7e-269: tmp = t / (b - y) elif y <= 1.3e-27: tmp = -a / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -5.5e+27) tmp = t_1; elseif (y <= 7e-269) tmp = Float64(t / Float64(b - y)); elseif (y <= 1.3e-27) tmp = Float64(Float64(-a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -5.5e+27) tmp = t_1; elseif (y <= 7e-269) tmp = t / (b - y); elseif (y <= 1.3e-27) tmp = -a / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e+27], t$95$1, If[LessEqual[y, 7e-269], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-27], N[((-a) / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-269}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-27}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -5.49999999999999966e27 or 1.30000000000000009e-27 < y Initial program 51.5%
Taylor expanded in y around inf 56.3%
+-commutative56.3%
mul-1-neg56.3%
unsub-neg56.3%
Simplified56.3%
if -5.49999999999999966e27 < y < 7.00000000000000038e-269Initial program 71.9%
Taylor expanded in t around inf 39.5%
associate-/l*47.5%
+-commutative47.5%
*-commutative47.5%
fma-def47.5%
Simplified47.5%
Taylor expanded in z around inf 45.6%
if 7.00000000000000038e-269 < y < 1.30000000000000009e-27Initial program 79.2%
Taylor expanded in t around 0 53.8%
*-commutative53.8%
mul-1-neg53.8%
unsub-neg53.8%
*-commutative53.8%
Simplified53.8%
Taylor expanded in y around 0 48.6%
associate-*r/48.6%
neg-mul-148.6%
Simplified48.6%
Final simplification51.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.35e+163) (not (<= y 2.7e-27))) (/ x (- 1.0 z)) (/ (- t a) (- b y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.35e+163) || !(y <= 2.7e-27)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.35d+163)) .or. (.not. (y <= 2.7d-27))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / (b - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.35e+163) || !(y <= 2.7e-27)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.35e+163) or not (y <= 2.7e-27): tmp = x / (1.0 - z) else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.35e+163) || !(y <= 2.7e-27)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.35e+163) || ~((y <= 2.7e-27))) tmp = x / (1.0 - z); else tmp = (t - a) / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.35e+163], N[Not[LessEqual[y, 2.7e-27]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{+163} \lor \neg \left(y \leq 2.7 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\end{array}
\end{array}
if y < -1.35e163 or 2.69999999999999989e-27 < y Initial program 51.6%
Taylor expanded in y around inf 62.0%
+-commutative62.0%
mul-1-neg62.0%
unsub-neg62.0%
Simplified62.0%
if -1.35e163 < y < 2.69999999999999989e-27Initial program 69.3%
Taylor expanded in z around inf 67.0%
Final simplification65.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -20000.0) x (if (<= y 8.2e-269) (/ t b) (if (<= y 1.25e-27) (/ (- a) b) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -20000.0) {
tmp = x;
} else if (y <= 8.2e-269) {
tmp = t / b;
} else if (y <= 1.25e-27) {
tmp = -a / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if (y <= (-20000.0d0)) then
tmp = x
else if (y <= 8.2d-269) then
tmp = t / b
else if (y <= 1.25d-27) then
tmp = -a / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -20000.0) {
tmp = x;
} else if (y <= 8.2e-269) {
tmp = t / b;
} else if (y <= 1.25e-27) {
tmp = -a / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -20000.0: tmp = x elif y <= 8.2e-269: tmp = t / b elif y <= 1.25e-27: tmp = -a / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -20000.0) tmp = x; elseif (y <= 8.2e-269) tmp = Float64(t / b); elseif (y <= 1.25e-27) tmp = Float64(Float64(-a) / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -20000.0) tmp = x; elseif (y <= 8.2e-269) tmp = t / b; elseif (y <= 1.25e-27) tmp = -a / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -20000.0], x, If[LessEqual[y, 8.2e-269], N[(t / b), $MachinePrecision], If[LessEqual[y, 1.25e-27], N[((-a) / b), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -20000:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-269}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-27}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2e4 or 1.25e-27 < y Initial program 51.5%
Taylor expanded in z around 0 40.0%
if -2e4 < y < 8.2000000000000006e-269Initial program 73.0%
Taylor expanded in t around inf 40.1%
associate-/l*48.6%
+-commutative48.6%
*-commutative48.6%
fma-def48.6%
Simplified48.6%
Taylor expanded in b around inf 42.4%
if 8.2000000000000006e-269 < y < 1.25e-27Initial program 79.2%
Taylor expanded in t around 0 53.8%
*-commutative53.8%
mul-1-neg53.8%
unsub-neg53.8%
*-commutative53.8%
Simplified53.8%
Taylor expanded in y around 0 48.6%
associate-*r/48.6%
neg-mul-148.6%
Simplified48.6%
Final simplification42.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -6.2e+38) (+ x (* z x)) (if (<= y 8.2e-269) (/ t (- b y)) (if (<= y 1.15e-27) (/ (- a) b) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.2e+38) {
tmp = x + (z * x);
} else if (y <= 8.2e-269) {
tmp = t / (b - y);
} else if (y <= 1.15e-27) {
tmp = -a / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if (y <= (-6.2d+38)) then
tmp = x + (z * x)
else if (y <= 8.2d-269) then
tmp = t / (b - y)
else if (y <= 1.15d-27) then
tmp = -a / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.2e+38) {
tmp = x + (z * x);
} else if (y <= 8.2e-269) {
tmp = t / (b - y);
} else if (y <= 1.15e-27) {
tmp = -a / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6.2e+38: tmp = x + (z * x) elif y <= 8.2e-269: tmp = t / (b - y) elif y <= 1.15e-27: tmp = -a / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6.2e+38) tmp = Float64(x + Float64(z * x)); elseif (y <= 8.2e-269) tmp = Float64(t / Float64(b - y)); elseif (y <= 1.15e-27) tmp = Float64(Float64(-a) / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -6.2e+38) tmp = x + (z * x); elseif (y <= 8.2e-269) tmp = t / (b - y); elseif (y <= 1.15e-27) tmp = -a / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.2e+38], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.2e-269], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e-27], N[((-a) / b), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+38}:\\
\;\;\;\;x + z \cdot x\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-269}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-27}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.20000000000000035e38Initial program 47.1%
Taylor expanded in y around inf 52.9%
+-commutative52.9%
mul-1-neg52.9%
unsub-neg52.9%
Simplified52.9%
Taylor expanded in z around 0 44.3%
if -6.20000000000000035e38 < y < 8.2000000000000006e-269Initial program 71.0%
Taylor expanded in t around inf 39.0%
associate-/l*47.0%
+-commutative47.0%
*-commutative47.0%
fma-def47.0%
Simplified47.0%
Taylor expanded in z around inf 45.1%
if 8.2000000000000006e-269 < y < 1.15e-27Initial program 79.2%
Taylor expanded in t around 0 53.8%
*-commutative53.8%
mul-1-neg53.8%
unsub-neg53.8%
*-commutative53.8%
Simplified53.8%
Taylor expanded in y around 0 48.6%
associate-*r/48.6%
neg-mul-148.6%
Simplified48.6%
if 1.15e-27 < y Initial program 55.9%
Taylor expanded in z around 0 39.0%
Final simplification43.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.7e+38) (not (<= y 3.1e-27))) (/ x (- 1.0 z)) (/ (- t a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.7e+38) || !(y <= 3.1e-27)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((y <= (-2.7d+38)) .or. (.not. (y <= 3.1d-27))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.7e+38) || !(y <= 3.1e-27)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.7e+38) or not (y <= 3.1e-27): tmp = x / (1.0 - z) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.7e+38) || !(y <= 3.1e-27)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.7e+38) || ~((y <= 3.1e-27))) tmp = x / (1.0 - z); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.7e+38], N[Not[LessEqual[y, 3.1e-27]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+38} \lor \neg \left(y \leq 3.1 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -2.69999999999999996e38 or 3.0999999999999998e-27 < y Initial program 51.9%
Taylor expanded in y around inf 56.7%
+-commutative56.7%
mul-1-neg56.7%
unsub-neg56.7%
Simplified56.7%
if -2.69999999999999996e38 < y < 3.0999999999999998e-27Initial program 74.0%
Taylor expanded in y around 0 61.7%
Final simplification59.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -13500.0) x (if (<= y 4.8e-108) (/ t b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -13500.0) {
tmp = x;
} else if (y <= 4.8e-108) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if (y <= (-13500.0d0)) then
tmp = x
else if (y <= 4.8d-108) then
tmp = t / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -13500.0) {
tmp = x;
} else if (y <= 4.8e-108) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -13500.0: tmp = x elif y <= 4.8e-108: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -13500.0) tmp = x; elseif (y <= 4.8e-108) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -13500.0) tmp = x; elseif (y <= 4.8e-108) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -13500.0], x, If[LessEqual[y, 4.8e-108], N[(t / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -13500:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-108}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -13500 or 4.80000000000000034e-108 < y Initial program 55.0%
Taylor expanded in z around 0 37.6%
if -13500 < y < 4.80000000000000034e-108Initial program 73.8%
Taylor expanded in t around inf 38.6%
associate-/l*46.2%
+-commutative46.2%
*-commutative46.2%
fma-def46.2%
Simplified46.2%
Taylor expanded in b around inf 36.9%
Final simplification37.3%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 62.8%
Taylor expanded in z around 0 24.1%
Final simplification24.1%
(FPCore (x y z t a b) :precision binary64 (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
def code(x, y, z, t, a, b): return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(z * t) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) - Float64(a / Float64(Float64(b - y) + Float64(y / z)))) end
function tmp = code(x, y, z, t, a, b) tmp = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(z * t), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}
\end{array}
herbie shell --seed 2023230
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:herbie-target
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))