
(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 (- y (* z (- y b))))
(t_2 (* x (+ (/ y t_1) (/ (* z (- t a)) (* x t_1)))))
(t_3 (/ (- t a) (- b y))))
(if (<= z -1.2e+52)
t_3
(if (<= z -7.6e-104)
t_2
(if (<= z 5.6e-196)
(/ (fma z (- t a) (* y x)) (fma z (- b y) y))
(if (<= z 1.02e+27) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y - (z * (y - b));
double t_2 = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -1.2e+52) {
tmp = t_3;
} else if (z <= -7.6e-104) {
tmp = t_2;
} else if (z <= 5.6e-196) {
tmp = fma(z, (t - a), (y * x)) / fma(z, (b - y), y);
} else if (z <= 1.02e+27) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y - Float64(z * Float64(y - b))) t_2 = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(z * Float64(t - a)) / Float64(x * t_1)))) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.2e+52) tmp = t_3; elseif (z <= -7.6e-104) tmp = t_2; elseif (z <= 5.6e-196) tmp = Float64(fma(z, Float64(t - a), Float64(y * x)) / fma(z, Float64(b - y), y)); elseif (z <= 1.02e+27) tmp = t_2; else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(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]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e+52], t$95$3, If[LessEqual[z, -7.6e-104], t$95$2, If[LessEqual[z, 5.6e-196], N[(N[(z * N[(t - a), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e+27], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - z \cdot \left(y - b\right)\\
t_2 := x \cdot \left(\frac{y}{t\_1} + \frac{z \cdot \left(t - a\right)}{x \cdot t\_1}\right)\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+52}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -7.6 \cdot 10^{-104}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-196}:\\
\;\;\;\;\frac{\mathsf{fma}\left(z, t - a, y \cdot x\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{+27}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -1.2e52 or 1.0199999999999999e27 < z Initial program 37.7%
Taylor expanded in z around inf 86.6%
if -1.2e52 < z < -7.6000000000000001e-104 or 5.5999999999999997e-196 < z < 1.0199999999999999e27Initial program 78.6%
Taylor expanded in x around inf 91.7%
if -7.6000000000000001e-104 < z < 5.5999999999999997e-196Initial program 95.6%
+-commutative95.6%
fma-define95.6%
+-commutative95.6%
fma-define95.7%
Simplified95.7%
Final simplification90.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- y (* z (- y b))))
(t_2 (/ (- t a) (- b y)))
(t_3 (* z (- t a)))
(t_4 (* x (+ (/ y t_1) (/ t_3 (* x t_1))))))
(if (<= z -9e+51)
t_2
(if (<= z -6.2e-104)
t_4
(if (<= z 2.9e-199)
(/ (+ t_3 (* y x)) t_1)
(if (<= z 5.6e+24) t_4 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y - (z * (y - b));
double t_2 = (t - a) / (b - y);
double t_3 = z * (t - a);
double t_4 = x * ((y / t_1) + (t_3 / (x * t_1)));
double tmp;
if (z <= -9e+51) {
tmp = t_2;
} else if (z <= -6.2e-104) {
tmp = t_4;
} else if (z <= 2.9e-199) {
tmp = (t_3 + (y * x)) / t_1;
} else if (z <= 5.6e+24) {
tmp = t_4;
} 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) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = y - (z * (y - b))
t_2 = (t - a) / (b - y)
t_3 = z * (t - a)
t_4 = x * ((y / t_1) + (t_3 / (x * t_1)))
if (z <= (-9d+51)) then
tmp = t_2
else if (z <= (-6.2d-104)) then
tmp = t_4
else if (z <= 2.9d-199) then
tmp = (t_3 + (y * x)) / t_1
else if (z <= 5.6d+24) then
tmp = t_4
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 = y - (z * (y - b));
double t_2 = (t - a) / (b - y);
double t_3 = z * (t - a);
double t_4 = x * ((y / t_1) + (t_3 / (x * t_1)));
double tmp;
if (z <= -9e+51) {
tmp = t_2;
} else if (z <= -6.2e-104) {
tmp = t_4;
} else if (z <= 2.9e-199) {
tmp = (t_3 + (y * x)) / t_1;
} else if (z <= 5.6e+24) {
tmp = t_4;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y - (z * (y - b)) t_2 = (t - a) / (b - y) t_3 = z * (t - a) t_4 = x * ((y / t_1) + (t_3 / (x * t_1))) tmp = 0 if z <= -9e+51: tmp = t_2 elif z <= -6.2e-104: tmp = t_4 elif z <= 2.9e-199: tmp = (t_3 + (y * x)) / t_1 elif z <= 5.6e+24: tmp = t_4 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y - Float64(z * Float64(y - b))) t_2 = Float64(Float64(t - a) / Float64(b - y)) t_3 = Float64(z * Float64(t - a)) t_4 = Float64(x * Float64(Float64(y / t_1) + Float64(t_3 / Float64(x * t_1)))) tmp = 0.0 if (z <= -9e+51) tmp = t_2; elseif (z <= -6.2e-104) tmp = t_4; elseif (z <= 2.9e-199) tmp = Float64(Float64(t_3 + Float64(y * x)) / t_1); elseif (z <= 5.6e+24) tmp = t_4; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y - (z * (y - b)); t_2 = (t - a) / (b - y); t_3 = z * (t - a); t_4 = x * ((y / t_1) + (t_3 / (x * t_1))); tmp = 0.0; if (z <= -9e+51) tmp = t_2; elseif (z <= -6.2e-104) tmp = t_4; elseif (z <= 2.9e-199) tmp = (t_3 + (y * x)) / t_1; elseif (z <= 5.6e+24) tmp = t_4; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(t$95$3 / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e+51], t$95$2, If[LessEqual[z, -6.2e-104], t$95$4, If[LessEqual[z, 2.9e-199], N[(N[(t$95$3 + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z, 5.6e+24], t$95$4, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - z \cdot \left(y - b\right)\\
t_2 := \frac{t - a}{b - y}\\
t_3 := z \cdot \left(t - a\right)\\
t_4 := x \cdot \left(\frac{y}{t\_1} + \frac{t\_3}{x \cdot t\_1}\right)\\
\mathbf{if}\;z \leq -9 \cdot 10^{+51}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-104}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-199}:\\
\;\;\;\;\frac{t\_3 + y \cdot x}{t\_1}\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{+24}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -8.9999999999999999e51 or 5.6000000000000003e24 < z Initial program 37.7%
Taylor expanded in z around inf 86.6%
if -8.9999999999999999e51 < z < -6.19999999999999951e-104 or 2.9e-199 < z < 5.6000000000000003e24Initial program 78.6%
Taylor expanded in x around inf 91.7%
if -6.19999999999999951e-104 < z < 2.9e-199Initial program 95.6%
Final simplification90.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* y x) (* z t)) (- y (* z (- y b)))))
(t_2 (/ (- t a) (- b y))))
(if (<= z -1.6e+18)
t_2
(if (<= z 5.5e-71)
t_1
(if (<= z 2.6e-38) (- x (/ (* z a) y)) (if (<= z 0.00195) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * x) + (z * t)) / (y - (z * (y - b)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.6e+18) {
tmp = t_2;
} else if (z <= 5.5e-71) {
tmp = t_1;
} else if (z <= 2.6e-38) {
tmp = x - ((z * a) / y);
} else if (z <= 0.00195) {
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 = ((y * x) + (z * t)) / (y - (z * (y - b)))
t_2 = (t - a) / (b - y)
if (z <= (-1.6d+18)) then
tmp = t_2
else if (z <= 5.5d-71) then
tmp = t_1
else if (z <= 2.6d-38) then
tmp = x - ((z * a) / y)
else if (z <= 0.00195d0) 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 = ((y * x) + (z * t)) / (y - (z * (y - b)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.6e+18) {
tmp = t_2;
} else if (z <= 5.5e-71) {
tmp = t_1;
} else if (z <= 2.6e-38) {
tmp = x - ((z * a) / y);
} else if (z <= 0.00195) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y * x) + (z * t)) / (y - (z * (y - b))) t_2 = (t - a) / (b - y) tmp = 0 if z <= -1.6e+18: tmp = t_2 elif z <= 5.5e-71: tmp = t_1 elif z <= 2.6e-38: tmp = x - ((z * a) / y) elif z <= 0.00195: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * x) + Float64(z * t)) / Float64(y - Float64(z * Float64(y - b)))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.6e+18) tmp = t_2; elseif (z <= 5.5e-71) tmp = t_1; elseif (z <= 2.6e-38) tmp = Float64(x - Float64(Float64(z * a) / y)); elseif (z <= 0.00195) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((y * x) + (z * t)) / (y - (z * (y - b))); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.6e+18) tmp = t_2; elseif (z <= 5.5e-71) tmp = t_1; elseif (z <= 2.6e-38) tmp = x - ((z * a) / y); elseif (z <= 0.00195) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * x), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+18], t$95$2, If[LessEqual[z, 5.5e-71], t$95$1, If[LessEqual[z, 2.6e-38], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.00195], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot x + z \cdot t}{y - z \cdot \left(y - b\right)}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+18}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-38}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{elif}\;z \leq 0.00195:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.6e18 or 0.0019499999999999999 < z Initial program 42.8%
Taylor expanded in z around inf 85.1%
if -1.6e18 < z < 5.4999999999999997e-71 or 2.60000000000000011e-38 < z < 0.0019499999999999999Initial program 88.8%
Taylor expanded in a around 0 74.0%
if 5.4999999999999997e-71 < z < 2.60000000000000011e-38Initial program 54.4%
Taylor expanded in z around 0 37.4%
Taylor expanded in a around inf 100.0%
Final simplification80.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* z (- t a)) (* y x))) (t_2 (/ (- t a) (- b y))))
(if (<= z -2.6e-79)
t_2
(if (<= z 5.6e-211)
(/ t_1 y)
(if (<= z 3.3e-175)
(/ t_1 (* z b))
(if (<= z 9.2e-7) (+ x (* z (/ t y))) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (t - a)) + (y * x);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -2.6e-79) {
tmp = t_2;
} else if (z <= 5.6e-211) {
tmp = t_1 / y;
} else if (z <= 3.3e-175) {
tmp = t_1 / (z * b);
} else if (z <= 9.2e-7) {
tmp = x + (z * (t / y));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z * (t - a)) + (y * x)
t_2 = (t - a) / (b - y)
if (z <= (-2.6d-79)) then
tmp = t_2
else if (z <= 5.6d-211) then
tmp = t_1 / y
else if (z <= 3.3d-175) then
tmp = t_1 / (z * b)
else if (z <= 9.2d-7) then
tmp = x + (z * (t / y))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (t - a)) + (y * x);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -2.6e-79) {
tmp = t_2;
} else if (z <= 5.6e-211) {
tmp = t_1 / y;
} else if (z <= 3.3e-175) {
tmp = t_1 / (z * b);
} else if (z <= 9.2e-7) {
tmp = x + (z * (t / y));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * (t - a)) + (y * x) t_2 = (t - a) / (b - y) tmp = 0 if z <= -2.6e-79: tmp = t_2 elif z <= 5.6e-211: tmp = t_1 / y elif z <= 3.3e-175: tmp = t_1 / (z * b) elif z <= 9.2e-7: tmp = x + (z * (t / y)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(t - a)) + Float64(y * x)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.6e-79) tmp = t_2; elseif (z <= 5.6e-211) tmp = Float64(t_1 / y); elseif (z <= 3.3e-175) tmp = Float64(t_1 / Float64(z * b)); elseif (z <= 9.2e-7) tmp = Float64(x + Float64(z * Float64(t / y))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * (t - a)) + (y * x); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -2.6e-79) tmp = t_2; elseif (z <= 5.6e-211) tmp = t_1 / y; elseif (z <= 3.3e-175) tmp = t_1 / (z * b); elseif (z <= 9.2e-7) tmp = x + (z * (t / y)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e-79], t$95$2, If[LessEqual[z, 5.6e-211], N[(t$95$1 / y), $MachinePrecision], If[LessEqual[z, 3.3e-175], N[(t$95$1 / N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e-7], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right) + y \cdot x\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{-79}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-211}:\\
\;\;\;\;\frac{t\_1}{y}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-175}:\\
\;\;\;\;\frac{t\_1}{z \cdot b}\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-7}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.59999999999999994e-79 or 9.1999999999999998e-7 < z Initial program 48.1%
Taylor expanded in z around inf 79.4%
if -2.59999999999999994e-79 < z < 5.5999999999999996e-211Initial program 92.0%
Taylor expanded in z around 0 70.3%
if 5.5999999999999996e-211 < z < 3.29999999999999999e-175Initial program 89.3%
Taylor expanded in y around 0 78.6%
*-commutative78.6%
Simplified78.6%
if 3.29999999999999999e-175 < z < 9.1999999999999998e-7Initial program 82.5%
Taylor expanded in z around 0 57.8%
Taylor expanded in t around inf 65.2%
Final simplification75.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -4e-79)
t_1
(if (<= z 1.3e-206)
(/ (+ (* z (- t a)) (* y x)) y)
(if (<= z 3.3e-175)
(* y (- (/ x (* z b)) (/ a (* b y))))
(if (<= z 1.7e-8) (+ x (* z (/ t y))) 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-79) {
tmp = t_1;
} else if (z <= 1.3e-206) {
tmp = ((z * (t - a)) + (y * x)) / y;
} else if (z <= 3.3e-175) {
tmp = y * ((x / (z * b)) - (a / (b * y)));
} else if (z <= 1.7e-8) {
tmp = x + (z * (t / y));
} 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-79)) then
tmp = t_1
else if (z <= 1.3d-206) then
tmp = ((z * (t - a)) + (y * x)) / y
else if (z <= 3.3d-175) then
tmp = y * ((x / (z * b)) - (a / (b * y)))
else if (z <= 1.7d-8) then
tmp = x + (z * (t / y))
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-79) {
tmp = t_1;
} else if (z <= 1.3e-206) {
tmp = ((z * (t - a)) + (y * x)) / y;
} else if (z <= 3.3e-175) {
tmp = y * ((x / (z * b)) - (a / (b * y)));
} else if (z <= 1.7e-8) {
tmp = x + (z * (t / y));
} 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-79: tmp = t_1 elif z <= 1.3e-206: tmp = ((z * (t - a)) + (y * x)) / y elif z <= 3.3e-175: tmp = y * ((x / (z * b)) - (a / (b * y))) elif z <= 1.7e-8: tmp = x + (z * (t / y)) 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-79) tmp = t_1; elseif (z <= 1.3e-206) tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / y); elseif (z <= 3.3e-175) tmp = Float64(y * Float64(Float64(x / Float64(z * b)) - Float64(a / Float64(b * y)))); elseif (z <= 1.7e-8) tmp = Float64(x + Float64(z * Float64(t / y))); 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-79) tmp = t_1; elseif (z <= 1.3e-206) tmp = ((z * (t - a)) + (y * x)) / y; elseif (z <= 3.3e-175) tmp = y * ((x / (z * b)) - (a / (b * y))); elseif (z <= 1.7e-8) tmp = x + (z * (t / y)); 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-79], t$95$1, If[LessEqual[z, 1.3e-206], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 3.3e-175], N[(y * N[(N[(x / N[(z * b), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e-8], N[(x + N[(z * N[(t / y), $MachinePrecision]), $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^{-79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-206}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-175}:\\
\;\;\;\;y \cdot \left(\frac{x}{z \cdot b} - \frac{a}{b \cdot y}\right)\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-8}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4e-79 or 1.7e-8 < z Initial program 48.1%
Taylor expanded in z around inf 79.4%
if -4e-79 < z < 1.3e-206Initial program 92.2%
Taylor expanded in z around 0 69.3%
if 1.3e-206 < z < 3.29999999999999999e-175Initial program 88.0%
Taylor expanded in t around inf 87.8%
Taylor expanded in b around inf 51.2%
Taylor expanded in t around 0 52.0%
+-commutative52.0%
mul-1-neg52.0%
unsub-neg52.0%
associate-/l*51.8%
Simplified51.8%
Taylor expanded in y around inf 76.1%
+-commutative76.1%
mul-1-neg76.1%
unsub-neg76.1%
*-commutative76.1%
Simplified76.1%
if 3.29999999999999999e-175 < z < 1.7e-8Initial program 82.5%
Taylor expanded in z around 0 57.8%
Taylor expanded in t around inf 65.2%
Final simplification74.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -4e-79)
t_1
(if (<= z 9.5e-220)
(/ (+ (* z (- t a)) (* y x)) y)
(if (<= z 1.08e-173)
(/ (* y x) (- y (* z (- y b))))
(if (<= z 2.25e-6) (+ x (* z (/ t y))) 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-79) {
tmp = t_1;
} else if (z <= 9.5e-220) {
tmp = ((z * (t - a)) + (y * x)) / y;
} else if (z <= 1.08e-173) {
tmp = (y * x) / (y - (z * (y - b)));
} else if (z <= 2.25e-6) {
tmp = x + (z * (t / y));
} 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-79)) then
tmp = t_1
else if (z <= 9.5d-220) then
tmp = ((z * (t - a)) + (y * x)) / y
else if (z <= 1.08d-173) then
tmp = (y * x) / (y - (z * (y - b)))
else if (z <= 2.25d-6) then
tmp = x + (z * (t / y))
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-79) {
tmp = t_1;
} else if (z <= 9.5e-220) {
tmp = ((z * (t - a)) + (y * x)) / y;
} else if (z <= 1.08e-173) {
tmp = (y * x) / (y - (z * (y - b)));
} else if (z <= 2.25e-6) {
tmp = x + (z * (t / y));
} 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-79: tmp = t_1 elif z <= 9.5e-220: tmp = ((z * (t - a)) + (y * x)) / y elif z <= 1.08e-173: tmp = (y * x) / (y - (z * (y - b))) elif z <= 2.25e-6: tmp = x + (z * (t / y)) 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-79) tmp = t_1; elseif (z <= 9.5e-220) tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / y); elseif (z <= 1.08e-173) tmp = Float64(Float64(y * x) / Float64(y - Float64(z * Float64(y - b)))); elseif (z <= 2.25e-6) tmp = Float64(x + Float64(z * Float64(t / y))); 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-79) tmp = t_1; elseif (z <= 9.5e-220) tmp = ((z * (t - a)) + (y * x)) / y; elseif (z <= 1.08e-173) tmp = (y * x) / (y - (z * (y - b))); elseif (z <= 2.25e-6) tmp = x + (z * (t / y)); 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-79], t$95$1, If[LessEqual[z, 9.5e-220], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.08e-173], N[(N[(y * x), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e-6], N[(x + N[(z * N[(t / y), $MachinePrecision]), $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^{-79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-220}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y}\\
\mathbf{elif}\;z \leq 1.08 \cdot 10^{-173}:\\
\;\;\;\;\frac{y \cdot x}{y - z \cdot \left(y - b\right)}\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{-6}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4e-79 or 2.25000000000000006e-6 < z Initial program 48.1%
Taylor expanded in z around inf 79.4%
if -4e-79 < z < 9.50000000000000062e-220Initial program 91.8%
Taylor expanded in z around 0 70.8%
if 9.50000000000000062e-220 < z < 1.07999999999999995e-173Initial program 91.3%
Taylor expanded in x around inf 64.7%
*-commutative64.7%
Simplified64.7%
if 1.07999999999999995e-173 < z < 2.25000000000000006e-6Initial program 82.5%
Taylor expanded in z around 0 57.8%
Taylor expanded in t around inf 65.2%
Final simplification74.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -7.2e-35)
t_1
(if (<= z 1.05e-226)
(- x (/ (* z a) y))
(if (<= z 8.4e-172)
(/ (* y x) (- y (* z (- y b))))
(if (<= z 1.6e-8) (+ x (* z (/ t y))) 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 <= -7.2e-35) {
tmp = t_1;
} else if (z <= 1.05e-226) {
tmp = x - ((z * a) / y);
} else if (z <= 8.4e-172) {
tmp = (y * x) / (y - (z * (y - b)));
} else if (z <= 1.6e-8) {
tmp = x + (z * (t / y));
} 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 <= (-7.2d-35)) then
tmp = t_1
else if (z <= 1.05d-226) then
tmp = x - ((z * a) / y)
else if (z <= 8.4d-172) then
tmp = (y * x) / (y - (z * (y - b)))
else if (z <= 1.6d-8) then
tmp = x + (z * (t / y))
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 <= -7.2e-35) {
tmp = t_1;
} else if (z <= 1.05e-226) {
tmp = x - ((z * a) / y);
} else if (z <= 8.4e-172) {
tmp = (y * x) / (y - (z * (y - b)));
} else if (z <= 1.6e-8) {
tmp = x + (z * (t / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -7.2e-35: tmp = t_1 elif z <= 1.05e-226: tmp = x - ((z * a) / y) elif z <= 8.4e-172: tmp = (y * x) / (y - (z * (y - b))) elif z <= 1.6e-8: tmp = x + (z * (t / y)) 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 <= -7.2e-35) tmp = t_1; elseif (z <= 1.05e-226) tmp = Float64(x - Float64(Float64(z * a) / y)); elseif (z <= 8.4e-172) tmp = Float64(Float64(y * x) / Float64(y - Float64(z * Float64(y - b)))); elseif (z <= 1.6e-8) tmp = Float64(x + Float64(z * Float64(t / y))); 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 <= -7.2e-35) tmp = t_1; elseif (z <= 1.05e-226) tmp = x - ((z * a) / y); elseif (z <= 8.4e-172) tmp = (y * x) / (y - (z * (y - b))); elseif (z <= 1.6e-8) tmp = x + (z * (t / y)); 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, -7.2e-35], t$95$1, If[LessEqual[z, 1.05e-226], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.4e-172], N[(N[(y * x), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-8], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{-35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-226}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{elif}\;z \leq 8.4 \cdot 10^{-172}:\\
\;\;\;\;\frac{y \cdot x}{y - z \cdot \left(y - b\right)}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-8}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.20000000000000038e-35 or 1.6000000000000001e-8 < z Initial program 46.5%
Taylor expanded in z around inf 82.1%
if -7.20000000000000038e-35 < z < 1.0500000000000001e-226Initial program 88.7%
Taylor expanded in z around 0 51.9%
Taylor expanded in a around inf 63.4%
if 1.0500000000000001e-226 < z < 8.3999999999999998e-172Initial program 93.1%
Taylor expanded in x around inf 65.3%
*-commutative65.3%
Simplified65.3%
if 8.3999999999999998e-172 < z < 1.6000000000000001e-8Initial program 82.5%
Taylor expanded in z around 0 57.8%
Taylor expanded in t around inf 65.2%
Final simplification73.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a t) y)) (t_2 (/ (- t a) b)))
(if (<= z -2e+61)
t_2
(if (<= z -40000000000000.0)
t_1
(if (<= z -4.2e-79) t_2 (if (<= z 1.0) (+ x (* z (/ t y))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - t) / y;
double t_2 = (t - a) / b;
double tmp;
if (z <= -2e+61) {
tmp = t_2;
} else if (z <= -40000000000000.0) {
tmp = t_1;
} else if (z <= -4.2e-79) {
tmp = t_2;
} else if (z <= 1.0) {
tmp = x + (z * (t / y));
} 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) :: t_2
real(8) :: tmp
t_1 = (a - t) / y
t_2 = (t - a) / b
if (z <= (-2d+61)) then
tmp = t_2
else if (z <= (-40000000000000.0d0)) then
tmp = t_1
else if (z <= (-4.2d-79)) then
tmp = t_2
else if (z <= 1.0d0) then
tmp = x + (z * (t / y))
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 = (a - t) / y;
double t_2 = (t - a) / b;
double tmp;
if (z <= -2e+61) {
tmp = t_2;
} else if (z <= -40000000000000.0) {
tmp = t_1;
} else if (z <= -4.2e-79) {
tmp = t_2;
} else if (z <= 1.0) {
tmp = x + (z * (t / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - t) / y t_2 = (t - a) / b tmp = 0 if z <= -2e+61: tmp = t_2 elif z <= -40000000000000.0: tmp = t_1 elif z <= -4.2e-79: tmp = t_2 elif z <= 1.0: tmp = x + (z * (t / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - t) / y) t_2 = Float64(Float64(t - a) / b) tmp = 0.0 if (z <= -2e+61) tmp = t_2; elseif (z <= -40000000000000.0) tmp = t_1; elseif (z <= -4.2e-79) tmp = t_2; elseif (z <= 1.0) tmp = Float64(x + Float64(z * Float64(t / y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - t) / y; t_2 = (t - a) / b; tmp = 0.0; if (z <= -2e+61) tmp = t_2; elseif (z <= -40000000000000.0) tmp = t_1; elseif (z <= -4.2e-79) tmp = t_2; elseif (z <= 1.0) tmp = x + (z * (t / y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[z, -2e+61], t$95$2, If[LessEqual[z, -40000000000000.0], t$95$1, If[LessEqual[z, -4.2e-79], t$95$2, If[LessEqual[z, 1.0], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y}\\
t_2 := \frac{t - a}{b}\\
\mathbf{if}\;z \leq -2 \cdot 10^{+61}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -40000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-79}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.9999999999999999e61 or -4e13 < z < -4.1999999999999999e-79Initial program 56.8%
Taylor expanded in y around 0 55.4%
if -1.9999999999999999e61 < z < -4e13 or 1 < z Initial program 40.5%
Taylor expanded in z around inf 83.4%
Taylor expanded in b around 0 58.2%
associate-*r/58.2%
neg-mul-158.2%
Simplified58.2%
if -4.1999999999999999e-79 < z < 1Initial program 89.2%
Taylor expanded in z around 0 54.0%
Taylor expanded in t around inf 59.8%
Final simplification58.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6.5e+30) (not (<= z 8.5e+27))) (/ (- t a) (- b y)) (/ (+ (* z (- t a)) (* y x)) (- y (* z (- y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.5e+30) || !(z <= 8.5e+27)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y - (z * (y - 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 <= (-6.5d+30)) .or. (.not. (z <= 8.5d+27))) then
tmp = (t - a) / (b - y)
else
tmp = ((z * (t - a)) + (y * x)) / (y - (z * (y - 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 <= -6.5e+30) || !(z <= 8.5e+27)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y - (z * (y - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.5e+30) or not (z <= 8.5e+27): tmp = (t - a) / (b - y) else: tmp = ((z * (t - a)) + (y * x)) / (y - (z * (y - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.5e+30) || !(z <= 8.5e+27)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / Float64(y - Float64(z * Float64(y - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.5e+30) || ~((z <= 8.5e+27))) tmp = (t - a) / (b - y); else tmp = ((z * (t - a)) + (y * x)) / (y - (z * (y - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.5e+30], N[Not[LessEqual[z, 8.5e+27]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+30} \lor \neg \left(z \leq 8.5 \cdot 10^{+27}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y - z \cdot \left(y - b\right)}\\
\end{array}
\end{array}
if z < -6.5e30 or 8.5e27 < z Initial program 39.6%
Taylor expanded in z around inf 85.9%
if -6.5e30 < z < 8.5e27Initial program 87.3%
Final simplification86.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -3.2e+97)
t_1
(if (<= y -8.5e+15)
(/ t (- b y))
(if (<= y -2.3e-35)
(/ a (- y b))
(if (<= y 4.5e+18) (/ (- t a) b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -3.2e+97) {
tmp = t_1;
} else if (y <= -8.5e+15) {
tmp = t / (b - y);
} else if (y <= -2.3e-35) {
tmp = a / (y - b);
} else if (y <= 4.5e+18) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-3.2d+97)) then
tmp = t_1
else if (y <= (-8.5d+15)) then
tmp = t / (b - y)
else if (y <= (-2.3d-35)) then
tmp = a / (y - b)
else if (y <= 4.5d+18) then
tmp = (t - a) / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -3.2e+97) {
tmp = t_1;
} else if (y <= -8.5e+15) {
tmp = t / (b - y);
} else if (y <= -2.3e-35) {
tmp = a / (y - b);
} else if (y <= 4.5e+18) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -3.2e+97: tmp = t_1 elif y <= -8.5e+15: tmp = t / (b - y) elif y <= -2.3e-35: tmp = a / (y - b) elif y <= 4.5e+18: tmp = (t - a) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -3.2e+97) tmp = t_1; elseif (y <= -8.5e+15) tmp = Float64(t / Float64(b - y)); elseif (y <= -2.3e-35) tmp = Float64(a / Float64(y - b)); elseif (y <= 4.5e+18) tmp = Float64(Float64(t - a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -3.2e+97) tmp = t_1; elseif (y <= -8.5e+15) tmp = t / (b - y); elseif (y <= -2.3e-35) tmp = a / (y - b); elseif (y <= 4.5e+18) tmp = (t - a) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.2e+97], t$95$1, If[LessEqual[y, -8.5e+15], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.3e-35], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+18], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -3.2 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{+15}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-35}:\\
\;\;\;\;\frac{a}{y - b}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+18}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.20000000000000016e97 or 4.5e18 < y Initial program 52.1%
Taylor expanded in y around inf 58.4%
mul-1-neg58.4%
unsub-neg58.4%
Simplified58.4%
if -3.20000000000000016e97 < y < -8.5e15Initial program 68.0%
Taylor expanded in t around inf 38.7%
*-commutative38.7%
Simplified38.7%
Taylor expanded in z around inf 49.9%
if -8.5e15 < y < -2.2999999999999999e-35Initial program 81.2%
Taylor expanded in z around inf 44.6%
Taylor expanded in t around 0 35.1%
associate-*r/35.1%
mul-1-neg35.1%
Simplified35.1%
if -2.2999999999999999e-35 < y < 4.5e18Initial program 77.7%
Taylor expanded in y around 0 59.6%
Final simplification57.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -7.8e+97)
t_1
(if (<= y -1.45e+14)
(/ t (- b y))
(if (<= y -2.35e-35) x (if (<= y 2.7e+18) (/ (- t a) b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -7.8e+97) {
tmp = t_1;
} else if (y <= -1.45e+14) {
tmp = t / (b - y);
} else if (y <= -2.35e-35) {
tmp = x;
} else if (y <= 2.7e+18) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-7.8d+97)) then
tmp = t_1
else if (y <= (-1.45d+14)) then
tmp = t / (b - y)
else if (y <= (-2.35d-35)) then
tmp = x
else if (y <= 2.7d+18) then
tmp = (t - a) / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -7.8e+97) {
tmp = t_1;
} else if (y <= -1.45e+14) {
tmp = t / (b - y);
} else if (y <= -2.35e-35) {
tmp = x;
} else if (y <= 2.7e+18) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -7.8e+97: tmp = t_1 elif y <= -1.45e+14: tmp = t / (b - y) elif y <= -2.35e-35: tmp = x elif y <= 2.7e+18: tmp = (t - a) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -7.8e+97) tmp = t_1; elseif (y <= -1.45e+14) tmp = Float64(t / Float64(b - y)); elseif (y <= -2.35e-35) tmp = x; elseif (y <= 2.7e+18) tmp = Float64(Float64(t - a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -7.8e+97) tmp = t_1; elseif (y <= -1.45e+14) tmp = t / (b - y); elseif (y <= -2.35e-35) tmp = x; elseif (y <= 2.7e+18) tmp = (t - a) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.8e+97], t$95$1, If[LessEqual[y, -1.45e+14], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.35e-35], x, If[LessEqual[y, 2.7e+18], N[(N[(t - a), $MachinePrecision] / 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^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{+14}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq -2.35 \cdot 10^{-35}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+18}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.7999999999999999e97 or 2.7e18 < y Initial program 52.1%
Taylor expanded in y around inf 58.4%
mul-1-neg58.4%
unsub-neg58.4%
Simplified58.4%
if -7.7999999999999999e97 < y < -1.45e14Initial program 69.9%
Taylor expanded in t around inf 36.5%
*-commutative36.5%
Simplified36.5%
Taylor expanded in z around inf 47.1%
if -1.45e14 < y < -2.35e-35Initial program 79.9%
Taylor expanded in z around 0 31.9%
if -2.35e-35 < y < 2.7e18Initial program 77.7%
Taylor expanded in y around 0 59.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))) (t_2 (/ x (- 1.0 z))))
(if (<= y -5.5e+97)
t_2
(if (<= y -1.95e-278)
t_1
(if (<= y 1.8e-148) (/ a (- b)) (if (<= y 2.25e+60) 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 <= -5.5e+97) {
tmp = t_2;
} else if (y <= -1.95e-278) {
tmp = t_1;
} else if (y <= 1.8e-148) {
tmp = a / -b;
} else if (y <= 2.25e+60) {
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 <= (-5.5d+97)) then
tmp = t_2
else if (y <= (-1.95d-278)) then
tmp = t_1
else if (y <= 1.8d-148) then
tmp = a / -b
else if (y <= 2.25d+60) 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 <= -5.5e+97) {
tmp = t_2;
} else if (y <= -1.95e-278) {
tmp = t_1;
} else if (y <= 1.8e-148) {
tmp = a / -b;
} else if (y <= 2.25e+60) {
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 <= -5.5e+97: tmp = t_2 elif y <= -1.95e-278: tmp = t_1 elif y <= 1.8e-148: tmp = a / -b elif y <= 2.25e+60: 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 <= -5.5e+97) tmp = t_2; elseif (y <= -1.95e-278) tmp = t_1; elseif (y <= 1.8e-148) tmp = Float64(a / Float64(-b)); elseif (y <= 2.25e+60) 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 <= -5.5e+97) tmp = t_2; elseif (y <= -1.95e-278) tmp = t_1; elseif (y <= 1.8e-148) tmp = a / -b; elseif (y <= 2.25e+60) 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, -5.5e+97], t$95$2, If[LessEqual[y, -1.95e-278], t$95$1, If[LessEqual[y, 1.8e-148], N[(a / (-b)), $MachinePrecision], If[LessEqual[y, 2.25e+60], 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 -5.5 \cdot 10^{+97}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.95 \cdot 10^{-278}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-148}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -5.50000000000000021e97 or 2.25000000000000006e60 < y Initial program 50.2%
Taylor expanded in y around inf 63.0%
mul-1-neg63.0%
unsub-neg63.0%
Simplified63.0%
if -5.50000000000000021e97 < y < -1.9500000000000001e-278 or 1.7999999999999999e-148 < y < 2.25000000000000006e60Initial program 78.6%
Taylor expanded in t around inf 33.5%
*-commutative33.5%
Simplified33.5%
Taylor expanded in z around inf 32.9%
if -1.9500000000000001e-278 < y < 1.7999999999999999e-148Initial program 67.7%
Taylor expanded in t around inf 61.7%
Taylor expanded in b around inf 71.6%
Taylor expanded in a around inf 55.9%
mul-1-neg55.9%
Simplified55.9%
Final simplification47.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -3e+97)
t_1
(if (<= y -4.4e-35) (/ (- a t) y) (if (<= y 8e+18) (/ (- t a) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -3e+97) {
tmp = t_1;
} else if (y <= -4.4e-35) {
tmp = (a - t) / y;
} else if (y <= 8e+18) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-3d+97)) then
tmp = t_1
else if (y <= (-4.4d-35)) then
tmp = (a - t) / y
else if (y <= 8d+18) then
tmp = (t - a) / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -3e+97) {
tmp = t_1;
} else if (y <= -4.4e-35) {
tmp = (a - t) / y;
} else if (y <= 8e+18) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -3e+97: tmp = t_1 elif y <= -4.4e-35: tmp = (a - t) / y elif y <= 8e+18: tmp = (t - a) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -3e+97) tmp = t_1; elseif (y <= -4.4e-35) tmp = Float64(Float64(a - t) / y); elseif (y <= 8e+18) tmp = Float64(Float64(t - a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -3e+97) tmp = t_1; elseif (y <= -4.4e-35) tmp = (a - t) / y; elseif (y <= 8e+18) tmp = (t - a) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3e+97], t$95$1, If[LessEqual[y, -4.4e-35], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 8e+18], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -3 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.4 \cdot 10^{-35}:\\
\;\;\;\;\frac{a - t}{y}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+18}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.9999999999999998e97 or 8e18 < y Initial program 52.3%
Taylor expanded in y around inf 57.9%
mul-1-neg57.9%
unsub-neg57.9%
Simplified57.9%
if -2.9999999999999998e97 < y < -4.39999999999999987e-35Initial program 73.3%
Taylor expanded in z around inf 56.4%
Taylor expanded in b around 0 41.5%
associate-*r/41.5%
neg-mul-141.5%
Simplified41.5%
if -4.39999999999999987e-35 < y < 8e18Initial program 77.9%
Taylor expanded in y around 0 59.1%
Final simplification56.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ a (- b))))
(if (<= z -1.2e+50)
t_1
(if (<= z -8e-41) (/ t b) (if (<= z 8.2e-28) (+ x (* z x)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / -b;
double tmp;
if (z <= -1.2e+50) {
tmp = t_1;
} else if (z <= -8e-41) {
tmp = t / b;
} else if (z <= 8.2e-28) {
tmp = x + (z * 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 = a / -b
if (z <= (-1.2d+50)) then
tmp = t_1
else if (z <= (-8d-41)) then
tmp = t / b
else if (z <= 8.2d-28) then
tmp = x + (z * 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 = a / -b;
double tmp;
if (z <= -1.2e+50) {
tmp = t_1;
} else if (z <= -8e-41) {
tmp = t / b;
} else if (z <= 8.2e-28) {
tmp = x + (z * x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / -b tmp = 0 if z <= -1.2e+50: tmp = t_1 elif z <= -8e-41: tmp = t / b elif z <= 8.2e-28: tmp = x + (z * x) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(-b)) tmp = 0.0 if (z <= -1.2e+50) tmp = t_1; elseif (z <= -8e-41) tmp = Float64(t / b); elseif (z <= 8.2e-28) tmp = Float64(x + Float64(z * x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / -b; tmp = 0.0; if (z <= -1.2e+50) tmp = t_1; elseif (z <= -8e-41) tmp = t / b; elseif (z <= 8.2e-28) tmp = x + (z * x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / (-b)), $MachinePrecision]}, If[LessEqual[z, -1.2e+50], t$95$1, If[LessEqual[z, -8e-41], N[(t / b), $MachinePrecision], If[LessEqual[z, 8.2e-28], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{-b}\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-41}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-28}:\\
\;\;\;\;x + z \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.2000000000000001e50 or 8.2000000000000005e-28 < z Initial program 40.4%
Taylor expanded in t around inf 43.3%
Taylor expanded in b around inf 39.0%
Taylor expanded in a around inf 29.5%
mul-1-neg29.5%
Simplified29.5%
if -1.2000000000000001e50 < z < -8.00000000000000005e-41Initial program 82.9%
Taylor expanded in t around inf 34.3%
*-commutative34.3%
Simplified34.3%
Taylor expanded in y around 0 38.5%
if -8.00000000000000005e-41 < z < 8.2000000000000005e-28Initial program 87.4%
Taylor expanded in z around 0 50.9%
Taylor expanded in y around inf 48.3%
Final simplification39.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ a (- b))))
(if (<= z -1.05e+51)
t_1
(if (<= z -1.15e-29) (/ t b) (if (<= z 9.2e-28) x t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / -b;
double tmp;
if (z <= -1.05e+51) {
tmp = t_1;
} else if (z <= -1.15e-29) {
tmp = t / b;
} else if (z <= 9.2e-28) {
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 = a / -b
if (z <= (-1.05d+51)) then
tmp = t_1
else if (z <= (-1.15d-29)) then
tmp = t / b
else if (z <= 9.2d-28) 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 = a / -b;
double tmp;
if (z <= -1.05e+51) {
tmp = t_1;
} else if (z <= -1.15e-29) {
tmp = t / b;
} else if (z <= 9.2e-28) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / -b tmp = 0 if z <= -1.05e+51: tmp = t_1 elif z <= -1.15e-29: tmp = t / b elif z <= 9.2e-28: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(-b)) tmp = 0.0 if (z <= -1.05e+51) tmp = t_1; elseif (z <= -1.15e-29) tmp = Float64(t / b); elseif (z <= 9.2e-28) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / -b; tmp = 0.0; if (z <= -1.05e+51) tmp = t_1; elseif (z <= -1.15e-29) tmp = t / b; elseif (z <= 9.2e-28) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / (-b)), $MachinePrecision]}, If[LessEqual[z, -1.05e+51], t$95$1, If[LessEqual[z, -1.15e-29], N[(t / b), $MachinePrecision], If[LessEqual[z, 9.2e-28], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{-b}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-29}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-28}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.0500000000000001e51 or 9.19999999999999942e-28 < z Initial program 40.4%
Taylor expanded in t around inf 43.3%
Taylor expanded in b around inf 39.0%
Taylor expanded in a around inf 29.5%
mul-1-neg29.5%
Simplified29.5%
if -1.0500000000000001e51 < z < -1.14999999999999996e-29Initial program 82.9%
Taylor expanded in t around inf 34.3%
*-commutative34.3%
Simplified34.3%
Taylor expanded in y around 0 38.5%
if -1.14999999999999996e-29 < z < 9.19999999999999942e-28Initial program 87.4%
Taylor expanded in z around 0 48.3%
Final simplification39.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.1e-30) (not (<= z 4.8e-27))) (/ (- t a) (- b y)) (- x (/ (* z a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.1e-30) || !(z <= 4.8e-27)) {
tmp = (t - a) / (b - y);
} else {
tmp = x - ((z * 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.1d-30)) .or. (.not. (z <= 4.8d-27))) then
tmp = (t - a) / (b - y)
else
tmp = x - ((z * 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.1e-30) || !(z <= 4.8e-27)) {
tmp = (t - a) / (b - y);
} else {
tmp = x - ((z * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.1e-30) or not (z <= 4.8e-27): tmp = (t - a) / (b - y) else: tmp = x - ((z * a) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.1e-30) || !(z <= 4.8e-27)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x - Float64(Float64(z * a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.1e-30) || ~((z <= 4.8e-27))) tmp = (t - a) / (b - y); else tmp = x - ((z * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.1e-30], N[Not[LessEqual[z, 4.8e-27]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{-30} \lor \neg \left(z \leq 4.8 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\end{array}
\end{array}
if z < -2.1000000000000002e-30 or 4.80000000000000004e-27 < z Initial program 47.2%
Taylor expanded in z around inf 80.9%
if -2.1000000000000002e-30 < z < 4.80000000000000004e-27Initial program 87.4%
Taylor expanded in z around 0 50.9%
Taylor expanded in a around inf 59.8%
Final simplification71.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.1e-79) (not (<= z 3.8e-10))) (/ (- 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 <= -4.1e-79) || !(z <= 3.8e-10)) {
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 <= (-4.1d-79)) .or. (.not. (z <= 3.8d-10))) 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 <= -4.1e-79) || !(z <= 3.8e-10)) {
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 <= -4.1e-79) or not (z <= 3.8e-10): 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 <= -4.1e-79) || !(z <= 3.8e-10)) 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 <= -4.1e-79) || ~((z <= 3.8e-10))) 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, -4.1e-79], N[Not[LessEqual[z, 3.8e-10]], $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 -4.1 \cdot 10^{-79} \lor \neg \left(z \leq 3.8 \cdot 10^{-10}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\end{array}
\end{array}
if z < -4.09999999999999994e-79 or 3.7999999999999998e-10 < z Initial program 48.1%
Taylor expanded in z around inf 79.4%
if -4.09999999999999994e-79 < z < 3.7999999999999998e-10Initial program 89.1%
Taylor expanded in z around 0 53.6%
Taylor expanded in t around inf 59.5%
Final simplification70.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.5e-50) (not (<= z 4.7e-27))) (/ t (- b y)) (+ x (* z x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.5e-50) || !(z <= 4.7e-27)) {
tmp = t / (b - y);
} else {
tmp = x + (z * 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.5d-50)) .or. (.not. (z <= 4.7d-27))) then
tmp = t / (b - y)
else
tmp = x + (z * 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.5e-50) || !(z <= 4.7e-27)) {
tmp = t / (b - y);
} else {
tmp = x + (z * x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.5e-50) or not (z <= 4.7e-27): tmp = t / (b - y) else: tmp = x + (z * x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.5e-50) || !(z <= 4.7e-27)) tmp = Float64(t / Float64(b - y)); else tmp = Float64(x + Float64(z * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.5e-50) || ~((z <= 4.7e-27))) tmp = t / (b - y); else tmp = x + (z * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.5e-50], N[Not[LessEqual[z, 4.7e-27]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{-50} \lor \neg \left(z \leq 4.7 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot x\\
\end{array}
\end{array}
if z < -2.49999999999999984e-50 or 4.70000000000000032e-27 < z Initial program 47.2%
Taylor expanded in t around inf 22.3%
*-commutative22.3%
Simplified22.3%
Taylor expanded in z around inf 37.3%
if -2.49999999999999984e-50 < z < 4.70000000000000032e-27Initial program 87.4%
Taylor expanded in z around 0 50.9%
Taylor expanded in y around inf 48.3%
Final simplification42.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.16e-36) (not (<= y 2.7e+18))) x (/ t b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.16e-36) || !(y <= 2.7e+18)) {
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 ((y <= (-1.16d-36)) .or. (.not. (y <= 2.7d+18))) 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 ((y <= -1.16e-36) || !(y <= 2.7e+18)) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.16e-36) or not (y <= 2.7e+18): tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.16e-36) || !(y <= 2.7e+18)) 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 ((y <= -1.16e-36) || ~((y <= 2.7e+18))) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.16e-36], N[Not[LessEqual[y, 2.7e+18]], $MachinePrecision]], x, N[(t / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.16 \cdot 10^{-36} \lor \neg \left(y \leq 2.7 \cdot 10^{+18}\right):\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if y < -1.16000000000000002e-36 or 2.7e18 < y Initial program 57.1%
Taylor expanded in z around 0 37.9%
if -1.16000000000000002e-36 < y < 2.7e18Initial program 77.5%
Taylor expanded in t around inf 35.4%
*-commutative35.4%
Simplified35.4%
Taylor expanded in y around 0 34.9%
Final simplification36.6%
(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 65.9%
Taylor expanded in z around 0 24.8%
(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 2024096
(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)))))