
(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 17 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 (/ (- t a) (- b y))))
(if (<= z -1.35e+38)
t_1
(if (<= z 1.16e+51)
(/ (+ (* y x) (* z (- t a))) (- (* z b) (* y (+ z -1.0))))
(+
(+ t_1 (/ (* y (/ x z)) (- b y)))
(/ (/ (- a t) (/ z y)) (pow (- b y) 2.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.35e+38) {
tmp = t_1;
} else if (z <= 1.16e+51) {
tmp = ((y * x) + (z * (t - a))) / ((z * b) - (y * (z + -1.0)));
} else {
tmp = (t_1 + ((y * (x / z)) / (b - y))) + (((a - t) / (z / y)) / pow((b - y), 2.0));
}
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 = (t - a) / (b - y)
if (z <= (-1.35d+38)) then
tmp = t_1
else if (z <= 1.16d+51) then
tmp = ((y * x) + (z * (t - a))) / ((z * b) - (y * (z + (-1.0d0))))
else
tmp = (t_1 + ((y * (x / z)) / (b - y))) + (((a - t) / (z / y)) / ((b - y) ** 2.0d0))
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 = (t - a) / (b - y);
double tmp;
if (z <= -1.35e+38) {
tmp = t_1;
} else if (z <= 1.16e+51) {
tmp = ((y * x) + (z * (t - a))) / ((z * b) - (y * (z + -1.0)));
} else {
tmp = (t_1 + ((y * (x / z)) / (b - y))) + (((a - t) / (z / y)) / Math.pow((b - y), 2.0));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.35e+38: tmp = t_1 elif z <= 1.16e+51: tmp = ((y * x) + (z * (t - a))) / ((z * b) - (y * (z + -1.0))) else: tmp = (t_1 + ((y * (x / z)) / (b - y))) + (((a - t) / (z / y)) / math.pow((b - y), 2.0)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.35e+38) tmp = t_1; elseif (z <= 1.16e+51) tmp = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / Float64(Float64(z * b) - Float64(y * Float64(z + -1.0)))); else tmp = Float64(Float64(t_1 + Float64(Float64(y * Float64(x / z)) / Float64(b - y))) + Float64(Float64(Float64(a - t) / Float64(z / y)) / (Float64(b - y) ^ 2.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.35e+38) tmp = t_1; elseif (z <= 1.16e+51) tmp = ((y * x) + (z * (t - a))) / ((z * b) - (y * (z + -1.0))); else tmp = (t_1 + ((y * (x / z)) / (b - y))) + (((a - t) / (z / y)) / ((b - y) ^ 2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.35e+38], t$95$1, If[LessEqual[z, 1.16e+51], N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * b), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 + N[(N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(a - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.16 \cdot 10^{+51}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{z \cdot b - y \cdot \left(z + -1\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(t\_1 + \frac{y \cdot \frac{x}{z}}{b - y}\right) + \frac{\frac{a - t}{\frac{z}{y}}}{{\left(b - y\right)}^{2}}\\
\end{array}
\end{array}
if z < -1.34999999999999998e38Initial program 33.0%
Taylor expanded in z around inf 82.9%
if -1.34999999999999998e38 < z < 1.16e51Initial program 83.5%
Taylor expanded in y around -inf 83.6%
+-commutative83.6%
mul-1-neg83.6%
unsub-neg83.6%
*-commutative83.6%
sub-neg83.6%
metadata-eval83.6%
Simplified83.6%
if 1.16e51 < z Initial program 36.9%
Taylor expanded in z around inf 61.4%
associate--r+61.4%
+-commutative61.4%
associate--l+61.4%
times-frac69.8%
associate-*r/71.4%
div-sub73.1%
associate-/r*73.1%
*-commutative73.1%
associate-/l*86.4%
Simplified86.4%
Final simplification84.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (* z b) (* y (+ z -1.0))))
(t_2 (* z (- t a)))
(t_3 (+ (* y x) t_2))
(t_4 (/ (- t a) (- b y)))
(t_5 (/ t_3 y)))
(if (<= z -1.28e+39)
t_4
(if (<= z -2.5e-92)
(/ t_3 (* z (- b y)))
(if (<= z -7.6e-127)
t_5
(if (<= z -9.2e-141)
(/ z (/ t_1 (- t a)))
(if (<= z -1.2e-239)
(/ (* y x) (+ y (* z b)))
(if (<= z 1.02e-82)
t_5
(if (<= z 5.3e-6)
(/ 1.0 (/ t_1 t_2))
(if (<= z 2.15e+40) (/ x (- 1.0 z)) t_4))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * b) - (y * (z + -1.0));
double t_2 = z * (t - a);
double t_3 = (y * x) + t_2;
double t_4 = (t - a) / (b - y);
double t_5 = t_3 / y;
double tmp;
if (z <= -1.28e+39) {
tmp = t_4;
} else if (z <= -2.5e-92) {
tmp = t_3 / (z * (b - y));
} else if (z <= -7.6e-127) {
tmp = t_5;
} else if (z <= -9.2e-141) {
tmp = z / (t_1 / (t - a));
} else if (z <= -1.2e-239) {
tmp = (y * x) / (y + (z * b));
} else if (z <= 1.02e-82) {
tmp = t_5;
} else if (z <= 5.3e-6) {
tmp = 1.0 / (t_1 / t_2);
} else if (z <= 2.15e+40) {
tmp = x / (1.0 - z);
} else {
tmp = t_4;
}
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) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = (z * b) - (y * (z + (-1.0d0)))
t_2 = z * (t - a)
t_3 = (y * x) + t_2
t_4 = (t - a) / (b - y)
t_5 = t_3 / y
if (z <= (-1.28d+39)) then
tmp = t_4
else if (z <= (-2.5d-92)) then
tmp = t_3 / (z * (b - y))
else if (z <= (-7.6d-127)) then
tmp = t_5
else if (z <= (-9.2d-141)) then
tmp = z / (t_1 / (t - a))
else if (z <= (-1.2d-239)) then
tmp = (y * x) / (y + (z * b))
else if (z <= 1.02d-82) then
tmp = t_5
else if (z <= 5.3d-6) then
tmp = 1.0d0 / (t_1 / t_2)
else if (z <= 2.15d+40) then
tmp = x / (1.0d0 - z)
else
tmp = t_4
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 * b) - (y * (z + -1.0));
double t_2 = z * (t - a);
double t_3 = (y * x) + t_2;
double t_4 = (t - a) / (b - y);
double t_5 = t_3 / y;
double tmp;
if (z <= -1.28e+39) {
tmp = t_4;
} else if (z <= -2.5e-92) {
tmp = t_3 / (z * (b - y));
} else if (z <= -7.6e-127) {
tmp = t_5;
} else if (z <= -9.2e-141) {
tmp = z / (t_1 / (t - a));
} else if (z <= -1.2e-239) {
tmp = (y * x) / (y + (z * b));
} else if (z <= 1.02e-82) {
tmp = t_5;
} else if (z <= 5.3e-6) {
tmp = 1.0 / (t_1 / t_2);
} else if (z <= 2.15e+40) {
tmp = x / (1.0 - z);
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * b) - (y * (z + -1.0)) t_2 = z * (t - a) t_3 = (y * x) + t_2 t_4 = (t - a) / (b - y) t_5 = t_3 / y tmp = 0 if z <= -1.28e+39: tmp = t_4 elif z <= -2.5e-92: tmp = t_3 / (z * (b - y)) elif z <= -7.6e-127: tmp = t_5 elif z <= -9.2e-141: tmp = z / (t_1 / (t - a)) elif z <= -1.2e-239: tmp = (y * x) / (y + (z * b)) elif z <= 1.02e-82: tmp = t_5 elif z <= 5.3e-6: tmp = 1.0 / (t_1 / t_2) elif z <= 2.15e+40: tmp = x / (1.0 - z) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * b) - Float64(y * Float64(z + -1.0))) t_2 = Float64(z * Float64(t - a)) t_3 = Float64(Float64(y * x) + t_2) t_4 = Float64(Float64(t - a) / Float64(b - y)) t_5 = Float64(t_3 / y) tmp = 0.0 if (z <= -1.28e+39) tmp = t_4; elseif (z <= -2.5e-92) tmp = Float64(t_3 / Float64(z * Float64(b - y))); elseif (z <= -7.6e-127) tmp = t_5; elseif (z <= -9.2e-141) tmp = Float64(z / Float64(t_1 / Float64(t - a))); elseif (z <= -1.2e-239) tmp = Float64(Float64(y * x) / Float64(y + Float64(z * b))); elseif (z <= 1.02e-82) tmp = t_5; elseif (z <= 5.3e-6) tmp = Float64(1.0 / Float64(t_1 / t_2)); elseif (z <= 2.15e+40) tmp = Float64(x / Float64(1.0 - z)); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * b) - (y * (z + -1.0)); t_2 = z * (t - a); t_3 = (y * x) + t_2; t_4 = (t - a) / (b - y); t_5 = t_3 / y; tmp = 0.0; if (z <= -1.28e+39) tmp = t_4; elseif (z <= -2.5e-92) tmp = t_3 / (z * (b - y)); elseif (z <= -7.6e-127) tmp = t_5; elseif (z <= -9.2e-141) tmp = z / (t_1 / (t - a)); elseif (z <= -1.2e-239) tmp = (y * x) / (y + (z * b)); elseif (z <= 1.02e-82) tmp = t_5; elseif (z <= 5.3e-6) tmp = 1.0 / (t_1 / t_2); elseif (z <= 2.15e+40) tmp = x / (1.0 - z); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * b), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y * x), $MachinePrecision] + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$3 / y), $MachinePrecision]}, If[LessEqual[z, -1.28e+39], t$95$4, If[LessEqual[z, -2.5e-92], N[(t$95$3 / N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.6e-127], t$95$5, If[LessEqual[z, -9.2e-141], N[(z / N[(t$95$1 / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.2e-239], N[(N[(y * x), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e-82], t$95$5, If[LessEqual[z, 5.3e-6], N[(1.0 / N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e+40], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot b - y \cdot \left(z + -1\right)\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := y \cdot x + t\_2\\
t_4 := \frac{t - a}{b - y}\\
t_5 := \frac{t\_3}{y}\\
\mathbf{if}\;z \leq -1.28 \cdot 10^{+39}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-92}:\\
\;\;\;\;\frac{t\_3}{z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq -7.6 \cdot 10^{-127}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;z \leq -9.2 \cdot 10^{-141}:\\
\;\;\;\;\frac{z}{\frac{t\_1}{t - a}}\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot x}{y + z \cdot b}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-82}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{-6}:\\
\;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+40}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if z < -1.27999999999999994e39 or 2.1500000000000001e40 < z Initial program 35.5%
Taylor expanded in z around inf 82.5%
if -1.27999999999999994e39 < z < -2.50000000000000006e-92Initial program 88.6%
Taylor expanded in y around -inf 88.6%
+-commutative88.6%
mul-1-neg88.6%
unsub-neg88.6%
*-commutative88.6%
sub-neg88.6%
metadata-eval88.6%
Simplified88.6%
Taylor expanded in z around inf 72.5%
if -2.50000000000000006e-92 < z < -7.60000000000000005e-127 or -1.19999999999999996e-239 < z < 1.02000000000000007e-82Initial program 84.0%
Taylor expanded in z around 0 69.0%
if -7.60000000000000005e-127 < z < -9.1999999999999998e-141Initial program 76.2%
Taylor expanded in y around -inf 76.2%
+-commutative76.2%
mul-1-neg76.2%
unsub-neg76.2%
*-commutative76.2%
sub-neg76.2%
metadata-eval76.2%
Simplified76.2%
Taylor expanded in x around 0 57.7%
associate-/l*57.7%
*-commutative57.7%
sub-neg57.7%
metadata-eval57.7%
Simplified57.7%
if -9.1999999999999998e-141 < z < -1.19999999999999996e-239Initial program 87.4%
Taylor expanded in x around inf 62.4%
*-commutative62.4%
Simplified62.4%
Taylor expanded in b around inf 62.4%
*-commutative62.4%
Simplified62.4%
if 1.02000000000000007e-82 < z < 5.3000000000000001e-6Initial program 84.4%
Taylor expanded in y around -inf 84.5%
+-commutative84.5%
mul-1-neg84.5%
unsub-neg84.5%
*-commutative84.5%
sub-neg84.5%
metadata-eval84.5%
Simplified84.5%
clear-num84.5%
inv-pow84.5%
fma-def84.5%
Applied egg-rr84.5%
unpow-184.5%
Simplified84.5%
Taylor expanded in x around 0 73.2%
*-commutative73.2%
sub-neg73.2%
metadata-eval73.2%
Simplified73.2%
if 5.3000000000000001e-6 < z < 2.1500000000000001e40Initial program 64.8%
Taylor expanded in y around inf 65.9%
mul-1-neg65.9%
unsub-neg65.9%
Simplified65.9%
Final simplification74.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ z (/ (- (* z b) (* y (+ z -1.0))) (- t a))))
(t_2 (+ (* y x) (* z (- t a))))
(t_3 (/ (- t a) (- b y)))
(t_4 (/ t_2 y)))
(if (<= z -2.2e+38)
t_3
(if (<= z -1.82e-87)
(/ t_2 (* z (- b y)))
(if (<= z -4.6e-128)
t_4
(if (<= z -4.8e-142)
t_1
(if (<= z -1.7e-242)
(/ (* y x) (+ y (* z b)))
(if (<= z 1.26e-83)
t_4
(if (<= z 5.3e-6)
t_1
(if (<= z 2.15e+40) (/ x (- 1.0 z)) t_3))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z / (((z * b) - (y * (z + -1.0))) / (t - a));
double t_2 = (y * x) + (z * (t - a));
double t_3 = (t - a) / (b - y);
double t_4 = t_2 / y;
double tmp;
if (z <= -2.2e+38) {
tmp = t_3;
} else if (z <= -1.82e-87) {
tmp = t_2 / (z * (b - y));
} else if (z <= -4.6e-128) {
tmp = t_4;
} else if (z <= -4.8e-142) {
tmp = t_1;
} else if (z <= -1.7e-242) {
tmp = (y * x) / (y + (z * b));
} else if (z <= 1.26e-83) {
tmp = t_4;
} else if (z <= 5.3e-6) {
tmp = t_1;
} else if (z <= 2.15e+40) {
tmp = x / (1.0 - z);
} 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) :: t_4
real(8) :: tmp
t_1 = z / (((z * b) - (y * (z + (-1.0d0)))) / (t - a))
t_2 = (y * x) + (z * (t - a))
t_3 = (t - a) / (b - y)
t_4 = t_2 / y
if (z <= (-2.2d+38)) then
tmp = t_3
else if (z <= (-1.82d-87)) then
tmp = t_2 / (z * (b - y))
else if (z <= (-4.6d-128)) then
tmp = t_4
else if (z <= (-4.8d-142)) then
tmp = t_1
else if (z <= (-1.7d-242)) then
tmp = (y * x) / (y + (z * b))
else if (z <= 1.26d-83) then
tmp = t_4
else if (z <= 5.3d-6) then
tmp = t_1
else if (z <= 2.15d+40) then
tmp = x / (1.0d0 - z)
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 / (((z * b) - (y * (z + -1.0))) / (t - a));
double t_2 = (y * x) + (z * (t - a));
double t_3 = (t - a) / (b - y);
double t_4 = t_2 / y;
double tmp;
if (z <= -2.2e+38) {
tmp = t_3;
} else if (z <= -1.82e-87) {
tmp = t_2 / (z * (b - y));
} else if (z <= -4.6e-128) {
tmp = t_4;
} else if (z <= -4.8e-142) {
tmp = t_1;
} else if (z <= -1.7e-242) {
tmp = (y * x) / (y + (z * b));
} else if (z <= 1.26e-83) {
tmp = t_4;
} else if (z <= 5.3e-6) {
tmp = t_1;
} else if (z <= 2.15e+40) {
tmp = x / (1.0 - z);
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z / (((z * b) - (y * (z + -1.0))) / (t - a)) t_2 = (y * x) + (z * (t - a)) t_3 = (t - a) / (b - y) t_4 = t_2 / y tmp = 0 if z <= -2.2e+38: tmp = t_3 elif z <= -1.82e-87: tmp = t_2 / (z * (b - y)) elif z <= -4.6e-128: tmp = t_4 elif z <= -4.8e-142: tmp = t_1 elif z <= -1.7e-242: tmp = (y * x) / (y + (z * b)) elif z <= 1.26e-83: tmp = t_4 elif z <= 5.3e-6: tmp = t_1 elif z <= 2.15e+40: tmp = x / (1.0 - z) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z / Float64(Float64(Float64(z * b) - Float64(y * Float64(z + -1.0))) / Float64(t - a))) t_2 = Float64(Float64(y * x) + Float64(z * Float64(t - a))) t_3 = Float64(Float64(t - a) / Float64(b - y)) t_4 = Float64(t_2 / y) tmp = 0.0 if (z <= -2.2e+38) tmp = t_3; elseif (z <= -1.82e-87) tmp = Float64(t_2 / Float64(z * Float64(b - y))); elseif (z <= -4.6e-128) tmp = t_4; elseif (z <= -4.8e-142) tmp = t_1; elseif (z <= -1.7e-242) tmp = Float64(Float64(y * x) / Float64(y + Float64(z * b))); elseif (z <= 1.26e-83) tmp = t_4; elseif (z <= 5.3e-6) tmp = t_1; elseif (z <= 2.15e+40) tmp = Float64(x / Float64(1.0 - z)); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z / (((z * b) - (y * (z + -1.0))) / (t - a)); t_2 = (y * x) + (z * (t - a)); t_3 = (t - a) / (b - y); t_4 = t_2 / y; tmp = 0.0; if (z <= -2.2e+38) tmp = t_3; elseif (z <= -1.82e-87) tmp = t_2 / (z * (b - y)); elseif (z <= -4.6e-128) tmp = t_4; elseif (z <= -4.8e-142) tmp = t_1; elseif (z <= -1.7e-242) tmp = (y * x) / (y + (z * b)); elseif (z <= 1.26e-83) tmp = t_4; elseif (z <= 5.3e-6) tmp = t_1; elseif (z <= 2.15e+40) tmp = x / (1.0 - z); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z / N[(N[(N[(z * b), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 / y), $MachinePrecision]}, If[LessEqual[z, -2.2e+38], t$95$3, If[LessEqual[z, -1.82e-87], N[(t$95$2 / N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.6e-128], t$95$4, If[LessEqual[z, -4.8e-142], t$95$1, If[LessEqual[z, -1.7e-242], N[(N[(y * x), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.26e-83], t$95$4, If[LessEqual[z, 5.3e-6], t$95$1, If[LessEqual[z, 2.15e+40], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{\frac{z \cdot b - y \cdot \left(z + -1\right)}{t - a}}\\
t_2 := y \cdot x + z \cdot \left(t - a\right)\\
t_3 := \frac{t - a}{b - y}\\
t_4 := \frac{t\_2}{y}\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+38}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -1.82 \cdot 10^{-87}:\\
\;\;\;\;\frac{t\_2}{z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{-128}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-242}:\\
\;\;\;\;\frac{y \cdot x}{y + z \cdot b}\\
\mathbf{elif}\;z \leq 1.26 \cdot 10^{-83}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+40}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -2.20000000000000006e38 or 2.1500000000000001e40 < z Initial program 35.5%
Taylor expanded in z around inf 82.5%
if -2.20000000000000006e38 < z < -1.81999999999999993e-87Initial program 88.6%
Taylor expanded in y around -inf 88.6%
+-commutative88.6%
mul-1-neg88.6%
unsub-neg88.6%
*-commutative88.6%
sub-neg88.6%
metadata-eval88.6%
Simplified88.6%
Taylor expanded in z around inf 72.5%
if -1.81999999999999993e-87 < z < -4.6000000000000002e-128 or -1.7e-242 < z < 1.2600000000000001e-83Initial program 84.0%
Taylor expanded in z around 0 69.0%
if -4.6000000000000002e-128 < z < -4.79999999999999976e-142 or 1.2600000000000001e-83 < z < 5.3000000000000001e-6Initial program 82.9%
Taylor expanded in y around -inf 83.0%
+-commutative83.0%
mul-1-neg83.0%
unsub-neg83.0%
*-commutative83.0%
sub-neg83.0%
metadata-eval83.0%
Simplified83.0%
Taylor expanded in x around 0 70.4%
associate-/l*70.0%
*-commutative70.0%
sub-neg70.0%
metadata-eval70.0%
Simplified70.0%
if -4.79999999999999976e-142 < z < -1.7e-242Initial program 87.4%
Taylor expanded in x around inf 62.4%
*-commutative62.4%
Simplified62.4%
Taylor expanded in b around inf 62.4%
*-commutative62.4%
Simplified62.4%
if 5.3000000000000001e-6 < z < 2.1500000000000001e40Initial program 64.8%
Taylor expanded in y around inf 65.9%
mul-1-neg65.9%
unsub-neg65.9%
Simplified65.9%
Final simplification74.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -2.4e+111)
t_1
(if (<= z -4.8e+60)
(/ a y)
(if (<= z -3.9e-87)
(- (/ a b))
(if (<= z 0.03) x (if (<= z 1.15e+250) t_1 (/ a y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -2.4e+111) {
tmp = t_1;
} else if (z <= -4.8e+60) {
tmp = a / y;
} else if (z <= -3.9e-87) {
tmp = -(a / b);
} else if (z <= 0.03) {
tmp = x;
} else if (z <= 1.15e+250) {
tmp = t_1;
} else {
tmp = a / 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) :: t_1
real(8) :: tmp
t_1 = t / (b - y)
if (z <= (-2.4d+111)) then
tmp = t_1
else if (z <= (-4.8d+60)) then
tmp = a / y
else if (z <= (-3.9d-87)) then
tmp = -(a / b)
else if (z <= 0.03d0) then
tmp = x
else if (z <= 1.15d+250) then
tmp = t_1
else
tmp = a / y
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 = t / (b - y);
double tmp;
if (z <= -2.4e+111) {
tmp = t_1;
} else if (z <= -4.8e+60) {
tmp = a / y;
} else if (z <= -3.9e-87) {
tmp = -(a / b);
} else if (z <= 0.03) {
tmp = x;
} else if (z <= 1.15e+250) {
tmp = t_1;
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -2.4e+111: tmp = t_1 elif z <= -4.8e+60: tmp = a / y elif z <= -3.9e-87: tmp = -(a / b) elif z <= 0.03: tmp = x elif z <= 1.15e+250: tmp = t_1 else: tmp = a / y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -2.4e+111) tmp = t_1; elseif (z <= -4.8e+60) tmp = Float64(a / y); elseif (z <= -3.9e-87) tmp = Float64(-Float64(a / b)); elseif (z <= 0.03) tmp = x; elseif (z <= 1.15e+250) tmp = t_1; else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (z <= -2.4e+111) tmp = t_1; elseif (z <= -4.8e+60) tmp = a / y; elseif (z <= -3.9e-87) tmp = -(a / b); elseif (z <= 0.03) tmp = x; elseif (z <= 1.15e+250) tmp = t_1; else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.4e+111], t$95$1, If[LessEqual[z, -4.8e+60], N[(a / y), $MachinePrecision], If[LessEqual[z, -3.9e-87], (-N[(a / b), $MachinePrecision]), If[LessEqual[z, 0.03], x, If[LessEqual[z, 1.15e+250], t$95$1, N[(a / y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{+60}:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq -3.9 \cdot 10^{-87}:\\
\;\;\;\;-\frac{a}{b}\\
\mathbf{elif}\;z \leq 0.03:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+250}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -2.40000000000000006e111 or 0.029999999999999999 < z < 1.1500000000000001e250Initial program 40.2%
Taylor expanded in t around inf 20.6%
associate-/l*26.2%
+-commutative26.2%
fma-def26.2%
Simplified26.2%
Taylor expanded in z around inf 39.6%
if -2.40000000000000006e111 < z < -4.8e60 or 1.1500000000000001e250 < z Initial program 28.0%
Taylor expanded in y around -inf 27.7%
+-commutative27.7%
mul-1-neg27.7%
unsub-neg27.7%
*-commutative27.7%
sub-neg27.7%
metadata-eval27.7%
Simplified27.7%
Taylor expanded in a around inf 25.0%
mul-1-neg25.0%
*-commutative25.0%
distribute-rgt-neg-in25.0%
Simplified25.0%
Taylor expanded in z around inf 72.2%
associate-*r/72.2%
neg-mul-172.2%
Simplified72.2%
Taylor expanded in b around 0 58.0%
if -4.8e60 < z < -3.8999999999999998e-87Initial program 70.5%
Taylor expanded in b around inf 49.1%
Taylor expanded in a around inf 33.0%
associate-*r/33.0%
neg-mul-133.0%
Simplified33.0%
if -3.8999999999999998e-87 < z < 0.029999999999999999Initial program 84.9%
Taylor expanded in z around 0 51.5%
Final simplification46.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -4e-87)
t_1
(if (<= z 1.8e-82)
(/ (+ (* y x) (* z (- t a))) y)
(if (<= z 5.3e-6)
(/ z (/ (- (* z b) (* y (+ z -1.0))) (- t a)))
(if (<= z 2.15e+40) (/ x (- 1.0 z)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -4e-87) {
tmp = t_1;
} else if (z <= 1.8e-82) {
tmp = ((y * x) + (z * (t - a))) / y;
} else if (z <= 5.3e-6) {
tmp = z / (((z * b) - (y * (z + -1.0))) / (t - a));
} else if (z <= 2.15e+40) {
tmp = x / (1.0 - z);
} 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 = (t - a) / (b - y)
if (z <= (-4d-87)) then
tmp = t_1
else if (z <= 1.8d-82) then
tmp = ((y * x) + (z * (t - a))) / y
else if (z <= 5.3d-6) then
tmp = z / (((z * b) - (y * (z + (-1.0d0)))) / (t - a))
else if (z <= 2.15d+40) then
tmp = x / (1.0d0 - z)
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 = (t - a) / (b - y);
double tmp;
if (z <= -4e-87) {
tmp = t_1;
} else if (z <= 1.8e-82) {
tmp = ((y * x) + (z * (t - a))) / y;
} else if (z <= 5.3e-6) {
tmp = z / (((z * b) - (y * (z + -1.0))) / (t - a));
} else if (z <= 2.15e+40) {
tmp = x / (1.0 - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -4e-87: tmp = t_1 elif z <= 1.8e-82: tmp = ((y * x) + (z * (t - a))) / y elif z <= 5.3e-6: tmp = z / (((z * b) - (y * (z + -1.0))) / (t - a)) elif z <= 2.15e+40: tmp = x / (1.0 - z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -4e-87) tmp = t_1; elseif (z <= 1.8e-82) tmp = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / y); elseif (z <= 5.3e-6) tmp = Float64(z / Float64(Float64(Float64(z * b) - Float64(y * Float64(z + -1.0))) / Float64(t - a))); elseif (z <= 2.15e+40) tmp = Float64(x / Float64(1.0 - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -4e-87) tmp = t_1; elseif (z <= 1.8e-82) tmp = ((y * x) + (z * (t - a))) / y; elseif (z <= 5.3e-6) tmp = z / (((z * b) - (y * (z + -1.0))) / (t - a)); elseif (z <= 2.15e+40) tmp = x / (1.0 - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e-87], t$95$1, If[LessEqual[z, 1.8e-82], N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 5.3e-6], N[(z / N[(N[(N[(z * b), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e+40], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -4 \cdot 10^{-87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-82}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{-6}:\\
\;\;\;\;\frac{z}{\frac{z \cdot b - y \cdot \left(z + -1\right)}{t - a}}\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+40}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.00000000000000007e-87 or 2.1500000000000001e40 < z Initial program 42.2%
Taylor expanded in z around inf 78.1%
if -4.00000000000000007e-87 < z < 1.79999999999999999e-82Initial program 84.5%
Taylor expanded in z around 0 62.4%
if 1.79999999999999999e-82 < z < 5.3000000000000001e-6Initial program 84.4%
Taylor expanded in y around -inf 84.5%
+-commutative84.5%
mul-1-neg84.5%
unsub-neg84.5%
*-commutative84.5%
sub-neg84.5%
metadata-eval84.5%
Simplified84.5%
Taylor expanded in x around 0 73.2%
associate-/l*72.8%
*-commutative72.8%
sub-neg72.8%
metadata-eval72.8%
Simplified72.8%
if 5.3000000000000001e-6 < z < 2.1500000000000001e40Initial program 64.8%
Taylor expanded in y around inf 65.9%
mul-1-neg65.9%
unsub-neg65.9%
Simplified65.9%
Final simplification71.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ a b))))
(if (<= z -1.75e+109)
t_1
(if (<= z -2.15e+88)
(/ a y)
(if (<= z -1.08e-88)
t_1
(if (<= z 1.22e-31) x (if (<= z 2e+251) t_1 (/ a y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -(a / b);
double tmp;
if (z <= -1.75e+109) {
tmp = t_1;
} else if (z <= -2.15e+88) {
tmp = a / y;
} else if (z <= -1.08e-88) {
tmp = t_1;
} else if (z <= 1.22e-31) {
tmp = x;
} else if (z <= 2e+251) {
tmp = t_1;
} else {
tmp = a / 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) :: t_1
real(8) :: tmp
t_1 = -(a / b)
if (z <= (-1.75d+109)) then
tmp = t_1
else if (z <= (-2.15d+88)) then
tmp = a / y
else if (z <= (-1.08d-88)) then
tmp = t_1
else if (z <= 1.22d-31) then
tmp = x
else if (z <= 2d+251) then
tmp = t_1
else
tmp = a / y
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 (z <= -1.75e+109) {
tmp = t_1;
} else if (z <= -2.15e+88) {
tmp = a / y;
} else if (z <= -1.08e-88) {
tmp = t_1;
} else if (z <= 1.22e-31) {
tmp = x;
} else if (z <= 2e+251) {
tmp = t_1;
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -(a / b) tmp = 0 if z <= -1.75e+109: tmp = t_1 elif z <= -2.15e+88: tmp = a / y elif z <= -1.08e-88: tmp = t_1 elif z <= 1.22e-31: tmp = x elif z <= 2e+251: tmp = t_1 else: tmp = a / y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(-Float64(a / b)) tmp = 0.0 if (z <= -1.75e+109) tmp = t_1; elseif (z <= -2.15e+88) tmp = Float64(a / y); elseif (z <= -1.08e-88) tmp = t_1; elseif (z <= 1.22e-31) tmp = x; elseif (z <= 2e+251) tmp = t_1; else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -(a / b); tmp = 0.0; if (z <= -1.75e+109) tmp = t_1; elseif (z <= -2.15e+88) tmp = a / y; elseif (z <= -1.08e-88) tmp = t_1; elseif (z <= 1.22e-31) tmp = x; elseif (z <= 2e+251) tmp = t_1; else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = (-N[(a / b), $MachinePrecision])}, If[LessEqual[z, -1.75e+109], t$95$1, If[LessEqual[z, -2.15e+88], N[(a / y), $MachinePrecision], If[LessEqual[z, -1.08e-88], t$95$1, If[LessEqual[z, 1.22e-31], x, If[LessEqual[z, 2e+251], t$95$1, N[(a / y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -\frac{a}{b}\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{+109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.15 \cdot 10^{+88}:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq -1.08 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.22 \cdot 10^{-31}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+251}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -1.74999999999999992e109 or -2.14999999999999987e88 < z < -1.07999999999999995e-88 or 1.21999999999999992e-31 < z < 2.0000000000000001e251Initial program 50.4%
Taylor expanded in b around inf 30.7%
Taylor expanded in a around inf 32.1%
associate-*r/32.1%
neg-mul-132.1%
Simplified32.1%
if -1.74999999999999992e109 < z < -2.14999999999999987e88 or 2.0000000000000001e251 < z Initial program 19.8%
Taylor expanded in y around -inf 19.4%
+-commutative19.4%
mul-1-neg19.4%
unsub-neg19.4%
*-commutative19.4%
sub-neg19.4%
metadata-eval19.4%
Simplified19.4%
Taylor expanded in a around inf 16.1%
mul-1-neg16.1%
*-commutative16.1%
distribute-rgt-neg-in16.1%
Simplified16.1%
Taylor expanded in z around inf 67.4%
associate-*r/67.4%
neg-mul-167.4%
Simplified67.4%
Taylor expanded in b around 0 59.3%
if -1.07999999999999995e-88 < z < 1.21999999999999992e-31Initial program 83.8%
Taylor expanded in z around 0 54.2%
Final simplification43.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.7e+41) (not (<= z 9.5e+40))) (/ (- t a) (- b y)) (/ (+ (* y x) (* z (- t a))) (- (* z b) (* y (+ z -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.7e+41) || !(z <= 9.5e+40)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) + (z * (t - a))) / ((z * b) - (y * (z + -1.0)));
}
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 ((z <= (-3.7d+41)) .or. (.not. (z <= 9.5d+40))) then
tmp = (t - a) / (b - y)
else
tmp = ((y * x) + (z * (t - a))) / ((z * b) - (y * (z + (-1.0d0))))
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 ((z <= -3.7e+41) || !(z <= 9.5e+40)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) + (z * (t - a))) / ((z * b) - (y * (z + -1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.7e+41) or not (z <= 9.5e+40): tmp = (t - a) / (b - y) else: tmp = ((y * x) + (z * (t - a))) / ((z * b) - (y * (z + -1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.7e+41) || !(z <= 9.5e+40)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / Float64(Float64(z * b) - Float64(y * Float64(z + -1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.7e+41) || ~((z <= 9.5e+40))) tmp = (t - a) / (b - y); else tmp = ((y * x) + (z * (t - a))) / ((z * b) - (y * (z + -1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.7e+41], N[Not[LessEqual[z, 9.5e+40]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * b), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{+41} \lor \neg \left(z \leq 9.5 \cdot 10^{+40}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{z \cdot b - y \cdot \left(z + -1\right)}\\
\end{array}
\end{array}
if z < -3.69999999999999981e41 or 9.5000000000000003e40 < z Initial program 35.5%
Taylor expanded in z around inf 82.5%
if -3.69999999999999981e41 < z < 9.5000000000000003e40Initial program 83.4%
Taylor expanded in y around -inf 83.4%
+-commutative83.4%
mul-1-neg83.4%
unsub-neg83.4%
*-commutative83.4%
sub-neg83.4%
metadata-eval83.4%
Simplified83.4%
Final simplification83.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -4.6e-90)
t_1
(if (<= z -7.5e-169)
x
(if (<= z -1.3e-244)
(/ (* y x) (+ y (* z b)))
(if (<= z 2.15e+40) (/ x (- 1.0 z)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -4.6e-90) {
tmp = t_1;
} else if (z <= -7.5e-169) {
tmp = x;
} else if (z <= -1.3e-244) {
tmp = (y * x) / (y + (z * b));
} else if (z <= 2.15e+40) {
tmp = x / (1.0 - z);
} 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 = (t - a) / (b - y)
if (z <= (-4.6d-90)) then
tmp = t_1
else if (z <= (-7.5d-169)) then
tmp = x
else if (z <= (-1.3d-244)) then
tmp = (y * x) / (y + (z * b))
else if (z <= 2.15d+40) then
tmp = x / (1.0d0 - z)
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 = (t - a) / (b - y);
double tmp;
if (z <= -4.6e-90) {
tmp = t_1;
} else if (z <= -7.5e-169) {
tmp = x;
} else if (z <= -1.3e-244) {
tmp = (y * x) / (y + (z * b));
} else if (z <= 2.15e+40) {
tmp = x / (1.0 - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -4.6e-90: tmp = t_1 elif z <= -7.5e-169: tmp = x elif z <= -1.3e-244: tmp = (y * x) / (y + (z * b)) elif z <= 2.15e+40: tmp = x / (1.0 - z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -4.6e-90) tmp = t_1; elseif (z <= -7.5e-169) tmp = x; elseif (z <= -1.3e-244) tmp = Float64(Float64(y * x) / Float64(y + Float64(z * b))); elseif (z <= 2.15e+40) tmp = Float64(x / Float64(1.0 - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -4.6e-90) tmp = t_1; elseif (z <= -7.5e-169) tmp = x; elseif (z <= -1.3e-244) tmp = (y * x) / (y + (z * b)); elseif (z <= 2.15e+40) tmp = x / (1.0 - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.6e-90], t$95$1, If[LessEqual[z, -7.5e-169], x, If[LessEqual[z, -1.3e-244], N[(N[(y * x), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e+40], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{-90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-169}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-244}:\\
\;\;\;\;\frac{y \cdot x}{y + z \cdot b}\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+40}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.5999999999999996e-90 or 2.1500000000000001e40 < z Initial program 42.2%
Taylor expanded in z around inf 78.1%
if -4.5999999999999996e-90 < z < -7.49999999999999978e-169Initial program 73.5%
Taylor expanded in z around 0 57.7%
if -7.49999999999999978e-169 < z < -1.3000000000000001e-244Initial program 94.9%
Taylor expanded in x around inf 66.3%
*-commutative66.3%
Simplified66.3%
Taylor expanded in b around inf 66.3%
*-commutative66.3%
Simplified66.3%
if -1.3000000000000001e-244 < z < 2.1500000000000001e40Initial program 81.8%
Taylor expanded in y around inf 55.9%
mul-1-neg55.9%
unsub-neg55.9%
Simplified55.9%
Final simplification68.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.85e+39) (not (<= z 1.7e+47))) (/ (- t a) (- b y)) (/ (+ (* y x) (* z (- t a))) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.85e+39) || !(z <= 1.7e+47)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) + (z * (t - a))) / (y + (z * (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 ((z <= (-1.85d+39)) .or. (.not. (z <= 1.7d+47))) then
tmp = (t - a) / (b - y)
else
tmp = ((y * x) + (z * (t - a))) / (y + (z * (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 ((z <= -1.85e+39) || !(z <= 1.7e+47)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) + (z * (t - a))) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.85e+39) or not (z <= 1.7e+47): tmp = (t - a) / (b - y) else: tmp = ((y * x) + (z * (t - a))) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.85e+39) || !(z <= 1.7e+47)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.85e+39) || ~((z <= 1.7e+47))) tmp = (t - a) / (b - y); else tmp = ((y * x) + (z * (t - a))) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.85e+39], N[Not[LessEqual[z, 1.7e+47]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+39} \lor \neg \left(z \leq 1.7 \cdot 10^{+47}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -1.85000000000000006e39 or 1.6999999999999999e47 < z Initial program 35.5%
Taylor expanded in z around inf 82.5%
if -1.85000000000000006e39 < z < 1.6999999999999999e47Initial program 83.4%
Final simplification83.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -2.7e+194)
t_1
(if (<= y -3.2e+94)
(/ (- a) (- b y))
(if (or (<= y -1.15e-40) (not (<= y 6.5e+73))) t_1 (/ (- t a) b))))))
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 <= -2.7e+194) {
tmp = t_1;
} else if (y <= -3.2e+94) {
tmp = -a / (b - y);
} else if ((y <= -1.15e-40) || !(y <= 6.5e+73)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-2.7d+194)) then
tmp = t_1
else if (y <= (-3.2d+94)) then
tmp = -a / (b - y)
else if ((y <= (-1.15d-40)) .or. (.not. (y <= 6.5d+73))) then
tmp = t_1
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 t_1 = x / (1.0 - z);
double tmp;
if (y <= -2.7e+194) {
tmp = t_1;
} else if (y <= -3.2e+94) {
tmp = -a / (b - y);
} else if ((y <= -1.15e-40) || !(y <= 6.5e+73)) {
tmp = t_1;
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -2.7e+194: tmp = t_1 elif y <= -3.2e+94: tmp = -a / (b - y) elif (y <= -1.15e-40) or not (y <= 6.5e+73): tmp = t_1 else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -2.7e+194) tmp = t_1; elseif (y <= -3.2e+94) tmp = Float64(Float64(-a) / Float64(b - y)); elseif ((y <= -1.15e-40) || !(y <= 6.5e+73)) tmp = t_1; else tmp = Float64(Float64(t - a) / b); 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 <= -2.7e+194) tmp = t_1; elseif (y <= -3.2e+94) tmp = -a / (b - y); elseif ((y <= -1.15e-40) || ~((y <= 6.5e+73))) tmp = t_1; else tmp = (t - a) / b; 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, -2.7e+194], t$95$1, If[LessEqual[y, -3.2e+94], N[((-a) / N[(b - y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.15e-40], N[Not[LessEqual[y, 6.5e+73]], $MachinePrecision]], t$95$1, N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -2.7 \cdot 10^{+194}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{+94}:\\
\;\;\;\;\frac{-a}{b - y}\\
\mathbf{elif}\;y \leq -1.15 \cdot 10^{-40} \lor \neg \left(y \leq 6.5 \cdot 10^{+73}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -2.7000000000000002e194 or -3.20000000000000014e94 < y < -1.15e-40 or 6.5000000000000001e73 < y Initial program 46.3%
Taylor expanded in y around inf 60.9%
mul-1-neg60.9%
unsub-neg60.9%
Simplified60.9%
if -2.7000000000000002e194 < y < -3.20000000000000014e94Initial program 49.5%
Taylor expanded in y around -inf 49.5%
+-commutative49.5%
mul-1-neg49.5%
unsub-neg49.5%
*-commutative49.5%
sub-neg49.5%
metadata-eval49.5%
Simplified49.5%
Taylor expanded in a around inf 12.5%
mul-1-neg12.5%
*-commutative12.5%
distribute-rgt-neg-in12.5%
Simplified12.5%
Taylor expanded in z around inf 37.2%
associate-*r/37.2%
neg-mul-137.2%
Simplified37.2%
if -1.15e-40 < y < 6.5000000000000001e73Initial program 76.5%
Taylor expanded in y around 0 55.0%
Final simplification55.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))) (t_2 (/ x (- 1.0 z))))
(if (<= y -2.7e-38)
t_2
(if (<= y -8.5e-121)
t_1
(if (<= y 5e-209) (- (/ a b)) (if (<= y 1.45e-27) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -2.7e-38) {
tmp = t_2;
} else if (y <= -8.5e-121) {
tmp = t_1;
} else if (y <= 5e-209) {
tmp = -(a / b);
} else if (y <= 1.45e-27) {
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 = t / (b - y)
t_2 = x / (1.0d0 - z)
if (y <= (-2.7d-38)) then
tmp = t_2
else if (y <= (-8.5d-121)) then
tmp = t_1
else if (y <= 5d-209) then
tmp = -(a / b)
else if (y <= 1.45d-27) 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 = t / (b - y);
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -2.7e-38) {
tmp = t_2;
} else if (y <= -8.5e-121) {
tmp = t_1;
} else if (y <= 5e-209) {
tmp = -(a / b);
} else if (y <= 1.45e-27) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) t_2 = x / (1.0 - z) tmp = 0 if y <= -2.7e-38: tmp = t_2 elif y <= -8.5e-121: tmp = t_1 elif y <= 5e-209: tmp = -(a / b) elif y <= 1.45e-27: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) t_2 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -2.7e-38) tmp = t_2; elseif (y <= -8.5e-121) tmp = t_1; elseif (y <= 5e-209) tmp = Float64(-Float64(a / b)); elseif (y <= 1.45e-27) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); t_2 = x / (1.0 - z); tmp = 0.0; if (y <= -2.7e-38) tmp = t_2; elseif (y <= -8.5e-121) tmp = t_1; elseif (y <= 5e-209) tmp = -(a / b); elseif (y <= 1.45e-27) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.7e-38], t$95$2, If[LessEqual[y, -8.5e-121], t$95$1, If[LessEqual[y, 5e-209], (-N[(a / b), $MachinePrecision]), If[LessEqual[y, 1.45e-27], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -2.7 \cdot 10^{-38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{-121}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-209}:\\
\;\;\;\;-\frac{a}{b}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -2.70000000000000005e-38 or 1.45000000000000002e-27 < y Initial program 47.8%
Taylor expanded in y around inf 50.6%
mul-1-neg50.6%
unsub-neg50.6%
Simplified50.6%
if -2.70000000000000005e-38 < y < -8.50000000000000025e-121 or 5.0000000000000005e-209 < y < 1.45000000000000002e-27Initial program 81.8%
Taylor expanded in t around inf 34.0%
associate-/l*37.8%
+-commutative37.8%
fma-def37.8%
Simplified37.8%
Taylor expanded in z around inf 41.5%
if -8.50000000000000025e-121 < y < 5.0000000000000005e-209Initial program 79.2%
Taylor expanded in b around inf 52.3%
Taylor expanded in a around inf 53.5%
associate-*r/53.5%
neg-mul-153.5%
Simplified53.5%
Final simplification49.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.9e-87) (not (<= z 0.024))) (/ (- t a) (- b y)) (/ (+ (* y x) (* z (- t a))) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.9e-87) || !(z <= 0.024)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) + (z * (t - a))) / 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 ((z <= (-2.9d-87)) .or. (.not. (z <= 0.024d0))) then
tmp = (t - a) / (b - y)
else
tmp = ((y * x) + (z * (t - a))) / 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 ((z <= -2.9e-87) || !(z <= 0.024)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) + (z * (t - a))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.9e-87) or not (z <= 0.024): tmp = (t - a) / (b - y) else: tmp = ((y * x) + (z * (t - a))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.9e-87) || !(z <= 0.024)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.9e-87) || ~((z <= 0.024))) tmp = (t - a) / (b - y); else tmp = ((y * x) + (z * (t - a))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.9e-87], N[Not[LessEqual[z, 0.024]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{-87} \lor \neg \left(z \leq 0.024\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -2.8999999999999999e-87 or 0.024 < z Initial program 42.7%
Taylor expanded in z around inf 75.8%
if -2.8999999999999999e-87 < z < 0.024Initial program 84.9%
Taylor expanded in z around 0 58.8%
Final simplification68.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.9e-87) (not (<= z 2.15e+40))) (/ (- t a) (- b y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.9e-87) || !(z <= 2.15e+40)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 - z);
}
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 ((z <= (-3.9d-87)) .or. (.not. (z <= 2.15d+40))) then
tmp = (t - a) / (b - y)
else
tmp = x / (1.0d0 - z)
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 ((z <= -3.9e-87) || !(z <= 2.15e+40)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.9e-87) or not (z <= 2.15e+40): tmp = (t - a) / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.9e-87) || !(z <= 2.15e+40)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x / Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.9e-87) || ~((z <= 2.15e+40))) tmp = (t - a) / (b - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.9e-87], N[Not[LessEqual[z, 2.15e+40]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{-87} \lor \neg \left(z \leq 2.15 \cdot 10^{+40}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -3.8999999999999998e-87 or 2.1500000000000001e40 < z Initial program 42.2%
Taylor expanded in z around inf 78.1%
if -3.8999999999999998e-87 < z < 2.1500000000000001e40Initial program 82.7%
Taylor expanded in y around inf 53.1%
mul-1-neg53.1%
unsub-neg53.1%
Simplified53.1%
Final simplification66.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.4e-40) (not (<= y 6e+73))) (/ 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 <= -4.4e-40) || !(y <= 6e+73)) {
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 <= (-4.4d-40)) .or. (.not. (y <= 6d+73))) 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 <= -4.4e-40) || !(y <= 6e+73)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.4e-40) or not (y <= 6e+73): 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 <= -4.4e-40) || !(y <= 6e+73)) 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 <= -4.4e-40) || ~((y <= 6e+73))) 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, -4.4e-40], N[Not[LessEqual[y, 6e+73]], $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 -4.4 \cdot 10^{-40} \lor \neg \left(y \leq 6 \cdot 10^{+73}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -4.40000000000000018e-40 or 6.00000000000000021e73 < y Initial program 46.9%
Taylor expanded in y around inf 53.7%
mul-1-neg53.7%
unsub-neg53.7%
Simplified53.7%
if -4.40000000000000018e-40 < y < 6.00000000000000021e73Initial program 76.5%
Taylor expanded in y around 0 55.0%
Final simplification54.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.8e+58) (not (<= z 0.96))) (/ a y) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.8e+58) || !(z <= 0.96)) {
tmp = a / y;
} 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 ((z <= (-2.8d+58)) .or. (.not. (z <= 0.96d0))) then
tmp = a / y
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 ((z <= -2.8e+58) || !(z <= 0.96)) {
tmp = a / y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.8e+58) or not (z <= 0.96): tmp = a / y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.8e+58) || !(z <= 0.96)) tmp = Float64(a / y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.8e+58) || ~((z <= 0.96))) tmp = a / y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.8e+58], N[Not[LessEqual[z, 0.96]], $MachinePrecision]], N[(a / y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+58} \lor \neg \left(z \leq 0.96\right):\\
\;\;\;\;\frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.7999999999999998e58 or 0.95999999999999996 < z Initial program 37.4%
Taylor expanded in y around -inf 37.4%
+-commutative37.4%
mul-1-neg37.4%
unsub-neg37.4%
*-commutative37.4%
sub-neg37.4%
metadata-eval37.4%
Simplified37.4%
Taylor expanded in a around inf 23.3%
mul-1-neg23.3%
*-commutative23.3%
distribute-rgt-neg-in23.3%
Simplified23.3%
Taylor expanded in z around inf 51.0%
associate-*r/51.0%
neg-mul-151.0%
Simplified51.0%
Taylor expanded in b around 0 29.2%
if -2.7999999999999998e58 < z < 0.95999999999999996Initial program 82.5%
Taylor expanded in z around 0 44.9%
Final simplification37.5%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2.6e-49) (/ t b) (if (<= z 0.62) x (/ a y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.6e-49) {
tmp = t / b;
} else if (z <= 0.62) {
tmp = x;
} else {
tmp = a / 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 (z <= (-2.6d-49)) then
tmp = t / b
else if (z <= 0.62d0) then
tmp = x
else
tmp = a / 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 (z <= -2.6e-49) {
tmp = t / b;
} else if (z <= 0.62) {
tmp = x;
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.6e-49: tmp = t / b elif z <= 0.62: tmp = x else: tmp = a / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.6e-49) tmp = Float64(t / b); elseif (z <= 0.62) tmp = x; else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.6e-49) tmp = t / b; elseif (z <= 0.62) tmp = x; else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.6e-49], N[(t / b), $MachinePrecision], If[LessEqual[z, 0.62], x, N[(a / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{-49}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 0.62:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -2.59999999999999995e-49Initial program 43.1%
Taylor expanded in b around inf 26.3%
Taylor expanded in t around inf 22.2%
if -2.59999999999999995e-49 < z < 0.619999999999999996Initial program 84.7%
Taylor expanded in z around 0 50.3%
if 0.619999999999999996 < z Initial program 39.6%
Taylor expanded in y around -inf 39.5%
+-commutative39.5%
mul-1-neg39.5%
unsub-neg39.5%
*-commutative39.5%
sub-neg39.5%
metadata-eval39.5%
Simplified39.5%
Taylor expanded in a around inf 25.4%
mul-1-neg25.4%
*-commutative25.4%
distribute-rgt-neg-in25.4%
Simplified25.4%
Taylor expanded in z around inf 51.6%
associate-*r/51.6%
neg-mul-151.6%
Simplified51.6%
Taylor expanded in b around 0 31.7%
Final simplification37.7%
(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 61.4%
Taylor expanded in z around 0 25.6%
Final simplification25.6%
(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 2024027
(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)))))