
(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
(let* ((t_1
(-
(fma (/ x z) (/ y (- b y)) (/ t (- b y)))
(fma y (/ (- t a) (* z (pow (- b y) 2.0))) (/ a (- b y)))))
(t_2 (fma z (- b y) y))
(t_3 (* z (- t a)))
(t_4 (/ (+ (* x y) t_3) (+ y (* z (- b y)))))
(t_5 (<= t_4 INFINITY))
(t_6 (* x (+ (/ y t_2) (* (/ z x) (/ (- t a) t_2))))))
(if (<= t_4 (- INFINITY))
t_6
(if (<= t_4 -2e-301)
(/ (fma x y t_3) t_2)
(if (<= t_4 0.0) t_1 (if t_5 t_4 (if t_5 t_6 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((x / z), (y / (b - y)), (t / (b - y))) - fma(y, ((t - a) / (z * pow((b - y), 2.0))), (a / (b - y)));
double t_2 = fma(z, (b - y), y);
double t_3 = z * (t - a);
double t_4 = ((x * y) + t_3) / (y + (z * (b - y)));
int t_5 = t_4 <= ((double) INFINITY);
double t_6 = x * ((y / t_2) + ((z / x) * ((t - a) / t_2)));
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_6;
} else if (t_4 <= -2e-301) {
tmp = fma(x, y, t_3) / t_2;
} else if (t_4 <= 0.0) {
tmp = t_1;
} else if (t_5) {
tmp = t_4;
} else if (t_5) {
tmp = t_6;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(Float64(x / z), Float64(y / Float64(b - y)), Float64(t / Float64(b - y))) - fma(y, Float64(Float64(t - a) / Float64(z * (Float64(b - y) ^ 2.0))), Float64(a / Float64(b - y)))) t_2 = fma(z, Float64(b - y), y) t_3 = Float64(z * Float64(t - a)) t_4 = Float64(Float64(Float64(x * y) + t_3) / Float64(y + Float64(z * Float64(b - y)))) t_5 = t_4 <= Inf t_6 = Float64(x * Float64(Float64(y / t_2) + Float64(Float64(z / x) * Float64(Float64(t - a) / t_2)))) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_6; elseif (t_4 <= -2e-301) tmp = Float64(fma(x, y, t_3) / t_2); elseif (t_4 <= 0.0) tmp = t_1; elseif (t_5) tmp = t_4; elseif (t_5) tmp = t_6; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(t - a), $MachinePrecision] / N[(z * N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(b - y), $MachinePrecision] + y), $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] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = LessEqual[t$95$4, Infinity]}, Block[{t$95$6 = N[(x * N[(N[(y / t$95$2), $MachinePrecision] + N[(N[(z / x), $MachinePrecision] * N[(N[(t - a), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$6, If[LessEqual[t$95$4, -2e-301], N[(N[(x * y + t$95$3), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$4, 0.0], t$95$1, If[t$95$5, t$95$4, If[t$95$5, t$95$6, t$95$1]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x}{z}, \frac{y}{b - y}, \frac{t}{b - y}\right) - \mathsf{fma}\left(y, \frac{t - a}{z \cdot {\left(b - y\right)}^{2}}, \frac{a}{b - y}\right)\\
t_2 := \mathsf{fma}\left(z, b - y, y\right)\\
t_3 := z \cdot \left(t - a\right)\\
t_4 := \frac{x \cdot y + t\_3}{y + z \cdot \left(b - y\right)}\\
t_5 := t\_4 \leq \infty\\
t_6 := x \cdot \left(\frac{y}{t\_2} + \frac{z}{x} \cdot \frac{t - a}{t\_2}\right)\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_4 \leq -2 \cdot 10^{-301}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t\_3\right)}{t\_2}\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_5:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_5:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 28.0%
Taylor expanded in x around inf 44.9%
+-commutative44.9%
fma-define44.9%
times-frac90.8%
+-commutative90.8%
fma-define90.8%
Simplified90.8%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000013e-301Initial program 99.6%
fma-define99.6%
+-commutative99.6%
fma-define99.7%
Simplified99.7%
if -2.00000000000000013e-301 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 13.3%
Taylor expanded in z around inf 45.6%
+-commutative45.6%
times-frac60.7%
fma-define60.7%
+-commutative60.7%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 76.9%
Final simplification89.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma z (- b y) y))
(t_2 (* z (- t a)))
(t_3 (/ (+ (* x y) t_2) (+ y (* z (- b y)))))
(t_4 (<= t_3 INFINITY))
(t_5 (* x (+ (/ y t_1) (* (/ z x) (/ (- t a) t_1))))))
(if (<= t_3 (- INFINITY))
t_5
(if (<= t_3 -2e-301)
(/ (fma x y t_2) t_1)
(if (<= t_3 0.0)
(+
(+
(/ t (- b y))
(/ (- (/ (* x y) (- b y)) (/ (* y (- t a)) (pow (- b y) 2.0))) z))
(/ a (- y b)))
(if t_4 t_3 (if t_4 t_5 (/ (- t a) (- b y)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(z, (b - y), y);
double t_2 = z * (t - a);
double t_3 = ((x * y) + t_2) / (y + (z * (b - y)));
int t_4 = t_3 <= ((double) INFINITY);
double t_5 = x * ((y / t_1) + ((z / x) * ((t - a) / t_1)));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_3 <= -2e-301) {
tmp = fma(x, y, t_2) / t_1;
} else if (t_3 <= 0.0) {
tmp = ((t / (b - y)) + ((((x * y) / (b - y)) - ((y * (t - a)) / pow((b - y), 2.0))) / z)) + (a / (y - b));
} else if (t_4) {
tmp = t_3;
} else if (t_4) {
tmp = t_5;
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(z, Float64(b - y), y) t_2 = Float64(z * Float64(t - a)) t_3 = Float64(Float64(Float64(x * y) + t_2) / Float64(y + Float64(z * Float64(b - y)))) t_4 = t_3 <= Inf t_5 = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(z / x) * Float64(Float64(t - a) / t_1)))) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_5; elseif (t_3 <= -2e-301) tmp = Float64(fma(x, y, t_2) / t_1); elseif (t_3 <= 0.0) tmp = Float64(Float64(Float64(t / Float64(b - y)) + Float64(Float64(Float64(Float64(x * y) / Float64(b - y)) - Float64(Float64(y * Float64(t - a)) / (Float64(b - y) ^ 2.0))) / z)) + Float64(a / Float64(y - b))); elseif (t_4) tmp = t_3; elseif (t_4) tmp = t_5; else tmp = Float64(Float64(t - a) / Float64(b - y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = LessEqual[t$95$3, Infinity]}, Block[{t$95$5 = N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(z / x), $MachinePrecision] * N[(N[(t - a), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$5, If[LessEqual[t$95$3, -2e-301], N[(N[(x * y + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(x * y), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(N[(y * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[t$95$4, t$95$3, If[t$95$4, t$95$5, N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, b - y, y\right)\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := \frac{x \cdot y + t\_2}{y + z \cdot \left(b - y\right)}\\
t_4 := t\_3 \leq \infty\\
t_5 := x \cdot \left(\frac{y}{t\_1} + \frac{z}{x} \cdot \frac{t - a}{t\_1}\right)\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-301}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t\_2\right)}{t\_1}\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\left(\frac{t}{b - y} + \frac{\frac{x \cdot y}{b - y} - \frac{y \cdot \left(t - a\right)}{{\left(b - y\right)}^{2}}}{z}\right) + \frac{a}{y - b}\\
\mathbf{elif}\;t\_4:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_4:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\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 +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 28.0%
Taylor expanded in x around inf 44.9%
+-commutative44.9%
fma-define44.9%
times-frac90.8%
+-commutative90.8%
fma-define90.8%
Simplified90.8%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000013e-301Initial program 99.6%
fma-define99.6%
+-commutative99.6%
fma-define99.7%
Simplified99.7%
if -2.00000000000000013e-301 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 29.5%
Taylor expanded in z around -inf 86.9%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 76.9%
if +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 0.0%
Taylor expanded in z around inf 70.3%
Final simplification85.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (+ y (* z (- b y))))
(t_3 (/ t_1 t_2))
(t_4 (/ (- t a) (- b y)))
(t_5 (/ (- (* x y) (* z a)) y)))
(if (<= z -6e+16)
t_4
(if (<= z -1.18e-91)
t_3
(if (<= z -1.62e-251)
t_5
(if (<= z -2.1e-288)
t_3
(if (<= z 4e-262)
(/ (* x y) t_2)
(if (<= z 1e-197)
(/ (* x (+ y (/ t_1 x))) y)
(if (<= z 9.3e-60)
t_3
(if (<= z 7.2e-50)
t_5
(if (<= z 2.1e-20)
t_3
(if (<= z 1.78e+53)
(/ 1.0 (/ (- 1.0 z) x))
t_4))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = y + (z * (b - y));
double t_3 = t_1 / t_2;
double t_4 = (t - a) / (b - y);
double t_5 = ((x * y) - (z * a)) / y;
double tmp;
if (z <= -6e+16) {
tmp = t_4;
} else if (z <= -1.18e-91) {
tmp = t_3;
} else if (z <= -1.62e-251) {
tmp = t_5;
} else if (z <= -2.1e-288) {
tmp = t_3;
} else if (z <= 4e-262) {
tmp = (x * y) / t_2;
} else if (z <= 1e-197) {
tmp = (x * (y + (t_1 / x))) / y;
} else if (z <= 9.3e-60) {
tmp = t_3;
} else if (z <= 7.2e-50) {
tmp = t_5;
} else if (z <= 2.1e-20) {
tmp = t_3;
} else if (z <= 1.78e+53) {
tmp = 1.0 / ((1.0 - z) / x);
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = z * (t - a)
t_2 = y + (z * (b - y))
t_3 = t_1 / t_2
t_4 = (t - a) / (b - y)
t_5 = ((x * y) - (z * a)) / y
if (z <= (-6d+16)) then
tmp = t_4
else if (z <= (-1.18d-91)) then
tmp = t_3
else if (z <= (-1.62d-251)) then
tmp = t_5
else if (z <= (-2.1d-288)) then
tmp = t_3
else if (z <= 4d-262) then
tmp = (x * y) / t_2
else if (z <= 1d-197) then
tmp = (x * (y + (t_1 / x))) / y
else if (z <= 9.3d-60) then
tmp = t_3
else if (z <= 7.2d-50) then
tmp = t_5
else if (z <= 2.1d-20) then
tmp = t_3
else if (z <= 1.78d+53) then
tmp = 1.0d0 / ((1.0d0 - z) / x)
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = y + (z * (b - y));
double t_3 = t_1 / t_2;
double t_4 = (t - a) / (b - y);
double t_5 = ((x * y) - (z * a)) / y;
double tmp;
if (z <= -6e+16) {
tmp = t_4;
} else if (z <= -1.18e-91) {
tmp = t_3;
} else if (z <= -1.62e-251) {
tmp = t_5;
} else if (z <= -2.1e-288) {
tmp = t_3;
} else if (z <= 4e-262) {
tmp = (x * y) / t_2;
} else if (z <= 1e-197) {
tmp = (x * (y + (t_1 / x))) / y;
} else if (z <= 9.3e-60) {
tmp = t_3;
} else if (z <= 7.2e-50) {
tmp = t_5;
} else if (z <= 2.1e-20) {
tmp = t_3;
} else if (z <= 1.78e+53) {
tmp = 1.0 / ((1.0 - z) / x);
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = y + (z * (b - y)) t_3 = t_1 / t_2 t_4 = (t - a) / (b - y) t_5 = ((x * y) - (z * a)) / y tmp = 0 if z <= -6e+16: tmp = t_4 elif z <= -1.18e-91: tmp = t_3 elif z <= -1.62e-251: tmp = t_5 elif z <= -2.1e-288: tmp = t_3 elif z <= 4e-262: tmp = (x * y) / t_2 elif z <= 1e-197: tmp = (x * (y + (t_1 / x))) / y elif z <= 9.3e-60: tmp = t_3 elif z <= 7.2e-50: tmp = t_5 elif z <= 2.1e-20: tmp = t_3 elif z <= 1.78e+53: tmp = 1.0 / ((1.0 - z) / x) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(y + Float64(z * Float64(b - y))) t_3 = Float64(t_1 / t_2) t_4 = Float64(Float64(t - a) / Float64(b - y)) t_5 = Float64(Float64(Float64(x * y) - Float64(z * a)) / y) tmp = 0.0 if (z <= -6e+16) tmp = t_4; elseif (z <= -1.18e-91) tmp = t_3; elseif (z <= -1.62e-251) tmp = t_5; elseif (z <= -2.1e-288) tmp = t_3; elseif (z <= 4e-262) tmp = Float64(Float64(x * y) / t_2); elseif (z <= 1e-197) tmp = Float64(Float64(x * Float64(y + Float64(t_1 / x))) / y); elseif (z <= 9.3e-60) tmp = t_3; elseif (z <= 7.2e-50) tmp = t_5; elseif (z <= 2.1e-20) tmp = t_3; elseif (z <= 1.78e+53) tmp = Float64(1.0 / Float64(Float64(1.0 - z) / x)); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = y + (z * (b - y)); t_3 = t_1 / t_2; t_4 = (t - a) / (b - y); t_5 = ((x * y) - (z * a)) / y; tmp = 0.0; if (z <= -6e+16) tmp = t_4; elseif (z <= -1.18e-91) tmp = t_3; elseif (z <= -1.62e-251) tmp = t_5; elseif (z <= -2.1e-288) tmp = t_3; elseif (z <= 4e-262) tmp = (x * y) / t_2; elseif (z <= 1e-197) tmp = (x * (y + (t_1 / x))) / y; elseif (z <= 9.3e-60) tmp = t_3; elseif (z <= 7.2e-50) tmp = t_5; elseif (z <= 2.1e-20) tmp = t_3; elseif (z <= 1.78e+53) tmp = 1.0 / ((1.0 - z) / x); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(x * y), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[z, -6e+16], t$95$4, If[LessEqual[z, -1.18e-91], t$95$3, If[LessEqual[z, -1.62e-251], t$95$5, If[LessEqual[z, -2.1e-288], t$95$3, If[LessEqual[z, 4e-262], N[(N[(x * y), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[z, 1e-197], N[(N[(x * N[(y + N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 9.3e-60], t$95$3, If[LessEqual[z, 7.2e-50], t$95$5, If[LessEqual[z, 2.1e-20], t$95$3, If[LessEqual[z, 1.78e+53], N[(1.0 / N[(N[(1.0 - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \frac{t\_1}{t\_2}\\
t_4 := \frac{t - a}{b - y}\\
t_5 := \frac{x \cdot y - z \cdot a}{y}\\
\mathbf{if}\;z \leq -6 \cdot 10^{+16}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;z \leq -1.18 \cdot 10^{-91}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -1.62 \cdot 10^{-251}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-288}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-262}:\\
\;\;\;\;\frac{x \cdot y}{t\_2}\\
\mathbf{elif}\;z \leq 10^{-197}:\\
\;\;\;\;\frac{x \cdot \left(y + \frac{t\_1}{x}\right)}{y}\\
\mathbf{elif}\;z \leq 9.3 \cdot 10^{-60}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-50}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-20}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 1.78 \cdot 10^{+53}:\\
\;\;\;\;\frac{1}{\frac{1 - z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if z < -6e16 or 1.77999999999999999e53 < z Initial program 37.9%
Taylor expanded in z around inf 83.4%
if -6e16 < z < -1.18e-91 or -1.62e-251 < z < -2.09999999999999996e-288 or 9.9999999999999999e-198 < z < 9.30000000000000019e-60 or 7.19999999999999958e-50 < z < 2.0999999999999999e-20Initial program 86.7%
Taylor expanded in x around 0 68.3%
if -1.18e-91 < z < -1.62e-251 or 9.30000000000000019e-60 < z < 7.19999999999999958e-50Initial program 94.9%
Taylor expanded in t around 0 85.1%
+-commutative85.1%
mul-1-neg85.1%
unsub-neg85.1%
*-commutative85.1%
*-commutative85.1%
Simplified85.1%
Taylor expanded in z around 0 66.1%
if -2.09999999999999996e-288 < z < 4.00000000000000005e-262Initial program 94.1%
Taylor expanded in x around inf 88.0%
*-commutative88.0%
Simplified88.0%
if 4.00000000000000005e-262 < z < 9.9999999999999999e-198Initial program 90.5%
Taylor expanded in x around inf 90.3%
Taylor expanded in z around 0 76.4%
if 2.0999999999999999e-20 < z < 1.77999999999999999e53Initial program 64.1%
fma-define64.1%
clear-num64.1%
inv-pow64.1%
+-commutative64.1%
fma-undefine64.1%
fma-define64.1%
+-commutative64.1%
fma-define64.1%
Applied egg-rr64.1%
unpow-164.1%
*-commutative64.1%
Simplified64.1%
Taylor expanded in y around inf 65.4%
neg-mul-165.4%
Simplified65.4%
Final simplification76.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))))
(if (or (<= z -2e+56) (not (<= z 2.45e+53)))
(/ (- t a) (- b y))
(* x (+ (/ y t_1) (/ (* z (- t a)) (* x t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double tmp;
if ((z <= -2e+56) || !(z <= 2.45e+53)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y + (z * (b - y))
if ((z <= (-2d+56)) .or. (.not. (z <= 2.45d+53))) then
tmp = (t - a) / (b - y)
else
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double tmp;
if ((z <= -2e+56) || !(z <= 2.45e+53)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) tmp = 0 if (z <= -2e+56) or not (z <= 2.45e+53): tmp = (t - a) / (b - y) else: tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if ((z <= -2e+56) || !(z <= 2.45e+53)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(z * Float64(t - a)) / Float64(x * t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); tmp = 0.0; if ((z <= -2e+56) || ~((z <= 2.45e+53))) tmp = (t - a) / (b - y); else tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -2e+56], N[Not[LessEqual[z, 2.45e+53]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -2 \cdot 10^{+56} \lor \neg \left(z \leq 2.45 \cdot 10^{+53}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{z \cdot \left(t - a\right)}{x \cdot t\_1}\right)\\
\end{array}
\end{array}
if z < -2.00000000000000018e56 or 2.45000000000000009e53 < z Initial program 36.6%
Taylor expanded in z around inf 87.7%
if -2.00000000000000018e56 < z < 2.45000000000000009e53Initial program 86.5%
Taylor expanded in x around inf 87.6%
Final simplification87.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a t) y)) (t_2 (/ x (- 1.0 z))))
(if (<= y -2.8e+197)
t_2
(if (<= y -2.4e+142)
t_1
(if (<= y -3.4e+59)
t_2
(if (<= y -6.5e+25)
t_1
(if (or (<= y -1.85e-31) (not (<= y 6.6e+37)))
t_2
(/ (- t a) b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - t) / y;
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -2.8e+197) {
tmp = t_2;
} else if (y <= -2.4e+142) {
tmp = t_1;
} else if (y <= -3.4e+59) {
tmp = t_2;
} else if (y <= -6.5e+25) {
tmp = t_1;
} else if ((y <= -1.85e-31) || !(y <= 6.6e+37)) {
tmp = t_2;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (a - t) / y
t_2 = x / (1.0d0 - z)
if (y <= (-2.8d+197)) then
tmp = t_2
else if (y <= (-2.4d+142)) then
tmp = t_1
else if (y <= (-3.4d+59)) then
tmp = t_2
else if (y <= (-6.5d+25)) then
tmp = t_1
else if ((y <= (-1.85d-31)) .or. (.not. (y <= 6.6d+37))) then
tmp = t_2
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 t_1 = (a - t) / y;
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -2.8e+197) {
tmp = t_2;
} else if (y <= -2.4e+142) {
tmp = t_1;
} else if (y <= -3.4e+59) {
tmp = t_2;
} else if (y <= -6.5e+25) {
tmp = t_1;
} else if ((y <= -1.85e-31) || !(y <= 6.6e+37)) {
tmp = t_2;
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - t) / y t_2 = x / (1.0 - z) tmp = 0 if y <= -2.8e+197: tmp = t_2 elif y <= -2.4e+142: tmp = t_1 elif y <= -3.4e+59: tmp = t_2 elif y <= -6.5e+25: tmp = t_1 elif (y <= -1.85e-31) or not (y <= 6.6e+37): tmp = t_2 else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - t) / y) t_2 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -2.8e+197) tmp = t_2; elseif (y <= -2.4e+142) tmp = t_1; elseif (y <= -3.4e+59) tmp = t_2; elseif (y <= -6.5e+25) tmp = t_1; elseif ((y <= -1.85e-31) || !(y <= 6.6e+37)) tmp = t_2; else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - t) / y; t_2 = x / (1.0 - z); tmp = 0.0; if (y <= -2.8e+197) tmp = t_2; elseif (y <= -2.4e+142) tmp = t_1; elseif (y <= -3.4e+59) tmp = t_2; elseif (y <= -6.5e+25) tmp = t_1; elseif ((y <= -1.85e-31) || ~((y <= 6.6e+37))) tmp = t_2; else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.8e+197], t$95$2, If[LessEqual[y, -2.4e+142], t$95$1, If[LessEqual[y, -3.4e+59], t$95$2, If[LessEqual[y, -6.5e+25], t$95$1, If[Or[LessEqual[y, -1.85e-31], N[Not[LessEqual[y, 6.6e+37]], $MachinePrecision]], t$95$2, N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{+197}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{+142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{+59}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{-31} \lor \neg \left(y \leq 6.6 \cdot 10^{+37}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -2.7999999999999999e197 or -2.3999999999999999e142 < y < -3.40000000000000006e59 or -6.50000000000000005e25 < y < -1.8499999999999999e-31 or 6.6000000000000002e37 < y Initial program 56.7%
Taylor expanded in y around inf 62.0%
mul-1-neg62.0%
unsub-neg62.0%
Simplified62.0%
if -2.7999999999999999e197 < y < -2.3999999999999999e142 or -3.40000000000000006e59 < y < -6.50000000000000005e25Initial program 57.0%
Taylor expanded in z around inf 66.5%
Taylor expanded in b around 0 55.5%
mul-1-neg55.5%
Simplified55.5%
if -1.8499999999999999e-31 < y < 6.6000000000000002e37Initial program 78.8%
Taylor expanded in y around 0 53.6%
Final simplification57.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))) (t_2 (/ (- t a) (- b y))))
(if (<= z -6e+16)
t_2
(if (<= z -1.05e-91)
(/ (* z (- t a)) t_1)
(if (<= z -2.95e-220)
(/ (- (* x y) (* z a)) (+ y (* z b)))
(if (<= z 1.78e+53) (/ (+ (* x y) (* z t)) t_1) t_2))))))
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 tmp;
if (z <= -6e+16) {
tmp = t_2;
} else if (z <= -1.05e-91) {
tmp = (z * (t - a)) / t_1;
} else if (z <= -2.95e-220) {
tmp = ((x * y) - (z * a)) / (y + (z * b));
} else if (z <= 1.78e+53) {
tmp = ((x * y) + (z * t)) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (z * (b - y))
t_2 = (t - a) / (b - y)
if (z <= (-6d+16)) then
tmp = t_2
else if (z <= (-1.05d-91)) then
tmp = (z * (t - a)) / t_1
else if (z <= (-2.95d-220)) then
tmp = ((x * y) - (z * a)) / (y + (z * b))
else if (z <= 1.78d+53) then
tmp = ((x * y) + (z * t)) / t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -6e+16) {
tmp = t_2;
} else if (z <= -1.05e-91) {
tmp = (z * (t - a)) / t_1;
} else if (z <= -2.95e-220) {
tmp = ((x * y) - (z * a)) / (y + (z * b));
} else if (z <= 1.78e+53) {
tmp = ((x * y) + (z * t)) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = (t - a) / (b - y) tmp = 0 if z <= -6e+16: tmp = t_2 elif z <= -1.05e-91: tmp = (z * (t - a)) / t_1 elif z <= -2.95e-220: tmp = ((x * y) - (z * a)) / (y + (z * b)) elif z <= 1.78e+53: tmp = ((x * y) + (z * t)) / t_1 else: tmp = t_2 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)) tmp = 0.0 if (z <= -6e+16) tmp = t_2; elseif (z <= -1.05e-91) tmp = Float64(Float64(z * Float64(t - a)) / t_1); elseif (z <= -2.95e-220) tmp = Float64(Float64(Float64(x * y) - Float64(z * a)) / Float64(y + Float64(z * b))); elseif (z <= 1.78e+53) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) / t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -6e+16) tmp = t_2; elseif (z <= -1.05e-91) tmp = (z * (t - a)) / t_1; elseif (z <= -2.95e-220) tmp = ((x * y) - (z * a)) / (y + (z * b)); elseif (z <= 1.78e+53) tmp = ((x * y) + (z * t)) / t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6e+16], t$95$2, If[LessEqual[z, -1.05e-91], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z, -2.95e-220], N[(N[(N[(x * y), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.78e+53], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -6 \cdot 10^{+16}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-91}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{t\_1}\\
\mathbf{elif}\;z \leq -2.95 \cdot 10^{-220}:\\
\;\;\;\;\frac{x \cdot y - z \cdot a}{y + z \cdot b}\\
\mathbf{elif}\;z \leq 1.78 \cdot 10^{+53}:\\
\;\;\;\;\frac{x \cdot y + z \cdot t}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6e16 or 1.77999999999999999e53 < z Initial program 37.9%
Taylor expanded in z around inf 83.4%
if -6e16 < z < -1.05e-91Initial program 82.6%
Taylor expanded in x around 0 76.4%
if -1.05e-91 < z < -2.9499999999999998e-220Initial program 93.4%
Taylor expanded in t around 0 80.5%
+-commutative80.5%
mul-1-neg80.5%
unsub-neg80.5%
*-commutative80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in b around inf 80.5%
*-commutative80.5%
Simplified80.5%
if -2.9499999999999998e-220 < z < 1.77999999999999999e53Initial program 88.7%
Taylor expanded in a around 0 71.9%
Final simplification78.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (+ y (/ (* z (- t a)) x))) y)) (t_2 (/ (- t a) (- b y))))
(if (<= z -5.5e-46)
t_2
(if (<= z -1e-288)
t_1
(if (<= z 2.6e-262)
(/ (* x y) (+ y (* z (- b y))))
(if (<= z 3.1e-6) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * (y + ((z * (t - a)) / x))) / y;
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -5.5e-46) {
tmp = t_2;
} else if (z <= -1e-288) {
tmp = t_1;
} else if (z <= 2.6e-262) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (z <= 3.1e-6) {
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 + ((z * (t - a)) / x))) / y
t_2 = (t - a) / (b - y)
if (z <= (-5.5d-46)) then
tmp = t_2
else if (z <= (-1d-288)) then
tmp = t_1
else if (z <= 2.6d-262) then
tmp = (x * y) / (y + (z * (b - y)))
else if (z <= 3.1d-6) 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 + ((z * (t - a)) / x))) / y;
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -5.5e-46) {
tmp = t_2;
} else if (z <= -1e-288) {
tmp = t_1;
} else if (z <= 2.6e-262) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (z <= 3.1e-6) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * (y + ((z * (t - a)) / x))) / y t_2 = (t - a) / (b - y) tmp = 0 if z <= -5.5e-46: tmp = t_2 elif z <= -1e-288: tmp = t_1 elif z <= 2.6e-262: tmp = (x * y) / (y + (z * (b - y))) elif z <= 3.1e-6: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * Float64(y + Float64(Float64(z * Float64(t - a)) / x))) / y) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -5.5e-46) tmp = t_2; elseif (z <= -1e-288) tmp = t_1; elseif (z <= 2.6e-262) tmp = Float64(Float64(x * y) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= 3.1e-6) 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 + ((z * (t - a)) / x))) / y; t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -5.5e-46) tmp = t_2; elseif (z <= -1e-288) tmp = t_1; elseif (z <= 2.6e-262) tmp = (x * y) / (y + (z * (b - y))); elseif (z <= 3.1e-6) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[(y + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5e-46], t$95$2, If[LessEqual[z, -1e-288], t$95$1, If[LessEqual[z, 2.6e-262], N[(N[(x * y), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e-6], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot \left(y + \frac{z \cdot \left(t - a\right)}{x}\right)}{y}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{-46}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-288}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-262}:\\
\;\;\;\;\frac{x \cdot y}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -5.49999999999999983e-46 or 3.1e-6 < z Initial program 43.0%
Taylor expanded in z around inf 78.0%
if -5.49999999999999983e-46 < z < -1.00000000000000006e-288 or 2.5999999999999999e-262 < z < 3.1e-6Initial program 90.7%
Taylor expanded in x around inf 85.5%
Taylor expanded in z around 0 60.2%
if -1.00000000000000006e-288 < z < 2.5999999999999999e-262Initial program 94.1%
Taylor expanded in x around inf 88.0%
*-commutative88.0%
Simplified88.0%
Final simplification70.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (* x y) (* z a)) y)) (t_2 (/ (- t a) (- b y))))
(if (<= z -8e-40)
t_2
(if (<= z -5.2e-288)
t_1
(if (<= z 1.16e-231)
(/ (* x y) (+ y (* z (- b y))))
(if (<= z 4.8e-14) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) - (z * a)) / y;
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -8e-40) {
tmp = t_2;
} else if (z <= -5.2e-288) {
tmp = t_1;
} else if (z <= 1.16e-231) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (z <= 4.8e-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) - (z * a)) / y
t_2 = (t - a) / (b - y)
if (z <= (-8d-40)) then
tmp = t_2
else if (z <= (-5.2d-288)) then
tmp = t_1
else if (z <= 1.16d-231) then
tmp = (x * y) / (y + (z * (b - y)))
else if (z <= 4.8d-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) - (z * a)) / y;
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -8e-40) {
tmp = t_2;
} else if (z <= -5.2e-288) {
tmp = t_1;
} else if (z <= 1.16e-231) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (z <= 4.8e-14) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * y) - (z * a)) / y t_2 = (t - a) / (b - y) tmp = 0 if z <= -8e-40: tmp = t_2 elif z <= -5.2e-288: tmp = t_1 elif z <= 1.16e-231: tmp = (x * y) / (y + (z * (b - y))) elif z <= 4.8e-14: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x * y) - Float64(z * a)) / y) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -8e-40) tmp = t_2; elseif (z <= -5.2e-288) tmp = t_1; elseif (z <= 1.16e-231) tmp = Float64(Float64(x * y) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= 4.8e-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) - (z * a)) / y; t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -8e-40) tmp = t_2; elseif (z <= -5.2e-288) tmp = t_1; elseif (z <= 1.16e-231) tmp = (x * y) / (y + (z * (b - y))); elseif (z <= 4.8e-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[(N[(N[(x * y), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e-40], t$95$2, If[LessEqual[z, -5.2e-288], t$95$1, If[LessEqual[z, 1.16e-231], N[(N[(x * y), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e-14], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y - z \cdot a}{y}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -8 \cdot 10^{-40}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-288}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.16 \cdot 10^{-231}:\\
\;\;\;\;\frac{x \cdot y}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -7.9999999999999994e-40 or 4.8e-14 < z Initial program 43.0%
Taylor expanded in z around inf 78.0%
if -7.9999999999999994e-40 < z < -5.19999999999999979e-288 or 1.16e-231 < z < 4.8e-14Initial program 90.6%
Taylor expanded in t around 0 65.7%
+-commutative65.7%
mul-1-neg65.7%
unsub-neg65.7%
*-commutative65.7%
*-commutative65.7%
Simplified65.7%
Taylor expanded in z around 0 50.9%
if -5.19999999999999979e-288 < z < 1.16e-231Initial program 92.9%
Taylor expanded in x around inf 75.4%
*-commutative75.4%
Simplified75.4%
Final simplification66.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -6e+16)
t_1
(if (<= z -1.2e-91)
(/ (* z (- t a)) (+ y (* z (- b y))))
(if (<= z 0.00047) (/ (- (* x y) (* z a)) (+ y (* z b))) 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 <= -6e+16) {
tmp = t_1;
} else if (z <= -1.2e-91) {
tmp = (z * (t - a)) / (y + (z * (b - y)));
} else if (z <= 0.00047) {
tmp = ((x * y) - (z * a)) / (y + (z * 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)
if (z <= (-6d+16)) then
tmp = t_1
else if (z <= (-1.2d-91)) then
tmp = (z * (t - a)) / (y + (z * (b - y)))
else if (z <= 0.00047d0) then
tmp = ((x * y) - (z * a)) / (y + (z * 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);
double tmp;
if (z <= -6e+16) {
tmp = t_1;
} else if (z <= -1.2e-91) {
tmp = (z * (t - a)) / (y + (z * (b - y)));
} else if (z <= 0.00047) {
tmp = ((x * y) - (z * a)) / (y + (z * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -6e+16: tmp = t_1 elif z <= -1.2e-91: tmp = (z * (t - a)) / (y + (z * (b - y))) elif z <= 0.00047: tmp = ((x * y) - (z * a)) / (y + (z * b)) 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 <= -6e+16) tmp = t_1; elseif (z <= -1.2e-91) tmp = Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= 0.00047) tmp = Float64(Float64(Float64(x * y) - Float64(z * a)) / Float64(y + Float64(z * 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); tmp = 0.0; if (z <= -6e+16) tmp = t_1; elseif (z <= -1.2e-91) tmp = (z * (t - a)) / (y + (z * (b - y))); elseif (z <= 0.00047) tmp = ((x * y) - (z * a)) / (y + (z * b)); 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, -6e+16], t$95$1, If[LessEqual[z, -1.2e-91], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.00047], N[(N[(N[(x * y), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -6 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-91}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 0.00047:\\
\;\;\;\;\frac{x \cdot y - z \cdot a}{y + z \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6e16 or 4.69999999999999986e-4 < z Initial program 39.5%
Taylor expanded in z around inf 81.1%
if -6e16 < z < -1.20000000000000005e-91Initial program 82.6%
Taylor expanded in x around 0 76.4%
if -1.20000000000000005e-91 < z < 4.69999999999999986e-4Initial program 90.8%
Taylor expanded in t around 0 69.5%
+-commutative69.5%
mul-1-neg69.5%
unsub-neg69.5%
*-commutative69.5%
*-commutative69.5%
Simplified69.5%
Taylor expanded in b around inf 69.5%
*-commutative69.5%
Simplified69.5%
Final simplification75.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -8.2e+49) (not (<= z 3.25e+53))) (/ (- t a) (- b y)) (/ (+ (* x y) (* 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 <= -8.2e+49) || !(z <= 3.25e+53)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + (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 <= (-8.2d+49)) .or. (.not. (z <= 3.25d+53))) then
tmp = (t - a) / (b - y)
else
tmp = ((x * y) + (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 <= -8.2e+49) || !(z <= 3.25e+53)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -8.2e+49) or not (z <= 3.25e+53): tmp = (t - a) / (b - y) else: tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -8.2e+49) || !(z <= 3.25e+53)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(x * y) + 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 <= -8.2e+49) || ~((z <= 3.25e+53))) tmp = (t - a) / (b - y); else tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -8.2e+49], N[Not[LessEqual[z, 3.25e+53]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{+49} \lor \neg \left(z \leq 3.25 \cdot 10^{+53}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -8.2e49 or 3.25000000000000008e53 < z Initial program 36.6%
Taylor expanded in z around inf 87.7%
if -8.2e49 < z < 3.25000000000000008e53Initial program 86.5%
Final simplification87.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -7.8e+58)
t_1
(if (<= y -1.35e+26)
(/ a (- y b))
(if (or (<= y -2.8e-31) (not (<= y 2.95e+37))) t_1 (/ (- t a) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -7.8e+58) {
tmp = t_1;
} else if (y <= -1.35e+26) {
tmp = a / (y - b);
} else if ((y <= -2.8e-31) || !(y <= 2.95e+37)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-7.8d+58)) then
tmp = t_1
else if (y <= (-1.35d+26)) then
tmp = a / (y - b)
else if ((y <= (-2.8d-31)) .or. (.not. (y <= 2.95d+37))) then
tmp = t_1
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 t_1 = x / (1.0 - z);
double tmp;
if (y <= -7.8e+58) {
tmp = t_1;
} else if (y <= -1.35e+26) {
tmp = a / (y - b);
} else if ((y <= -2.8e-31) || !(y <= 2.95e+37)) {
tmp = t_1;
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -7.8e+58: tmp = t_1 elif y <= -1.35e+26: tmp = a / (y - b) elif (y <= -2.8e-31) or not (y <= 2.95e+37): tmp = t_1 else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -7.8e+58) tmp = t_1; elseif (y <= -1.35e+26) tmp = Float64(a / Float64(y - b)); elseif ((y <= -2.8e-31) || !(y <= 2.95e+37)) tmp = t_1; else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -7.8e+58) tmp = t_1; elseif (y <= -1.35e+26) tmp = a / (y - b); elseif ((y <= -2.8e-31) || ~((y <= 2.95e+37))) tmp = t_1; else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.8e+58], t$95$1, If[LessEqual[y, -1.35e+26], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -2.8e-31], N[Not[LessEqual[y, 2.95e+37]], $MachinePrecision]], t$95$1, N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -7.8 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{+26}:\\
\;\;\;\;\frac{a}{y - b}\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-31} \lor \neg \left(y \leq 2.95 \cdot 10^{+37}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -7.8000000000000002e58 or -1.35e26 < y < -2.7999999999999999e-31 or 2.95e37 < y Initial program 57.2%
Taylor expanded in y around inf 57.7%
mul-1-neg57.7%
unsub-neg57.7%
Simplified57.7%
if -7.8000000000000002e58 < y < -1.35e26Initial program 51.3%
Taylor expanded in a around inf 31.9%
mul-1-neg31.9%
distribute-lft-neg-out31.9%
*-commutative31.9%
Simplified31.9%
Taylor expanded in z around inf 49.5%
mul-1-neg49.5%
Simplified49.5%
if -2.7999999999999999e-31 < y < 2.95e37Initial program 78.8%
Taylor expanded in y around 0 53.6%
Final simplification55.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.5e-50) (not (<= z 2.2e-14))) (/ (- t a) (- b y)) (/ (- (* x y) (* z a)) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.5e-50) || !(z <= 2.2e-14)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) - (z * a)) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-5.5d-50)) .or. (.not. (z <= 2.2d-14))) then
tmp = (t - a) / (b - y)
else
tmp = ((x * y) - (z * a)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.5e-50) || !(z <= 2.2e-14)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((x * y) - (z * a)) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.5e-50) or not (z <= 2.2e-14): tmp = (t - a) / (b - y) else: tmp = ((x * y) - (z * a)) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.5e-50) || !(z <= 2.2e-14)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(x * y) - Float64(z * a)) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.5e-50) || ~((z <= 2.2e-14))) tmp = (t - a) / (b - y); else tmp = ((x * y) - (z * a)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.5e-50], N[Not[LessEqual[z, 2.2e-14]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{-50} \lor \neg \left(z \leq 2.2 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y - z \cdot a}{y}\\
\end{array}
\end{array}
if z < -5.49999999999999975e-50 or 2.2000000000000001e-14 < z Initial program 43.0%
Taylor expanded in z around inf 78.0%
if -5.49999999999999975e-50 < z < 2.2000000000000001e-14Initial program 91.1%
Taylor expanded in t around 0 69.2%
+-commutative69.2%
mul-1-neg69.2%
unsub-neg69.2%
*-commutative69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in z around 0 52.5%
Final simplification65.0%
(FPCore (x y z t a b) :precision binary64 (if (<= z -7.8e+235) (/ (- a) b) (if (or (<= z -1.9e-91) (not (<= z 2.7e-6))) (/ t b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7.8e+235) {
tmp = -a / b;
} else if ((z <= -1.9e-91) || !(z <= 2.7e-6)) {
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 <= (-7.8d+235)) then
tmp = -a / b
else if ((z <= (-1.9d-91)) .or. (.not. (z <= 2.7d-6))) 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 <= -7.8e+235) {
tmp = -a / b;
} else if ((z <= -1.9e-91) || !(z <= 2.7e-6)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -7.8e+235: tmp = -a / b elif (z <= -1.9e-91) or not (z <= 2.7e-6): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -7.8e+235) tmp = Float64(Float64(-a) / b); elseif ((z <= -1.9e-91) || !(z <= 2.7e-6)) 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 <= -7.8e+235) tmp = -a / b; elseif ((z <= -1.9e-91) || ~((z <= 2.7e-6))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -7.8e+235], N[((-a) / b), $MachinePrecision], If[Or[LessEqual[z, -1.9e-91], N[Not[LessEqual[z, 2.7e-6]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{+235}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-91} \lor \neg \left(z \leq 2.7 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -7.8000000000000005e235Initial program 11.0%
Taylor expanded in a around inf 10.9%
mul-1-neg10.9%
distribute-lft-neg-out10.9%
*-commutative10.9%
Simplified10.9%
Taylor expanded in y around 0 46.6%
mul-1-neg46.6%
Simplified46.6%
if -7.8000000000000005e235 < z < -1.89999999999999989e-91 or 2.69999999999999998e-6 < z Initial program 48.2%
Taylor expanded in t around inf 29.0%
associate-/l*40.1%
+-commutative40.1%
fma-define40.2%
Simplified40.2%
Taylor expanded in b around inf 31.3%
if -1.89999999999999989e-91 < z < 2.69999999999999998e-6Initial program 90.8%
Taylor expanded in z around 0 48.8%
Final simplification40.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.7e-91) (not (<= z 1.78e+53))) (/ (- t a) (- b y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.7e-91) || !(z <= 1.78e+53)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.7d-91)) .or. (.not. (z <= 1.78d+53))) then
tmp = (t - a) / (b - y)
else
tmp = x / (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.7e-91) || !(z <= 1.78e+53)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.7e-91) or not (z <= 1.78e+53): tmp = (t - a) / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.7e-91) || !(z <= 1.78e+53)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x / Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.7e-91) || ~((z <= 1.78e+53))) tmp = (t - a) / (b - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.7e-91], N[Not[LessEqual[z, 1.78e+53]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-91} \lor \neg \left(z \leq 1.78 \cdot 10^{+53}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -1.70000000000000013e-91 or 1.77999999999999999e53 < z Initial program 44.0%
Taylor expanded in z around inf 77.8%
if -1.70000000000000013e-91 < z < 1.77999999999999999e53Initial program 89.7%
Taylor expanded in y around inf 49.1%
mul-1-neg49.1%
unsub-neg49.1%
Simplified49.1%
Final simplification63.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.8e-91) (not (<= z 3.8e-13))) (/ t (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.8e-91) || !(z <= 3.8e-13)) {
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.8d-91)) .or. (.not. (z <= 3.8d-13))) 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.8e-91) || !(z <= 3.8e-13)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.8e-91) or not (z <= 3.8e-13): tmp = t / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.8e-91) || !(z <= 3.8e-13)) 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.8e-91) || ~((z <= 3.8e-13))) tmp = t / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.8e-91], N[Not[LessEqual[z, 3.8e-13]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{-91} \lor \neg \left(z \leq 3.8 \cdot 10^{-13}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.8e-91 or 3.8e-13 < z Initial program 45.1%
Taylor expanded in t around inf 26.8%
associate-/l*37.8%
+-commutative37.8%
fma-define37.8%
Simplified37.8%
Taylor expanded in z around inf 45.9%
if -1.8e-91 < z < 3.8e-13Initial program 90.8%
Taylor expanded in z around 0 48.8%
Final simplification47.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.4e-48) (not (<= y 3.85e-25))) (/ x (- 1.0 z)) (/ t (- b y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.4e-48) || !(y <= 3.85e-25)) {
tmp = x / (1.0 - z);
} else {
tmp = t / (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 ((y <= (-2.4d-48)) .or. (.not. (y <= 3.85d-25))) then
tmp = x / (1.0d0 - z)
else
tmp = t / (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 ((y <= -2.4e-48) || !(y <= 3.85e-25)) {
tmp = x / (1.0 - z);
} else {
tmp = t / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.4e-48) or not (y <= 3.85e-25): tmp = x / (1.0 - z) else: tmp = t / (b - y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.4e-48) || !(y <= 3.85e-25)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(t / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.4e-48) || ~((y <= 3.85e-25))) tmp = x / (1.0 - z); else tmp = t / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.4e-48], N[Not[LessEqual[y, 3.85e-25]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-48} \lor \neg \left(y \leq 3.85 \cdot 10^{-25}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y}\\
\end{array}
\end{array}
if y < -2.4e-48 or 3.8500000000000001e-25 < y Initial program 57.8%
Taylor expanded in y around inf 50.5%
mul-1-neg50.5%
unsub-neg50.5%
Simplified50.5%
if -2.4e-48 < y < 3.8500000000000001e-25Initial program 80.4%
Taylor expanded in t around inf 37.8%
associate-/l*45.6%
+-commutative45.6%
fma-define45.6%
Simplified45.6%
Taylor expanded in z around inf 45.9%
Final simplification48.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.8e-31) (not (<= y 2.7e+37))) (/ 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 <= -2.8e-31) || !(y <= 2.7e+37)) {
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 <= (-2.8d-31)) .or. (.not. (y <= 2.7d+37))) 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 <= -2.8e-31) || !(y <= 2.7e+37)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.8e-31) or not (y <= 2.7e+37): 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 <= -2.8e-31) || !(y <= 2.7e+37)) 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 <= -2.8e-31) || ~((y <= 2.7e+37))) 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, -2.8e-31], N[Not[LessEqual[y, 2.7e+37]], $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 -2.8 \cdot 10^{-31} \lor \neg \left(y \leq 2.7 \cdot 10^{+37}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -2.7999999999999999e-31 or 2.69999999999999986e37 < y Initial program 56.7%
Taylor expanded in y around inf 53.6%
mul-1-neg53.6%
unsub-neg53.6%
Simplified53.6%
if -2.7999999999999999e-31 < y < 2.69999999999999986e37Initial program 78.8%
Taylor expanded in y around 0 53.6%
Final simplification53.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.9e-91) (not (<= z 6.2e-7))) (/ t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.9e-91) || !(z <= 6.2e-7)) {
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 <= (-1.9d-91)) .or. (.not. (z <= 6.2d-7))) 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 <= -1.9e-91) || !(z <= 6.2e-7)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.9e-91) or not (z <= 6.2e-7): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.9e-91) || !(z <= 6.2e-7)) 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 <= -1.9e-91) || ~((z <= 6.2e-7))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.9e-91], N[Not[LessEqual[z, 6.2e-7]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{-91} \lor \neg \left(z \leq 6.2 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.89999999999999989e-91 or 6.1999999999999999e-7 < z Initial program 45.1%
Taylor expanded in t around inf 26.8%
associate-/l*37.8%
+-commutative37.8%
fma-define37.8%
Simplified37.8%
Taylor expanded in b around inf 28.9%
if -1.89999999999999989e-91 < z < 6.1999999999999999e-7Initial program 90.8%
Taylor expanded in z around 0 48.8%
Final simplification38.6%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 67.4%
Taylor expanded in z around 0 25.7%
Final simplification25.7%
(FPCore (x y z t a b) :precision binary64 (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
def code(x, y, z, t, a, b): return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(z * t) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) - Float64(a / Float64(Float64(b - y) + Float64(y / z)))) end
function tmp = code(x, y, z, t, a, b) tmp = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(z * t), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}
\end{array}
herbie shell --seed 2024055
(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)))))