
(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 19 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 (if (or (<= z -0.00166) (not (<= z 4100000000000.0))) (+ (* (/ y (- b y)) (/ x z)) (/ (- t a) (- b y))) (/ (+ (* y x) (* z (- t a))) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -0.00166) || !(z <= 4100000000000.0)) {
tmp = ((y / (b - y)) * (x / z)) + ((t - a) / (b - y));
} else {
tmp = ((y * x) + (z * (t - a))) / (y + (z * (b - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-0.00166d0)) .or. (.not. (z <= 4100000000000.0d0))) then
tmp = ((y / (b - y)) * (x / z)) + ((t - a) / (b - y))
else
tmp = ((y * x) + (z * (t - a))) / (y + (z * (b - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -0.00166) || !(z <= 4100000000000.0)) {
tmp = ((y / (b - y)) * (x / z)) + ((t - a) / (b - y));
} else {
tmp = ((y * x) + (z * (t - a))) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -0.00166) or not (z <= 4100000000000.0): tmp = ((y / (b - y)) * (x / z)) + ((t - a) / (b - y)) else: tmp = ((y * x) + (z * (t - a))) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -0.00166) || !(z <= 4100000000000.0)) tmp = Float64(Float64(Float64(y / Float64(b - y)) * Float64(x / z)) + Float64(Float64(t - a) / Float64(b - y))); else tmp = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -0.00166) || ~((z <= 4100000000000.0))) tmp = ((y / (b - y)) * (x / z)) + ((t - a) / (b - y)); else tmp = ((y * x) + (z * (t - a))) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -0.00166], N[Not[LessEqual[z, 4100000000000.0]], $MachinePrecision]], N[(N[(N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00166 \lor \neg \left(z \leq 4100000000000\right):\\
\;\;\;\;\frac{y}{b - y} \cdot \frac{x}{z} + \frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -0.00166 or 4.1e12 < z Initial program 35.8%
Taylor expanded in z around -inf 58.5%
+-commutative58.5%
associate--l+58.5%
Simplified90.9%
Taylor expanded in x around inf 82.5%
times-frac99.1%
Simplified99.1%
if -0.00166 < z < 4.1e12Initial program 91.2%
Final simplification94.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y)))
(t_2 (/ (+ (* y x) (* z (- t a))) y))
(t_3 (+ (* (/ y (- b y)) (/ x z)) t_1)))
(if (<= z -7.5e-45)
t_3
(if (<= z -1.5e-67)
t_2
(if (<= z -1.85e-99)
(+ t_1 (* (/ y z) (/ x b)))
(if (<= z 2.3e-102) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = ((y * x) + (z * (t - a))) / y;
double t_3 = ((y / (b - y)) * (x / z)) + t_1;
double tmp;
if (z <= -7.5e-45) {
tmp = t_3;
} else if (z <= -1.5e-67) {
tmp = t_2;
} else if (z <= -1.85e-99) {
tmp = t_1 + ((y / z) * (x / b));
} else if (z <= 2.3e-102) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (t - a) / (b - y)
t_2 = ((y * x) + (z * (t - a))) / y
t_3 = ((y / (b - y)) * (x / z)) + t_1
if (z <= (-7.5d-45)) then
tmp = t_3
else if (z <= (-1.5d-67)) then
tmp = t_2
else if (z <= (-1.85d-99)) then
tmp = t_1 + ((y / z) * (x / b))
else if (z <= 2.3d-102) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = ((y * x) + (z * (t - a))) / y;
double t_3 = ((y / (b - y)) * (x / z)) + t_1;
double tmp;
if (z <= -7.5e-45) {
tmp = t_3;
} else if (z <= -1.5e-67) {
tmp = t_2;
} else if (z <= -1.85e-99) {
tmp = t_1 + ((y / z) * (x / b));
} else if (z <= 2.3e-102) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) t_2 = ((y * x) + (z * (t - a))) / y t_3 = ((y / (b - y)) * (x / z)) + t_1 tmp = 0 if z <= -7.5e-45: tmp = t_3 elif z <= -1.5e-67: tmp = t_2 elif z <= -1.85e-99: tmp = t_1 + ((y / z) * (x / b)) elif z <= 2.3e-102: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) t_2 = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / y) t_3 = Float64(Float64(Float64(y / Float64(b - y)) * Float64(x / z)) + t_1) tmp = 0.0 if (z <= -7.5e-45) tmp = t_3; elseif (z <= -1.5e-67) tmp = t_2; elseif (z <= -1.85e-99) tmp = Float64(t_1 + Float64(Float64(y / z) * Float64(x / b))); elseif (z <= 2.3e-102) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); t_2 = ((y * x) + (z * (t - a))) / y; t_3 = ((y / (b - y)) * (x / z)) + t_1; tmp = 0.0; if (z <= -7.5e-45) tmp = t_3; elseif (z <= -1.5e-67) tmp = t_2; elseif (z <= -1.85e-99) tmp = t_1 + ((y / z) * (x / b)); elseif (z <= 2.3e-102) tmp = t_2; else tmp = t_3; 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]}, Block[{t$95$2 = N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[z, -7.5e-45], t$95$3, If[LessEqual[z, -1.5e-67], t$95$2, If[LessEqual[z, -1.85e-99], N[(t$95$1 + N[(N[(y / z), $MachinePrecision] * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e-102], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := \frac{y \cdot x + z \cdot \left(t - a\right)}{y}\\
t_3 := \frac{y}{b - y} \cdot \frac{x}{z} + t_1\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{-45}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-67}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{-99}:\\
\;\;\;\;t_1 + \frac{y}{z} \cdot \frac{x}{b}\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-102}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -7.5000000000000006e-45 or 2.29999999999999987e-102 < z Initial program 47.9%
Taylor expanded in z around -inf 57.5%
+-commutative57.5%
associate--l+57.5%
Simplified83.9%
Taylor expanded in x around inf 79.2%
times-frac92.1%
Simplified92.1%
if -7.5000000000000006e-45 < z < -1.50000000000000016e-67 or -1.85e-99 < z < 2.29999999999999987e-102Initial program 90.6%
Taylor expanded in z around 0 72.5%
if -1.50000000000000016e-67 < z < -1.85e-99Initial program 76.1%
Taylor expanded in z around -inf 59.8%
+-commutative59.8%
associate--l+59.8%
Simplified69.4%
Taylor expanded in b around inf 61.4%
*-commutative61.4%
times-frac69.2%
Simplified69.2%
Final simplification83.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))) (t_2 (/ (+ (* y x) (* z (- t a))) y)))
(if (<= z -7e+162)
t_1
(if (<= z -1.06e+86)
(- (/ t (- b y)) (/ x z))
(if (<= z -1.54e-27)
t_1
(if (<= z -9.2e-68)
t_2
(if (<= z -4.6e-99)
(/ (+ (- t a) (/ y (/ z x))) b)
(if (<= z 1e-102) t_2 t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = ((y * x) + (z * (t - a))) / y;
double tmp;
if (z <= -7e+162) {
tmp = t_1;
} else if (z <= -1.06e+86) {
tmp = (t / (b - y)) - (x / z);
} else if (z <= -1.54e-27) {
tmp = t_1;
} else if (z <= -9.2e-68) {
tmp = t_2;
} else if (z <= -4.6e-99) {
tmp = ((t - a) + (y / (z / x))) / b;
} else if (z <= 1e-102) {
tmp = t_2;
} 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 = (t - a) / (b - y)
t_2 = ((y * x) + (z * (t - a))) / y
if (z <= (-7d+162)) then
tmp = t_1
else if (z <= (-1.06d+86)) then
tmp = (t / (b - y)) - (x / z)
else if (z <= (-1.54d-27)) then
tmp = t_1
else if (z <= (-9.2d-68)) then
tmp = t_2
else if (z <= (-4.6d-99)) then
tmp = ((t - a) + (y / (z / x))) / b
else if (z <= 1d-102) then
tmp = t_2
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 t_2 = ((y * x) + (z * (t - a))) / y;
double tmp;
if (z <= -7e+162) {
tmp = t_1;
} else if (z <= -1.06e+86) {
tmp = (t / (b - y)) - (x / z);
} else if (z <= -1.54e-27) {
tmp = t_1;
} else if (z <= -9.2e-68) {
tmp = t_2;
} else if (z <= -4.6e-99) {
tmp = ((t - a) + (y / (z / x))) / b;
} else if (z <= 1e-102) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) t_2 = ((y * x) + (z * (t - a))) / y tmp = 0 if z <= -7e+162: tmp = t_1 elif z <= -1.06e+86: tmp = (t / (b - y)) - (x / z) elif z <= -1.54e-27: tmp = t_1 elif z <= -9.2e-68: tmp = t_2 elif z <= -4.6e-99: tmp = ((t - a) + (y / (z / x))) / b elif z <= 1e-102: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) t_2 = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / y) tmp = 0.0 if (z <= -7e+162) tmp = t_1; elseif (z <= -1.06e+86) tmp = Float64(Float64(t / Float64(b - y)) - Float64(x / z)); elseif (z <= -1.54e-27) tmp = t_1; elseif (z <= -9.2e-68) tmp = t_2; elseif (z <= -4.6e-99) tmp = Float64(Float64(Float64(t - a) + Float64(y / Float64(z / x))) / b); elseif (z <= 1e-102) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); t_2 = ((y * x) + (z * (t - a))) / y; tmp = 0.0; if (z <= -7e+162) tmp = t_1; elseif (z <= -1.06e+86) tmp = (t / (b - y)) - (x / z); elseif (z <= -1.54e-27) tmp = t_1; elseif (z <= -9.2e-68) tmp = t_2; elseif (z <= -4.6e-99) tmp = ((t - a) + (y / (z / x))) / b; elseif (z <= 1e-102) tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[z, -7e+162], t$95$1, If[LessEqual[z, -1.06e+86], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.54e-27], t$95$1, If[LessEqual[z, -9.2e-68], t$95$2, If[LessEqual[z, -4.6e-99], N[(N[(N[(t - a), $MachinePrecision] + N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 1e-102], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := \frac{y \cdot x + z \cdot \left(t - a\right)}{y}\\
\mathbf{if}\;z \leq -7 \cdot 10^{+162}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.06 \cdot 10^{+86}:\\
\;\;\;\;\frac{t}{b - y} - \frac{x}{z}\\
\mathbf{elif}\;z \leq -1.54 \cdot 10^{-27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -9.2 \cdot 10^{-68}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{-99}:\\
\;\;\;\;\frac{\left(t - a\right) + \frac{y}{\frac{z}{x}}}{b}\\
\mathbf{elif}\;z \leq 10^{-102}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -7.00000000000000036e162 or -1.06e86 < z < -1.54e-27 or 9.99999999999999933e-103 < z Initial program 49.0%
Taylor expanded in z around inf 77.9%
if -7.00000000000000036e162 < z < -1.06e86Initial program 32.5%
Taylor expanded in z around -inf 21.6%
+-commutative21.6%
associate--l+21.6%
Simplified84.1%
Taylor expanded in y around inf 95.0%
associate-*r/95.0%
mul-1-neg95.0%
Simplified95.0%
Taylor expanded in a around 0 95.0%
mul-1-neg95.0%
unsub-neg95.0%
Simplified95.0%
if -1.54e-27 < z < -9.19999999999999987e-68 or -4.5999999999999997e-99 < z < 9.99999999999999933e-103Initial program 90.1%
Taylor expanded in z around 0 71.8%
if -9.19999999999999987e-68 < z < -4.5999999999999997e-99Initial program 82.4%
Taylor expanded in z around -inf 64.7%
+-commutative64.7%
associate--l+64.7%
Simplified66.7%
Taylor expanded in x around inf 66.9%
times-frac53.9%
Simplified53.9%
clear-num53.7%
inv-pow53.7%
Applied egg-rr53.7%
unpow-153.7%
Simplified53.7%
Taylor expanded in b around inf 64.8%
associate--l+64.8%
associate-/l*63.7%
Simplified63.7%
Final simplification76.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))) (t_2 (/ (+ (* y x) (* z (- t a))) y)))
(if (<= z -7e+162)
t_1
(if (<= z -1.25e+85)
(- (/ t (- b y)) (/ x z))
(if (<= z -2.25e-27)
t_1
(if (<= z -2.05e-67)
t_2
(if (<= z -8.2e-99)
(/ (- (+ t (/ (* y x) z)) a) b)
(if (<= z 2.8e-102) t_2 t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = ((y * x) + (z * (t - a))) / y;
double tmp;
if (z <= -7e+162) {
tmp = t_1;
} else if (z <= -1.25e+85) {
tmp = (t / (b - y)) - (x / z);
} else if (z <= -2.25e-27) {
tmp = t_1;
} else if (z <= -2.05e-67) {
tmp = t_2;
} else if (z <= -8.2e-99) {
tmp = ((t + ((y * x) / z)) - a) / b;
} else if (z <= 2.8e-102) {
tmp = t_2;
} 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 = (t - a) / (b - y)
t_2 = ((y * x) + (z * (t - a))) / y
if (z <= (-7d+162)) then
tmp = t_1
else if (z <= (-1.25d+85)) then
tmp = (t / (b - y)) - (x / z)
else if (z <= (-2.25d-27)) then
tmp = t_1
else if (z <= (-2.05d-67)) then
tmp = t_2
else if (z <= (-8.2d-99)) then
tmp = ((t + ((y * x) / z)) - a) / b
else if (z <= 2.8d-102) then
tmp = t_2
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 t_2 = ((y * x) + (z * (t - a))) / y;
double tmp;
if (z <= -7e+162) {
tmp = t_1;
} else if (z <= -1.25e+85) {
tmp = (t / (b - y)) - (x / z);
} else if (z <= -2.25e-27) {
tmp = t_1;
} else if (z <= -2.05e-67) {
tmp = t_2;
} else if (z <= -8.2e-99) {
tmp = ((t + ((y * x) / z)) - a) / b;
} else if (z <= 2.8e-102) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) t_2 = ((y * x) + (z * (t - a))) / y tmp = 0 if z <= -7e+162: tmp = t_1 elif z <= -1.25e+85: tmp = (t / (b - y)) - (x / z) elif z <= -2.25e-27: tmp = t_1 elif z <= -2.05e-67: tmp = t_2 elif z <= -8.2e-99: tmp = ((t + ((y * x) / z)) - a) / b elif z <= 2.8e-102: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) t_2 = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / y) tmp = 0.0 if (z <= -7e+162) tmp = t_1; elseif (z <= -1.25e+85) tmp = Float64(Float64(t / Float64(b - y)) - Float64(x / z)); elseif (z <= -2.25e-27) tmp = t_1; elseif (z <= -2.05e-67) tmp = t_2; elseif (z <= -8.2e-99) tmp = Float64(Float64(Float64(t + Float64(Float64(y * x) / z)) - a) / b); elseif (z <= 2.8e-102) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); t_2 = ((y * x) + (z * (t - a))) / y; tmp = 0.0; if (z <= -7e+162) tmp = t_1; elseif (z <= -1.25e+85) tmp = (t / (b - y)) - (x / z); elseif (z <= -2.25e-27) tmp = t_1; elseif (z <= -2.05e-67) tmp = t_2; elseif (z <= -8.2e-99) tmp = ((t + ((y * x) / z)) - a) / b; elseif (z <= 2.8e-102) tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[z, -7e+162], t$95$1, If[LessEqual[z, -1.25e+85], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.25e-27], t$95$1, If[LessEqual[z, -2.05e-67], t$95$2, If[LessEqual[z, -8.2e-99], N[(N[(N[(t + N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 2.8e-102], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := \frac{y \cdot x + z \cdot \left(t - a\right)}{y}\\
\mathbf{if}\;z \leq -7 \cdot 10^{+162}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{+85}:\\
\;\;\;\;\frac{t}{b - y} - \frac{x}{z}\\
\mathbf{elif}\;z \leq -2.25 \cdot 10^{-27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.05 \cdot 10^{-67}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-99}:\\
\;\;\;\;\frac{\left(t + \frac{y \cdot x}{z}\right) - a}{b}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-102}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -7.00000000000000036e162 or -1.25e85 < z < -2.2500000000000001e-27 or 2.80000000000000013e-102 < z Initial program 49.0%
Taylor expanded in z around inf 77.9%
if -7.00000000000000036e162 < z < -1.25e85Initial program 32.5%
Taylor expanded in z around -inf 21.6%
+-commutative21.6%
associate--l+21.6%
Simplified84.1%
Taylor expanded in y around inf 95.0%
associate-*r/95.0%
mul-1-neg95.0%
Simplified95.0%
Taylor expanded in a around 0 95.0%
mul-1-neg95.0%
unsub-neg95.0%
Simplified95.0%
if -2.2500000000000001e-27 < z < -2.0499999999999999e-67 or -8.20000000000000057e-99 < z < 2.80000000000000013e-102Initial program 90.1%
Taylor expanded in z around 0 71.8%
if -2.0499999999999999e-67 < z < -8.20000000000000057e-99Initial program 82.4%
Taylor expanded in z around -inf 64.7%
+-commutative64.7%
associate--l+64.7%
Simplified66.7%
Taylor expanded in x around inf 66.9%
times-frac53.9%
Simplified53.9%
Taylor expanded in b around inf 64.8%
Final simplification76.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -7.5e+162)
t_1
(if (<= z -1e+86)
(- (/ t (- b y)) (/ x z))
(if (<= z -1.5e-27)
t_1
(if (<= z -1.7e-117)
(+ x (* z (/ t y)))
(if (<= z -1.76e-152)
(/ (- t a) (/ y z))
(if (<= z 2.8e-102) (- x (* z (/ a 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.5e+162) {
tmp = t_1;
} else if (z <= -1e+86) {
tmp = (t / (b - y)) - (x / z);
} else if (z <= -1.5e-27) {
tmp = t_1;
} else if (z <= -1.7e-117) {
tmp = x + (z * (t / y));
} else if (z <= -1.76e-152) {
tmp = (t - a) / (y / z);
} else if (z <= 2.8e-102) {
tmp = x - (z * (a / 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.5d+162)) then
tmp = t_1
else if (z <= (-1d+86)) then
tmp = (t / (b - y)) - (x / z)
else if (z <= (-1.5d-27)) then
tmp = t_1
else if (z <= (-1.7d-117)) then
tmp = x + (z * (t / y))
else if (z <= (-1.76d-152)) then
tmp = (t - a) / (y / z)
else if (z <= 2.8d-102) then
tmp = x - (z * (a / 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.5e+162) {
tmp = t_1;
} else if (z <= -1e+86) {
tmp = (t / (b - y)) - (x / z);
} else if (z <= -1.5e-27) {
tmp = t_1;
} else if (z <= -1.7e-117) {
tmp = x + (z * (t / y));
} else if (z <= -1.76e-152) {
tmp = (t - a) / (y / z);
} else if (z <= 2.8e-102) {
tmp = x - (z * (a / 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.5e+162: tmp = t_1 elif z <= -1e+86: tmp = (t / (b - y)) - (x / z) elif z <= -1.5e-27: tmp = t_1 elif z <= -1.7e-117: tmp = x + (z * (t / y)) elif z <= -1.76e-152: tmp = (t - a) / (y / z) elif z <= 2.8e-102: tmp = x - (z * (a / 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.5e+162) tmp = t_1; elseif (z <= -1e+86) tmp = Float64(Float64(t / Float64(b - y)) - Float64(x / z)); elseif (z <= -1.5e-27) tmp = t_1; elseif (z <= -1.7e-117) tmp = Float64(x + Float64(z * Float64(t / y))); elseif (z <= -1.76e-152) tmp = Float64(Float64(t - a) / Float64(y / z)); elseif (z <= 2.8e-102) tmp = Float64(x - Float64(z * Float64(a / 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.5e+162) tmp = t_1; elseif (z <= -1e+86) tmp = (t / (b - y)) - (x / z); elseif (z <= -1.5e-27) tmp = t_1; elseif (z <= -1.7e-117) tmp = x + (z * (t / y)); elseif (z <= -1.76e-152) tmp = (t - a) / (y / z); elseif (z <= 2.8e-102) tmp = x - (z * (a / 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.5e+162], t$95$1, If[LessEqual[z, -1e+86], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.5e-27], t$95$1, If[LessEqual[z, -1.7e-117], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.76e-152], N[(N[(t - a), $MachinePrecision] / N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e-102], N[(x - N[(z * N[(a / 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.5 \cdot 10^{+162}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1 \cdot 10^{+86}:\\
\;\;\;\;\frac{t}{b - y} - \frac{x}{z}\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-117}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\mathbf{elif}\;z \leq -1.76 \cdot 10^{-152}:\\
\;\;\;\;\frac{t - a}{\frac{y}{z}}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-102}:\\
\;\;\;\;x - z \cdot \frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -7.50000000000000033e162 or -1e86 < z < -1.5000000000000001e-27 or 2.80000000000000013e-102 < z Initial program 49.0%
Taylor expanded in z around inf 77.9%
if -7.50000000000000033e162 < z < -1e86Initial program 32.5%
Taylor expanded in z around -inf 21.6%
+-commutative21.6%
associate--l+21.6%
Simplified84.1%
Taylor expanded in y around inf 95.0%
associate-*r/95.0%
mul-1-neg95.0%
Simplified95.0%
Taylor expanded in a around 0 95.0%
mul-1-neg95.0%
unsub-neg95.0%
Simplified95.0%
if -1.5000000000000001e-27 < z < -1.70000000000000017e-117Initial program 85.8%
Taylor expanded in z around 0 38.3%
Taylor expanded in t around inf 48.7%
if -1.70000000000000017e-117 < z < -1.76000000000000001e-152Initial program 100.0%
Taylor expanded in z around 0 64.2%
Taylor expanded in x around 0 64.4%
associate-/l*64.0%
Simplified64.0%
if -1.76000000000000001e-152 < z < 2.80000000000000013e-102Initial program 89.4%
Taylor expanded in z around 0 57.7%
Taylor expanded in a around inf 68.0%
associate-*r/68.0%
mul-1-neg68.0%
Simplified68.0%
Final simplification72.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -7.2e+162)
t_1
(if (<= z -1.06e+86)
(- (/ t (- b y)) (/ x z))
(if (or (<= z -2.4e-27) (not (<= z 2e-103)))
t_1
(+ x (* z (- (/ t y) (/ a y)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -7.2e+162) {
tmp = t_1;
} else if (z <= -1.06e+86) {
tmp = (t / (b - y)) - (x / z);
} else if ((z <= -2.4e-27) || !(z <= 2e-103)) {
tmp = t_1;
} else {
tmp = x + (z * ((t / y) - (a / y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-7.2d+162)) then
tmp = t_1
else if (z <= (-1.06d+86)) then
tmp = (t / (b - y)) - (x / z)
else if ((z <= (-2.4d-27)) .or. (.not. (z <= 2d-103))) then
tmp = t_1
else
tmp = x + (z * ((t / y) - (a / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -7.2e+162) {
tmp = t_1;
} else if (z <= -1.06e+86) {
tmp = (t / (b - y)) - (x / z);
} else if ((z <= -2.4e-27) || !(z <= 2e-103)) {
tmp = t_1;
} else {
tmp = x + (z * ((t / y) - (a / y)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -7.2e+162: tmp = t_1 elif z <= -1.06e+86: tmp = (t / (b - y)) - (x / z) elif (z <= -2.4e-27) or not (z <= 2e-103): tmp = t_1 else: tmp = x + (z * ((t / y) - (a / y))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -7.2e+162) tmp = t_1; elseif (z <= -1.06e+86) tmp = Float64(Float64(t / Float64(b - y)) - Float64(x / z)); elseif ((z <= -2.4e-27) || !(z <= 2e-103)) tmp = t_1; else tmp = Float64(x + Float64(z * Float64(Float64(t / y) - Float64(a / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -7.2e+162) tmp = t_1; elseif (z <= -1.06e+86) tmp = (t / (b - y)) - (x / z); elseif ((z <= -2.4e-27) || ~((z <= 2e-103))) tmp = t_1; else tmp = x + (z * ((t / y) - (a / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.2e+162], t$95$1, If[LessEqual[z, -1.06e+86], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -2.4e-27], N[Not[LessEqual[z, 2e-103]], $MachinePrecision]], t$95$1, N[(x + N[(z * N[(N[(t / y), $MachinePrecision] - N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{+162}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.06 \cdot 10^{+86}:\\
\;\;\;\;\frac{t}{b - y} - \frac{x}{z}\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-27} \lor \neg \left(z \leq 2 \cdot 10^{-103}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(\frac{t}{y} - \frac{a}{y}\right)\\
\end{array}
\end{array}
if z < -7.19999999999999987e162 or -1.06e86 < z < -2.40000000000000002e-27 or 1.99999999999999992e-103 < z Initial program 49.0%
Taylor expanded in z around inf 77.9%
if -7.19999999999999987e162 < z < -1.06e86Initial program 32.5%
Taylor expanded in z around -inf 21.6%
+-commutative21.6%
associate--l+21.6%
Simplified84.1%
Taylor expanded in y around inf 95.0%
associate-*r/95.0%
mul-1-neg95.0%
Simplified95.0%
Taylor expanded in a around 0 95.0%
mul-1-neg95.0%
unsub-neg95.0%
Simplified95.0%
if -2.40000000000000002e-27 < z < 1.99999999999999992e-103Initial program 89.3%
Taylor expanded in z around 0 66.8%
Taylor expanded in z around 0 63.9%
Final simplification73.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -7e+162)
t_1
(if (<= z -1.06e+86)
(- (/ t (- b y)) (/ x z))
(if (or (<= z -2.55e-27) (not (<= z 2.8e-102)))
t_1
(/ (+ (* y x) (* z (- t a))) y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -7e+162) {
tmp = t_1;
} else if (z <= -1.06e+86) {
tmp = (t / (b - y)) - (x / z);
} else if ((z <= -2.55e-27) || !(z <= 2.8e-102)) {
tmp = t_1;
} else {
tmp = ((y * x) + (z * (t - a))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-7d+162)) then
tmp = t_1
else if (z <= (-1.06d+86)) then
tmp = (t / (b - y)) - (x / z)
else if ((z <= (-2.55d-27)) .or. (.not. (z <= 2.8d-102))) then
tmp = t_1
else
tmp = ((y * x) + (z * (t - a))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -7e+162) {
tmp = t_1;
} else if (z <= -1.06e+86) {
tmp = (t / (b - y)) - (x / z);
} else if ((z <= -2.55e-27) || !(z <= 2.8e-102)) {
tmp = t_1;
} else {
tmp = ((y * x) + (z * (t - a))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -7e+162: tmp = t_1 elif z <= -1.06e+86: tmp = (t / (b - y)) - (x / z) elif (z <= -2.55e-27) or not (z <= 2.8e-102): tmp = t_1 else: tmp = ((y * x) + (z * (t - a))) / y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -7e+162) tmp = t_1; elseif (z <= -1.06e+86) tmp = Float64(Float64(t / Float64(b - y)) - Float64(x / z)); elseif ((z <= -2.55e-27) || !(z <= 2.8e-102)) tmp = t_1; else tmp = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -7e+162) tmp = t_1; elseif (z <= -1.06e+86) tmp = (t / (b - y)) - (x / z); elseif ((z <= -2.55e-27) || ~((z <= 2.8e-102))) tmp = t_1; else tmp = ((y * x) + (z * (t - a))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7e+162], t$95$1, If[LessEqual[z, -1.06e+86], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -2.55e-27], N[Not[LessEqual[z, 2.8e-102]], $MachinePrecision]], t$95$1, N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -7 \cdot 10^{+162}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.06 \cdot 10^{+86}:\\
\;\;\;\;\frac{t}{b - y} - \frac{x}{z}\\
\mathbf{elif}\;z \leq -2.55 \cdot 10^{-27} \lor \neg \left(z \leq 2.8 \cdot 10^{-102}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -7.00000000000000036e162 or -1.06e86 < z < -2.55e-27 or 2.80000000000000013e-102 < z Initial program 49.0%
Taylor expanded in z around inf 77.9%
if -7.00000000000000036e162 < z < -1.06e86Initial program 32.5%
Taylor expanded in z around -inf 21.6%
+-commutative21.6%
associate--l+21.6%
Simplified84.1%
Taylor expanded in y around inf 95.0%
associate-*r/95.0%
mul-1-neg95.0%
Simplified95.0%
Taylor expanded in a around 0 95.0%
mul-1-neg95.0%
unsub-neg95.0%
Simplified95.0%
if -2.55e-27 < z < 2.80000000000000013e-102Initial program 89.3%
Taylor expanded in z around 0 66.8%
Final simplification74.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- t a) (- b y)) (/ x z))))
(if (<= z -6.6e-8)
t_1
(if (<= z 4.6e-104)
(/ (+ (* y x) (* z (- t a))) (- y (* z y)))
(if (<= z 2e+17) (/ (- (+ t (/ (* y x) z)) a) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -6.6e-8) {
tmp = t_1;
} else if (z <= 4.6e-104) {
tmp = ((y * x) + (z * (t - a))) / (y - (z * y));
} else if (z <= 2e+17) {
tmp = ((t + ((y * x) / z)) - 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 = ((t - a) / (b - y)) - (x / z)
if (z <= (-6.6d-8)) then
tmp = t_1
else if (z <= 4.6d-104) then
tmp = ((y * x) + (z * (t - a))) / (y - (z * y))
else if (z <= 2d+17) then
tmp = ((t + ((y * x) / z)) - 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 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -6.6e-8) {
tmp = t_1;
} else if (z <= 4.6e-104) {
tmp = ((y * x) + (z * (t - a))) / (y - (z * y));
} else if (z <= 2e+17) {
tmp = ((t + ((y * x) / z)) - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t - a) / (b - y)) - (x / z) tmp = 0 if z <= -6.6e-8: tmp = t_1 elif z <= 4.6e-104: tmp = ((y * x) + (z * (t - a))) / (y - (z * y)) elif z <= 2e+17: tmp = ((t + ((y * x) / z)) - a) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) tmp = 0.0 if (z <= -6.6e-8) tmp = t_1; elseif (z <= 4.6e-104) tmp = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / Float64(y - Float64(z * y))); elseif (z <= 2e+17) tmp = Float64(Float64(Float64(t + Float64(Float64(y * x) / z)) - a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t - a) / (b - y)) - (x / z); tmp = 0.0; if (z <= -6.6e-8) tmp = t_1; elseif (z <= 4.6e-104) tmp = ((y * x) + (z * (t - a))) / (y - (z * y)); elseif (z <= 2e+17) tmp = ((t + ((y * x) / z)) - a) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.6e-8], t$95$1, If[LessEqual[z, 4.6e-104], N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+17], N[(N[(N[(t + N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{-8}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{-104}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{y - z \cdot y}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+17}:\\
\;\;\;\;\frac{\left(t + \frac{y \cdot x}{z}\right) - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -6.59999999999999954e-8 or 2e17 < z Initial program 35.3%
Taylor expanded in z around -inf 59.0%
+-commutative59.0%
associate--l+59.0%
Simplified90.9%
Taylor expanded in y around inf 91.8%
associate-*r/91.8%
mul-1-neg91.8%
Simplified91.8%
if -6.59999999999999954e-8 < z < 4.5999999999999999e-104Initial program 89.9%
Taylor expanded in y around inf 66.3%
*-commutative66.3%
+-commutative66.3%
distribute-lft-in66.3%
*-rgt-identity66.3%
mul-1-neg66.3%
distribute-rgt-neg-in66.3%
unsub-neg66.3%
*-commutative66.3%
Simplified66.3%
if 4.5999999999999999e-104 < z < 2e17Initial program 99.5%
Taylor expanded in z around -inf 57.0%
+-commutative57.0%
associate--l+57.0%
Simplified62.2%
Taylor expanded in x around inf 68.0%
times-frac63.0%
Simplified63.0%
Taylor expanded in b around inf 64.3%
Final simplification78.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- t a) (- b y)) (/ x z))))
(if (<= z -3.6e-10)
t_1
(if (<= z 4.2e-103)
(/ (+ (* y x) (* z (- t a))) y)
(if (<= z 1e+18) (/ (- (+ t (/ (* y x) z)) a) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -3.6e-10) {
tmp = t_1;
} else if (z <= 4.2e-103) {
tmp = ((y * x) + (z * (t - a))) / y;
} else if (z <= 1e+18) {
tmp = ((t + ((y * x) / z)) - 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 = ((t - a) / (b - y)) - (x / z)
if (z <= (-3.6d-10)) then
tmp = t_1
else if (z <= 4.2d-103) then
tmp = ((y * x) + (z * (t - a))) / y
else if (z <= 1d+18) then
tmp = ((t + ((y * x) / z)) - 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 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -3.6e-10) {
tmp = t_1;
} else if (z <= 4.2e-103) {
tmp = ((y * x) + (z * (t - a))) / y;
} else if (z <= 1e+18) {
tmp = ((t + ((y * x) / z)) - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t - a) / (b - y)) - (x / z) tmp = 0 if z <= -3.6e-10: tmp = t_1 elif z <= 4.2e-103: tmp = ((y * x) + (z * (t - a))) / y elif z <= 1e+18: tmp = ((t + ((y * x) / z)) - a) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) tmp = 0.0 if (z <= -3.6e-10) tmp = t_1; elseif (z <= 4.2e-103) tmp = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / y); elseif (z <= 1e+18) tmp = Float64(Float64(Float64(t + Float64(Float64(y * x) / z)) - a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t - a) / (b - y)) - (x / z); tmp = 0.0; if (z <= -3.6e-10) tmp = t_1; elseif (z <= 4.2e-103) tmp = ((y * x) + (z * (t - a))) / y; elseif (z <= 1e+18) tmp = ((t + ((y * x) / z)) - a) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.6e-10], t$95$1, If[LessEqual[z, 4.2e-103], N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1e+18], N[(N[(N[(t + N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{if}\;z \leq -3.6 \cdot 10^{-10}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-103}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 10^{+18}:\\
\;\;\;\;\frac{\left(t + \frac{y \cdot x}{z}\right) - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.6e-10 or 1e18 < z Initial program 35.3%
Taylor expanded in z around -inf 59.0%
+-commutative59.0%
associate--l+59.0%
Simplified90.9%
Taylor expanded in y around inf 91.8%
associate-*r/91.8%
mul-1-neg91.8%
Simplified91.8%
if -3.6e-10 < z < 4.20000000000000009e-103Initial program 89.9%
Taylor expanded in z around 0 66.1%
if 4.20000000000000009e-103 < z < 1e18Initial program 99.5%
Taylor expanded in z around -inf 57.0%
+-commutative57.0%
associate--l+57.0%
Simplified62.2%
Taylor expanded in x around inf 68.0%
times-frac63.0%
Simplified63.0%
Taylor expanded in b around inf 64.3%
Final simplification77.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z (/ t y)))) (t_2 (/ (- t a) (- b y))))
(if (<= z -2.15e-27)
t_2
(if (<= z -1.22e-117)
t_1
(if (<= z -1.76e-152)
(/ (- t a) (/ y z))
(if (<= z 2.7e-102) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * (t / y));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -2.15e-27) {
tmp = t_2;
} else if (z <= -1.22e-117) {
tmp = t_1;
} else if (z <= -1.76e-152) {
tmp = (t - a) / (y / z);
} else if (z <= 2.7e-102) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (z * (t / y))
t_2 = (t - a) / (b - y)
if (z <= (-2.15d-27)) then
tmp = t_2
else if (z <= (-1.22d-117)) then
tmp = t_1
else if (z <= (-1.76d-152)) then
tmp = (t - a) / (y / z)
else if (z <= 2.7d-102) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * (t / y));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -2.15e-27) {
tmp = t_2;
} else if (z <= -1.22e-117) {
tmp = t_1;
} else if (z <= -1.76e-152) {
tmp = (t - a) / (y / z);
} else if (z <= 2.7e-102) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * (t / y)) t_2 = (t - a) / (b - y) tmp = 0 if z <= -2.15e-27: tmp = t_2 elif z <= -1.22e-117: tmp = t_1 elif z <= -1.76e-152: tmp = (t - a) / (y / z) elif z <= 2.7e-102: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * Float64(t / y))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.15e-27) tmp = t_2; elseif (z <= -1.22e-117) tmp = t_1; elseif (z <= -1.76e-152) tmp = Float64(Float64(t - a) / Float64(y / z)); elseif (z <= 2.7e-102) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z * (t / y)); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -2.15e-27) tmp = t_2; elseif (z <= -1.22e-117) tmp = t_1; elseif (z <= -1.76e-152) tmp = (t - a) / (y / z); elseif (z <= 2.7e-102) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.15e-27], t$95$2, If[LessEqual[z, -1.22e-117], t$95$1, If[LessEqual[z, -1.76e-152], N[(N[(t - a), $MachinePrecision] / N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e-102], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{t}{y}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.15 \cdot 10^{-27}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.22 \cdot 10^{-117}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.76 \cdot 10^{-152}:\\
\;\;\;\;\frac{t - a}{\frac{y}{z}}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-102}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.15000000000000001e-27 or 2.7e-102 < z Initial program 46.8%
Taylor expanded in z around inf 76.8%
if -2.15000000000000001e-27 < z < -1.21999999999999997e-117 or -1.76000000000000001e-152 < z < 2.7e-102Initial program 88.5%
Taylor expanded in z around 0 52.6%
Taylor expanded in t around inf 56.6%
if -1.21999999999999997e-117 < z < -1.76000000000000001e-152Initial program 100.0%
Taylor expanded in z around 0 64.2%
Taylor expanded in x around 0 64.4%
associate-/l*64.0%
Simplified64.0%
Final simplification68.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.9e-27)
t_1
(if (<= z -1.22e-117)
(+ x (* z (/ t y)))
(if (<= z -1.76e-152)
(/ (- t a) (/ y z))
(if (<= z 2.8e-102) (- x (* z (/ a 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 <= -1.9e-27) {
tmp = t_1;
} else if (z <= -1.22e-117) {
tmp = x + (z * (t / y));
} else if (z <= -1.76e-152) {
tmp = (t - a) / (y / z);
} else if (z <= 2.8e-102) {
tmp = x - (z * (a / 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 <= (-1.9d-27)) then
tmp = t_1
else if (z <= (-1.22d-117)) then
tmp = x + (z * (t / y))
else if (z <= (-1.76d-152)) then
tmp = (t - a) / (y / z)
else if (z <= 2.8d-102) then
tmp = x - (z * (a / 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 <= -1.9e-27) {
tmp = t_1;
} else if (z <= -1.22e-117) {
tmp = x + (z * (t / y));
} else if (z <= -1.76e-152) {
tmp = (t - a) / (y / z);
} else if (z <= 2.8e-102) {
tmp = x - (z * (a / 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 <= -1.9e-27: tmp = t_1 elif z <= -1.22e-117: tmp = x + (z * (t / y)) elif z <= -1.76e-152: tmp = (t - a) / (y / z) elif z <= 2.8e-102: tmp = x - (z * (a / 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 <= -1.9e-27) tmp = t_1; elseif (z <= -1.22e-117) tmp = Float64(x + Float64(z * Float64(t / y))); elseif (z <= -1.76e-152) tmp = Float64(Float64(t - a) / Float64(y / z)); elseif (z <= 2.8e-102) tmp = Float64(x - Float64(z * Float64(a / 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 <= -1.9e-27) tmp = t_1; elseif (z <= -1.22e-117) tmp = x + (z * (t / y)); elseif (z <= -1.76e-152) tmp = (t - a) / (y / z); elseif (z <= 2.8e-102) tmp = x - (z * (a / 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, -1.9e-27], t$95$1, If[LessEqual[z, -1.22e-117], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.76e-152], N[(N[(t - a), $MachinePrecision] / N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e-102], N[(x - N[(z * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{-27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.22 \cdot 10^{-117}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\mathbf{elif}\;z \leq -1.76 \cdot 10^{-152}:\\
\;\;\;\;\frac{t - a}{\frac{y}{z}}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-102}:\\
\;\;\;\;x - z \cdot \frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.9e-27 or 2.80000000000000013e-102 < z Initial program 46.8%
Taylor expanded in z around inf 76.8%
if -1.9e-27 < z < -1.21999999999999997e-117Initial program 85.8%
Taylor expanded in z around 0 38.3%
Taylor expanded in t around inf 48.7%
if -1.21999999999999997e-117 < z < -1.76000000000000001e-152Initial program 100.0%
Taylor expanded in z around 0 64.2%
Taylor expanded in x around 0 64.4%
associate-/l*64.0%
Simplified64.0%
if -1.76000000000000001e-152 < z < 2.80000000000000013e-102Initial program 89.4%
Taylor expanded in z around 0 57.7%
Taylor expanded in a around inf 68.0%
associate-*r/68.0%
mul-1-neg68.0%
Simplified68.0%
Final simplification70.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.6e-27) (not (<= z 2.8e-102))) (/ (- 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 <= -1.6e-27) || !(z <= 2.8e-102)) {
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 <= (-1.6d-27)) .or. (.not. (z <= 2.8d-102))) 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 <= -1.6e-27) || !(z <= 2.8e-102)) {
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 <= -1.6e-27) or not (z <= 2.8e-102): 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 <= -1.6e-27) || !(z <= 2.8e-102)) 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 <= -1.6e-27) || ~((z <= 2.8e-102))) 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, -1.6e-27], N[Not[LessEqual[z, 2.8e-102]], $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 -1.6 \cdot 10^{-27} \lor \neg \left(z \leq 2.8 \cdot 10^{-102}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\end{array}
\end{array}
if z < -1.59999999999999995e-27 or 2.80000000000000013e-102 < z Initial program 46.8%
Taylor expanded in z around inf 76.8%
if -1.59999999999999995e-27 < z < 2.80000000000000013e-102Initial program 89.3%
Taylor expanded in z around 0 51.7%
Taylor expanded in t around inf 52.9%
Final simplification66.4%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.65e-21) (/ t b) (if (<= z 2.7e-102) x (if (<= z 3.5e+182) (/ t b) (/ (- a) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.65e-21) {
tmp = t / b;
} else if (z <= 2.7e-102) {
tmp = x;
} else if (z <= 3.5e+182) {
tmp = t / b;
} 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 <= (-1.65d-21)) then
tmp = t / b
else if (z <= 2.7d-102) then
tmp = x
else if (z <= 3.5d+182) then
tmp = t / b
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 <= -1.65e-21) {
tmp = t / b;
} else if (z <= 2.7e-102) {
tmp = x;
} else if (z <= 3.5e+182) {
tmp = t / b;
} else {
tmp = -a / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.65e-21: tmp = t / b elif z <= 2.7e-102: tmp = x elif z <= 3.5e+182: tmp = t / b else: tmp = -a / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.65e-21) tmp = Float64(t / b); elseif (z <= 2.7e-102) tmp = x; elseif (z <= 3.5e+182) tmp = Float64(t / b); else tmp = Float64(Float64(-a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.65e-21) tmp = t / b; elseif (z <= 2.7e-102) tmp = x; elseif (z <= 3.5e+182) tmp = t / b; else tmp = -a / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.65e-21], N[(t / b), $MachinePrecision], If[LessEqual[z, 2.7e-102], x, If[LessEqual[z, 3.5e+182], N[(t / b), $MachinePrecision], N[((-a) / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{-21}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-102}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+182}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{-a}{b}\\
\end{array}
\end{array}
if z < -1.65000000000000004e-21 or 2.7e-102 < z < 3.50000000000000023e182Initial program 49.9%
Taylor expanded in b around inf 32.4%
Taylor expanded in t around inf 30.9%
if -1.65000000000000004e-21 < z < 2.7e-102Initial program 89.5%
Taylor expanded in z around 0 47.7%
if 3.50000000000000023e182 < z Initial program 28.8%
Taylor expanded in b around inf 24.7%
Taylor expanded in a around inf 45.7%
associate-*r/45.7%
neg-mul-145.7%
Simplified45.7%
Final simplification39.8%
(FPCore (x y z t a b) :precision binary64 (if (<= z -3.5e-43) (- (/ t y)) (if (<= z 1.45e-102) x (if (<= z 3.5e+182) (/ t b) (/ (- a) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.5e-43) {
tmp = -(t / y);
} else if (z <= 1.45e-102) {
tmp = x;
} else if (z <= 3.5e+182) {
tmp = t / b;
} 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.5d-43)) then
tmp = -(t / y)
else if (z <= 1.45d-102) then
tmp = x
else if (z <= 3.5d+182) then
tmp = t / b
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.5e-43) {
tmp = -(t / y);
} else if (z <= 1.45e-102) {
tmp = x;
} else if (z <= 3.5e+182) {
tmp = t / b;
} else {
tmp = -a / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.5e-43: tmp = -(t / y) elif z <= 1.45e-102: tmp = x elif z <= 3.5e+182: tmp = t / b else: tmp = -a / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.5e-43) tmp = Float64(-Float64(t / y)); elseif (z <= 1.45e-102) tmp = x; elseif (z <= 3.5e+182) tmp = Float64(t / b); else tmp = Float64(Float64(-a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.5e-43) tmp = -(t / y); elseif (z <= 1.45e-102) tmp = x; elseif (z <= 3.5e+182) tmp = t / b; else tmp = -a / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.5e-43], (-N[(t / y), $MachinePrecision]), If[LessEqual[z, 1.45e-102], x, If[LessEqual[z, 3.5e+182], N[(t / b), $MachinePrecision], N[((-a) / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{-43}:\\
\;\;\;\;-\frac{t}{y}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-102}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+182}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{-a}{b}\\
\end{array}
\end{array}
if z < -3.49999999999999997e-43Initial program 40.7%
Taylor expanded in b around 0 25.0%
+-commutative25.0%
+-commutative25.0%
*-commutative25.0%
fma-udef25.0%
*-commutative25.0%
mul-1-neg25.0%
unsub-neg25.0%
*-commutative25.0%
Simplified25.0%
Taylor expanded in t around inf 15.7%
Taylor expanded in z around inf 33.2%
associate-*r/33.2%
mul-1-neg33.2%
Simplified33.2%
if -3.49999999999999997e-43 < z < 1.44999999999999993e-102Initial program 89.0%
Taylor expanded in z around 0 49.4%
if 1.44999999999999993e-102 < z < 3.50000000000000023e182Initial program 66.7%
Taylor expanded in b around inf 41.2%
Taylor expanded in t around inf 32.4%
if 3.50000000000000023e182 < z Initial program 28.8%
Taylor expanded in b around inf 24.7%
Taylor expanded in a around inf 45.7%
associate-*r/45.7%
neg-mul-145.7%
Simplified45.7%
Final simplification41.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.9e-44) (not (<= z 2.8e-102))) (/ t (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.9e-44) || !(z <= 2.8e-102)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-2.9d-44)) .or. (.not. (z <= 2.8d-102))) then
tmp = t / (b - y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.9e-44) || !(z <= 2.8e-102)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.9e-44) or not (z <= 2.8e-102): tmp = t / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.9e-44) || !(z <= 2.8e-102)) tmp = Float64(t / Float64(b - y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.9e-44) || ~((z <= 2.8e-102))) tmp = t / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.9e-44], N[Not[LessEqual[z, 2.8e-102]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{-44} \lor \neg \left(z \leq 2.8 \cdot 10^{-102}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.9000000000000001e-44 or 2.80000000000000013e-102 < z Initial program 47.9%
Taylor expanded in z around -inf 57.5%
+-commutative57.5%
associate--l+57.5%
Simplified83.9%
Taylor expanded in x around inf 79.2%
times-frac92.1%
Simplified92.1%
Taylor expanded in t around inf 47.5%
if -2.9000000000000001e-44 < z < 2.80000000000000013e-102Initial program 89.0%
Taylor expanded in z around 0 49.4%
Final simplification48.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.25e+57) (not (<= z 1.45e-102))) (/ t (- b y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.25e+57) || !(z <= 1.45e-102)) {
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 ((z <= (-1.25d+57)) .or. (.not. (z <= 1.45d-102))) 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 ((z <= -1.25e+57) || !(z <= 1.45e-102)) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.25e+57) or not (z <= 1.45e-102): tmp = t / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.25e+57) || !(z <= 1.45e-102)) 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 ((z <= -1.25e+57) || ~((z <= 1.45e-102))) 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[z, -1.25e+57], N[Not[LessEqual[z, 1.45e-102]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+57} \lor \neg \left(z \leq 1.45 \cdot 10^{-102}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -1.24999999999999993e57 or 1.44999999999999993e-102 < z Initial program 42.2%
Taylor expanded in z around -inf 57.7%
+-commutative57.7%
associate--l+57.7%
Simplified86.9%
Taylor expanded in x around inf 80.6%
times-frac93.8%
Simplified93.8%
Taylor expanded in t around inf 50.4%
if -1.24999999999999993e57 < z < 1.44999999999999993e-102Initial program 89.0%
Taylor expanded in y around inf 46.2%
+-commutative46.2%
mul-1-neg46.2%
unsub-neg46.2%
Simplified46.2%
Final simplification48.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -9.6e+14) (not (<= y 1.22e-12))) (/ x (- 1.0 z)) (/ (- t a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -9.6e+14) || !(y <= 1.22e-12)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-9.6d+14)) .or. (.not. (y <= 1.22d-12))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -9.6e+14) || !(y <= 1.22e-12)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -9.6e+14) or not (y <= 1.22e-12): tmp = x / (1.0 - z) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -9.6e+14) || !(y <= 1.22e-12)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -9.6e+14) || ~((y <= 1.22e-12))) tmp = x / (1.0 - z); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -9.6e+14], N[Not[LessEqual[y, 1.22e-12]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.6 \cdot 10^{+14} \lor \neg \left(y \leq 1.22 \cdot 10^{-12}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -9.6e14 or 1.2200000000000001e-12 < y Initial program 52.0%
Taylor expanded in y around inf 49.2%
+-commutative49.2%
mul-1-neg49.2%
unsub-neg49.2%
Simplified49.2%
if -9.6e14 < y < 1.2200000000000001e-12Initial program 78.5%
Taylor expanded in y around 0 60.3%
Final simplification54.7%
(FPCore (x y z t a b) :precision binary64 (if (<= z -8e-23) (/ t b) (if (<= z 7e-103) x (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8e-23) {
tmp = t / b;
} else if (z <= 7e-103) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-8d-23)) then
tmp = t / b
else if (z <= 7d-103) then
tmp = x
else
tmp = t / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8e-23) {
tmp = t / b;
} else if (z <= 7e-103) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -8e-23: tmp = t / b elif z <= 7e-103: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -8e-23) tmp = Float64(t / b); elseif (z <= 7e-103) tmp = x; else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -8e-23) tmp = t / b; elseif (z <= 7e-103) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8e-23], N[(t / b), $MachinePrecision], If[LessEqual[z, 7e-103], x, N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-23}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-103}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -7.99999999999999968e-23 or 7.00000000000000032e-103 < z Initial program 46.1%
Taylor expanded in b around inf 31.0%
Taylor expanded in t around inf 30.2%
if -7.99999999999999968e-23 < z < 7.00000000000000032e-103Initial program 89.5%
Taylor expanded in z around 0 47.7%
Final simplification37.9%
(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.2%
Taylor expanded in z around 0 23.8%
Final simplification23.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 2023238
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:herbie-target
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))