
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ (- t a) (- b y)))
(t_3 (* z (- t a)))
(t_4 (/ (+ (* x y) t_3) t_1))
(t_5 (+ (/ x (- 1.0 z)) t_2)))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 -4e-271)
t_4
(if (<= t_4 0.0)
(+
t_2
(/ (- (* x (/ y (- b y))) (* y (/ (- t a) (pow (- b y) 2.0)))) z))
(if (<= t_4 5e+285) (/ (fma x y t_3) t_1) t_5))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (t - a) / (b - y);
double t_3 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_1;
double t_5 = (x / (1.0 - z)) + t_2;
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= -4e-271) {
tmp = t_4;
} else if (t_4 <= 0.0) {
tmp = t_2 + (((x * (y / (b - y))) - (y * ((t - a) / pow((b - y), 2.0)))) / z);
} else if (t_4 <= 5e+285) {
tmp = fma(x, y, t_3) / t_1;
} else {
tmp = t_5;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(t - a) / Float64(b - y)) t_3 = Float64(z * Float64(t - a)) t_4 = Float64(Float64(Float64(x * y) + t_3) / t_1) t_5 = Float64(Float64(x / Float64(1.0 - z)) + t_2) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= -4e-271) tmp = t_4; elseif (t_4 <= 0.0) tmp = Float64(t_2 + Float64(Float64(Float64(x * Float64(y / Float64(b - y))) - Float64(y * Float64(Float64(t - a) / (Float64(b - y) ^ 2.0)))) / z)); elseif (t_4 <= 5e+285) tmp = Float64(fma(x, y, t_3) / t_1); else tmp = t_5; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(x * y), $MachinePrecision] + t$95$3), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -4e-271], t$95$4, If[LessEqual[t$95$4, 0.0], N[(t$95$2 + N[(N[(N[(x * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(t - a), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 5e+285], N[(N[(x * y + t$95$3), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$5]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{t - a}{b - y}\\
t_3 := z \cdot \left(t - a\right)\\
t_4 := \frac{x \cdot y + t\_3}{t\_1}\\
t_5 := \frac{x}{1 - z} + t\_2\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_4 \leq -4 \cdot 10^{-271}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_2 + \frac{x \cdot \frac{y}{b - y} - y \cdot \frac{t - a}{{\left(b - y\right)}^{2}}}{z}\\
\mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+285}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t\_3\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_5\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 5.00000000000000016e285 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 27.1%
Taylor expanded in x around 0 27.1%
Taylor expanded in y around inf 44.6%
neg-mul-144.6%
sub-neg44.6%
Simplified44.6%
Taylor expanded in z around inf 98.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -3.99999999999999985e-271Initial program 99.6%
if -3.99999999999999985e-271 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 33.8%
Taylor expanded in z around -inf 92.7%
associate--l+92.7%
mul-1-neg92.7%
distribute-lft-out--92.7%
associate-/l*89.6%
associate-/l*96.7%
div-sub96.7%
Simplified96.7%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.00000000000000016e285Initial program 99.6%
fma-define99.6%
Simplified99.6%
Final simplification98.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ (- t a) (- b y)))
(t_3 (* z (- t a)))
(t_4 (/ (+ (* x y) t_3) t_1))
(t_5 (+ (/ x (- 1.0 z)) t_2)))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 -4e-271)
t_4
(if (<= t_4 0.0) t_2 (if (<= t_4 5e+285) (/ (fma x y t_3) t_1) t_5))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (t - a) / (b - y);
double t_3 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_1;
double t_5 = (x / (1.0 - z)) + t_2;
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= -4e-271) {
tmp = t_4;
} else if (t_4 <= 0.0) {
tmp = t_2;
} else if (t_4 <= 5e+285) {
tmp = fma(x, y, t_3) / t_1;
} else {
tmp = t_5;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(t - a) / Float64(b - y)) t_3 = Float64(z * Float64(t - a)) t_4 = Float64(Float64(Float64(x * y) + t_3) / t_1) t_5 = Float64(Float64(x / Float64(1.0 - z)) + t_2) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= -4e-271) tmp = t_4; elseif (t_4 <= 0.0) tmp = t_2; elseif (t_4 <= 5e+285) tmp = Float64(fma(x, y, t_3) / t_1); else tmp = t_5; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(x * y), $MachinePrecision] + t$95$3), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -4e-271], t$95$4, If[LessEqual[t$95$4, 0.0], t$95$2, If[LessEqual[t$95$4, 5e+285], N[(N[(x * y + t$95$3), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$5]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{t - a}{b - y}\\
t_3 := z \cdot \left(t - a\right)\\
t_4 := \frac{x \cdot y + t\_3}{t\_1}\\
t_5 := \frac{x}{1 - z} + t\_2\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_4 \leq -4 \cdot 10^{-271}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+285}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t\_3\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_5\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 5.00000000000000016e285 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 27.1%
Taylor expanded in x around 0 27.1%
Taylor expanded in y around inf 44.6%
neg-mul-144.6%
sub-neg44.6%
Simplified44.6%
Taylor expanded in z around inf 98.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -3.99999999999999985e-271Initial program 99.6%
if -3.99999999999999985e-271 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 33.8%
Taylor expanded in z around inf 80.2%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.00000000000000016e285Initial program 99.6%
fma-define99.6%
Simplified99.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y)))
(t_2 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
(t_3 (+ (/ x (- 1.0 z)) t_1)))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 -4e-271)
t_2
(if (<= t_2 0.0) t_1 (if (<= t_2 5e+285) 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 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double t_3 = (x / (1.0 - z)) + t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= -4e-271) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1;
} else if (t_2 <= 5e+285) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
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 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double t_3 = (x / (1.0 - z)) + t_1;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_3;
} else if (t_2 <= -4e-271) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1;
} else if (t_2 <= 5e+285) {
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 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) t_3 = (x / (1.0 - z)) + t_1 tmp = 0 if t_2 <= -math.inf: tmp = t_3 elif t_2 <= -4e-271: tmp = t_2 elif t_2 <= 0.0: tmp = t_1 elif t_2 <= 5e+285: 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(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) t_3 = Float64(Float64(x / Float64(1.0 - z)) + t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= -4e-271) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1; elseif (t_2 <= 5e+285) 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 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); t_3 = (x / (1.0 - z)) + t_1; tmp = 0.0; if (t_2 <= -Inf) tmp = t_3; elseif (t_2 <= -4e-271) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1; elseif (t_2 <= 5e+285) 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[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -4e-271], t$95$2, If[LessEqual[t$95$2, 0.0], t$95$1, If[LessEqual[t$95$2, 5e+285], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
t_3 := \frac{x}{1 - z} + t\_1\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-271}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+285}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 5.00000000000000016e285 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 27.1%
Taylor expanded in x around 0 27.1%
Taylor expanded in y around inf 44.6%
neg-mul-144.6%
sub-neg44.6%
Simplified44.6%
Taylor expanded in z around inf 98.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -3.99999999999999985e-271 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.00000000000000016e285Initial program 99.6%
if -3.99999999999999985e-271 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 33.8%
Taylor expanded in z around inf 80.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z)))
(t_2 (+ t_1 (/ (- t a) (- b y))))
(t_3 (* z (- t a))))
(if (<= z -0.27)
t_2
(if (<= z -8.5e-123)
(+ t_1 (/ t_3 (* y (- 1.0 z))))
(if (<= z -6.6e-139)
(/ (- t a) b)
(if (<= z -3.8e-151)
(/ (+ (* x y) (* z t)) y)
(if (<= z 6e-12) (+ t_1 (/ t_3 y)) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double t_2 = t_1 + ((t - a) / (b - y));
double t_3 = z * (t - a);
double tmp;
if (z <= -0.27) {
tmp = t_2;
} else if (z <= -8.5e-123) {
tmp = t_1 + (t_3 / (y * (1.0 - z)));
} else if (z <= -6.6e-139) {
tmp = (t - a) / b;
} else if (z <= -3.8e-151) {
tmp = ((x * y) + (z * t)) / y;
} else if (z <= 6e-12) {
tmp = t_1 + (t_3 / y);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x / (1.0d0 - z)
t_2 = t_1 + ((t - a) / (b - y))
t_3 = z * (t - a)
if (z <= (-0.27d0)) then
tmp = t_2
else if (z <= (-8.5d-123)) then
tmp = t_1 + (t_3 / (y * (1.0d0 - z)))
else if (z <= (-6.6d-139)) then
tmp = (t - a) / b
else if (z <= (-3.8d-151)) then
tmp = ((x * y) + (z * t)) / y
else if (z <= 6d-12) then
tmp = t_1 + (t_3 / y)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double t_2 = t_1 + ((t - a) / (b - y));
double t_3 = z * (t - a);
double tmp;
if (z <= -0.27) {
tmp = t_2;
} else if (z <= -8.5e-123) {
tmp = t_1 + (t_3 / (y * (1.0 - z)));
} else if (z <= -6.6e-139) {
tmp = (t - a) / b;
} else if (z <= -3.8e-151) {
tmp = ((x * y) + (z * t)) / y;
} else if (z <= 6e-12) {
tmp = t_1 + (t_3 / y);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) t_2 = t_1 + ((t - a) / (b - y)) t_3 = z * (t - a) tmp = 0 if z <= -0.27: tmp = t_2 elif z <= -8.5e-123: tmp = t_1 + (t_3 / (y * (1.0 - z))) elif z <= -6.6e-139: tmp = (t - a) / b elif z <= -3.8e-151: tmp = ((x * y) + (z * t)) / y elif z <= 6e-12: tmp = t_1 + (t_3 / y) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) t_2 = Float64(t_1 + Float64(Float64(t - a) / Float64(b - y))) t_3 = Float64(z * Float64(t - a)) tmp = 0.0 if (z <= -0.27) tmp = t_2; elseif (z <= -8.5e-123) tmp = Float64(t_1 + Float64(t_3 / Float64(y * Float64(1.0 - z)))); elseif (z <= -6.6e-139) tmp = Float64(Float64(t - a) / b); elseif (z <= -3.8e-151) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) / y); elseif (z <= 6e-12) tmp = Float64(t_1 + Float64(t_3 / y)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); t_2 = t_1 + ((t - a) / (b - y)); t_3 = z * (t - a); tmp = 0.0; if (z <= -0.27) tmp = t_2; elseif (z <= -8.5e-123) tmp = t_1 + (t_3 / (y * (1.0 - z))); elseif (z <= -6.6e-139) tmp = (t - a) / b; elseif (z <= -3.8e-151) tmp = ((x * y) + (z * t)) / y; elseif (z <= 6e-12) tmp = t_1 + (t_3 / y); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.27], t$95$2, If[LessEqual[z, -8.5e-123], N[(t$95$1 + N[(t$95$3 / N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.6e-139], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, -3.8e-151], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 6e-12], N[(t$95$1 + N[(t$95$3 / y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
t_2 := t\_1 + \frac{t - a}{b - y}\\
t_3 := z \cdot \left(t - a\right)\\
\mathbf{if}\;z \leq -0.27:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-123}:\\
\;\;\;\;t\_1 + \frac{t\_3}{y \cdot \left(1 - z\right)}\\
\mathbf{elif}\;z \leq -6.6 \cdot 10^{-139}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-151}:\\
\;\;\;\;\frac{x \cdot y + z \cdot t}{y}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-12}:\\
\;\;\;\;t\_1 + \frac{t\_3}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -0.27000000000000002 or 6.0000000000000003e-12 < z Initial program 48.9%
Taylor expanded in x around 0 48.8%
Taylor expanded in y around inf 46.0%
neg-mul-146.0%
sub-neg46.0%
Simplified46.0%
Taylor expanded in z around inf 88.1%
if -0.27000000000000002 < z < -8.4999999999999995e-123Initial program 90.9%
Taylor expanded in x around 0 91.0%
Taylor expanded in y around inf 87.8%
neg-mul-187.8%
sub-neg87.8%
Simplified87.8%
Taylor expanded in y around inf 67.5%
mul-1-neg67.5%
unsub-neg67.5%
Simplified67.5%
if -8.4999999999999995e-123 < z < -6.5999999999999999e-139Initial program 98.8%
Taylor expanded in y around 0 100.0%
if -6.5999999999999999e-139 < z < -3.7999999999999997e-151Initial program 100.0%
Taylor expanded in z around 0 76.2%
Taylor expanded in t around inf 100.0%
if -3.7999999999999997e-151 < z < 6.0000000000000003e-12Initial program 90.8%
Taylor expanded in x around 0 90.8%
Taylor expanded in y around inf 80.3%
neg-mul-180.3%
sub-neg80.3%
Simplified80.3%
Taylor expanded in z around 0 72.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z)))
(t_2 (+ t_1 (/ (* z (- t a)) y)))
(t_3 (+ t_1 (/ (- t a) (- b y)))))
(if (<= z -2.25e-41)
t_3
(if (<= z -1.3e-96)
t_2
(if (<= z -1.5e-139)
t_3
(if (<= z -2.75e-157)
(/ (+ (* x y) (* z t)) y)
(if (<= z 1.25e-13) t_2 t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double t_2 = t_1 + ((z * (t - a)) / y);
double t_3 = t_1 + ((t - a) / (b - y));
double tmp;
if (z <= -2.25e-41) {
tmp = t_3;
} else if (z <= -1.3e-96) {
tmp = t_2;
} else if (z <= -1.5e-139) {
tmp = t_3;
} else if (z <= -2.75e-157) {
tmp = ((x * y) + (z * t)) / y;
} else if (z <= 1.25e-13) {
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 = x / (1.0d0 - z)
t_2 = t_1 + ((z * (t - a)) / y)
t_3 = t_1 + ((t - a) / (b - y))
if (z <= (-2.25d-41)) then
tmp = t_3
else if (z <= (-1.3d-96)) then
tmp = t_2
else if (z <= (-1.5d-139)) then
tmp = t_3
else if (z <= (-2.75d-157)) then
tmp = ((x * y) + (z * t)) / y
else if (z <= 1.25d-13) 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 = x / (1.0 - z);
double t_2 = t_1 + ((z * (t - a)) / y);
double t_3 = t_1 + ((t - a) / (b - y));
double tmp;
if (z <= -2.25e-41) {
tmp = t_3;
} else if (z <= -1.3e-96) {
tmp = t_2;
} else if (z <= -1.5e-139) {
tmp = t_3;
} else if (z <= -2.75e-157) {
tmp = ((x * y) + (z * t)) / y;
} else if (z <= 1.25e-13) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) t_2 = t_1 + ((z * (t - a)) / y) t_3 = t_1 + ((t - a) / (b - y)) tmp = 0 if z <= -2.25e-41: tmp = t_3 elif z <= -1.3e-96: tmp = t_2 elif z <= -1.5e-139: tmp = t_3 elif z <= -2.75e-157: tmp = ((x * y) + (z * t)) / y elif z <= 1.25e-13: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) t_2 = Float64(t_1 + Float64(Float64(z * Float64(t - a)) / y)) t_3 = Float64(t_1 + Float64(Float64(t - a) / Float64(b - y))) tmp = 0.0 if (z <= -2.25e-41) tmp = t_3; elseif (z <= -1.3e-96) tmp = t_2; elseif (z <= -1.5e-139) tmp = t_3; elseif (z <= -2.75e-157) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) / y); elseif (z <= 1.25e-13) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); t_2 = t_1 + ((z * (t - a)) / y); t_3 = t_1 + ((t - a) / (b - y)); tmp = 0.0; if (z <= -2.25e-41) tmp = t_3; elseif (z <= -1.3e-96) tmp = t_2; elseif (z <= -1.5e-139) tmp = t_3; elseif (z <= -2.75e-157) tmp = ((x * y) + (z * t)) / y; elseif (z <= 1.25e-13) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.25e-41], t$95$3, If[LessEqual[z, -1.3e-96], t$95$2, If[LessEqual[z, -1.5e-139], t$95$3, If[LessEqual[z, -2.75e-157], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.25e-13], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
t_2 := t\_1 + \frac{z \cdot \left(t - a\right)}{y}\\
t_3 := t\_1 + \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{-41}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-96}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-139}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -2.75 \cdot 10^{-157}:\\
\;\;\;\;\frac{x \cdot y + z \cdot t}{y}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-13}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -2.25e-41 or -1.3000000000000001e-96 < z < -1.5e-139 or 1.24999999999999997e-13 < z Initial program 55.5%
Taylor expanded in x around 0 55.5%
Taylor expanded in y around inf 51.8%
neg-mul-151.8%
sub-neg51.8%
Simplified51.8%
Taylor expanded in z around inf 85.1%
if -2.25e-41 < z < -1.3000000000000001e-96 or -2.7499999999999999e-157 < z < 1.24999999999999997e-13Initial program 90.1%
Taylor expanded in x around 0 90.1%
Taylor expanded in y around inf 81.1%
neg-mul-181.1%
sub-neg81.1%
Simplified81.1%
Taylor expanded in z around 0 72.3%
if -1.5e-139 < z < -2.7499999999999999e-157Initial program 100.0%
Taylor expanded in z around 0 81.0%
Taylor expanded in t around inf 100.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* z t) y))) (t_2 (/ (- t a) (- b y))))
(if (<= z -5.6e-52)
t_2
(if (<= z -8.5e-123)
t_1
(if (<= z -8.2e-139)
(/ (- t a) b)
(if (<= z -3e-151)
(/ (+ (* x y) (* z t)) y)
(if (<= z 1e-85) 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 <= -5.6e-52) {
tmp = t_2;
} else if (z <= -8.5e-123) {
tmp = t_1;
} else if (z <= -8.2e-139) {
tmp = (t - a) / b;
} else if (z <= -3e-151) {
tmp = ((x * y) + (z * t)) / y;
} else if (z <= 1e-85) {
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 <= (-5.6d-52)) then
tmp = t_2
else if (z <= (-8.5d-123)) then
tmp = t_1
else if (z <= (-8.2d-139)) then
tmp = (t - a) / b
else if (z <= (-3d-151)) then
tmp = ((x * y) + (z * t)) / y
else if (z <= 1d-85) 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 <= -5.6e-52) {
tmp = t_2;
} else if (z <= -8.5e-123) {
tmp = t_1;
} else if (z <= -8.2e-139) {
tmp = (t - a) / b;
} else if (z <= -3e-151) {
tmp = ((x * y) + (z * t)) / y;
} else if (z <= 1e-85) {
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 <= -5.6e-52: tmp = t_2 elif z <= -8.5e-123: tmp = t_1 elif z <= -8.2e-139: tmp = (t - a) / b elif z <= -3e-151: tmp = ((x * y) + (z * t)) / y elif z <= 1e-85: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(z * t) / y)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -5.6e-52) tmp = t_2; elseif (z <= -8.5e-123) tmp = t_1; elseif (z <= -8.2e-139) tmp = Float64(Float64(t - a) / b); elseif (z <= -3e-151) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) / y); elseif (z <= 1e-85) 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 <= -5.6e-52) tmp = t_2; elseif (z <= -8.5e-123) tmp = t_1; elseif (z <= -8.2e-139) tmp = (t - a) / b; elseif (z <= -3e-151) tmp = ((x * y) + (z * t)) / y; elseif (z <= 1e-85) 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[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.6e-52], t$95$2, If[LessEqual[z, -8.5e-123], t$95$1, If[LessEqual[z, -8.2e-139], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, -3e-151], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1e-85], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z \cdot t}{y}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{-52}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-123}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-139}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-151}:\\
\;\;\;\;\frac{x \cdot y + z \cdot t}{y}\\
\mathbf{elif}\;z \leq 10^{-85}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -5.59999999999999989e-52 or 9.9999999999999998e-86 < z Initial program 56.9%
Taylor expanded in z around inf 77.4%
if -5.59999999999999989e-52 < z < -8.4999999999999995e-123 or -3e-151 < z < 9.9999999999999998e-86Initial program 88.4%
Taylor expanded in z around 0 61.2%
Taylor expanded in t around inf 53.4%
Taylor expanded in x around 0 64.8%
if -8.4999999999999995e-123 < z < -8.20000000000000028e-139Initial program 98.8%
Taylor expanded in y around 0 100.0%
if -8.20000000000000028e-139 < z < -3e-151Initial program 100.0%
Taylor expanded in z around 0 76.2%
Taylor expanded in t around inf 100.0%
Final simplification73.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -0.0037)
t_1
(if (<= z -7.8e-70)
(* x (+ (* z (/ (- t a) (* x y))) 1.0))
(if (<= z -3.9e-82)
(/ (+ t (- (* x (/ y z)) a)) b)
(if (<= z 4.5e-15) (* x (/ y (+ y (* z (- b 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.0037) {
tmp = t_1;
} else if (z <= -7.8e-70) {
tmp = x * ((z * ((t - a) / (x * y))) + 1.0);
} else if (z <= -3.9e-82) {
tmp = (t + ((x * (y / z)) - a)) / b;
} else if (z <= 4.5e-15) {
tmp = x * (y / (y + (z * (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 = (t - a) / (b - y)
if (z <= (-0.0037d0)) then
tmp = t_1
else if (z <= (-7.8d-70)) then
tmp = x * ((z * ((t - a) / (x * y))) + 1.0d0)
else if (z <= (-3.9d-82)) then
tmp = (t + ((x * (y / z)) - a)) / b
else if (z <= 4.5d-15) then
tmp = x * (y / (y + (z * (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 = (t - a) / (b - y);
double tmp;
if (z <= -0.0037) {
tmp = t_1;
} else if (z <= -7.8e-70) {
tmp = x * ((z * ((t - a) / (x * y))) + 1.0);
} else if (z <= -3.9e-82) {
tmp = (t + ((x * (y / z)) - a)) / b;
} else if (z <= 4.5e-15) {
tmp = x * (y / (y + (z * (b - 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.0037: tmp = t_1 elif z <= -7.8e-70: tmp = x * ((z * ((t - a) / (x * y))) + 1.0) elif z <= -3.9e-82: tmp = (t + ((x * (y / z)) - a)) / b elif z <= 4.5e-15: tmp = x * (y / (y + (z * (b - 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.0037) tmp = t_1; elseif (z <= -7.8e-70) tmp = Float64(x * Float64(Float64(z * Float64(Float64(t - a) / Float64(x * y))) + 1.0)); elseif (z <= -3.9e-82) tmp = Float64(Float64(t + Float64(Float64(x * Float64(y / z)) - a)) / b); elseif (z <= 4.5e-15) tmp = Float64(x * Float64(y / Float64(y + Float64(z * Float64(b - 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.0037) tmp = t_1; elseif (z <= -7.8e-70) tmp = x * ((z * ((t - a) / (x * y))) + 1.0); elseif (z <= -3.9e-82) tmp = (t + ((x * (y / z)) - a)) / b; elseif (z <= 4.5e-15) tmp = x * (y / (y + (z * (b - 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.0037], t$95$1, If[LessEqual[z, -7.8e-70], N[(x * N[(N[(z * N[(N[(t - a), $MachinePrecision] / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.9e-82], N[(N[(t + N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 4.5e-15], N[(x * N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -0.0037:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-70}:\\
\;\;\;\;x \cdot \left(z \cdot \frac{t - a}{x \cdot y} + 1\right)\\
\mathbf{elif}\;z \leq -3.9 \cdot 10^{-82}:\\
\;\;\;\;\frac{t + \left(x \cdot \frac{y}{z} - a\right)}{b}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-15}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -0.0037000000000000002 or 4.4999999999999998e-15 < z Initial program 48.9%
Taylor expanded in z around inf 84.6%
if -0.0037000000000000002 < z < -7.80000000000000038e-70Initial program 88.3%
Taylor expanded in z around 0 56.3%
Taylor expanded in x around inf 67.5%
associate-/l*67.5%
Simplified67.5%
if -7.80000000000000038e-70 < z < -3.89999999999999973e-82Initial program 100.0%
Taylor expanded in x around 0 99.5%
Taylor expanded in b around inf 99.5%
associate--l+99.5%
associate-/l*100.0%
Simplified100.0%
if -3.89999999999999973e-82 < z < 4.4999999999999998e-15Initial program 91.6%
Taylor expanded in x around 0 91.6%
Taylor expanded in x around inf 59.3%
associate-/l*66.5%
Simplified66.5%
Final simplification76.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ y (+ y (* z (- b y)))))) (t_2 (/ (- t a) (- b y))))
(if (<= z -4.8e-52)
t_2
(if (<= z 3.9e-304)
t_1
(if (<= z 9.5e-217)
(/ (+ (* x y) (* z (- t a))) y)
(if (<= z 1.45e-14) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (y / (y + (z * (b - y))));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -4.8e-52) {
tmp = t_2;
} else if (z <= 3.9e-304) {
tmp = t_1;
} else if (z <= 9.5e-217) {
tmp = ((x * y) + (z * (t - a))) / y;
} else if (z <= 1.45e-14) {
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 * (y / (y + (z * (b - y))))
t_2 = (t - a) / (b - y)
if (z <= (-4.8d-52)) then
tmp = t_2
else if (z <= 3.9d-304) then
tmp = t_1
else if (z <= 9.5d-217) then
tmp = ((x * y) + (z * (t - a))) / y
else if (z <= 1.45d-14) 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 * (y / (y + (z * (b - y))));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -4.8e-52) {
tmp = t_2;
} else if (z <= 3.9e-304) {
tmp = t_1;
} else if (z <= 9.5e-217) {
tmp = ((x * y) + (z * (t - a))) / y;
} else if (z <= 1.45e-14) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (y / (y + (z * (b - y)))) t_2 = (t - a) / (b - y) tmp = 0 if z <= -4.8e-52: tmp = t_2 elif z <= 3.9e-304: tmp = t_1 elif z <= 9.5e-217: tmp = ((x * y) + (z * (t - a))) / y elif z <= 1.45e-14: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(y / Float64(y + Float64(z * Float64(b - y))))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -4.8e-52) tmp = t_2; elseif (z <= 3.9e-304) tmp = t_1; elseif (z <= 9.5e-217) tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / y); elseif (z <= 1.45e-14) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (y / (y + (z * (b - y)))); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -4.8e-52) tmp = t_2; elseif (z <= 3.9e-304) tmp = t_1; elseif (z <= 9.5e-217) tmp = ((x * y) + (z * (t - a))) / y; elseif (z <= 1.45e-14) 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[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e-52], t$95$2, If[LessEqual[z, 3.9e-304], t$95$1, If[LessEqual[z, 9.5e-217], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.45e-14], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{-52}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-304}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-217}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -4.8000000000000003e-52 or 1.4500000000000001e-14 < z Initial program 53.1%
Taylor expanded in z around inf 81.4%
if -4.8000000000000003e-52 < z < 3.89999999999999975e-304 or 9.5000000000000001e-217 < z < 1.4500000000000001e-14Initial program 89.0%
Taylor expanded in x around 0 89.0%
Taylor expanded in x around inf 57.3%
associate-/l*67.1%
Simplified67.1%
if 3.89999999999999975e-304 < z < 9.5000000000000001e-217Initial program 99.6%
Taylor expanded in z around 0 77.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -7.4e+76)
t_1
(if (<= y -1.12e-35)
(/ t (- b y))
(if (<= y -1.2e-40) x (if (<= y 5.2e-24) (/ (- t a) b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -7.4e+76) {
tmp = t_1;
} else if (y <= -1.12e-35) {
tmp = t / (b - y);
} else if (y <= -1.2e-40) {
tmp = x;
} else if (y <= 5.2e-24) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-7.4d+76)) then
tmp = t_1
else if (y <= (-1.12d-35)) then
tmp = t / (b - y)
else if (y <= (-1.2d-40)) then
tmp = x
else if (y <= 5.2d-24) then
tmp = (t - a) / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -7.4e+76) {
tmp = t_1;
} else if (y <= -1.12e-35) {
tmp = t / (b - y);
} else if (y <= -1.2e-40) {
tmp = x;
} else if (y <= 5.2e-24) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -7.4e+76: tmp = t_1 elif y <= -1.12e-35: tmp = t / (b - y) elif y <= -1.2e-40: tmp = x elif y <= 5.2e-24: tmp = (t - a) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -7.4e+76) tmp = t_1; elseif (y <= -1.12e-35) tmp = Float64(t / Float64(b - y)); elseif (y <= -1.2e-40) tmp = x; elseif (y <= 5.2e-24) tmp = Float64(Float64(t - a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -7.4e+76) tmp = t_1; elseif (y <= -1.12e-35) tmp = t / (b - y); elseif (y <= -1.2e-40) tmp = x; elseif (y <= 5.2e-24) tmp = (t - a) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.4e+76], t$95$1, If[LessEqual[y, -1.12e-35], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.2e-40], x, If[LessEqual[y, 5.2e-24], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -7.4 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.12 \cdot 10^{-35}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-40}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-24}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.3999999999999999e76 or 5.2e-24 < y Initial program 58.3%
Taylor expanded in y around inf 56.3%
mul-1-neg56.3%
unsub-neg56.3%
Simplified56.3%
if -7.3999999999999999e76 < y < -1.12e-35Initial program 78.9%
Taylor expanded in t around inf 31.3%
*-commutative31.3%
Simplified31.3%
Taylor expanded in z around inf 43.2%
if -1.12e-35 < y < -1.19999999999999996e-40Initial program 100.0%
Taylor expanded in z around 0 68.4%
if -1.19999999999999996e-40 < y < 5.2e-24Initial program 77.2%
Taylor expanded in y around 0 65.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.35e+16) (not (<= z 0.0015))) (/ (- t a) (- b y)) (+ (/ x (- 1.0 z)) (/ (* z (- t a)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.35e+16) || !(z <= 0.0015)) {
tmp = (t - a) / (b - y);
} else {
tmp = (x / (1.0 - z)) + ((z * (t - a)) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-3.35d+16)) .or. (.not. (z <= 0.0015d0))) then
tmp = (t - a) / (b - y)
else
tmp = (x / (1.0d0 - z)) + ((z * (t - a)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.35e+16) || !(z <= 0.0015)) {
tmp = (t - a) / (b - y);
} else {
tmp = (x / (1.0 - z)) + ((z * (t - a)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.35e+16) or not (z <= 0.0015): tmp = (t - a) / (b - y) else: tmp = (x / (1.0 - z)) + ((z * (t - a)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.35e+16) || !(z <= 0.0015)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(z * Float64(t - a)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.35e+16) || ~((z <= 0.0015))) tmp = (t - a) / (b - y); else tmp = (x / (1.0 - z)) + ((z * (t - a)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.35e+16], N[Not[LessEqual[z, 0.0015]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.35 \cdot 10^{+16} \lor \neg \left(z \leq 0.0015\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z} + \frac{z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -3.35e16 or 0.0015 < z Initial program 47.3%
Taylor expanded in z around inf 85.7%
if -3.35e16 < z < 0.0015Initial program 91.6%
Taylor expanded in x around 0 91.6%
Taylor expanded in y around inf 81.8%
neg-mul-181.8%
sub-neg81.8%
Simplified81.8%
Taylor expanded in z around 0 68.0%
Final simplification76.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.5e-52) (not (<= z 2.4e-8))) (/ (- t a) (- b y)) (* x (/ y (+ y (* z (- b y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.5e-52) || !(z <= 2.4e-8)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * (y / (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 <= (-4.5d-52)) .or. (.not. (z <= 2.4d-8))) then
tmp = (t - a) / (b - y)
else
tmp = x * (y / (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 <= -4.5e-52) || !(z <= 2.4e-8)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * (y / (y + (z * (b - y))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.5e-52) or not (z <= 2.4e-8): tmp = (t - a) / (b - y) else: tmp = x * (y / (y + (z * (b - y)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.5e-52) || !(z <= 2.4e-8)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x * Float64(y / 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 <= -4.5e-52) || ~((z <= 2.4e-8))) tmp = (t - a) / (b - y); else tmp = x * (y / (y + (z * (b - y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.5e-52], N[Not[LessEqual[z, 2.4e-8]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{-52} \lor \neg \left(z \leq 2.4 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -4.5e-52 or 2.39999999999999998e-8 < z Initial program 53.1%
Taylor expanded in z around inf 81.4%
if -4.5e-52 < z < 2.39999999999999998e-8Initial program 90.5%
Taylor expanded in x around 0 90.5%
Taylor expanded in x around inf 56.5%
associate-/l*64.9%
Simplified64.9%
Final simplification74.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -7e-45) x (if (<= y -1.1e-288) (/ (- a) b) (if (<= y 9e-105) (/ t b) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7e-45) {
tmp = x;
} else if (y <= -1.1e-288) {
tmp = -a / b;
} else if (y <= 9e-105) {
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 (y <= (-7d-45)) then
tmp = x
else if (y <= (-1.1d-288)) then
tmp = -a / b
else if (y <= 9d-105) 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 (y <= -7e-45) {
tmp = x;
} else if (y <= -1.1e-288) {
tmp = -a / b;
} else if (y <= 9e-105) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7e-45: tmp = x elif y <= -1.1e-288: tmp = -a / b elif y <= 9e-105: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7e-45) tmp = x; elseif (y <= -1.1e-288) tmp = Float64(Float64(-a) / b); elseif (y <= 9e-105) 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 (y <= -7e-45) tmp = x; elseif (y <= -1.1e-288) tmp = -a / b; elseif (y <= 9e-105) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7e-45], x, If[LessEqual[y, -1.1e-288], N[((-a) / b), $MachinePrecision], If[LessEqual[y, 9e-105], N[(t / b), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{-45}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{-288}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-105}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -7e-45 or 8.9999999999999995e-105 < y Initial program 66.1%
Taylor expanded in z around 0 35.4%
if -7e-45 < y < -1.1000000000000001e-288Initial program 73.4%
Taylor expanded in y around 0 64.9%
Taylor expanded in t around 0 50.7%
neg-mul-150.7%
distribute-neg-frac50.7%
Simplified50.7%
if -1.1000000000000001e-288 < y < 8.9999999999999995e-105Initial program 76.8%
Taylor expanded in t around inf 35.5%
*-commutative35.5%
Simplified35.5%
Taylor expanded in y around 0 49.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.3e-52) (not (<= z 1.3e-85))) (/ (- t a) (- b y)) (+ x (/ (* z t) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.3e-52) || !(z <= 1.3e-85)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * t) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-4.3d-52)) .or. (.not. (z <= 1.3d-85))) then
tmp = (t - a) / (b - y)
else
tmp = x + ((z * t) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.3e-52) || !(z <= 1.3e-85)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * t) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.3e-52) or not (z <= 1.3e-85): tmp = (t - a) / (b - y) else: tmp = x + ((z * t) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.3e-52) || !(z <= 1.3e-85)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(Float64(z * t) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.3e-52) || ~((z <= 1.3e-85))) tmp = (t - a) / (b - y); else tmp = x + ((z * t) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.3e-52], N[Not[LessEqual[z, 1.3e-85]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{-52} \lor \neg \left(z \leq 1.3 \cdot 10^{-85}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot t}{y}\\
\end{array}
\end{array}
if z < -4.3000000000000003e-52 or 1.30000000000000006e-85 < z Initial program 56.9%
Taylor expanded in z around inf 77.4%
if -4.3000000000000003e-52 < z < 1.30000000000000006e-85Initial program 89.3%
Taylor expanded in z around 0 59.4%
Taylor expanded in t around inf 53.3%
Taylor expanded in x around 0 62.8%
Final simplification71.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.8e-44) (not (<= z 1360000000.0))) (/ 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 <= -4.8e-44) || !(z <= 1360000000.0)) {
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 <= (-4.8d-44)) .or. (.not. (z <= 1360000000.0d0))) 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 <= -4.8e-44) || !(z <= 1360000000.0)) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.8e-44) or not (z <= 1360000000.0): 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 <= -4.8e-44) || !(z <= 1360000000.0)) 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 <= -4.8e-44) || ~((z <= 1360000000.0))) 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, -4.8e-44], N[Not[LessEqual[z, 1360000000.0]], $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 -4.8 \cdot 10^{-44} \lor \neg \left(z \leq 1360000000\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -4.80000000000000017e-44 or 1.36e9 < z Initial program 51.0%
Taylor expanded in t around inf 27.6%
*-commutative27.6%
Simplified27.6%
Taylor expanded in z around inf 47.3%
if -4.80000000000000017e-44 < z < 1.36e9Initial program 91.0%
Taylor expanded in y around inf 49.9%
mul-1-neg49.9%
unsub-neg49.9%
Simplified49.9%
Final simplification48.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.95e-44) (not (<= z 9.2e-39))) (/ t (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.95e-44) || !(z <= 9.2e-39)) {
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 <= (-1.95d-44)) .or. (.not. (z <= 9.2d-39))) 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 <= -1.95e-44) || !(z <= 9.2e-39)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.95e-44) or not (z <= 9.2e-39): tmp = t / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.95e-44) || !(z <= 9.2e-39)) 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 <= -1.95e-44) || ~((z <= 9.2e-39))) tmp = t / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.95e-44], N[Not[LessEqual[z, 9.2e-39]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{-44} \lor \neg \left(z \leq 9.2 \cdot 10^{-39}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.9500000000000001e-44 or 9.20000000000000033e-39 < z Initial program 54.0%
Taylor expanded in t around inf 26.0%
*-commutative26.0%
Simplified26.0%
Taylor expanded in z around inf 44.7%
if -1.9500000000000001e-44 < z < 9.20000000000000033e-39Initial program 90.2%
Taylor expanded in z around 0 53.0%
Final simplification48.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.9e-52) (not (<= z 9.6e-30))) (/ t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.9e-52) || !(z <= 9.6e-30)) {
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 <= (-5.9d-52)) .or. (.not. (z <= 9.6d-30))) 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 <= -5.9e-52) || !(z <= 9.6e-30)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.9e-52) or not (z <= 9.6e-30): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.9e-52) || !(z <= 9.6e-30)) 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 <= -5.9e-52) || ~((z <= 9.6e-30))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.9e-52], N[Not[LessEqual[z, 9.6e-30]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.9 \cdot 10^{-52} \lor \neg \left(z \leq 9.6 \cdot 10^{-30}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -5.90000000000000019e-52 or 9.5999999999999994e-30 < z Initial program 54.3%
Taylor expanded in t around inf 25.9%
*-commutative25.9%
Simplified25.9%
Taylor expanded in y around 0 25.8%
if -5.90000000000000019e-52 < z < 9.5999999999999994e-30Initial program 90.1%
Taylor expanded in z around 0 53.4%
Final simplification37.5%
(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 69.4%
Taylor expanded in z around 0 25.0%
(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 2024110
(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)))))