
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))))
(if (or (<= z -3800000000000.0) (not (<= z 1.45e+31)))
(-
(* y (/ (- a t) (* z (pow (- b y) 2.0))))
(+ (* (/ y z) (/ x (- y b))) (/ (- t a) (- y b))))
(* 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 <= -3800000000000.0) || !(z <= 1.45e+31)) {
tmp = (y * ((a - t) / (z * pow((b - y), 2.0)))) - (((y / z) * (x / (y - b))) + ((t - a) / (y - b)));
} 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 <= (-3800000000000.0d0)) .or. (.not. (z <= 1.45d+31))) then
tmp = (y * ((a - t) / (z * ((b - y) ** 2.0d0)))) - (((y / z) * (x / (y - b))) + ((t - a) / (y - b)))
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 <= -3800000000000.0) || !(z <= 1.45e+31)) {
tmp = (y * ((a - t) / (z * Math.pow((b - y), 2.0)))) - (((y / z) * (x / (y - b))) + ((t - a) / (y - b)));
} 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 <= -3800000000000.0) or not (z <= 1.45e+31): tmp = (y * ((a - t) / (z * math.pow((b - y), 2.0)))) - (((y / z) * (x / (y - b))) + ((t - a) / (y - b))) 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 <= -3800000000000.0) || !(z <= 1.45e+31)) tmp = Float64(Float64(y * Float64(Float64(a - t) / Float64(z * (Float64(b - y) ^ 2.0)))) - Float64(Float64(Float64(y / z) * Float64(x / Float64(y - b))) + Float64(Float64(t - a) / Float64(y - b)))); 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 <= -3800000000000.0) || ~((z <= 1.45e+31))) tmp = (y * ((a - t) / (z * ((b - y) ^ 2.0)))) - (((y / z) * (x / (y - b))) + ((t - a) / (y - b))); 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, -3800000000000.0], N[Not[LessEqual[z, 1.45e+31]], $MachinePrecision]], N[(N[(y * N[(N[(a - t), $MachinePrecision] / N[(z * N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y / z), $MachinePrecision] * N[(x / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(y - b), $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 -3800000000000 \lor \neg \left(z \leq 1.45 \cdot 10^{+31}\right):\\
\;\;\;\;y \cdot \frac{a - t}{z \cdot {\left(b - y\right)}^{2}} - \left(\frac{y}{z} \cdot \frac{x}{y - b} + \frac{t - a}{y - b}\right)\\
\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 < -3.8e12 or 1.45e31 < z Initial program 37.7%
Taylor expanded in z around inf 61.7%
associate--r+61.7%
+-commutative61.7%
associate--l+61.7%
*-commutative61.7%
times-frac69.0%
div-sub69.0%
associate-/l*95.1%
Simplified95.1%
if -3.8e12 < z < 1.45e31Initial program 92.3%
Taylor expanded in x around inf 94.0%
Final simplification94.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ x (- 1.0 z)) (* (/ z y) (/ (- a t) (+ z -1.0))))))
(if (<= y -1.42e-98)
t_1
(if (<= y 7.6e-93)
(- (+ (/ t b) (/ (* y x) (* z b))) (/ a b))
(if (<= y 1.15e+42)
(/ (+ (* y x) (* z t)) (+ y (* z (- b y))))
(if (<= y 1.7e+108) (/ (- t a) (- b y)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / (1.0 - z)) + ((z / y) * ((a - t) / (z + -1.0)));
double tmp;
if (y <= -1.42e-98) {
tmp = t_1;
} else if (y <= 7.6e-93) {
tmp = ((t / b) + ((y * x) / (z * b))) - (a / b);
} else if (y <= 1.15e+42) {
tmp = ((y * x) + (z * t)) / (y + (z * (b - y)));
} else if (y <= 1.7e+108) {
tmp = (t - a) / (b - 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 = (x / (1.0d0 - z)) + ((z / y) * ((a - t) / (z + (-1.0d0))))
if (y <= (-1.42d-98)) then
tmp = t_1
else if (y <= 7.6d-93) then
tmp = ((t / b) + ((y * x) / (z * b))) - (a / b)
else if (y <= 1.15d+42) then
tmp = ((y * x) + (z * t)) / (y + (z * (b - y)))
else if (y <= 1.7d+108) then
tmp = (t - a) / (b - 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 = (x / (1.0 - z)) + ((z / y) * ((a - t) / (z + -1.0)));
double tmp;
if (y <= -1.42e-98) {
tmp = t_1;
} else if (y <= 7.6e-93) {
tmp = ((t / b) + ((y * x) / (z * b))) - (a / b);
} else if (y <= 1.15e+42) {
tmp = ((y * x) + (z * t)) / (y + (z * (b - y)));
} else if (y <= 1.7e+108) {
tmp = (t - a) / (b - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / (1.0 - z)) + ((z / y) * ((a - t) / (z + -1.0))) tmp = 0 if y <= -1.42e-98: tmp = t_1 elif y <= 7.6e-93: tmp = ((t / b) + ((y * x) / (z * b))) - (a / b) elif y <= 1.15e+42: tmp = ((y * x) + (z * t)) / (y + (z * (b - y))) elif y <= 1.7e+108: tmp = (t - a) / (b - y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(z / y) * Float64(Float64(a - t) / Float64(z + -1.0)))) tmp = 0.0 if (y <= -1.42e-98) tmp = t_1; elseif (y <= 7.6e-93) tmp = Float64(Float64(Float64(t / b) + Float64(Float64(y * x) / Float64(z * b))) - Float64(a / b)); elseif (y <= 1.15e+42) tmp = Float64(Float64(Float64(y * x) + Float64(z * t)) / Float64(y + Float64(z * Float64(b - y)))); elseif (y <= 1.7e+108) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / (1.0 - z)) + ((z / y) * ((a - t) / (z + -1.0))); tmp = 0.0; if (y <= -1.42e-98) tmp = t_1; elseif (y <= 7.6e-93) tmp = ((t / b) + ((y * x) / (z * b))) - (a / b); elseif (y <= 1.15e+42) tmp = ((y * x) + (z * t)) / (y + (z * (b - y))); elseif (y <= 1.7e+108) tmp = (t - a) / (b - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(z / y), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.42e-98], t$95$1, If[LessEqual[y, 7.6e-93], N[(N[(N[(t / b), $MachinePrecision] + N[(N[(y * x), $MachinePrecision] / N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e+42], N[(N[(N[(y * x), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e+108], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z} + \frac{z}{y} \cdot \frac{a - t}{z + -1}\\
\mathbf{if}\;y \leq -1.42 \cdot 10^{-98}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{-93}:\\
\;\;\;\;\left(\frac{t}{b} + \frac{y \cdot x}{z \cdot b}\right) - \frac{a}{b}\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+42}:\\
\;\;\;\;\frac{y \cdot x + z \cdot t}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+108}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.41999999999999999e-98 or 1.69999999999999998e108 < y Initial program 57.4%
Taylor expanded in y around inf 52.8%
mul-1-neg11.3%
unsub-neg11.3%
Simplified52.8%
Taylor expanded in x around 0 67.8%
times-frac85.4%
Simplified85.4%
if -1.41999999999999999e-98 < y < 7.5999999999999998e-93Initial program 82.9%
Taylor expanded in x around inf 72.0%
Taylor expanded in b around inf 66.2%
associate-/l*62.5%
Simplified62.5%
Taylor expanded in x around 0 83.1%
if 7.5999999999999998e-93 < y < 1.15e42Initial program 82.9%
Taylor expanded in a around 0 78.7%
if 1.15e42 < y < 1.69999999999999998e108Initial program 32.6%
Taylor expanded in z around inf 70.4%
Final simplification83.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))))
(if (or (<= z -3e+23) (not (<= z 4.5e+40)))
(/ (- t a) (- b y))
(* 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 <= -3e+23) || !(z <= 4.5e+40)) {
tmp = (t - a) / (b - y);
} 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 <= (-3d+23)) .or. (.not. (z <= 4.5d+40))) then
tmp = (t - a) / (b - y)
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 <= -3e+23) || !(z <= 4.5e+40)) {
tmp = (t - a) / (b - y);
} 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 <= -3e+23) or not (z <= 4.5e+40): tmp = (t - a) / (b - y) 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 <= -3e+23) || !(z <= 4.5e+40)) tmp = Float64(Float64(t - a) / Float64(b - y)); 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 <= -3e+23) || ~((z <= 4.5e+40))) tmp = (t - a) / (b - y); 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, -3e+23], N[Not[LessEqual[z, 4.5e+40]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $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 -3 \cdot 10^{+23} \lor \neg \left(z \leq 4.5 \cdot 10^{+40}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\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 < -3.0000000000000001e23 or 4.50000000000000032e40 < z Initial program 37.9%
Taylor expanded in z around inf 81.5%
if -3.0000000000000001e23 < z < 4.50000000000000032e40Initial program 89.9%
Taylor expanded in x around inf 92.8%
Final simplification87.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -0.0085)
t_1
(if (<= z -8.4e-280)
(+ x (* z (+ (/ t y) (- x (/ a y)))))
(if (<= z 5e-188)
(/ (* y x) (+ y (* z (- b y))))
(if (<= z 3.6e-18) (/ (+ (* z (- t a)) (* y x)) 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 <= -0.0085) {
tmp = t_1;
} else if (z <= -8.4e-280) {
tmp = x + (z * ((t / y) + (x - (a / y))));
} else if (z <= 5e-188) {
tmp = (y * x) / (y + (z * (b - y)));
} else if (z <= 3.6e-18) {
tmp = ((z * (t - a)) + (y * x)) / 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 <= (-0.0085d0)) then
tmp = t_1
else if (z <= (-8.4d-280)) then
tmp = x + (z * ((t / y) + (x - (a / y))))
else if (z <= 5d-188) then
tmp = (y * x) / (y + (z * (b - y)))
else if (z <= 3.6d-18) then
tmp = ((z * (t - a)) + (y * x)) / 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 <= -0.0085) {
tmp = t_1;
} else if (z <= -8.4e-280) {
tmp = x + (z * ((t / y) + (x - (a / y))));
} else if (z <= 5e-188) {
tmp = (y * x) / (y + (z * (b - y)));
} else if (z <= 3.6e-18) {
tmp = ((z * (t - a)) + (y * x)) / 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 <= -0.0085: tmp = t_1 elif z <= -8.4e-280: tmp = x + (z * ((t / y) + (x - (a / y)))) elif z <= 5e-188: tmp = (y * x) / (y + (z * (b - y))) elif z <= 3.6e-18: tmp = ((z * (t - a)) + (y * x)) / 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 <= -0.0085) tmp = t_1; elseif (z <= -8.4e-280) tmp = Float64(x + Float64(z * Float64(Float64(t / y) + Float64(x - Float64(a / y))))); elseif (z <= 5e-188) tmp = Float64(Float64(y * x) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= 3.6e-18) tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / 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 <= -0.0085) tmp = t_1; elseif (z <= -8.4e-280) tmp = x + (z * ((t / y) + (x - (a / y)))); elseif (z <= 5e-188) tmp = (y * x) / (y + (z * (b - y))); elseif (z <= 3.6e-18) tmp = ((z * (t - a)) + (y * x)) / 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, -0.0085], t$95$1, If[LessEqual[z, -8.4e-280], N[(x + N[(z * N[(N[(t / y), $MachinePrecision] + N[(x - N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-188], N[(N[(y * x), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e-18], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -0.0085:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -8.4 \cdot 10^{-280}:\\
\;\;\;\;x + z \cdot \left(\frac{t}{y} + \left(x - \frac{a}{y}\right)\right)\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-188}:\\
\;\;\;\;\frac{y \cdot x}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-18}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -0.0085000000000000006 or 3.6000000000000001e-18 < z Initial program 44.5%
Taylor expanded in z around inf 76.1%
if -0.0085000000000000006 < z < -8.40000000000000003e-280Initial program 88.4%
Taylor expanded in y around inf 66.6%
mul-1-neg16.6%
unsub-neg16.6%
Simplified66.6%
Taylor expanded in z around 0 69.6%
if -8.40000000000000003e-280 < z < 5.0000000000000001e-188Initial program 99.6%
Taylor expanded in x around inf 82.8%
*-commutative60.4%
Simplified82.8%
if 5.0000000000000001e-188 < z < 3.6000000000000001e-18Initial program 94.3%
Taylor expanded in z around 0 71.2%
Final simplification74.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -4.2e+52)
t_1
(if (<= y -1.2e-12)
(/ (- a t) y)
(if (<= y -1.9e-94)
t_1
(if (<= y 5.5e-89)
(/ (- t a) b)
(if (<= y 6.2) (/ t (- b y)) 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 <= -4.2e+52) {
tmp = t_1;
} else if (y <= -1.2e-12) {
tmp = (a - t) / y;
} else if (y <= -1.9e-94) {
tmp = t_1;
} else if (y <= 5.5e-89) {
tmp = (t - a) / b;
} else if (y <= 6.2) {
tmp = t / (b - 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 = x / (1.0d0 - z)
if (y <= (-4.2d+52)) then
tmp = t_1
else if (y <= (-1.2d-12)) then
tmp = (a - t) / y
else if (y <= (-1.9d-94)) then
tmp = t_1
else if (y <= 5.5d-89) then
tmp = (t - a) / b
else if (y <= 6.2d0) then
tmp = t / (b - 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 = x / (1.0 - z);
double tmp;
if (y <= -4.2e+52) {
tmp = t_1;
} else if (y <= -1.2e-12) {
tmp = (a - t) / y;
} else if (y <= -1.9e-94) {
tmp = t_1;
} else if (y <= 5.5e-89) {
tmp = (t - a) / b;
} else if (y <= 6.2) {
tmp = t / (b - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -4.2e+52: tmp = t_1 elif y <= -1.2e-12: tmp = (a - t) / y elif y <= -1.9e-94: tmp = t_1 elif y <= 5.5e-89: tmp = (t - a) / b elif y <= 6.2: tmp = t / (b - y) 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 <= -4.2e+52) tmp = t_1; elseif (y <= -1.2e-12) tmp = Float64(Float64(a - t) / y); elseif (y <= -1.9e-94) tmp = t_1; elseif (y <= 5.5e-89) tmp = Float64(Float64(t - a) / b); elseif (y <= 6.2) tmp = Float64(t / Float64(b - y)); 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 <= -4.2e+52) tmp = t_1; elseif (y <= -1.2e-12) tmp = (a - t) / y; elseif (y <= -1.9e-94) tmp = t_1; elseif (y <= 5.5e-89) tmp = (t - a) / b; elseif (y <= 6.2) tmp = t / (b - y); 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, -4.2e+52], t$95$1, If[LessEqual[y, -1.2e-12], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -1.9e-94], t$95$1, If[LessEqual[y, 5.5e-89], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 6.2], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-12}:\\
\;\;\;\;\frac{a - t}{y}\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-89}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;y \leq 6.2:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.2e52 or -1.19999999999999994e-12 < y < -1.9e-94 or 6.20000000000000018 < y Initial program 57.4%
Taylor expanded in y around inf 58.1%
mul-1-neg58.1%
unsub-neg58.1%
Simplified58.1%
if -4.2e52 < y < -1.19999999999999994e-12Initial program 54.5%
Taylor expanded in y around inf 36.9%
mul-1-neg10.7%
unsub-neg10.7%
Simplified36.9%
Taylor expanded in z around inf 54.8%
mul-1-neg54.8%
Simplified54.8%
if -1.9e-94 < y < 5.50000000000000012e-89Initial program 83.2%
Taylor expanded in y around 0 71.8%
if 5.50000000000000012e-89 < y < 6.20000000000000018Initial program 82.3%
Taylor expanded in t around inf 43.6%
*-commutative43.6%
Simplified43.6%
Taylor expanded in z around inf 42.3%
Final simplification61.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.2e+25) (not (<= z 2.9e+28))) (/ (- t a) (- b y)) (/ (+ (* z (- t a)) (* y x)) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.2e+25) || !(z <= 2.9e+28)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-3.2d+25)) .or. (.not. (z <= 2.9d+28))) then
tmp = (t - a) / (b - y)
else
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.2e+25) || !(z <= 2.9e+28)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.2e+25) or not (z <= 2.9e+28): tmp = (t - a) / (b - y) else: tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.2e+25) || !(z <= 2.9e+28)) 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(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.2e+25) || ~((z <= 2.9e+28))) tmp = (t - a) / (b - y); else tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.2e+25], N[Not[LessEqual[z, 2.9e+28]], $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[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+25} \lor \neg \left(z \leq 2.9 \cdot 10^{+28}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -3.1999999999999999e25 or 2.9000000000000001e28 < z Initial program 39.4%
Taylor expanded in z around inf 80.8%
if -3.1999999999999999e25 < z < 2.9000000000000001e28Initial program 90.9%
Final simplification86.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -1.05e-14)
t_1
(if (<= z 0.066)
(+ x (* z x))
(if (or (<= z 4.9e+210) (not (<= z 1.35e+264))) t_1 (/ a (- b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -1.05e-14) {
tmp = t_1;
} else if (z <= 0.066) {
tmp = x + (z * x);
} else if ((z <= 4.9e+210) || !(z <= 1.35e+264)) {
tmp = t_1;
} else {
tmp = a / -b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t / (b - y)
if (z <= (-1.05d-14)) then
tmp = t_1
else if (z <= 0.066d0) then
tmp = x + (z * x)
else if ((z <= 4.9d+210) .or. (.not. (z <= 1.35d+264))) then
tmp = t_1
else
tmp = a / -b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -1.05e-14) {
tmp = t_1;
} else if (z <= 0.066) {
tmp = x + (z * x);
} else if ((z <= 4.9e+210) || !(z <= 1.35e+264)) {
tmp = t_1;
} else {
tmp = a / -b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -1.05e-14: tmp = t_1 elif z <= 0.066: tmp = x + (z * x) elif (z <= 4.9e+210) or not (z <= 1.35e+264): tmp = t_1 else: tmp = a / -b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -1.05e-14) tmp = t_1; elseif (z <= 0.066) tmp = Float64(x + Float64(z * x)); elseif ((z <= 4.9e+210) || !(z <= 1.35e+264)) tmp = t_1; else tmp = Float64(a / Float64(-b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (z <= -1.05e-14) tmp = t_1; elseif (z <= 0.066) tmp = x + (z * x); elseif ((z <= 4.9e+210) || ~((z <= 1.35e+264))) tmp = t_1; else tmp = a / -b; 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, -1.05e-14], t$95$1, If[LessEqual[z, 0.066], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 4.9e+210], N[Not[LessEqual[z, 1.35e+264]], $MachinePrecision]], t$95$1, N[(a / (-b)), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.066:\\
\;\;\;\;x + z \cdot x\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{+210} \lor \neg \left(z \leq 1.35 \cdot 10^{+264}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{-b}\\
\end{array}
\end{array}
if z < -1.0499999999999999e-14 or 0.066000000000000003 < z < 4.90000000000000007e210 or 1.3500000000000001e264 < z Initial program 47.4%
Taylor expanded in t around inf 25.3%
*-commutative25.3%
Simplified25.3%
Taylor expanded in z around inf 43.7%
if -1.0499999999999999e-14 < z < 0.066000000000000003Initial program 92.0%
Taylor expanded in y around inf 67.6%
mul-1-neg15.5%
unsub-neg15.5%
Simplified67.6%
Taylor expanded in x around inf 51.1%
*-commutative51.1%
Simplified51.1%
Taylor expanded in z around 0 57.6%
if 4.90000000000000007e210 < z < 1.3500000000000001e264Initial program 24.4%
Taylor expanded in x around inf 16.7%
Taylor expanded in b around inf 55.0%
associate-/l*50.4%
Simplified50.4%
Taylor expanded in a around inf 68.4%
associate-*r/68.4%
neg-mul-168.4%
Simplified68.4%
Final simplification51.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.08e+23) (not (<= z 2.25e+16))) (/ (- t a) (- b y)) (/ (+ (* y x) (* z t)) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.08e+23) || !(z <= 2.25e+16)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) + (z * t)) / (y + (z * (b - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.08d+23)) .or. (.not. (z <= 2.25d+16))) then
tmp = (t - a) / (b - y)
else
tmp = ((y * x) + (z * t)) / (y + (z * (b - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.08e+23) || !(z <= 2.25e+16)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) + (z * t)) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.08e+23) or not (z <= 2.25e+16): tmp = (t - a) / (b - y) else: tmp = ((y * x) + (z * t)) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.08e+23) || !(z <= 2.25e+16)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(y * x) + Float64(z * t)) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.08e+23) || ~((z <= 2.25e+16))) tmp = (t - a) / (b - y); else tmp = ((y * x) + (z * t)) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.08e+23], N[Not[LessEqual[z, 2.25e+16]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.08 \cdot 10^{+23} \lor \neg \left(z \leq 2.25 \cdot 10^{+16}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x + z \cdot t}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -1.0800000000000001e23 or 2.25e16 < z Initial program 39.4%
Taylor expanded in z around inf 80.8%
if -1.0800000000000001e23 < z < 2.25e16Initial program 90.9%
Taylor expanded in a around 0 81.0%
Final simplification80.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -20.0) (not (<= z 4.8e-18))) (/ (- t a) (- b y)) (/ (* y x) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -20.0) || !(z <= 4.8e-18)) {
tmp = (t - a) / (b - y);
} else {
tmp = (y * x) / (y + (z * (b - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-20.0d0)) .or. (.not. (z <= 4.8d-18))) then
tmp = (t - a) / (b - y)
else
tmp = (y * x) / (y + (z * (b - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -20.0) || !(z <= 4.8e-18)) {
tmp = (t - a) / (b - y);
} else {
tmp = (y * x) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -20.0) or not (z <= 4.8e-18): tmp = (t - a) / (b - y) else: tmp = (y * x) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -20.0) || !(z <= 4.8e-18)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(y * x) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -20.0) || ~((z <= 4.8e-18))) tmp = (t - a) / (b - y); else tmp = (y * x) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -20.0], N[Not[LessEqual[z, 4.8e-18]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -20 \lor \neg \left(z \leq 4.8 \cdot 10^{-18}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -20 or 4.79999999999999988e-18 < z Initial program 44.1%
Taylor expanded in z around inf 76.6%
if -20 < z < 4.79999999999999988e-18Initial program 92.8%
Taylor expanded in x around inf 64.6%
*-commutative52.2%
Simplified64.6%
Final simplification71.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.14e-14) (not (<= z 2.1e-18))) (/ (- t a) (- b y)) (/ (+ (* z (- t a)) (* y x)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.14e-14) || !(z <= 2.1e-18)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (y * x)) / 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.14d-14)) .or. (.not. (z <= 2.1d-18))) then
tmp = (t - a) / (b - y)
else
tmp = ((z * (t - a)) + (y * x)) / 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.14e-14) || !(z <= 2.1e-18)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (y * x)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.14e-14) or not (z <= 2.1e-18): tmp = (t - a) / (b - y) else: tmp = ((z * (t - a)) + (y * x)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.14e-14) || !(z <= 2.1e-18)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.14e-14) || ~((z <= 2.1e-18))) tmp = (t - a) / (b - y); else tmp = ((z * (t - a)) + (y * x)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.14e-14], N[Not[LessEqual[z, 2.1e-18]], $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] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.14 \cdot 10^{-14} \lor \neg \left(z \leq 2.1 \cdot 10^{-18}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y}\\
\end{array}
\end{array}
if z < -1.1400000000000001e-14 or 2.1e-18 < z Initial program 47.2%
Taylor expanded in z around inf 74.1%
if -1.1400000000000001e-14 < z < 2.1e-18Initial program 92.3%
Taylor expanded in z around 0 68.5%
Final simplification71.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.6e+90)
(/ t (- y))
(if (<= z -1.22e-14)
(/ t b)
(if (<= z 440000000.0) (+ x (* z x)) (/ a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.6e+90) {
tmp = t / -y;
} else if (z <= -1.22e-14) {
tmp = t / b;
} else if (z <= 440000000.0) {
tmp = x + (z * x);
} else {
tmp = 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 (z <= (-3.6d+90)) then
tmp = t / -y
else if (z <= (-1.22d-14)) then
tmp = t / b
else if (z <= 440000000.0d0) then
tmp = x + (z * x)
else
tmp = 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 (z <= -3.6e+90) {
tmp = t / -y;
} else if (z <= -1.22e-14) {
tmp = t / b;
} else if (z <= 440000000.0) {
tmp = x + (z * x);
} else {
tmp = a / -b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.6e+90: tmp = t / -y elif z <= -1.22e-14: tmp = t / b elif z <= 440000000.0: tmp = x + (z * x) else: tmp = a / -b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.6e+90) tmp = Float64(t / Float64(-y)); elseif (z <= -1.22e-14) tmp = Float64(t / b); elseif (z <= 440000000.0) tmp = Float64(x + Float64(z * x)); else tmp = Float64(a / Float64(-b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.6e+90) tmp = t / -y; elseif (z <= -1.22e-14) tmp = t / b; elseif (z <= 440000000.0) tmp = x + (z * x); else tmp = a / -b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.6e+90], N[(t / (-y)), $MachinePrecision], If[LessEqual[z, -1.22e-14], N[(t / b), $MachinePrecision], If[LessEqual[z, 440000000.0], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], N[(a / (-b)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+90}:\\
\;\;\;\;\frac{t}{-y}\\
\mathbf{elif}\;z \leq -1.22 \cdot 10^{-14}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 440000000:\\
\;\;\;\;x + z \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{-b}\\
\end{array}
\end{array}
if z < -3.6e90Initial program 27.8%
Taylor expanded in t around inf 16.9%
*-commutative16.9%
Simplified16.9%
Taylor expanded in y around inf 13.5%
mul-1-neg13.5%
unsub-neg13.5%
Simplified13.5%
Taylor expanded in z around inf 30.6%
associate-*r/30.6%
neg-mul-130.6%
Simplified30.6%
if -3.6e90 < z < -1.21999999999999994e-14Initial program 65.2%
Taylor expanded in t around inf 38.2%
*-commutative38.2%
Simplified38.2%
Taylor expanded in y around 0 38.0%
if -1.21999999999999994e-14 < z < 4.4e8Initial program 92.0%
Taylor expanded in y around inf 67.8%
mul-1-neg15.4%
unsub-neg15.4%
Simplified67.8%
Taylor expanded in x around inf 50.7%
*-commutative50.7%
Simplified50.7%
Taylor expanded in z around 0 57.1%
if 4.4e8 < z Initial program 50.8%
Taylor expanded in x around inf 44.4%
Taylor expanded in b around inf 46.3%
associate-/l*43.6%
Simplified43.6%
Taylor expanded in a around inf 35.3%
associate-*r/35.3%
neg-mul-135.3%
Simplified35.3%
Final simplification44.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -1.45e-94)
t_1
(if (<= y 4.8e-89) (/ (- t a) b) (if (<= y 6.8) (/ t (- b y)) 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 <= -1.45e-94) {
tmp = t_1;
} else if (y <= 4.8e-89) {
tmp = (t - a) / b;
} else if (y <= 6.8) {
tmp = t / (b - 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 = x / (1.0d0 - z)
if (y <= (-1.45d-94)) then
tmp = t_1
else if (y <= 4.8d-89) then
tmp = (t - a) / b
else if (y <= 6.8d0) then
tmp = t / (b - 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 = x / (1.0 - z);
double tmp;
if (y <= -1.45e-94) {
tmp = t_1;
} else if (y <= 4.8e-89) {
tmp = (t - a) / b;
} else if (y <= 6.8) {
tmp = t / (b - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -1.45e-94: tmp = t_1 elif y <= 4.8e-89: tmp = (t - a) / b elif y <= 6.8: tmp = t / (b - y) 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 <= -1.45e-94) tmp = t_1; elseif (y <= 4.8e-89) tmp = Float64(Float64(t - a) / b); elseif (y <= 6.8) tmp = Float64(t / Float64(b - y)); 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 <= -1.45e-94) tmp = t_1; elseif (y <= 4.8e-89) tmp = (t - a) / b; elseif (y <= 6.8) tmp = t / (b - y); 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, -1.45e-94], t$95$1, If[LessEqual[y, 4.8e-89], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 6.8], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -1.45 \cdot 10^{-94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-89}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;y \leq 6.8:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.44999999999999998e-94 or 6.79999999999999982 < y Initial program 57.1%
Taylor expanded in y around inf 54.3%
mul-1-neg54.3%
unsub-neg54.3%
Simplified54.3%
if -1.44999999999999998e-94 < y < 4.80000000000000032e-89Initial program 83.2%
Taylor expanded in y around 0 71.8%
if 4.80000000000000032e-89 < y < 6.79999999999999982Initial program 82.3%
Taylor expanded in t around inf 43.6%
*-commutative43.6%
Simplified43.6%
Taylor expanded in z around inf 42.3%
Final simplification59.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ a (- b))))
(if (<= z -6e+121)
t_1
(if (<= z -1e-14) (/ t b) (if (<= z 1.4e-17) 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 <= -6e+121) {
tmp = t_1;
} else if (z <= -1e-14) {
tmp = t / b;
} else if (z <= 1.4e-17) {
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 <= (-6d+121)) then
tmp = t_1
else if (z <= (-1d-14)) then
tmp = t / b
else if (z <= 1.4d-17) 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 <= -6e+121) {
tmp = t_1;
} else if (z <= -1e-14) {
tmp = t / b;
} else if (z <= 1.4e-17) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / -b tmp = 0 if z <= -6e+121: tmp = t_1 elif z <= -1e-14: tmp = t / b elif z <= 1.4e-17: 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 <= -6e+121) tmp = t_1; elseif (z <= -1e-14) tmp = Float64(t / b); elseif (z <= 1.4e-17) 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 <= -6e+121) tmp = t_1; elseif (z <= -1e-14) tmp = t / b; elseif (z <= 1.4e-17) 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, -6e+121], t$95$1, If[LessEqual[z, -1e-14], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.4e-17], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{-b}\\
\mathbf{if}\;z \leq -6 \cdot 10^{+121}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-14}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-17}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.0000000000000005e121 or 1.3999999999999999e-17 < z Initial program 44.5%
Taylor expanded in x around inf 40.0%
Taylor expanded in b around inf 37.4%
associate-/l*34.2%
Simplified34.2%
Taylor expanded in a around inf 31.9%
associate-*r/31.9%
neg-mul-131.9%
Simplified31.9%
if -6.0000000000000005e121 < z < -9.99999999999999999e-15Initial program 55.1%
Taylor expanded in t around inf 33.7%
*-commutative33.7%
Simplified33.7%
Taylor expanded in y around 0 30.5%
if -9.99999999999999999e-15 < z < 1.3999999999999999e-17Initial program 92.3%
Taylor expanded in z around 0 59.8%
Final simplification43.9%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2.1e+91) (/ t (- y)) (if (<= z -9.7e-14) (/ t b) (if (<= z 3.4e-17) x (/ a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.1e+91) {
tmp = t / -y;
} else if (z <= -9.7e-14) {
tmp = t / b;
} else if (z <= 3.4e-17) {
tmp = x;
} else {
tmp = 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 (z <= (-2.1d+91)) then
tmp = t / -y
else if (z <= (-9.7d-14)) then
tmp = t / b
else if (z <= 3.4d-17) then
tmp = x
else
tmp = 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 (z <= -2.1e+91) {
tmp = t / -y;
} else if (z <= -9.7e-14) {
tmp = t / b;
} else if (z <= 3.4e-17) {
tmp = x;
} else {
tmp = a / -b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.1e+91: tmp = t / -y elif z <= -9.7e-14: tmp = t / b elif z <= 3.4e-17: tmp = x else: tmp = a / -b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.1e+91) tmp = Float64(t / Float64(-y)); elseif (z <= -9.7e-14) tmp = Float64(t / b); elseif (z <= 3.4e-17) tmp = x; else tmp = Float64(a / Float64(-b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.1e+91) tmp = t / -y; elseif (z <= -9.7e-14) tmp = t / b; elseif (z <= 3.4e-17) tmp = x; else tmp = a / -b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.1e+91], N[(t / (-y)), $MachinePrecision], If[LessEqual[z, -9.7e-14], N[(t / b), $MachinePrecision], If[LessEqual[z, 3.4e-17], x, N[(a / (-b)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+91}:\\
\;\;\;\;\frac{t}{-y}\\
\mathbf{elif}\;z \leq -9.7 \cdot 10^{-14}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-17}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{-b}\\
\end{array}
\end{array}
if z < -2.10000000000000008e91Initial program 27.8%
Taylor expanded in t around inf 16.9%
*-commutative16.9%
Simplified16.9%
Taylor expanded in y around inf 13.5%
mul-1-neg13.5%
unsub-neg13.5%
Simplified13.5%
Taylor expanded in z around inf 30.6%
associate-*r/30.6%
neg-mul-130.6%
Simplified30.6%
if -2.10000000000000008e91 < z < -9.70000000000000032e-14Initial program 65.2%
Taylor expanded in t around inf 38.2%
*-commutative38.2%
Simplified38.2%
Taylor expanded in y around 0 38.0%
if -9.70000000000000032e-14 < z < 3.3999999999999998e-17Initial program 92.3%
Taylor expanded in z around 0 59.8%
if 3.3999999999999998e-17 < z Initial program 55.1%
Taylor expanded in x around inf 50.9%
Taylor expanded in b around inf 44.1%
associate-/l*41.7%
Simplified41.7%
Taylor expanded in a around inf 32.8%
associate-*r/32.8%
neg-mul-132.8%
Simplified32.8%
Final simplification44.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -64.0) (not (<= z 200.0))) (/ (- t a) (- b y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -64.0) || !(z <= 200.0)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-64.0d0)) .or. (.not. (z <= 200.0d0))) then
tmp = (t - a) / (b - y)
else
tmp = x / (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -64.0) || !(z <= 200.0)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -64.0) or not (z <= 200.0): tmp = (t - a) / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -64.0) || !(z <= 200.0)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x / Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -64.0) || ~((z <= 200.0))) tmp = (t - a) / (b - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -64.0], N[Not[LessEqual[z, 200.0]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -64 \lor \neg \left(z \leq 200\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -64 or 200 < z Initial program 41.8%
Taylor expanded in z around inf 79.1%
if -64 < z < 200Initial program 92.5%
Taylor expanded in y around inf 57.0%
mul-1-neg57.0%
unsub-neg57.0%
Simplified57.0%
Final simplification68.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1e+192) (not (<= t 1.3e+114))) (/ t (- b y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1e+192) || !(t <= 1.3e+114)) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1d+192)) .or. (.not. (t <= 1.3d+114))) then
tmp = t / (b - y)
else
tmp = x / (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1e+192) || !(t <= 1.3e+114)) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1e+192) or not (t <= 1.3e+114): tmp = t / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1e+192) || !(t <= 1.3e+114)) tmp = Float64(t / Float64(b - y)); else tmp = Float64(x / Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1e+192) || ~((t <= 1.3e+114))) tmp = t / (b - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1e+192], N[Not[LessEqual[t, 1.3e+114]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{+192} \lor \neg \left(t \leq 1.3 \cdot 10^{+114}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if t < -1.00000000000000004e192 or 1.3e114 < t Initial program 58.8%
Taylor expanded in t around inf 49.5%
*-commutative49.5%
Simplified49.5%
Taylor expanded in z around inf 62.4%
if -1.00000000000000004e192 < t < 1.3e114Initial program 70.2%
Taylor expanded in y around inf 47.6%
mul-1-neg47.6%
unsub-neg47.6%
Simplified47.6%
Final simplification51.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.1e-13) (not (<= z 1.25e-18))) (/ t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.1e-13) || !(z <= 1.25e-18)) {
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 <= (-2.1d-13)) .or. (.not. (z <= 1.25d-18))) 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 <= -2.1e-13) || !(z <= 1.25e-18)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.1e-13) or not (z <= 1.25e-18): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.1e-13) || !(z <= 1.25e-18)) 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 <= -2.1e-13) || ~((z <= 1.25e-18))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.1e-13], N[Not[LessEqual[z, 1.25e-18]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{-13} \lor \neg \left(z \leq 1.25 \cdot 10^{-18}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.09999999999999989e-13 or 1.25000000000000009e-18 < z Initial program 47.2%
Taylor expanded in t around inf 25.5%
*-commutative25.5%
Simplified25.5%
Taylor expanded in y around 0 24.9%
if -2.09999999999999989e-13 < z < 1.25000000000000009e-18Initial program 92.3%
Taylor expanded in z around 0 59.8%
Final simplification40.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.9%
Taylor expanded in z around 0 28.7%
Final simplification28.7%
(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 2024077
(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)))))