
(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 20 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 (* z (- b y))))
(t_3
(+
(/ (+ (* x (/ y (- b y))) (* y (/ (- a t) (pow (- b y) 2.0)))) z)
(/ (- t a) (- b y)))))
(if (<= z -34000000000000.0)
t_3
(if (<= z -2.5e-188)
(/ (fma x y t_1) (fma z (- b y) y))
(if (<= z 13000.0) (* x (+ (/ y t_2) (/ t_1 (* x 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 = y + (z * (b - y));
double t_3 = (((x * (y / (b - y))) + (y * ((a - t) / pow((b - y), 2.0)))) / z) + ((t - a) / (b - y));
double tmp;
if (z <= -34000000000000.0) {
tmp = t_3;
} else if (z <= -2.5e-188) {
tmp = fma(x, y, t_1) / fma(z, (b - y), y);
} else if (z <= 13000.0) {
tmp = x * ((y / t_2) + (t_1 / (x * 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(y + Float64(z * Float64(b - y))) t_3 = Float64(Float64(Float64(Float64(x * Float64(y / Float64(b - y))) + Float64(y * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0)))) / z) + Float64(Float64(t - a) / Float64(b - y))) tmp = 0.0 if (z <= -34000000000000.0) tmp = t_3; elseif (z <= -2.5e-188) tmp = Float64(fma(x, y, t_1) / fma(z, Float64(b - y), y)); elseif (z <= 13000.0) tmp = Float64(x * Float64(Float64(y / t_2) + Float64(t_1 / Float64(x * t_2)))); else tmp = t_3; 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[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(x * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -34000000000000.0], t$95$3, If[LessEqual[z, -2.5e-188], N[(N[(x * y + t$95$1), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 13000.0], N[(x * N[(N[(y / t$95$2), $MachinePrecision] + N[(t$95$1 / N[(x * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \frac{x \cdot \frac{y}{b - y} + y \cdot \frac{a - t}{{\left(b - y\right)}^{2}}}{z} + \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -34000000000000:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-188}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t\_1\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\
\mathbf{elif}\;z \leq 13000:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_2} + \frac{t\_1}{x \cdot t\_2}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -3.4e13 or 13000 < z Initial program 41.0%
Taylor expanded in z around -inf 70.6%
associate--l+70.6%
mul-1-neg70.6%
distribute-lft-out--70.6%
associate-/l*76.2%
associate-/l*97.2%
div-sub97.2%
Simplified97.2%
if -3.4e13 < z < -2.5e-188Initial program 97.1%
fma-define97.1%
+-commutative97.1%
fma-define97.1%
Simplified97.1%
if -2.5e-188 < z < 13000Initial program 85.0%
Taylor expanded in x around inf 92.9%
Final simplification95.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (+ y (* z (- b y))))
(t_3
(+
(/ (+ (* x (/ y (- b y))) (* y (/ (- a t) (pow (- b y) 2.0)))) z)
(/ (- t a) (- b y)))))
(if (<= z -13500000000.0)
t_3
(if (<= z -2e-188)
(/ (+ t_1 (* x y)) t_2)
(if (<= z 1400000.0) (* x (+ (/ y t_2) (/ t_1 (* x 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 = y + (z * (b - y));
double t_3 = (((x * (y / (b - y))) + (y * ((a - t) / pow((b - y), 2.0)))) / z) + ((t - a) / (b - y));
double tmp;
if (z <= -13500000000.0) {
tmp = t_3;
} else if (z <= -2e-188) {
tmp = (t_1 + (x * y)) / t_2;
} else if (z <= 1400000.0) {
tmp = x * ((y / t_2) + (t_1 / (x * 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 = y + (z * (b - y))
t_3 = (((x * (y / (b - y))) + (y * ((a - t) / ((b - y) ** 2.0d0)))) / z) + ((t - a) / (b - y))
if (z <= (-13500000000.0d0)) then
tmp = t_3
else if (z <= (-2d-188)) then
tmp = (t_1 + (x * y)) / t_2
else if (z <= 1400000.0d0) then
tmp = x * ((y / t_2) + (t_1 / (x * 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 = y + (z * (b - y));
double t_3 = (((x * (y / (b - y))) + (y * ((a - t) / Math.pow((b - y), 2.0)))) / z) + ((t - a) / (b - y));
double tmp;
if (z <= -13500000000.0) {
tmp = t_3;
} else if (z <= -2e-188) {
tmp = (t_1 + (x * y)) / t_2;
} else if (z <= 1400000.0) {
tmp = x * ((y / t_2) + (t_1 / (x * t_2)));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = y + (z * (b - y)) t_3 = (((x * (y / (b - y))) + (y * ((a - t) / math.pow((b - y), 2.0)))) / z) + ((t - a) / (b - y)) tmp = 0 if z <= -13500000000.0: tmp = t_3 elif z <= -2e-188: tmp = (t_1 + (x * y)) / t_2 elif z <= 1400000.0: tmp = x * ((y / t_2) + (t_1 / (x * 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(y + Float64(z * Float64(b - y))) t_3 = Float64(Float64(Float64(Float64(x * Float64(y / Float64(b - y))) + Float64(y * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0)))) / z) + Float64(Float64(t - a) / Float64(b - y))) tmp = 0.0 if (z <= -13500000000.0) tmp = t_3; elseif (z <= -2e-188) tmp = Float64(Float64(t_1 + Float64(x * y)) / t_2); elseif (z <= 1400000.0) tmp = Float64(x * Float64(Float64(y / t_2) + Float64(t_1 / Float64(x * 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 = y + (z * (b - y)); t_3 = (((x * (y / (b - y))) + (y * ((a - t) / ((b - y) ^ 2.0)))) / z) + ((t - a) / (b - y)); tmp = 0.0; if (z <= -13500000000.0) tmp = t_3; elseif (z <= -2e-188) tmp = (t_1 + (x * y)) / t_2; elseif (z <= 1400000.0) tmp = x * ((y / t_2) + (t_1 / (x * 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[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(x * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -13500000000.0], t$95$3, If[LessEqual[z, -2e-188], N[(N[(t$95$1 + N[(x * y), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[z, 1400000.0], N[(x * N[(N[(y / t$95$2), $MachinePrecision] + N[(t$95$1 / N[(x * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \frac{x \cdot \frac{y}{b - y} + y \cdot \frac{a - t}{{\left(b - y\right)}^{2}}}{z} + \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -13500000000:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-188}:\\
\;\;\;\;\frac{t\_1 + x \cdot y}{t\_2}\\
\mathbf{elif}\;z \leq 1400000:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_2} + \frac{t\_1}{x \cdot t\_2}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -1.35e10 or 1.4e6 < z Initial program 41.0%
Taylor expanded in z around -inf 70.6%
associate--l+70.6%
mul-1-neg70.6%
distribute-lft-out--70.6%
associate-/l*76.2%
associate-/l*97.2%
div-sub97.2%
Simplified97.2%
if -1.35e10 < z < -1.9999999999999999e-188Initial program 97.1%
if -1.9999999999999999e-188 < z < 1.4e6Initial program 85.0%
Taylor expanded in x around inf 92.9%
Final simplification95.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))))
(if (or (<= z -1.2e+16) (not (<= z 14600000000.0)))
(-
(+ (/ (- t a) (- b y)) (/ (* y (/ x z)) (- b y)))
(* (/ (- t a) z) (/ y (pow (- b y) 2.0))))
(* x (+ (/ y t_1) (/ (* z (- t a)) (* x t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double tmp;
if ((z <= -1.2e+16) || !(z <= 14600000000.0)) {
tmp = (((t - a) / (b - y)) + ((y * (x / z)) / (b - y))) - (((t - a) / z) * (y / pow((b - y), 2.0)));
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * 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 = y + (z * (b - y))
if ((z <= (-1.2d+16)) .or. (.not. (z <= 14600000000.0d0))) then
tmp = (((t - a) / (b - y)) + ((y * (x / z)) / (b - y))) - (((t - a) / z) * (y / ((b - y) ** 2.0d0)))
else
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * 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 = y + (z * (b - y));
double tmp;
if ((z <= -1.2e+16) || !(z <= 14600000000.0)) {
tmp = (((t - a) / (b - y)) + ((y * (x / z)) / (b - y))) - (((t - a) / z) * (y / Math.pow((b - y), 2.0)));
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) tmp = 0 if (z <= -1.2e+16) or not (z <= 14600000000.0): tmp = (((t - a) / (b - y)) + ((y * (x / z)) / (b - y))) - (((t - a) / z) * (y / math.pow((b - y), 2.0))) else: tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if ((z <= -1.2e+16) || !(z <= 14600000000.0)) tmp = Float64(Float64(Float64(Float64(t - a) / Float64(b - y)) + Float64(Float64(y * Float64(x / z)) / Float64(b - y))) - Float64(Float64(Float64(t - a) / z) * Float64(y / (Float64(b - y) ^ 2.0)))); else tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(z * Float64(t - a)) / Float64(x * t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); tmp = 0.0; if ((z <= -1.2e+16) || ~((z <= 14600000000.0))) tmp = (((t - a) / (b - y)) + ((y * (x / z)) / (b - y))) - (((t - a) / z) * (y / ((b - y) ^ 2.0))); else tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -1.2e+16], N[Not[LessEqual[z, 14600000000.0]], $MachinePrecision]], N[(N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t - a), $MachinePrecision] / z), $MachinePrecision] * N[(y / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+16} \lor \neg \left(z \leq 14600000000\right):\\
\;\;\;\;\left(\frac{t - a}{b - y} + \frac{y \cdot \frac{x}{z}}{b - y}\right) - \frac{t - a}{z} \cdot \frac{y}{{\left(b - y\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{z \cdot \left(t - a\right)}{x \cdot t\_1}\right)\\
\end{array}
\end{array}
if z < -1.2e16 or 1.46e10 < z Initial program 41.2%
Taylor expanded in z around inf 68.4%
associate--r+68.4%
+-commutative68.4%
associate--l+68.4%
times-frac78.2%
associate-*r/77.5%
div-sub77.5%
*-commutative77.5%
times-frac96.6%
Simplified96.6%
if -1.2e16 < z < 1.46e10Initial program 87.6%
Taylor expanded in x around inf 91.0%
Final simplification93.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (+ (/ (- t a) (- b y)) (/ x (- 1.0 z))))
(t_3 (/ (+ (* z (- t a)) (* x y)) t_1)))
(if (<= t_3 -1e+284)
t_2
(if (<= t_3 -1e-320)
t_3
(if (or (<= t_3 0.0) (not (<= t_3 5e+233)))
t_2
(/ (+ (* x y) (- (* z t) (* z a))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = ((t - a) / (b - y)) + (x / (1.0 - z));
double t_3 = ((z * (t - a)) + (x * y)) / t_1;
double tmp;
if (t_3 <= -1e+284) {
tmp = t_2;
} else if (t_3 <= -1e-320) {
tmp = t_3;
} else if ((t_3 <= 0.0) || !(t_3 <= 5e+233)) {
tmp = t_2;
} else {
tmp = ((x * y) + ((z * t) - (z * a))) / 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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y + (z * (b - y))
t_2 = ((t - a) / (b - y)) + (x / (1.0d0 - z))
t_3 = ((z * (t - a)) + (x * y)) / t_1
if (t_3 <= (-1d+284)) then
tmp = t_2
else if (t_3 <= (-1d-320)) then
tmp = t_3
else if ((t_3 <= 0.0d0) .or. (.not. (t_3 <= 5d+233))) then
tmp = t_2
else
tmp = ((x * y) + ((z * t) - (z * a))) / 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 = y + (z * (b - y));
double t_2 = ((t - a) / (b - y)) + (x / (1.0 - z));
double t_3 = ((z * (t - a)) + (x * y)) / t_1;
double tmp;
if (t_3 <= -1e+284) {
tmp = t_2;
} else if (t_3 <= -1e-320) {
tmp = t_3;
} else if ((t_3 <= 0.0) || !(t_3 <= 5e+233)) {
tmp = t_2;
} else {
tmp = ((x * y) + ((z * t) - (z * a))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = ((t - a) / (b - y)) + (x / (1.0 - z)) t_3 = ((z * (t - a)) + (x * y)) / t_1 tmp = 0 if t_3 <= -1e+284: tmp = t_2 elif t_3 <= -1e-320: tmp = t_3 elif (t_3 <= 0.0) or not (t_3 <= 5e+233): tmp = t_2 else: tmp = ((x * y) + ((z * t) - (z * a))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(Float64(t - a) / Float64(b - y)) + Float64(x / Float64(1.0 - z))) t_3 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / t_1) tmp = 0.0 if (t_3 <= -1e+284) tmp = t_2; elseif (t_3 <= -1e-320) tmp = t_3; elseif ((t_3 <= 0.0) || !(t_3 <= 5e+233)) tmp = t_2; else tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = ((t - a) / (b - y)) + (x / (1.0 - z)); t_3 = ((z * (t - a)) + (x * y)) / t_1; tmp = 0.0; if (t_3 <= -1e+284) tmp = t_2; elseif (t_3 <= -1e-320) tmp = t_3; elseif ((t_3 <= 0.0) || ~((t_3 <= 5e+233))) tmp = t_2; else tmp = ((x * y) + ((z * t) - (z * a))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, -1e+284], t$95$2, If[LessEqual[t$95$3, -1e-320], t$95$3, If[Or[LessEqual[t$95$3, 0.0], N[Not[LessEqual[t$95$3, 5e+233]], $MachinePrecision]], t$95$2, N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{t - a}{b - y} + \frac{x}{1 - z}\\
t_3 := \frac{z \cdot \left(t - a\right) + x \cdot y}{t\_1}\\
\mathbf{if}\;t\_3 \leq -1 \cdot 10^{+284}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-320}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 0 \lor \neg \left(t\_3 \leq 5 \cdot 10^{+233}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{t\_1}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.00000000000000008e284 or -9.99989e-321 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or 5.00000000000000009e233 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 23.3%
Taylor expanded in x around inf 35.0%
Taylor expanded in y around -inf 41.6%
Taylor expanded in z around inf 75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in x around 0 86.0%
associate--l+86.0%
mul-1-neg86.0%
sub-neg86.0%
metadata-eval86.0%
distribute-frac-neg86.0%
+-commutative86.0%
div-sub86.0%
Simplified86.0%
if -1.00000000000000008e284 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.99989e-321Initial program 99.5%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.00000000000000009e233Initial program 99.4%
sub-neg99.4%
distribute-lft-in99.4%
Applied egg-rr99.4%
Final simplification93.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* z (- t a)) (* x y)) (+ y (* z (- b y))))))
(if (or (<= t_1 -1e+284)
(not
(or (<= t_1 -1e-320) (and (not (<= t_1 0.0)) (<= t_1 5e+233)))))
(+ (/ (- t a) (- b y)) (/ x (- 1.0 z)))
t_1)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
double tmp;
if ((t_1 <= -1e+284) || !((t_1 <= -1e-320) || (!(t_1 <= 0.0) && (t_1 <= 5e+233)))) {
tmp = ((t - a) / (b - y)) + (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 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)))
if ((t_1 <= (-1d+284)) .or. (.not. (t_1 <= (-1d-320)) .or. (.not. (t_1 <= 0.0d0)) .and. (t_1 <= 5d+233))) then
tmp = ((t - a) / (b - y)) + (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 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
double tmp;
if ((t_1 <= -1e+284) || !((t_1 <= -1e-320) || (!(t_1 <= 0.0) && (t_1 <= 5e+233)))) {
tmp = ((t - a) / (b - y)) + (x / (1.0 - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))) tmp = 0 if (t_1 <= -1e+284) or not ((t_1 <= -1e-320) or (not (t_1 <= 0.0) and (t_1 <= 5e+233))): tmp = ((t - a) / (b - y)) + (x / (1.0 - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y + Float64(z * Float64(b - y)))) tmp = 0.0 if ((t_1 <= -1e+284) || !((t_1 <= -1e-320) || (!(t_1 <= 0.0) && (t_1 <= 5e+233)))) tmp = Float64(Float64(Float64(t - a) / Float64(b - y)) + 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 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))); tmp = 0.0; if ((t_1 <= -1e+284) || ~(((t_1 <= -1e-320) || (~((t_1 <= 0.0)) && (t_1 <= 5e+233))))) tmp = ((t - a) / (b - y)) + (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[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+284], N[Not[Or[LessEqual[t$95$1, -1e-320], And[N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision], LessEqual[t$95$1, 5e+233]]]], $MachinePrecision]], N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+284} \lor \neg \left(t\_1 \leq -1 \cdot 10^{-320} \lor \neg \left(t\_1 \leq 0\right) \land t\_1 \leq 5 \cdot 10^{+233}\right):\\
\;\;\;\;\frac{t - a}{b - y} + \frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.00000000000000008e284 or -9.99989e-321 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or 5.00000000000000009e233 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 23.3%
Taylor expanded in x around inf 35.0%
Taylor expanded in y around -inf 41.6%
Taylor expanded in z around inf 75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in x around 0 86.0%
associate--l+86.0%
mul-1-neg86.0%
sub-neg86.0%
metadata-eval86.0%
distribute-frac-neg86.0%
+-commutative86.0%
div-sub86.0%
Simplified86.0%
if -1.00000000000000008e284 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.99989e-321 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.00000000000000009e233Initial program 99.4%
Final simplification93.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z (/ (- t a) y))))
(t_2 (+ (/ (- t a) (- b y)) (/ x (- 1.0 z)))))
(if (<= z -1.85e-13)
t_2
(if (<= z -3.3e-139)
t_1
(if (<= z -1.8e-193)
(/ (* z (- a t)) (- (* z (- y b)) y))
(if (<= z 7.2e-72) 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)) + (x / (1.0 - z));
double tmp;
if (z <= -1.85e-13) {
tmp = t_2;
} else if (z <= -3.3e-139) {
tmp = t_1;
} else if (z <= -1.8e-193) {
tmp = (z * (a - t)) / ((z * (y - b)) - y);
} else if (z <= 7.2e-72) {
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)) + (x / (1.0d0 - z))
if (z <= (-1.85d-13)) then
tmp = t_2
else if (z <= (-3.3d-139)) then
tmp = t_1
else if (z <= (-1.8d-193)) then
tmp = (z * (a - t)) / ((z * (y - b)) - y)
else if (z <= 7.2d-72) 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)) + (x / (1.0 - z));
double tmp;
if (z <= -1.85e-13) {
tmp = t_2;
} else if (z <= -3.3e-139) {
tmp = t_1;
} else if (z <= -1.8e-193) {
tmp = (z * (a - t)) / ((z * (y - b)) - y);
} else if (z <= 7.2e-72) {
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)) + (x / (1.0 - z)) tmp = 0 if z <= -1.85e-13: tmp = t_2 elif z <= -3.3e-139: tmp = t_1 elif z <= -1.8e-193: tmp = (z * (a - t)) / ((z * (y - b)) - y) elif z <= 7.2e-72: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * Float64(Float64(t - a) / y))) t_2 = Float64(Float64(Float64(t - a) / Float64(b - y)) + Float64(x / Float64(1.0 - z))) tmp = 0.0 if (z <= -1.85e-13) tmp = t_2; elseif (z <= -3.3e-139) tmp = t_1; elseif (z <= -1.8e-193) tmp = Float64(Float64(z * Float64(a - t)) / Float64(Float64(z * Float64(y - b)) - y)); elseif (z <= 7.2e-72) 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)) + (x / (1.0 - z)); tmp = 0.0; if (z <= -1.85e-13) tmp = t_2; elseif (z <= -3.3e-139) tmp = t_1; elseif (z <= -1.8e-193) tmp = (z * (a - t)) / ((z * (y - b)) - y); elseif (z <= 7.2e-72) 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[(z * N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.85e-13], t$95$2, If[LessEqual[z, -3.3e-139], t$95$1, If[LessEqual[z, -1.8e-193], N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e-72], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{t - a}{y}\\
t_2 := \frac{t - a}{b - y} + \frac{x}{1 - z}\\
\mathbf{if}\;z \leq -1.85 \cdot 10^{-13}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-193}:\\
\;\;\;\;\frac{z \cdot \left(a - t\right)}{z \cdot \left(y - b\right) - y}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.84999999999999994e-13 or 7.2e-72 < z Initial program 47.9%
Taylor expanded in x around inf 46.3%
Taylor expanded in y around -inf 46.5%
Taylor expanded in z around inf 72.9%
*-commutative72.9%
Simplified72.9%
Taylor expanded in x around 0 81.2%
associate--l+81.2%
mul-1-neg81.2%
sub-neg81.2%
metadata-eval81.2%
distribute-frac-neg81.2%
+-commutative81.2%
div-sub81.2%
Simplified81.2%
if -1.84999999999999994e-13 < z < -3.3e-139 or -1.7999999999999999e-193 < z < 7.2e-72Initial program 87.6%
Taylor expanded in z around 0 61.2%
Taylor expanded in x around 0 76.6%
div-sub77.6%
Simplified77.6%
if -3.3e-139 < z < -1.7999999999999999e-193Initial program 99.6%
Taylor expanded in x around 0 86.0%
Final simplification80.0%
(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 -2.8e-11)
t_2
(if (<= z -1.35e-139)
t_1
(if (<= z -1.8e-193)
(/ (* z (- a t)) (- (* z (- y b)) y))
(if (<= z 7.5e-12) 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 <= -2.8e-11) {
tmp = t_2;
} else if (z <= -1.35e-139) {
tmp = t_1;
} else if (z <= -1.8e-193) {
tmp = (z * (a - t)) / ((z * (y - b)) - y);
} else if (z <= 7.5e-12) {
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 <= (-2.8d-11)) then
tmp = t_2
else if (z <= (-1.35d-139)) then
tmp = t_1
else if (z <= (-1.8d-193)) then
tmp = (z * (a - t)) / ((z * (y - b)) - y)
else if (z <= 7.5d-12) 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 <= -2.8e-11) {
tmp = t_2;
} else if (z <= -1.35e-139) {
tmp = t_1;
} else if (z <= -1.8e-193) {
tmp = (z * (a - t)) / ((z * (y - b)) - y);
} else if (z <= 7.5e-12) {
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 <= -2.8e-11: tmp = t_2 elif z <= -1.35e-139: tmp = t_1 elif z <= -1.8e-193: tmp = (z * (a - t)) / ((z * (y - b)) - y) elif z <= 7.5e-12: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * Float64(Float64(t - a) / y))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.8e-11) tmp = t_2; elseif (z <= -1.35e-139) tmp = t_1; elseif (z <= -1.8e-193) tmp = Float64(Float64(z * Float64(a - t)) / Float64(Float64(z * Float64(y - b)) - y)); elseif (z <= 7.5e-12) 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 <= -2.8e-11) tmp = t_2; elseif (z <= -1.35e-139) tmp = t_1; elseif (z <= -1.8e-193) tmp = (z * (a - t)) / ((z * (y - b)) - y); elseif (z <= 7.5e-12) 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[(z * N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e-11], t$95$2, If[LessEqual[z, -1.35e-139], t$95$1, If[LessEqual[z, -1.8e-193], N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e-12], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{t - a}{y}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{-11}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-193}:\\
\;\;\;\;\frac{z \cdot \left(a - t\right)}{z \cdot \left(y - b\right) - y}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.8e-11 or 7.5e-12 < z Initial program 44.3%
Taylor expanded in z around inf 76.3%
if -2.8e-11 < z < -1.3499999999999999e-139 or -1.7999999999999999e-193 < z < 7.5e-12Initial program 86.7%
Taylor expanded in z around 0 60.1%
Taylor expanded in x around 0 75.3%
div-sub76.2%
Simplified76.2%
if -1.3499999999999999e-139 < z < -1.7999999999999999e-193Initial program 99.6%
Taylor expanded in x around 0 86.0%
Final simplification76.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.25e-11)
t_1
(if (<= z -1.3e-139)
(- x (* z (/ a y)))
(if (or (<= z -3.1e-180) (not (<= z 1.2e-12)))
t_1
(+ x (* z (/ t y))))))))
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 <= -2.25e-11) {
tmp = t_1;
} else if (z <= -1.3e-139) {
tmp = x - (z * (a / y));
} else if ((z <= -3.1e-180) || !(z <= 1.2e-12)) {
tmp = t_1;
} else {
tmp = x + (z * (t / 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 - a) / (b - y)
if (z <= (-2.25d-11)) then
tmp = t_1
else if (z <= (-1.3d-139)) then
tmp = x - (z * (a / y))
else if ((z <= (-3.1d-180)) .or. (.not. (z <= 1.2d-12))) then
tmp = t_1
else
tmp = x + (z * (t / 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 - a) / (b - y);
double tmp;
if (z <= -2.25e-11) {
tmp = t_1;
} else if (z <= -1.3e-139) {
tmp = x - (z * (a / y));
} else if ((z <= -3.1e-180) || !(z <= 1.2e-12)) {
tmp = t_1;
} else {
tmp = x + (z * (t / y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.25e-11: tmp = t_1 elif z <= -1.3e-139: tmp = x - (z * (a / y)) elif (z <= -3.1e-180) or not (z <= 1.2e-12): tmp = t_1 else: tmp = x + (z * (t / y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.25e-11) tmp = t_1; elseif (z <= -1.3e-139) tmp = Float64(x - Float64(z * Float64(a / y))); elseif ((z <= -3.1e-180) || !(z <= 1.2e-12)) tmp = t_1; else tmp = Float64(x + Float64(z * Float64(t / y))); 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 <= -2.25e-11) tmp = t_1; elseif (z <= -1.3e-139) tmp = x - (z * (a / y)); elseif ((z <= -3.1e-180) || ~((z <= 1.2e-12))) tmp = t_1; else tmp = x + (z * (t / y)); 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, -2.25e-11], t$95$1, If[LessEqual[z, -1.3e-139], N[(x - N[(z * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -3.1e-180], N[Not[LessEqual[z, 1.2e-12]], $MachinePrecision]], t$95$1, N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{-11}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-139}:\\
\;\;\;\;x - z \cdot \frac{a}{y}\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-180} \lor \neg \left(z \leq 1.2 \cdot 10^{-12}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\end{array}
\end{array}
if z < -2.25e-11 or -1.2999999999999999e-139 < z < -3.0999999999999999e-180 or 1.19999999999999994e-12 < z Initial program 48.8%
Taylor expanded in z around inf 74.6%
if -2.25e-11 < z < -1.2999999999999999e-139Initial program 95.6%
Taylor expanded in z around 0 72.8%
Taylor expanded in a around inf 65.3%
associate-*r/65.3%
neg-mul-165.3%
Simplified65.3%
if -3.0999999999999999e-180 < z < 1.19999999999999994e-12Initial program 84.7%
Taylor expanded in z around 0 57.9%
Taylor expanded in t around inf 73.4%
Final simplification73.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -2.26e-10)
t_1
(if (<= z -6e-142)
(+ x (* z x))
(if (<= z -6.4e-191) (* t (/ z y)) (if (<= z 7.6e-23) x t_1))))))
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.26e-10) {
tmp = t_1;
} else if (z <= -6e-142) {
tmp = x + (z * x);
} else if (z <= -6.4e-191) {
tmp = t * (z / y);
} else if (z <= 7.6e-23) {
tmp = x;
} 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 / (b - y)
if (z <= (-2.26d-10)) then
tmp = t_1
else if (z <= (-6d-142)) then
tmp = x + (z * x)
else if (z <= (-6.4d-191)) then
tmp = t * (z / y)
else if (z <= 7.6d-23) then
tmp = x
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 / (b - y);
double tmp;
if (z <= -2.26e-10) {
tmp = t_1;
} else if (z <= -6e-142) {
tmp = x + (z * x);
} else if (z <= -6.4e-191) {
tmp = t * (z / y);
} else if (z <= 7.6e-23) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -2.26e-10: tmp = t_1 elif z <= -6e-142: tmp = x + (z * x) elif z <= -6.4e-191: tmp = t * (z / y) elif z <= 7.6e-23: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -2.26e-10) tmp = t_1; elseif (z <= -6e-142) tmp = Float64(x + Float64(z * x)); elseif (z <= -6.4e-191) tmp = Float64(t * Float64(z / y)); elseif (z <= 7.6e-23) tmp = x; else tmp = t_1; 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.26e-10) tmp = t_1; elseif (z <= -6e-142) tmp = x + (z * x); elseif (z <= -6.4e-191) tmp = t * (z / y); elseif (z <= 7.6e-23) tmp = x; else tmp = t_1; 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.26e-10], t$95$1, If[LessEqual[z, -6e-142], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.4e-191], N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.6e-23], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -2.26 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-142}:\\
\;\;\;\;x + z \cdot x\\
\mathbf{elif}\;z \leq -6.4 \cdot 10^{-191}:\\
\;\;\;\;t \cdot \frac{z}{y}\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-23}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.26e-10 or 7.60000000000000023e-23 < z Initial program 44.8%
Taylor expanded in t around inf 24.3%
*-commutative24.3%
Simplified24.3%
Taylor expanded in z around inf 39.1%
if -2.26e-10 < z < -6.0000000000000002e-142Initial program 95.8%
Taylor expanded in z around 0 70.2%
Taylor expanded in y around inf 50.7%
*-commutative50.7%
Simplified50.7%
if -6.0000000000000002e-142 < z < -6.4000000000000006e-191Initial program 99.5%
Taylor expanded in t around inf 60.0%
*-commutative60.0%
Simplified60.0%
Taylor expanded in z around 0 44.8%
associate-/l*39.8%
Simplified39.8%
if -6.4000000000000006e-191 < z < 7.60000000000000023e-23Initial program 84.2%
Taylor expanded in z around 0 66.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.8e-12) (not (<= z 55000000.0))) (+ (/ (- t a) (- b y)) (/ x (- 1.0 z))) (/ (+ (* z (- t a)) (* x y)) (+ y (* z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.8e-12) || !(z <= 55000000.0)) {
tmp = ((t - a) / (b - y)) + (x / (1.0 - z));
} else {
tmp = ((z * (t - a)) + (x * y)) / (y + (z * 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 ((z <= (-2.8d-12)) .or. (.not. (z <= 55000000.0d0))) then
tmp = ((t - a) / (b - y)) + (x / (1.0d0 - z))
else
tmp = ((z * (t - a)) + (x * y)) / (y + (z * 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 ((z <= -2.8e-12) || !(z <= 55000000.0)) {
tmp = ((t - a) / (b - y)) + (x / (1.0 - z));
} else {
tmp = ((z * (t - a)) + (x * y)) / (y + (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.8e-12) or not (z <= 55000000.0): tmp = ((t - a) / (b - y)) + (x / (1.0 - z)) else: tmp = ((z * (t - a)) + (x * y)) / (y + (z * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.8e-12) || !(z <= 55000000.0)) tmp = Float64(Float64(Float64(t - a) / Float64(b - y)) + Float64(x / Float64(1.0 - z))); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y + Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.8e-12) || ~((z <= 55000000.0))) tmp = ((t - a) / (b - y)) + (x / (1.0 - z)); else tmp = ((z * (t - a)) + (x * y)) / (y + (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.8e-12], N[Not[LessEqual[z, 55000000.0]], $MachinePrecision]], N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-12} \lor \neg \left(z \leq 55000000\right):\\
\;\;\;\;\frac{t - a}{b - y} + \frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot b}\\
\end{array}
\end{array}
if z < -2.8000000000000002e-12 or 5.5e7 < z Initial program 44.2%
Taylor expanded in x around inf 39.3%
Taylor expanded in y around -inf 43.0%
Taylor expanded in z around inf 75.2%
*-commutative75.2%
Simplified75.2%
Taylor expanded in x around 0 84.6%
associate--l+84.6%
mul-1-neg84.6%
sub-neg84.6%
metadata-eval84.6%
distribute-frac-neg84.6%
+-commutative84.6%
div-sub84.6%
Simplified84.6%
if -2.8000000000000002e-12 < z < 5.5e7Initial program 87.6%
Taylor expanded in b around inf 87.5%
*-commutative87.5%
Simplified87.5%
Final simplification86.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -0.7)
(/ a (- b))
(if (<= z -6e-142)
(+ x (* z x))
(if (<= z -6.4e-191) (* t (/ z y)) (if (<= z 3.4e-20) x (/ t b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.7) {
tmp = a / -b;
} else if (z <= -6e-142) {
tmp = x + (z * x);
} else if (z <= -6.4e-191) {
tmp = t * (z / y);
} else if (z <= 3.4e-20) {
tmp = x;
} else {
tmp = t / 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 (z <= (-0.7d0)) then
tmp = a / -b
else if (z <= (-6d-142)) then
tmp = x + (z * x)
else if (z <= (-6.4d-191)) then
tmp = t * (z / y)
else if (z <= 3.4d-20) then
tmp = x
else
tmp = t / 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 (z <= -0.7) {
tmp = a / -b;
} else if (z <= -6e-142) {
tmp = x + (z * x);
} else if (z <= -6.4e-191) {
tmp = t * (z / y);
} else if (z <= 3.4e-20) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.7: tmp = a / -b elif z <= -6e-142: tmp = x + (z * x) elif z <= -6.4e-191: tmp = t * (z / y) elif z <= 3.4e-20: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.7) tmp = Float64(a / Float64(-b)); elseif (z <= -6e-142) tmp = Float64(x + Float64(z * x)); elseif (z <= -6.4e-191) tmp = Float64(t * Float64(z / y)); elseif (z <= 3.4e-20) tmp = x; else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.7) tmp = a / -b; elseif (z <= -6e-142) tmp = x + (z * x); elseif (z <= -6.4e-191) tmp = t * (z / y); elseif (z <= 3.4e-20) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.7], N[(a / (-b)), $MachinePrecision], If[LessEqual[z, -6e-142], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.4e-191], N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e-20], x, N[(t / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.7:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-142}:\\
\;\;\;\;x + z \cdot x\\
\mathbf{elif}\;z \leq -6.4 \cdot 10^{-191}:\\
\;\;\;\;t \cdot \frac{z}{y}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-20}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -0.69999999999999996Initial program 40.7%
Taylor expanded in x around inf 35.6%
Taylor expanded in b around inf 44.6%
associate-/l*39.4%
associate--l+39.4%
Simplified39.4%
Taylor expanded in a around inf 30.9%
associate-*r/30.9%
mul-1-neg30.9%
Simplified30.9%
if -0.69999999999999996 < z < -6.0000000000000002e-142Initial program 96.1%
Taylor expanded in z around 0 66.2%
Taylor expanded in y around inf 47.6%
*-commutative47.6%
Simplified47.6%
if -6.0000000000000002e-142 < z < -6.4000000000000006e-191Initial program 99.5%
Taylor expanded in t around inf 60.0%
*-commutative60.0%
Simplified60.0%
Taylor expanded in z around 0 44.8%
associate-/l*39.8%
Simplified39.8%
if -6.4000000000000006e-191 < z < 3.3999999999999997e-20Initial program 84.2%
Taylor expanded in z around 0 66.1%
if 3.3999999999999997e-20 < z Initial program 46.4%
Taylor expanded in t around inf 22.4%
*-commutative22.4%
Simplified22.4%
Taylor expanded in y around 0 32.8%
Final simplification46.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -0.65)
(/ a (- b))
(if (<= z -6e-142)
x
(if (<= z -6.4e-191) (* t (/ z y)) (if (<= z 1.3e-19) x (/ t b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.65) {
tmp = a / -b;
} else if (z <= -6e-142) {
tmp = x;
} else if (z <= -6.4e-191) {
tmp = t * (z / y);
} else if (z <= 1.3e-19) {
tmp = x;
} else {
tmp = t / 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 (z <= (-0.65d0)) then
tmp = a / -b
else if (z <= (-6d-142)) then
tmp = x
else if (z <= (-6.4d-191)) then
tmp = t * (z / y)
else if (z <= 1.3d-19) then
tmp = x
else
tmp = t / 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 (z <= -0.65) {
tmp = a / -b;
} else if (z <= -6e-142) {
tmp = x;
} else if (z <= -6.4e-191) {
tmp = t * (z / y);
} else if (z <= 1.3e-19) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.65: tmp = a / -b elif z <= -6e-142: tmp = x elif z <= -6.4e-191: tmp = t * (z / y) elif z <= 1.3e-19: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.65) tmp = Float64(a / Float64(-b)); elseif (z <= -6e-142) tmp = x; elseif (z <= -6.4e-191) tmp = Float64(t * Float64(z / y)); elseif (z <= 1.3e-19) tmp = x; else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.65) tmp = a / -b; elseif (z <= -6e-142) tmp = x; elseif (z <= -6.4e-191) tmp = t * (z / y); elseif (z <= 1.3e-19) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.65], N[(a / (-b)), $MachinePrecision], If[LessEqual[z, -6e-142], x, If[LessEqual[z, -6.4e-191], N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e-19], x, N[(t / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.65:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-142}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -6.4 \cdot 10^{-191}:\\
\;\;\;\;t \cdot \frac{z}{y}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-19}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -0.650000000000000022Initial program 40.7%
Taylor expanded in x around inf 35.6%
Taylor expanded in b around inf 44.6%
associate-/l*39.4%
associate--l+39.4%
Simplified39.4%
Taylor expanded in a around inf 30.9%
associate-*r/30.9%
mul-1-neg30.9%
Simplified30.9%
if -0.650000000000000022 < z < -6.0000000000000002e-142 or -6.4000000000000006e-191 < z < 1.30000000000000006e-19Initial program 87.1%
Taylor expanded in z around 0 61.1%
if -6.0000000000000002e-142 < z < -6.4000000000000006e-191Initial program 99.5%
Taylor expanded in t around inf 60.0%
*-commutative60.0%
Simplified60.0%
Taylor expanded in z around 0 44.8%
associate-/l*39.8%
Simplified39.8%
if 1.30000000000000006e-19 < z Initial program 46.4%
Taylor expanded in t around inf 22.4%
*-commutative22.4%
Simplified22.4%
Taylor expanded in y around 0 32.8%
Final simplification46.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.8e+174)
(/ a (- y b))
(if (or (<= z -8.8e-11) (not (<= z 4.2e-13)))
(/ (- t a) b)
(+ x (* z (/ t y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.8e+174) {
tmp = a / (y - b);
} else if ((z <= -8.8e-11) || !(z <= 4.2e-13)) {
tmp = (t - a) / b;
} else {
tmp = x + (z * (t / 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.8d+174)) then
tmp = a / (y - b)
else if ((z <= (-8.8d-11)) .or. (.not. (z <= 4.2d-13))) then
tmp = (t - a) / b
else
tmp = x + (z * (t / 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.8e+174) {
tmp = a / (y - b);
} else if ((z <= -8.8e-11) || !(z <= 4.2e-13)) {
tmp = (t - a) / b;
} else {
tmp = x + (z * (t / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.8e+174: tmp = a / (y - b) elif (z <= -8.8e-11) or not (z <= 4.2e-13): tmp = (t - a) / b else: tmp = x + (z * (t / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.8e+174) tmp = Float64(a / Float64(y - b)); elseif ((z <= -8.8e-11) || !(z <= 4.2e-13)) tmp = Float64(Float64(t - a) / b); else tmp = Float64(x + Float64(z * Float64(t / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.8e+174) tmp = a / (y - b); elseif ((z <= -8.8e-11) || ~((z <= 4.2e-13))) tmp = (t - a) / b; else tmp = x + (z * (t / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.8e+174], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -8.8e-11], N[Not[LessEqual[z, 4.2e-13]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+174}:\\
\;\;\;\;\frac{a}{y - b}\\
\mathbf{elif}\;z \leq -8.8 \cdot 10^{-11} \lor \neg \left(z \leq 4.2 \cdot 10^{-13}\right):\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\end{array}
\end{array}
if z < -1.8000000000000001e174Initial program 11.8%
Taylor expanded in x around inf 7.1%
Taylor expanded in y around -inf 15.4%
Taylor expanded in z around inf 75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in a around inf 57.4%
associate-*r/57.4%
mul-1-neg57.4%
Simplified57.4%
if -1.8000000000000001e174 < z < -8.8000000000000006e-11 or 4.19999999999999977e-13 < z Initial program 51.3%
Taylor expanded in y around 0 52.9%
if -8.8000000000000006e-11 < z < 4.19999999999999977e-13Initial program 88.1%
Taylor expanded in z around 0 58.4%
Taylor expanded in t around inf 66.5%
Final simplification60.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -7.8e-70)
t_1
(if (<= y 1.7e-279) (/ a (- b)) (if (<= y 3.5e-87) (/ t 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 <= -7.8e-70) {
tmp = t_1;
} else if (y <= 1.7e-279) {
tmp = a / -b;
} else if (y <= 3.5e-87) {
tmp = t / 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 <= (-7.8d-70)) then
tmp = t_1
else if (y <= 1.7d-279) then
tmp = a / -b
else if (y <= 3.5d-87) then
tmp = t / 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 <= -7.8e-70) {
tmp = t_1;
} else if (y <= 1.7e-279) {
tmp = a / -b;
} else if (y <= 3.5e-87) {
tmp = t / 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 <= -7.8e-70: tmp = t_1 elif y <= 1.7e-279: tmp = a / -b elif y <= 3.5e-87: tmp = t / 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 <= -7.8e-70) tmp = t_1; elseif (y <= 1.7e-279) tmp = Float64(a / Float64(-b)); elseif (y <= 3.5e-87) tmp = Float64(t / 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 <= -7.8e-70) tmp = t_1; elseif (y <= 1.7e-279) tmp = a / -b; elseif (y <= 3.5e-87) tmp = t / 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, -7.8e-70], t$95$1, If[LessEqual[y, 1.7e-279], N[(a / (-b)), $MachinePrecision], If[LessEqual[y, 3.5e-87], N[(t / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -7.8 \cdot 10^{-70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-279}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-87}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.80000000000000038e-70 or 3.50000000000000012e-87 < y Initial program 62.0%
Taylor expanded in y around inf 54.3%
mul-1-neg54.3%
unsub-neg54.3%
Simplified54.3%
if -7.80000000000000038e-70 < y < 1.70000000000000007e-279Initial program 77.6%
Taylor expanded in x around inf 62.1%
Taylor expanded in b around inf 52.0%
associate-/l*51.8%
associate--l+51.8%
Simplified51.8%
Taylor expanded in a around inf 39.9%
associate-*r/39.9%
mul-1-neg39.9%
Simplified39.9%
if 1.70000000000000007e-279 < y < 3.50000000000000012e-87Initial program 71.8%
Taylor expanded in t around inf 38.6%
*-commutative38.6%
Simplified38.6%
Taylor expanded in y around 0 48.2%
Final simplification50.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6.2e-10) (not (<= z 2.3e-15))) (/ (- t a) (- b y)) (+ x (* z (/ (- t a) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.2e-10) || !(z <= 2.3e-15)) {
tmp = (t - a) / (b - y);
} else {
tmp = 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 <= (-6.2d-10)) .or. (.not. (z <= 2.3d-15))) then
tmp = (t - a) / (b - y)
else
tmp = 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 <= -6.2e-10) || !(z <= 2.3e-15)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * ((t - a) / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.2e-10) or not (z <= 2.3e-15): tmp = (t - a) / (b - y) else: tmp = x + (z * ((t - a) / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.2e-10) || !(z <= 2.3e-15)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(z * Float64(Float64(t - a) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.2e-10) || ~((z <= 2.3e-15))) tmp = (t - a) / (b - y); else tmp = x + (z * ((t - a) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.2e-10], N[Not[LessEqual[z, 2.3e-15]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{-10} \lor \neg \left(z \leq 2.3 \cdot 10^{-15}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{t - a}{y}\\
\end{array}
\end{array}
if z < -6.2000000000000003e-10 or 2.2999999999999999e-15 < z Initial program 44.3%
Taylor expanded in z around inf 76.3%
if -6.2000000000000003e-10 < z < 2.2999999999999999e-15Initial program 88.1%
Taylor expanded in z around 0 58.4%
Taylor expanded in x around 0 72.0%
div-sub72.9%
Simplified72.9%
Final simplification74.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.4e-11) (not (<= z 2.5e-17))) (/ (- t a) (- b y)) (+ x (* z (/ t y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.4e-11) || !(z <= 2.5e-17)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * (t / 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.4d-11)) .or. (.not. (z <= 2.5d-17))) then
tmp = (t - a) / (b - y)
else
tmp = x + (z * (t / 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.4e-11) || !(z <= 2.5e-17)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * (t / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.4e-11) or not (z <= 2.5e-17): tmp = (t - a) / (b - y) else: tmp = x + (z * (t / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.4e-11) || !(z <= 2.5e-17)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(z * Float64(t / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.4e-11) || ~((z <= 2.5e-17))) tmp = (t - a) / (b - y); else tmp = x + (z * (t / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.4e-11], N[Not[LessEqual[z, 2.5e-17]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{-11} \lor \neg \left(z \leq 2.5 \cdot 10^{-17}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\end{array}
\end{array}
if z < -2.4000000000000001e-11 or 2.4999999999999999e-17 < z Initial program 44.3%
Taylor expanded in z around inf 76.3%
if -2.4000000000000001e-11 < z < 2.4999999999999999e-17Initial program 88.1%
Taylor expanded in z around 0 58.4%
Taylor expanded in t around inf 66.5%
Final simplification71.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.25e-25) (not (<= y 700000000.0))) (/ 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 <= -1.25e-25) || !(y <= 700000000.0)) {
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 <= (-1.25d-25)) .or. (.not. (y <= 700000000.0d0))) 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 <= -1.25e-25) || !(y <= 700000000.0)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.25e-25) or not (y <= 700000000.0): 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 <= -1.25e-25) || !(y <= 700000000.0)) 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 <= -1.25e-25) || ~((y <= 700000000.0))) 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, -1.25e-25], N[Not[LessEqual[y, 700000000.0]], $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 -1.25 \cdot 10^{-25} \lor \neg \left(y \leq 700000000\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -1.2499999999999999e-25 or 7e8 < y Initial program 59.4%
Taylor expanded in y around inf 58.5%
mul-1-neg58.5%
unsub-neg58.5%
Simplified58.5%
if -1.2499999999999999e-25 < y < 7e8Initial program 75.7%
Taylor expanded in y around 0 58.8%
Final simplification58.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2e-10) (not (<= z 7e-21))) (/ t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2e-10) || !(z <= 7e-21)) {
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 ((z <= (-2d-10)) .or. (.not. (z <= 7d-21))) 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 ((z <= -2e-10) || !(z <= 7e-21)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2e-10) or not (z <= 7e-21): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2e-10) || !(z <= 7e-21)) 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 ((z <= -2e-10) || ~((z <= 7e-21))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2e-10], N[Not[LessEqual[z, 7e-21]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-10} \lor \neg \left(z \leq 7 \cdot 10^{-21}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.00000000000000007e-10 or 7.0000000000000007e-21 < z Initial program 44.8%
Taylor expanded in t around inf 24.3%
*-commutative24.3%
Simplified24.3%
Taylor expanded in y around 0 30.9%
if -2.00000000000000007e-10 < z < 7.0000000000000007e-21Initial program 88.0%
Taylor expanded in z around 0 56.5%
Final simplification43.9%
(FPCore (x y z t a b) :precision binary64 (if (<= z -0.85) (/ a (- b)) (if (<= z 9.4e-20) x (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.85) {
tmp = a / -b;
} else if (z <= 9.4e-20) {
tmp = x;
} else {
tmp = t / 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 (z <= (-0.85d0)) then
tmp = a / -b
else if (z <= 9.4d-20) then
tmp = x
else
tmp = t / 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 (z <= -0.85) {
tmp = a / -b;
} else if (z <= 9.4e-20) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.85: tmp = a / -b elif z <= 9.4e-20: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.85) tmp = Float64(a / Float64(-b)); elseif (z <= 9.4e-20) tmp = x; else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.85) tmp = a / -b; elseif (z <= 9.4e-20) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.85], N[(a / (-b)), $MachinePrecision], If[LessEqual[z, 9.4e-20], x, N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.85:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;z \leq 9.4 \cdot 10^{-20}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -0.849999999999999978Initial program 40.7%
Taylor expanded in x around inf 35.6%
Taylor expanded in b around inf 44.6%
associate-/l*39.4%
associate--l+39.4%
Simplified39.4%
Taylor expanded in a around inf 30.9%
associate-*r/30.9%
mul-1-neg30.9%
Simplified30.9%
if -0.849999999999999978 < z < 9.4000000000000003e-20Initial program 88.2%
Taylor expanded in z around 0 55.7%
if 9.4000000000000003e-20 < z Initial program 46.4%
Taylor expanded in t around inf 22.4%
*-commutative22.4%
Simplified22.4%
Taylor expanded in y around 0 32.8%
Final simplification44.2%
(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 66.7%
Taylor expanded in z around 0 30.5%
(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 2024100
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:alt
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))