
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma z (- b y) y))
(t_2 (/ y t_1))
(t_3 (fma x t_2 (/ (- t a) (- b y)))))
(if (<= z -960.0)
t_3
(if (<= z 12200000000000.0) (fma x t_2 (/ (* z (- t a)) t_1)) t_3))))
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 = y / t_1;
double t_3 = fma(x, t_2, ((t - a) / (b - y)));
double tmp;
if (z <= -960.0) {
tmp = t_3;
} else if (z <= 12200000000000.0) {
tmp = fma(x, t_2, ((z * (t - a)) / t_1));
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(z, Float64(b - y), y) t_2 = Float64(y / t_1) t_3 = fma(x, t_2, Float64(Float64(t - a) / Float64(b - y))) tmp = 0.0 if (z <= -960.0) tmp = t_3; elseif (z <= 12200000000000.0) tmp = fma(x, t_2, Float64(Float64(z * Float64(t - a)) / t_1)); else tmp = t_3; 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[(y / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x * t$95$2 + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -960.0], t$95$3, If[LessEqual[z, 12200000000000.0], N[(x * t$95$2 + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, b - y, y\right)\\
t_2 := \frac{y}{t\_1}\\
t_3 := \mathsf{fma}\left(x, t\_2, \frac{t - a}{b - y}\right)\\
\mathbf{if}\;z \leq -960:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 12200000000000:\\
\;\;\;\;\mathsf{fma}\left(x, t\_2, \frac{z \cdot \left(t - a\right)}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -960 or 1.22e13 < z Initial program 36.3%
Taylor expanded in x around 0
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6440.8
Applied rewrites40.8%
Taylor expanded in z around inf
Applied rewrites88.9%
if -960 < z < 1.22e13Initial program 86.8%
Taylor expanded in x around 0
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6499.0
Applied rewrites99.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (fma x (/ y (fma z (- b y) y)) (/ (- t a) (- b y))))
(t_3 (/ (+ (* z (- t a)) (* x y)) t_1)))
(if (<= t_3 -2e+266)
t_2
(if (<= t_3 -1e-238)
(/ (fma z t (fma z (- a) (* x y))) t_1)
(if (<= t_3 1e-203) t_2 (if (<= t_3 1e+192) t_3 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 = fma(x, (y / fma(z, (b - y), y)), ((t - a) / (b - y)));
double t_3 = ((z * (t - a)) + (x * y)) / t_1;
double tmp;
if (t_3 <= -2e+266) {
tmp = t_2;
} else if (t_3 <= -1e-238) {
tmp = fma(z, t, fma(z, -a, (x * y))) / t_1;
} else if (t_3 <= 1e-203) {
tmp = t_2;
} else if (t_3 <= 1e+192) {
tmp = t_3;
} 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 = fma(x, Float64(y / fma(z, Float64(b - y), y)), Float64(Float64(t - a) / Float64(b - y))) t_3 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / t_1) tmp = 0.0 if (t_3 <= -2e+266) tmp = t_2; elseif (t_3 <= -1e-238) tmp = Float64(fma(z, t, fma(z, Float64(-a), Float64(x * y))) / t_1); elseif (t_3 <= 1e-203) tmp = t_2; elseif (t_3 <= 1e+192) tmp = t_3; else tmp = t_2; 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[(x * N[(y / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, -2e+266], t$95$2, If[LessEqual[t$95$3, -1e-238], N[(N[(z * t + N[(z * (-a) + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, 1e-203], t$95$2, If[LessEqual[t$95$3, 1e+192], t$95$3, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \mathsf{fma}\left(x, \frac{y}{\mathsf{fma}\left(z, b - y, y\right)}, \frac{t - a}{b - y}\right)\\
t_3 := \frac{z \cdot \left(t - a\right) + x \cdot y}{t\_1}\\
\mathbf{if}\;t\_3 \leq -2 \cdot 10^{+266}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-238}:\\
\;\;\;\;\frac{\mathsf{fma}\left(z, t, \mathsf{fma}\left(z, -a, x \cdot y\right)\right)}{t\_1}\\
\mathbf{elif}\;t\_3 \leq 10^{-203}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 10^{+192}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.0000000000000001e266 or -9.9999999999999999e-239 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1e-203 or 1.00000000000000004e192 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 27.6%
Taylor expanded in x around 0
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6442.8
Applied rewrites42.8%
Taylor expanded in z around inf
Applied rewrites88.7%
if -2.0000000000000001e266 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.9999999999999999e-239Initial program 99.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift--.f64N/A
sub-negN/A
distribute-lft-inN/A
associate-+l+N/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-neg.f6499.7
Applied rewrites99.7%
if 1e-203 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.00000000000000004e192Initial program 98.4%
Final simplification93.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (fma x (/ 1.0 (- 1.0 z)) (/ (- t a) (- b y))))
(t_3 (/ (+ (* z (- t a)) (* x y)) t_1)))
(if (<= t_3 -1e+307)
t_2
(if (<= t_3 -1e-238)
(/ (fma z t (fma z (- a) (* x y))) t_1)
(if (<= t_3 0.0)
(/ (* t (- 1.0 (/ a t))) (- b y))
(if (<= t_3 1e+192) t_3 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 = fma(x, (1.0 / (1.0 - z)), ((t - a) / (b - y)));
double t_3 = ((z * (t - a)) + (x * y)) / t_1;
double tmp;
if (t_3 <= -1e+307) {
tmp = t_2;
} else if (t_3 <= -1e-238) {
tmp = fma(z, t, fma(z, -a, (x * y))) / t_1;
} else if (t_3 <= 0.0) {
tmp = (t * (1.0 - (a / t))) / (b - y);
} else if (t_3 <= 1e+192) {
tmp = t_3;
} 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 = fma(x, Float64(1.0 / Float64(1.0 - z)), Float64(Float64(t - a) / Float64(b - y))) t_3 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / t_1) tmp = 0.0 if (t_3 <= -1e+307) tmp = t_2; elseif (t_3 <= -1e-238) tmp = Float64(fma(z, t, fma(z, Float64(-a), Float64(x * y))) / t_1); elseif (t_3 <= 0.0) tmp = Float64(Float64(t * Float64(1.0 - Float64(a / t))) / Float64(b - y)); elseif (t_3 <= 1e+192) tmp = t_3; else tmp = t_2; 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[(x * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, -1e+307], t$95$2, If[LessEqual[t$95$3, -1e-238], N[(N[(z * t + N[(z * (-a) + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(N[(t * N[(1.0 - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+192], t$95$3, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \mathsf{fma}\left(x, \frac{1}{1 - z}, \frac{t - a}{b - y}\right)\\
t_3 := \frac{z \cdot \left(t - a\right) + x \cdot y}{t\_1}\\
\mathbf{if}\;t\_3 \leq -1 \cdot 10^{+307}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-238}:\\
\;\;\;\;\frac{\mathsf{fma}\left(z, t, \mathsf{fma}\left(z, -a, x \cdot y\right)\right)}{t\_1}\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{t \cdot \left(1 - \frac{a}{t}\right)}{b - y}\\
\mathbf{elif}\;t\_3 \leq 10^{+192}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.99999999999999986e306 or 1.00000000000000004e192 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 23.1%
Taylor expanded in x around 0
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6443.1
Applied rewrites43.1%
Taylor expanded in z around inf
Applied rewrites95.1%
Taylor expanded in y around inf
Applied rewrites93.3%
if -9.99999999999999986e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.9999999999999999e-239Initial program 99.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift--.f64N/A
sub-negN/A
distribute-lft-inN/A
associate-+l+N/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-neg.f6499.6
Applied rewrites99.6%
if -9.9999999999999999e-239 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 34.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift--.f64N/A
sub-negN/A
distribute-lft-inN/A
associate-+l+N/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-neg.f6434.0
Applied rewrites34.0%
Taylor expanded in z around inf
mul-1-negN/A
sub-negN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6464.3
Applied rewrites64.3%
Taylor expanded in t around inf
Applied rewrites64.3%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.00000000000000004e192Initial program 98.4%
Final simplification92.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma x (/ 1.0 (- 1.0 z)) (/ (- t a) (- b y))))
(t_2 (+ (* z (- t a)) (* x y)))
(t_3 (/ t_2 (+ y (* z (- b y))))))
(if (<= t_3 -1e+307)
t_1
(if (<= t_3 -1e-238)
(/ t_2 (fma z b (fma z (- y) y)))
(if (<= t_3 0.0)
(/ (* t (- 1.0 (/ a t))) (- b y))
(if (<= t_3 1e+192) t_3 t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(x, (1.0 / (1.0 - z)), ((t - a) / (b - y)));
double t_2 = (z * (t - a)) + (x * y);
double t_3 = t_2 / (y + (z * (b - y)));
double tmp;
if (t_3 <= -1e+307) {
tmp = t_1;
} else if (t_3 <= -1e-238) {
tmp = t_2 / fma(z, b, fma(z, -y, y));
} else if (t_3 <= 0.0) {
tmp = (t * (1.0 - (a / t))) / (b - y);
} else if (t_3 <= 1e+192) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(x, Float64(1.0 / Float64(1.0 - z)), Float64(Float64(t - a) / Float64(b - y))) t_2 = Float64(Float64(z * Float64(t - a)) + Float64(x * y)) t_3 = Float64(t_2 / Float64(y + Float64(z * Float64(b - y)))) tmp = 0.0 if (t_3 <= -1e+307) tmp = t_1; elseif (t_3 <= -1e-238) tmp = Float64(t_2 / fma(z, b, fma(z, Float64(-y), y))); elseif (t_3 <= 0.0) tmp = Float64(Float64(t * Float64(1.0 - Float64(a / t))) / Float64(b - y)); elseif (t_3 <= 1e+192) tmp = t_3; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e+307], t$95$1, If[LessEqual[t$95$3, -1e-238], N[(t$95$2 / N[(z * b + N[(z * (-y) + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(N[(t * N[(1.0 - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+192], t$95$3, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x, \frac{1}{1 - z}, \frac{t - a}{b - y}\right)\\
t_2 := z \cdot \left(t - a\right) + x \cdot y\\
t_3 := \frac{t\_2}{y + z \cdot \left(b - y\right)}\\
\mathbf{if}\;t\_3 \leq -1 \cdot 10^{+307}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-238}:\\
\;\;\;\;\frac{t\_2}{\mathsf{fma}\left(z, b, \mathsf{fma}\left(z, -y, y\right)\right)}\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{t \cdot \left(1 - \frac{a}{t}\right)}{b - y}\\
\mathbf{elif}\;t\_3 \leq 10^{+192}:\\
\;\;\;\;t\_3\\
\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)))) < -9.99999999999999986e306 or 1.00000000000000004e192 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 23.1%
Taylor expanded in x around 0
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6443.1
Applied rewrites43.1%
Taylor expanded in z around inf
Applied rewrites95.1%
Taylor expanded in y around inf
Applied rewrites93.3%
if -9.99999999999999986e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.9999999999999999e-239Initial program 99.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift--.f64N/A
sub-negN/A
distribute-lft-inN/A
associate-+l+N/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-neg.f6499.6
Applied rewrites99.6%
if -9.9999999999999999e-239 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 34.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift--.f64N/A
sub-negN/A
distribute-lft-inN/A
associate-+l+N/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-neg.f6434.0
Applied rewrites34.0%
Taylor expanded in z around inf
mul-1-negN/A
sub-negN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6464.3
Applied rewrites64.3%
Taylor expanded in t around inf
Applied rewrites64.3%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.00000000000000004e192Initial program 98.4%
Final simplification92.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma x (/ 1.0 (- 1.0 z)) (/ (- t a) (- b y))))
(t_2 (/ (+ (* z (- t a)) (* x y)) (+ y (* z (- b y))))))
(if (<= t_2 -1e+307)
t_1
(if (<= t_2 -1e-238)
t_2
(if (<= t_2 0.0)
(/ (* t (- 1.0 (/ a t))) (- b y))
(if (<= t_2 1e+192) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(x, (1.0 / (1.0 - z)), ((t - a) / (b - y)));
double t_2 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
double tmp;
if (t_2 <= -1e+307) {
tmp = t_1;
} else if (t_2 <= -1e-238) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (t * (1.0 - (a / t))) / (b - y);
} else if (t_2 <= 1e+192) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(x, Float64(1.0 / Float64(1.0 - z)), Float64(Float64(t - a) / Float64(b - y))) t_2 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y + Float64(z * Float64(b - y)))) tmp = 0.0 if (t_2 <= -1e+307) tmp = t_1; elseif (t_2 <= -1e-238) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(t * Float64(1.0 - Float64(a / t))) / Float64(b - y)); elseif (t_2 <= 1e+192) tmp = t_2; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+307], t$95$1, If[LessEqual[t$95$2, -1e-238], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(t * N[(1.0 - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+192], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x, \frac{1}{1 - z}, \frac{t - a}{b - y}\right)\\
t_2 := \frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+307}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-238}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{t \cdot \left(1 - \frac{a}{t}\right)}{b - y}\\
\mathbf{elif}\;t\_2 \leq 10^{+192}:\\
\;\;\;\;t\_2\\
\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)))) < -9.99999999999999986e306 or 1.00000000000000004e192 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 23.1%
Taylor expanded in x around 0
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6443.1
Applied rewrites43.1%
Taylor expanded in z around inf
Applied rewrites95.1%
Taylor expanded in y around inf
Applied rewrites93.3%
if -9.99999999999999986e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.9999999999999999e-239 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.00000000000000004e192Initial program 99.1%
if -9.9999999999999999e-239 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 34.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift--.f64N/A
sub-negN/A
distribute-lft-inN/A
associate-+l+N/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-neg.f6434.0
Applied rewrites34.0%
Taylor expanded in z around inf
mul-1-negN/A
sub-negN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6464.3
Applied rewrites64.3%
Taylor expanded in t around inf
Applied rewrites64.3%
Final simplification92.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* z (- t a)) (* x y)) (+ y (* z (- b y)))))
(t_2 (/ (- t a) (- b y)))
(t_3 (fma x (/ 1.0 (- 1.0 z)) t_2))
(t_4 (/ (fma z t (* x y)) (fma z (- b y) y))))
(if (<= t_1 -1e+173)
t_3
(if (<= t_1 -1e-238)
t_4
(if (<= t_1 1e-203) t_2 (if (<= t_1 5e+70) t_4 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double t_3 = fma(x, (1.0 / (1.0 - z)), t_2);
double t_4 = fma(z, t, (x * y)) / fma(z, (b - y), y);
double tmp;
if (t_1 <= -1e+173) {
tmp = t_3;
} else if (t_1 <= -1e-238) {
tmp = t_4;
} else if (t_1 <= 1e-203) {
tmp = t_2;
} else if (t_1 <= 5e+70) {
tmp = t_4;
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y + Float64(z * Float64(b - y)))) t_2 = Float64(Float64(t - a) / Float64(b - y)) t_3 = fma(x, Float64(1.0 / Float64(1.0 - z)), t_2) t_4 = Float64(fma(z, t, Float64(x * y)) / fma(z, Float64(b - y), y)) tmp = 0.0 if (t_1 <= -1e+173) tmp = t_3; elseif (t_1 <= -1e-238) tmp = t_4; elseif (t_1 <= 1e-203) tmp = t_2; elseif (t_1 <= 5e+70) tmp = t_4; else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z * t + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+173], t$95$3, If[LessEqual[t$95$1, -1e-238], t$95$4, If[LessEqual[t$95$1, 1e-203], t$95$2, If[LessEqual[t$95$1, 5e+70], t$95$4, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{t - a}{b - y}\\
t_3 := \mathsf{fma}\left(x, \frac{1}{1 - z}, t\_2\right)\\
t_4 := \frac{\mathsf{fma}\left(z, t, x \cdot y\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+173}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-238}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_1 \leq 10^{-203}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+70}:\\
\;\;\;\;t\_4\\
\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)))) < -1e173 or 5.0000000000000002e70 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 36.0%
Taylor expanded in x around 0
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6452.7
Applied rewrites52.7%
Taylor expanded in z around inf
Applied rewrites92.1%
Taylor expanded in y around inf
Applied rewrites89.9%
if -1e173 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.9999999999999999e-239 or 1e-203 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.0000000000000002e70Initial program 99.0%
Taylor expanded in a around 0
lower-/.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6479.4
Applied rewrites79.4%
if -9.9999999999999999e-239 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1e-203Initial program 40.0%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6464.7
Applied rewrites64.7%
Final simplification82.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma x (/ -1.0 z) (/ (- t a) (- b y)))))
(if (<= z -5.1e-6)
t_1
(if (<= z 9.5e-9) (/ (fma z t (* x y)) (fma z (- b y) y)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(x, (-1.0 / z), ((t - a) / (b - y)));
double tmp;
if (z <= -5.1e-6) {
tmp = t_1;
} else if (z <= 9.5e-9) {
tmp = fma(z, t, (x * y)) / fma(z, (b - y), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(x, Float64(-1.0 / z), Float64(Float64(t - a) / Float64(b - y))) tmp = 0.0 if (z <= -5.1e-6) tmp = t_1; elseif (z <= 9.5e-9) tmp = Float64(fma(z, t, Float64(x * y)) / fma(z, Float64(b - y), y)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(-1.0 / z), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.1e-6], t$95$1, If[LessEqual[z, 9.5e-9], N[(N[(z * t + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x, \frac{-1}{z}, \frac{t - a}{b - y}\right)\\
\mathbf{if}\;z \leq -5.1 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-9}:\\
\;\;\;\;\frac{\mathsf{fma}\left(z, t, x \cdot y\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.1000000000000003e-6 or 9.5000000000000007e-9 < z Initial program 38.7%
Taylor expanded in x around 0
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6443.0
Applied rewrites43.0%
Taylor expanded in z around inf
Applied rewrites88.5%
Taylor expanded in y around inf
Applied rewrites87.0%
Taylor expanded in z around inf
Applied rewrites86.3%
if -5.1000000000000003e-6 < z < 9.5000000000000007e-9Initial program 86.2%
Taylor expanded in a around 0
lower-/.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6467.6
Applied rewrites67.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma z (- b y) y)) (t_2 (/ (- t a) (- b y))))
(if (<= z -960.0)
t_2
(if (<= z -3.1e-175)
(/ (* z (- t a)) t_1)
(if (<= z 9.8e-14) (* x (/ y t_1)) t_2)))))
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 = (t - a) / (b - y);
double tmp;
if (z <= -960.0) {
tmp = t_2;
} else if (z <= -3.1e-175) {
tmp = (z * (t - a)) / t_1;
} else if (z <= 9.8e-14) {
tmp = x * (y / t_1);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(z, Float64(b - y), y) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -960.0) tmp = t_2; elseif (z <= -3.1e-175) tmp = Float64(Float64(z * Float64(t - a)) / t_1); elseif (z <= 9.8e-14) tmp = Float64(x * Float64(y / t_1)); else tmp = t_2; 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[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -960.0], t$95$2, If[LessEqual[z, -3.1e-175], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z, 9.8e-14], N[(x * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, b - y, y\right)\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -960:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-175}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{t\_1}\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{-14}:\\
\;\;\;\;x \cdot \frac{y}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -960 or 9.79999999999999989e-14 < z Initial program 37.7%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6478.4
Applied rewrites78.4%
if -960 < z < -3.09999999999999999e-175Initial program 92.9%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6466.8
Applied rewrites66.8%
if -3.09999999999999999e-175 < z < 9.79999999999999989e-14Initial program 83.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift--.f64N/A
sub-negN/A
distribute-lft-inN/A
associate-+l+N/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-neg.f6483.2
Applied rewrites83.2%
Taylor expanded in x around inf
associate-/l*N/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
mul-1-negN/A
sub-negN/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6472.8
Applied rewrites72.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1e-56)
t_1
(if (<= z 1.4e-13) (/ (fma z t (* x y)) (fma z (- b y) 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 <= -1e-56) {
tmp = t_1;
} else if (z <= 1.4e-13) {
tmp = fma(z, t, (x * y)) / fma(z, (b - y), 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 <= -1e-56) tmp = t_1; elseif (z <= 1.4e-13) tmp = Float64(fma(z, t, Float64(x * y)) / fma(z, Float64(b - y), y)); else tmp = t_1; end return 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, -1e-56], t$95$1, If[LessEqual[z, 1.4e-13], N[(N[(z * t + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-13}:\\
\;\;\;\;\frac{\mathsf{fma}\left(z, t, x \cdot y\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1e-56 or 1.4000000000000001e-13 < z Initial program 41.0%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6478.4
Applied rewrites78.4%
if -1e-56 < z < 1.4000000000000001e-13Initial program 86.3%
Taylor expanded in a around 0
lower-/.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6467.3
Applied rewrites67.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -6.5e-69)
t_1
(if (<= z 9.8e-14) (* x (/ y (fma z (- b y) 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 <= -6.5e-69) {
tmp = t_1;
} else if (z <= 9.8e-14) {
tmp = x * (y / fma(z, (b - y), 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 <= -6.5e-69) tmp = t_1; elseif (z <= 9.8e-14) tmp = Float64(x * Float64(y / fma(z, Float64(b - y), y))); else tmp = t_1; end return 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, -6.5e-69], t$95$1, If[LessEqual[z, 9.8e-14], N[(x * N[(y / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{-69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{-14}:\\
\;\;\;\;x \cdot \frac{y}{\mathsf{fma}\left(z, b - y, y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.49999999999999951e-69 or 9.79999999999999989e-14 < z Initial program 43.0%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6476.6
Applied rewrites76.6%
if -6.49999999999999951e-69 < z < 9.79999999999999989e-14Initial program 85.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift--.f64N/A
sub-negN/A
distribute-lft-inN/A
associate-+l+N/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-neg.f6485.6
Applied rewrites85.6%
Taylor expanded in x around inf
associate-/l*N/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
mul-1-negN/A
sub-negN/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6465.2
Applied rewrites65.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -6e-69)
t_1
(if (<= z -6.5e-297)
(/ (* x y) (fma z (- b y) y))
(if (<= z 3.4e-16) (fma z x x) 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-69) {
tmp = t_1;
} else if (z <= -6.5e-297) {
tmp = (x * y) / fma(z, (b - y), y);
} else if (z <= 3.4e-16) {
tmp = fma(z, x, x);
} 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-69) tmp = t_1; elseif (z <= -6.5e-297) tmp = Float64(Float64(x * y) / fma(z, Float64(b - y), y)); elseif (z <= 3.4e-16) tmp = fma(z, x, x); else tmp = t_1; end return 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-69], t$95$1, If[LessEqual[z, -6.5e-297], N[(N[(x * y), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e-16], N[(z * x + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -6 \cdot 10^{-69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-297}:\\
\;\;\;\;\frac{x \cdot y}{\mathsf{fma}\left(z, b - y, y\right)}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-16}:\\
\;\;\;\;\mathsf{fma}\left(z, x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.99999999999999978e-69 or 3.4e-16 < z Initial program 43.0%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6476.6
Applied rewrites76.6%
if -5.99999999999999978e-69 < z < -6.5000000000000002e-297Initial program 94.4%
Taylor expanded in x around inf
lower-/.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6458.8
Applied rewrites58.8%
if -6.5000000000000002e-297 < z < 3.4e-16Initial program 77.7%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6464.9
Applied rewrites64.9%
Taylor expanded in z around 0
Applied rewrites64.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -2.55e+23)
t_1
(if (<= y 6.5e-87)
(/ (- t a) b)
(if (<= y 300000.0) (/ (- t a) (- y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -2.55e+23) {
tmp = t_1;
} else if (y <= 6.5e-87) {
tmp = (t - a) / b;
} else if (y <= 300000.0) {
tmp = (t - a) / -y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-2.55d+23)) then
tmp = t_1
else if (y <= 6.5d-87) then
tmp = (t - a) / b
else if (y <= 300000.0d0) then
tmp = (t - a) / -y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -2.55e+23) {
tmp = t_1;
} else if (y <= 6.5e-87) {
tmp = (t - a) / b;
} else if (y <= 300000.0) {
tmp = (t - a) / -y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -2.55e+23: tmp = t_1 elif y <= 6.5e-87: tmp = (t - a) / b elif y <= 300000.0: tmp = (t - a) / -y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -2.55e+23) tmp = t_1; elseif (y <= 6.5e-87) tmp = Float64(Float64(t - a) / b); elseif (y <= 300000.0) tmp = Float64(Float64(t - a) / Float64(-y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -2.55e+23) tmp = t_1; elseif (y <= 6.5e-87) tmp = (t - a) / b; elseif (y <= 300000.0) tmp = (t - a) / -y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.55e+23], t$95$1, If[LessEqual[y, 6.5e-87], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 300000.0], N[(N[(t - a), $MachinePrecision] / (-y)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -2.55 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-87}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;y \leq 300000:\\
\;\;\;\;\frac{t - a}{-y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.5500000000000001e23 or 3e5 < y Initial program 47.5%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6449.5
Applied rewrites49.5%
if -2.5500000000000001e23 < y < 6.5000000000000003e-87Initial program 77.2%
Taylor expanded in y around 0
lower-/.f64N/A
lower--.f6464.2
Applied rewrites64.2%
if 6.5000000000000003e-87 < y < 3e5Initial program 76.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift--.f64N/A
sub-negN/A
distribute-lft-inN/A
associate-+l+N/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-neg.f6476.6
Applied rewrites76.6%
Taylor expanded in z around inf
mul-1-negN/A
sub-negN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6453.1
Applied rewrites53.1%
Taylor expanded in b around 0
Applied rewrites43.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (- t a) (- b y)))) (if (<= z -1.6e-177) t_1 (if (<= z 3.4e-16) (fma z x x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.6e-177) {
tmp = t_1;
} else if (z <= 3.4e-16) {
tmp = fma(z, x, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.6e-177) tmp = t_1; elseif (z <= 3.4e-16) tmp = fma(z, x, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e-177], t$95$1, If[LessEqual[z, 3.4e-16], N[(z * x + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{-177}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-16}:\\
\;\;\;\;\mathsf{fma}\left(z, x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.5999999999999999e-177 or 3.4e-16 < z Initial program 51.0%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6469.1
Applied rewrites69.1%
if -1.5999999999999999e-177 < z < 3.4e-16Initial program 83.0%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6465.6
Applied rewrites65.6%
Taylor expanded in z around 0
Applied rewrites65.6%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ x (- 1.0 z)))) (if (<= y -2.55e+23) t_1 (if (<= y 4.1e+39) (/ (- 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 <= -2.55e+23) {
tmp = t_1;
} else if (y <= 4.1e+39) {
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 <= (-2.55d+23)) then
tmp = t_1
else if (y <= 4.1d+39) 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 <= -2.55e+23) {
tmp = t_1;
} else if (y <= 4.1e+39) {
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 <= -2.55e+23: tmp = t_1 elif y <= 4.1e+39: 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 <= -2.55e+23) tmp = t_1; elseif (y <= 4.1e+39) 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 <= -2.55e+23) tmp = t_1; elseif (y <= 4.1e+39) 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, -2.55e+23], t$95$1, If[LessEqual[y, 4.1e+39], 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 -2.55 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{+39}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.5500000000000001e23 or 4.10000000000000004e39 < y Initial program 45.7%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6450.0
Applied rewrites50.0%
if -2.5500000000000001e23 < y < 4.10000000000000004e39Initial program 76.5%
Taylor expanded in y around 0
lower-/.f64N/A
lower--.f6455.9
Applied rewrites55.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ a (- y b)))) (if (<= a -3.75e+115) t_1 (if (<= a 2.2e+116) (/ x (- 1.0 z)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / (y - b);
double tmp;
if (a <= -3.75e+115) {
tmp = t_1;
} else if (a <= 2.2e+116) {
tmp = x / (1.0 - z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a / (y - b)
if (a <= (-3.75d+115)) then
tmp = t_1
else if (a <= 2.2d+116) then
tmp = x / (1.0d0 - z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / (y - b);
double tmp;
if (a <= -3.75e+115) {
tmp = t_1;
} else if (a <= 2.2e+116) {
tmp = x / (1.0 - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / (y - b) tmp = 0 if a <= -3.75e+115: tmp = t_1 elif a <= 2.2e+116: tmp = x / (1.0 - z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(y - b)) tmp = 0.0 if (a <= -3.75e+115) tmp = t_1; elseif (a <= 2.2e+116) tmp = Float64(x / Float64(1.0 - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / (y - b); tmp = 0.0; if (a <= -3.75e+115) tmp = t_1; elseif (a <= 2.2e+116) tmp = x / (1.0 - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.75e+115], t$95$1, If[LessEqual[a, 2.2e+116], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{y - b}\\
\mathbf{if}\;a \leq -3.75 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{+116}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.7499999999999998e115 or 2.2e116 < a Initial program 56.4%
Taylor expanded in a around inf
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-neg.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6439.0
Applied rewrites39.0%
Taylor expanded in z around inf
Applied rewrites59.8%
if -3.7499999999999998e115 < a < 2.2e116Initial program 63.7%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6442.8
Applied rewrites42.8%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ a (- y b)))) (if (<= z -1.95e-8) t_1 (if (<= z 9.8e-14) (* x 1.0) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / (y - b);
double tmp;
if (z <= -1.95e-8) {
tmp = t_1;
} else if (z <= 9.8e-14) {
tmp = x * 1.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a / (y - b)
if (z <= (-1.95d-8)) then
tmp = t_1
else if (z <= 9.8d-14) then
tmp = x * 1.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / (y - b);
double tmp;
if (z <= -1.95e-8) {
tmp = t_1;
} else if (z <= 9.8e-14) {
tmp = x * 1.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / (y - b) tmp = 0 if z <= -1.95e-8: tmp = t_1 elif z <= 9.8e-14: tmp = x * 1.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(y - b)) tmp = 0.0 if (z <= -1.95e-8) tmp = t_1; elseif (z <= 9.8e-14) tmp = Float64(x * 1.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / (y - b); tmp = 0.0; if (z <= -1.95e-8) tmp = t_1; elseif (z <= 9.8e-14) tmp = x * 1.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.95e-8], t$95$1, If[LessEqual[z, 9.8e-14], N[(x * 1.0), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{y - b}\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{-14}:\\
\;\;\;\;x \cdot 1\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.94999999999999992e-8 or 9.79999999999999989e-14 < z Initial program 39.1%
Taylor expanded in a around inf
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-neg.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6420.5
Applied rewrites20.5%
Taylor expanded in z around inf
Applied rewrites43.8%
if -1.94999999999999992e-8 < z < 9.79999999999999989e-14Initial program 86.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift--.f64N/A
sub-negN/A
distribute-lft-inN/A
associate-+l+N/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-neg.f6486.1
Applied rewrites86.1%
Taylor expanded in x around inf
associate-/l*N/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
mul-1-negN/A
sub-negN/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6461.2
Applied rewrites61.2%
Taylor expanded in z around 0
Applied rewrites52.6%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ a (- b)))) (if (<= z -1e-56) t_1 (if (<= z 9.8e-14) (* x 1.0) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / -b;
double tmp;
if (z <= -1e-56) {
tmp = t_1;
} else if (z <= 9.8e-14) {
tmp = x * 1.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a / -b
if (z <= (-1d-56)) then
tmp = t_1
else if (z <= 9.8d-14) then
tmp = x * 1.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / -b;
double tmp;
if (z <= -1e-56) {
tmp = t_1;
} else if (z <= 9.8e-14) {
tmp = x * 1.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / -b tmp = 0 if z <= -1e-56: tmp = t_1 elif z <= 9.8e-14: tmp = x * 1.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(-b)) tmp = 0.0 if (z <= -1e-56) tmp = t_1; elseif (z <= 9.8e-14) tmp = Float64(x * 1.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / -b; tmp = 0.0; if (z <= -1e-56) tmp = t_1; elseif (z <= 9.8e-14) tmp = x * 1.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / (-b)), $MachinePrecision]}, If[LessEqual[z, -1e-56], t$95$1, If[LessEqual[z, 9.8e-14], N[(x * 1.0), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{-b}\\
\mathbf{if}\;z \leq -1 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{-14}:\\
\;\;\;\;x \cdot 1\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1e-56 or 9.79999999999999989e-14 < z Initial program 41.0%
Taylor expanded in a around inf
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-neg.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6420.5
Applied rewrites20.5%
Taylor expanded in b around inf
Applied rewrites22.0%
if -1e-56 < z < 9.79999999999999989e-14Initial program 86.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift--.f64N/A
sub-negN/A
distribute-lft-inN/A
associate-+l+N/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-neg.f6486.3
Applied rewrites86.3%
Taylor expanded in x around inf
associate-/l*N/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
mul-1-negN/A
sub-negN/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6463.4
Applied rewrites63.4%
Taylor expanded in z around 0
Applied rewrites54.3%
Final simplification36.4%
(FPCore (x y z t a b) :precision binary64 (fma z (fma z x x) x))
double code(double x, double y, double z, double t, double a, double b) {
return fma(z, fma(z, x, x), x);
}
function code(x, y, z, t, a, b) return fma(z, fma(z, x, x), x) end
code[x_, y_, z_, t_, a_, b_] := N[(z * N[(z * x + x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(z, \mathsf{fma}\left(z, x, x\right), x\right)
\end{array}
Initial program 61.1%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6434.9
Applied rewrites34.9%
Taylor expanded in z around 0
Applied rewrites27.0%
(FPCore (x y z t a b) :precision binary64 (* x 1.0))
double code(double x, double y, double z, double t, double a, double b) {
return x * 1.0;
}
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 * 1.0d0
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * 1.0;
}
def code(x, y, z, t, a, b): return x * 1.0
function code(x, y, z, t, a, b) return Float64(x * 1.0) end
function tmp = code(x, y, z, t, a, b) tmp = x * 1.0; end
code[x_, y_, z_, t_, a_, b_] := N[(x * 1.0), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 1
\end{array}
Initial program 61.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift--.f64N/A
sub-negN/A
distribute-lft-inN/A
associate-+l+N/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-neg.f6461.1
Applied rewrites61.1%
Taylor expanded in x around inf
associate-/l*N/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
mul-1-negN/A
sub-negN/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6437.5
Applied rewrites37.5%
Taylor expanded in z around 0
Applied rewrites26.7%
(FPCore (x y z t a b) :precision binary64 (* z x))
double code(double x, double y, double z, double t, double a, double b) {
return z * 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 = z * x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return z * x;
}
def code(x, y, z, t, a, b): return z * x
function code(x, y, z, t, a, b) return Float64(z * x) end
function tmp = code(x, y, z, t, a, b) tmp = z * x; end
code[x_, y_, z_, t_, a_, b_] := N[(z * x), $MachinePrecision]
\begin{array}{l}
\\
z \cdot x
\end{array}
Initial program 61.1%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6434.9
Applied rewrites34.9%
Taylor expanded in z around 0
Applied rewrites26.5%
Taylor expanded in z around inf
Applied rewrites4.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 2024233
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:alt
(! :herbie-platform default (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))