
(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 z (- b y) y))
(t_2 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
(t_3 (fma z (- t a) (* x y)))
(t_4 (/ z t_3)))
(if (<= t_2 -5e+280)
(-
(- (/ x (+ z -1.0)))
(/
(fma
z
(/ (- t a) (+ z -1.0))
(/ (* z (* x b)) (* (+ z -1.0) (+ z -1.0))))
y))
(if (<= t_2 5e+275)
(/ 1.0 (- (fma b t_4 (/ y t_3)) (* y t_4)))
(if (<= t_2 INFINITY)
(* x (fma z (/ (- t a) (* x t_1)) (/ y t_1)))
(/ (- 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 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double t_3 = fma(z, (t - a), (x * y));
double t_4 = z / t_3;
double tmp;
if (t_2 <= -5e+280) {
tmp = -(x / (z + -1.0)) - (fma(z, ((t - a) / (z + -1.0)), ((z * (x * b)) / ((z + -1.0) * (z + -1.0)))) / y);
} else if (t_2 <= 5e+275) {
tmp = 1.0 / (fma(b, t_4, (y / t_3)) - (y * t_4));
} else if (t_2 <= ((double) INFINITY)) {
tmp = x * fma(z, ((t - a) / (x * t_1)), (y / t_1));
} 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(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) t_3 = fma(z, Float64(t - a), Float64(x * y)) t_4 = Float64(z / t_3) tmp = 0.0 if (t_2 <= -5e+280) tmp = Float64(Float64(-Float64(x / Float64(z + -1.0))) - Float64(fma(z, Float64(Float64(t - a) / Float64(z + -1.0)), Float64(Float64(z * Float64(x * b)) / Float64(Float64(z + -1.0) * Float64(z + -1.0)))) / y)); elseif (t_2 <= 5e+275) tmp = Float64(1.0 / Float64(fma(b, t_4, Float64(y / t_3)) - Float64(y * t_4))); elseif (t_2 <= Inf) tmp = Float64(x * fma(z, Float64(Float64(t - a) / Float64(x * t_1)), Float64(y / t_1))); 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[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z / t$95$3), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+280], N[((-N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]) - N[(N[(z * N[(N[(t - a), $MachinePrecision] / N[(z + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(x * b), $MachinePrecision]), $MachinePrecision] / N[(N[(z + -1.0), $MachinePrecision] * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+275], N[(1.0 / N[(N[(b * t$95$4 + N[(y / t$95$3), $MachinePrecision]), $MachinePrecision] - N[(y * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(x * N[(z * N[(N[(t - a), $MachinePrecision] / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
t_3 := \mathsf{fma}\left(z, t - a, x \cdot y\right)\\
t_4 := \frac{z}{t\_3}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+280}:\\
\;\;\;\;\left(-\frac{x}{z + -1}\right) - \frac{\mathsf{fma}\left(z, \frac{t - a}{z + -1}, \frac{z \cdot \left(x \cdot b\right)}{\left(z + -1\right) \cdot \left(z + -1\right)}\right)}{y}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+275}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(b, t\_4, \frac{y}{t\_3}\right) - y \cdot t\_4}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;x \cdot \mathsf{fma}\left(z, \frac{t - a}{x \cdot t\_1}, \frac{y}{t\_1}\right)\\
\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)))) < -5.0000000000000002e280Initial program 45.0%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-/.f64N/A
Applied rewrites84.0%
if -5.0000000000000002e280 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 5.0000000000000003e275Initial program 92.3%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6492.1
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6492.1
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6492.1
Applied rewrites92.1%
Taylor expanded in b around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
Applied rewrites98.5%
if 5.0000000000000003e275 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 34.0%
Taylor expanded in x around inf
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6485.4
Applied rewrites85.4%
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
lower-/.f64N/A
lower--.f64N/A
lower--.f6478.0
Applied rewrites78.0%
Final simplification93.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ (fma z t (fma z (- a) (* x y))) t_1))
(t_3 (/ (- t a) (- b y)))
(t_4 (/ (+ (* x y) (* z (- t a))) t_1))
(t_5 (fma z (- b y) y)))
(if (<= t_4 (- INFINITY))
(-
(- (/ x (+ z -1.0)))
(/
(fma
z
(/ (- t a) (+ z -1.0))
(/ (* z (* x b)) (* (+ z -1.0) (+ z -1.0))))
y))
(if (<= t_4 -1e-277)
t_2
(if (<= t_4 0.0)
t_3
(if (<= t_4 2e+281)
t_2
(if (<= t_4 INFINITY)
(* x (fma z (/ (- t a) (* x t_5)) (/ y t_5)))
t_3)))))))
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(z, t, fma(z, -a, (x * y))) / t_1;
double t_3 = (t - a) / (b - y);
double t_4 = ((x * y) + (z * (t - a))) / t_1;
double t_5 = fma(z, (b - y), y);
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = -(x / (z + -1.0)) - (fma(z, ((t - a) / (z + -1.0)), ((z * (x * b)) / ((z + -1.0) * (z + -1.0)))) / y);
} else if (t_4 <= -1e-277) {
tmp = t_2;
} else if (t_4 <= 0.0) {
tmp = t_3;
} else if (t_4 <= 2e+281) {
tmp = t_2;
} else if (t_4 <= ((double) INFINITY)) {
tmp = x * fma(z, ((t - a) / (x * t_5)), (y / t_5));
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(fma(z, t, fma(z, Float64(-a), Float64(x * y))) / t_1) t_3 = Float64(Float64(t - a) / Float64(b - y)) t_4 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / t_1) t_5 = fma(z, Float64(b - y), y) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = Float64(Float64(-Float64(x / Float64(z + -1.0))) - Float64(fma(z, Float64(Float64(t - a) / Float64(z + -1.0)), Float64(Float64(z * Float64(x * b)) / Float64(Float64(z + -1.0) * Float64(z + -1.0)))) / y)); elseif (t_4 <= -1e-277) tmp = t_2; elseif (t_4 <= 0.0) tmp = t_3; elseif (t_4 <= 2e+281) tmp = t_2; elseif (t_4 <= Inf) tmp = Float64(x * fma(z, Float64(Float64(t - a) / Float64(x * t_5)), Float64(y / t_5))); else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * t + N[(z * (-a) + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$5 = N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], N[((-N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]) - N[(N[(z * N[(N[(t - a), $MachinePrecision] / N[(z + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(x * b), $MachinePrecision]), $MachinePrecision] / N[(N[(z + -1.0), $MachinePrecision] * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, -1e-277], t$95$2, If[LessEqual[t$95$4, 0.0], t$95$3, If[LessEqual[t$95$4, 2e+281], t$95$2, If[LessEqual[t$95$4, Infinity], N[(x * N[(z * N[(N[(t - a), $MachinePrecision] / N[(x * t$95$5), $MachinePrecision]), $MachinePrecision] + N[(y / t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{\mathsf{fma}\left(z, t, \mathsf{fma}\left(z, -a, x \cdot y\right)\right)}{t\_1}\\
t_3 := \frac{t - a}{b - y}\\
t_4 := \frac{x \cdot y + z \cdot \left(t - a\right)}{t\_1}\\
t_5 := \mathsf{fma}\left(z, b - y, y\right)\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;\left(-\frac{x}{z + -1}\right) - \frac{\mathsf{fma}\left(z, \frac{t - a}{z + -1}, \frac{z \cdot \left(x \cdot b\right)}{\left(z + -1\right) \cdot \left(z + -1\right)}\right)}{y}\\
\mathbf{elif}\;t\_4 \leq -1 \cdot 10^{-277}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+281}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;x \cdot \mathsf{fma}\left(z, \frac{t - a}{x \cdot t\_5}, \frac{y}{t\_5}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 41.3%
Taylor expanded in y around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-/.f64N/A
Applied rewrites83.0%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.99999999999999969e-278 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.0000000000000001e281Initial program 99.5%
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.5
Applied rewrites99.5%
if -9.99999999999999969e-278 < (/.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 10.9%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6480.5
Applied rewrites80.5%
if 2.0000000000000001e281 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 30.6%
Taylor expanded in x around inf
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6484.7
Applied rewrites84.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ (fma z t (fma z (- a) (* x y))) t_1))
(t_3 (fma z (- b y) y))
(t_4 (/ (+ (* x y) (* z (- t a))) t_1))
(t_5 (* x (fma z (/ (- t a) (* x t_3)) (/ y t_3))))
(t_6 (/ (- t a) (- b y))))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 -1e-277)
t_2
(if (<= t_4 0.0)
t_6
(if (<= t_4 2e+281) t_2 (if (<= t_4 INFINITY) t_5 t_6)))))))
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(z, t, fma(z, -a, (x * y))) / t_1;
double t_3 = fma(z, (b - y), y);
double t_4 = ((x * y) + (z * (t - a))) / t_1;
double t_5 = x * fma(z, ((t - a) / (x * t_3)), (y / t_3));
double t_6 = (t - a) / (b - y);
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= -1e-277) {
tmp = t_2;
} else if (t_4 <= 0.0) {
tmp = t_6;
} else if (t_4 <= 2e+281) {
tmp = t_2;
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_5;
} else {
tmp = t_6;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(fma(z, t, fma(z, Float64(-a), Float64(x * y))) / t_1) t_3 = fma(z, Float64(b - y), y) t_4 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / t_1) t_5 = Float64(x * fma(z, Float64(Float64(t - a) / Float64(x * t_3)), Float64(y / t_3))) t_6 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= -1e-277) tmp = t_2; elseif (t_4 <= 0.0) tmp = t_6; elseif (t_4 <= 2e+281) tmp = t_2; elseif (t_4 <= Inf) tmp = t_5; else tmp = t_6; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * t + N[(z * (-a) + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$5 = N[(x * N[(z * N[(N[(t - a), $MachinePrecision] / N[(x * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(y / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -1e-277], t$95$2, If[LessEqual[t$95$4, 0.0], t$95$6, If[LessEqual[t$95$4, 2e+281], t$95$2, If[LessEqual[t$95$4, Infinity], t$95$5, t$95$6]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{\mathsf{fma}\left(z, t, \mathsf{fma}\left(z, -a, x \cdot y\right)\right)}{t\_1}\\
t_3 := \mathsf{fma}\left(z, b - y, y\right)\\
t_4 := \frac{x \cdot y + z \cdot \left(t - a\right)}{t\_1}\\
t_5 := x \cdot \mathsf{fma}\left(z, \frac{t - a}{x \cdot t\_3}, \frac{y}{t\_3}\right)\\
t_6 := \frac{t - a}{b - y}\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_4 \leq -1 \cdot 10^{-277}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+281}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_6\\
\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 2.0000000000000001e281 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 37.1%
Taylor expanded in x around inf
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6481.6
Applied rewrites81.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.99999999999999969e-278 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.0000000000000001e281Initial program 99.5%
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.5
Applied rewrites99.5%
if -9.99999999999999969e-278 < (/.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 10.9%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6480.5
Applied rewrites80.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -4e+88)
t_1
(if (<= z 6.2e+19)
(/ (fma z t (fma z (- a) (* x y))) (+ y (* z (- b y))))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -4e+88) {
tmp = t_1;
} else if (z <= 6.2e+19) {
tmp = fma(z, t, fma(z, -a, (x * y))) / (y + (z * (b - y)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -4e+88) tmp = t_1; elseif (z <= 6.2e+19) tmp = Float64(fma(z, t, fma(z, Float64(-a), Float64(x * y))) / Float64(y + Float64(z * Float64(b - 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, -4e+88], t$95$1, If[LessEqual[z, 6.2e+19], N[(N[(z * t + N[(z * (-a) + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -4 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+19}:\\
\;\;\;\;\frac{\mathsf{fma}\left(z, t, \mathsf{fma}\left(z, -a, x \cdot y\right)\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.99999999999999984e88 or 6.2e19 < z Initial program 45.6%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6485.0
Applied rewrites85.0%
if -3.99999999999999984e88 < z < 6.2e19Initial program 88.4%
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.f6488.4
Applied rewrites88.4%
(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 -6.7e-41)
t_2
(if (<= z 2.1e-279)
(* x (/ y t_1))
(if (<= z 4.6e-113)
(fma z (/ t y) x)
(if (<= z 5.2e+14) (/ (* z (- t a)) 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 <= -6.7e-41) {
tmp = t_2;
} else if (z <= 2.1e-279) {
tmp = x * (y / t_1);
} else if (z <= 4.6e-113) {
tmp = fma(z, (t / y), x);
} else if (z <= 5.2e+14) {
tmp = (z * (t - a)) / 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 <= -6.7e-41) tmp = t_2; elseif (z <= 2.1e-279) tmp = Float64(x * Float64(y / t_1)); elseif (z <= 4.6e-113) tmp = fma(z, Float64(t / y), x); elseif (z <= 5.2e+14) tmp = Float64(Float64(z * Float64(t - a)) / 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, -6.7e-41], t$95$2, If[LessEqual[z, 2.1e-279], N[(x * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e-113], N[(z * N[(t / y), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 5.2e+14], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$1), $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 -6.7 \cdot 10^{-41}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-279}:\\
\;\;\;\;x \cdot \frac{y}{t\_1}\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{-113}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{t}{y}, x\right)\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+14}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6.69999999999999957e-41 or 5.2e14 < z Initial program 55.4%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6479.1
Applied rewrites79.1%
if -6.69999999999999957e-41 < z < 2.10000000000000006e-279Initial program 91.8%
Taylor expanded in x around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6474.1
Applied rewrites74.1%
if 2.10000000000000006e-279 < z < 4.60000000000000016e-113Initial program 81.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.f6481.1
Applied rewrites81.1%
Taylor expanded in a around 0
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6468.1
Applied rewrites68.1%
Taylor expanded in z around 0
Applied rewrites82.2%
Taylor expanded in t around inf
Applied rewrites82.0%
if 4.60000000000000016e-113 < z < 5.2e14Initial program 87.5%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6470.9
Applied rewrites70.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -4e+88)
t_1
(if (<= z 6.2e+19)
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y))))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -4e+88) {
tmp = t_1;
} else if (z <= 6.2e+19) {
tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-4d+88)) then
tmp = t_1
else if (z <= 6.2d+19) then
tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -4e+88) {
tmp = t_1;
} else if (z <= 6.2e+19) {
tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -4e+88: tmp = t_1 elif z <= 6.2e+19: tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -4e+88) tmp = t_1; elseif (z <= 6.2e+19) tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -4e+88) tmp = t_1; elseif (z <= 6.2e+19) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e+88], t$95$1, If[LessEqual[z, 6.2e+19], 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], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -4 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+19}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.99999999999999984e88 or 6.2e19 < z Initial program 45.6%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6485.0
Applied rewrites85.0%
if -3.99999999999999984e88 < z < 6.2e19Initial program 88.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -4.9e+73)
t_1
(if (<= z 1.65e+19) (/ (fma z t (* x y)) (+ y (* z (- b y)))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -4.9e+73) {
tmp = t_1;
} else if (z <= 1.65e+19) {
tmp = fma(z, t, (x * y)) / (y + (z * (b - y)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -4.9e+73) tmp = t_1; elseif (z <= 1.65e+19) tmp = Float64(fma(z, t, Float64(x * y)) / Float64(y + Float64(z * Float64(b - 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, -4.9e+73], t$95$1, If[LessEqual[z, 1.65e+19], N[(N[(z * t + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -4.9 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+19}:\\
\;\;\;\;\frac{\mathsf{fma}\left(z, t, x \cdot y\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.8999999999999999e73 or 1.65e19 < z Initial program 47.2%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.8
Applied rewrites84.8%
if -4.8999999999999999e73 < z < 1.65e19Initial program 88.7%
Taylor expanded in a around 0
*-commutativeN/A
lower-fma.f64N/A
lower-*.f6471.3
Applied rewrites71.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -4.9e+73)
t_1
(if (<= z 1.65e+19) (/ (fma x y (* z t)) (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 <= -4.9e+73) {
tmp = t_1;
} else if (z <= 1.65e+19) {
tmp = fma(x, y, (z * t)) / 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 <= -4.9e+73) tmp = t_1; elseif (z <= 1.65e+19) tmp = Float64(fma(x, y, Float64(z * t)) / 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, -4.9e+73], t$95$1, If[LessEqual[z, 1.65e+19], N[(N[(x * y + N[(z * t), $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 -4.9 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+19}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot t\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.8999999999999999e73 or 1.65e19 < z Initial program 47.2%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.8
Applied rewrites84.8%
if -4.8999999999999999e73 < z < 1.65e19Initial program 88.7%
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.f6488.7
Applied rewrites88.7%
Taylor expanded in a around 0
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6471.3
Applied rewrites71.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -4.9e+73)
t_1
(if (<= z 1.65e+19) (/ (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 <= -4.9e+73) {
tmp = t_1;
} else if (z <= 1.65e+19) {
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 <= -4.9e+73) tmp = t_1; elseif (z <= 1.65e+19) 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, -4.9e+73], t$95$1, If[LessEqual[z, 1.65e+19], 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 -4.9 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+19}:\\
\;\;\;\;\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 < -4.8999999999999999e73 or 1.65e19 < z Initial program 47.2%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.8
Applied rewrites84.8%
if -4.8999999999999999e73 < z < 1.65e19Initial program 88.7%
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--.f6471.3
Applied rewrites71.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -6.7e-41)
t_1
(if (<= z 2.1e-279)
(* x (/ y (fma z (- b y) y)))
(if (<= z 5e-27) (fma z (/ t y) 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 <= -6.7e-41) {
tmp = t_1;
} else if (z <= 2.1e-279) {
tmp = x * (y / fma(z, (b - y), y));
} else if (z <= 5e-27) {
tmp = fma(z, (t / y), 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 <= -6.7e-41) tmp = t_1; elseif (z <= 2.1e-279) tmp = Float64(x * Float64(y / fma(z, Float64(b - y), y))); elseif (z <= 5e-27) tmp = fma(z, Float64(t / y), 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, -6.7e-41], t$95$1, If[LessEqual[z, 2.1e-279], N[(x * N[(y / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-27], N[(z * N[(t / y), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -6.7 \cdot 10^{-41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-279}:\\
\;\;\;\;x \cdot \frac{y}{\mathsf{fma}\left(z, b - y, y\right)}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-27}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{t}{y}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.69999999999999957e-41 or 5.0000000000000002e-27 < z Initial program 57.8%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6476.8
Applied rewrites76.8%
if -6.69999999999999957e-41 < z < 2.10000000000000006e-279Initial program 91.8%
Taylor expanded in x around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6474.1
Applied rewrites74.1%
if 2.10000000000000006e-279 < z < 5.0000000000000002e-27Initial program 84.4%
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.f6484.4
Applied rewrites84.4%
Taylor expanded in a around 0
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6466.7
Applied rewrites66.7%
Taylor expanded in z around 0
Applied rewrites73.2%
Taylor expanded in t around inf
Applied rewrites73.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -4.8e-18)
t_1
(if (<= y -2.7e-71)
(/ t (- b y))
(if (<= y 3.5e+26) (/ (- 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 <= -4.8e-18) {
tmp = t_1;
} else if (y <= -2.7e-71) {
tmp = t / (b - y);
} else if (y <= 3.5e+26) {
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 <= (-4.8d-18)) then
tmp = t_1
else if (y <= (-2.7d-71)) then
tmp = t / (b - y)
else if (y <= 3.5d+26) 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 <= -4.8e-18) {
tmp = t_1;
} else if (y <= -2.7e-71) {
tmp = t / (b - y);
} else if (y <= 3.5e+26) {
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 <= -4.8e-18: tmp = t_1 elif y <= -2.7e-71: tmp = t / (b - y) elif y <= 3.5e+26: 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 <= -4.8e-18) tmp = t_1; elseif (y <= -2.7e-71) tmp = Float64(t / Float64(b - y)); elseif (y <= 3.5e+26) 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 <= -4.8e-18) tmp = t_1; elseif (y <= -2.7e-71) tmp = t / (b - y); elseif (y <= 3.5e+26) 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, -4.8e-18], t$95$1, If[LessEqual[y, -2.7e-71], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e+26], 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 -4.8 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.7 \cdot 10^{-71}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+26}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.79999999999999988e-18 or 3.4999999999999999e26 < y Initial program 57.8%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6458.5
Applied rewrites58.5%
if -4.79999999999999988e-18 < y < -2.7000000000000001e-71Initial program 67.7%
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.f6467.8
Applied rewrites67.8%
Taylor expanded in a around 0
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6454.3
Applied rewrites54.3%
Taylor expanded in z around inf
Applied rewrites61.4%
if -2.7000000000000001e-71 < y < 3.4999999999999999e26Initial program 84.3%
Taylor expanded in y around 0
lower-/.f64N/A
lower--.f6460.3
Applied rewrites60.3%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (- t a) (- b y)))) (if (<= z -2.25e-73) t_1 (if (<= z 5e-27) (fma z (/ t y) 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 <= -2.25e-73) {
tmp = t_1;
} else if (z <= 5e-27) {
tmp = fma(z, (t / y), 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 <= -2.25e-73) tmp = t_1; elseif (z <= 5e-27) tmp = fma(z, Float64(t / y), 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, -2.25e-73], t$95$1, If[LessEqual[z, 5e-27], N[(z * N[(t / y), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{-73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-27}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{t}{y}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.25e-73 or 5.0000000000000002e-27 < z Initial program 59.3%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6474.9
Applied rewrites74.9%
if -2.25e-73 < z < 5.0000000000000002e-27Initial program 88.5%
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.f6488.5
Applied rewrites88.5%
Taylor expanded in a around 0
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6474.3
Applied rewrites74.3%
Taylor expanded in z around 0
Applied rewrites67.9%
Taylor expanded in t around inf
Applied rewrites69.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (- t a) (- b y)))) (if (<= z -2.8e-93) t_1 (if (<= z 5.8e-53) (fma x z 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 <= -2.8e-93) {
tmp = t_1;
} else if (z <= 5.8e-53) {
tmp = fma(x, z, 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 <= -2.8e-93) tmp = t_1; elseif (z <= 5.8e-53) tmp = fma(x, z, 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, -2.8e-93], t$95$1, If[LessEqual[z, 5.8e-53], N[(x * z + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{-93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-53}:\\
\;\;\;\;\mathsf{fma}\left(x, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.79999999999999998e-93 or 5.7999999999999996e-53 < z Initial program 61.0%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6473.6
Applied rewrites73.6%
if -2.79999999999999998e-93 < z < 5.7999999999999996e-53Initial program 87.7%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6458.9
Applied rewrites58.9%
Taylor expanded in z around 0
Applied rewrites58.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ x (- 1.0 z)))) (if (<= y -6.3e-30) t_1 (if (<= y 3.5e+26) (/ (- 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 <= -6.3e-30) {
tmp = t_1;
} else if (y <= 3.5e+26) {
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 <= (-6.3d-30)) then
tmp = t_1
else if (y <= 3.5d+26) 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 <= -6.3e-30) {
tmp = t_1;
} else if (y <= 3.5e+26) {
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 <= -6.3e-30: tmp = t_1 elif y <= 3.5e+26: 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 <= -6.3e-30) tmp = t_1; elseif (y <= 3.5e+26) 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 <= -6.3e-30) tmp = t_1; elseif (y <= 3.5e+26) 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, -6.3e-30], t$95$1, If[LessEqual[y, 3.5e+26], 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 -6.3 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+26}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.29999999999999982e-30 or 3.4999999999999999e26 < y Initial program 58.2%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6458.0
Applied rewrites58.0%
if -6.29999999999999982e-30 < y < 3.4999999999999999e26Initial program 82.4%
Taylor expanded in y around 0
lower-/.f64N/A
lower--.f6457.3
Applied rewrites57.3%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ x (- 1.0 z)))) (if (<= y -5.6e-39) t_1 (if (<= y 1.15e-53) (/ t 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 <= -5.6e-39) {
tmp = t_1;
} else if (y <= 1.15e-53) {
tmp = t / 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 <= (-5.6d-39)) then
tmp = t_1
else if (y <= 1.15d-53) then
tmp = t / 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 <= -5.6e-39) {
tmp = t_1;
} else if (y <= 1.15e-53) {
tmp = t / 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 <= -5.6e-39: tmp = t_1 elif y <= 1.15e-53: tmp = t / 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 <= -5.6e-39) tmp = t_1; elseif (y <= 1.15e-53) tmp = Float64(t / 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 <= -5.6e-39) tmp = t_1; elseif (y <= 1.15e-53) tmp = t / 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, -5.6e-39], t$95$1, If[LessEqual[y, 1.15e-53], N[(t / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -5.6 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-53}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.6000000000000003e-39 or 1.1500000000000001e-53 < y Initial program 60.4%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6455.3
Applied rewrites55.3%
if -5.6000000000000003e-39 < y < 1.1500000000000001e-53Initial program 82.7%
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.f6482.7
Applied rewrites82.7%
Taylor expanded in a around 0
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6452.6
Applied rewrites52.6%
Taylor expanded in y around 0
Applied rewrites35.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2.25e-73) (/ t b) (if (<= z 5.2e-62) (/ x 1.0) (- (/ a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.25e-73) {
tmp = t / b;
} else if (z <= 5.2e-62) {
tmp = x / 1.0;
} else {
tmp = -(a / b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-2.25d-73)) then
tmp = t / b
else if (z <= 5.2d-62) then
tmp = x / 1.0d0
else
tmp = -(a / b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.25e-73) {
tmp = t / b;
} else if (z <= 5.2e-62) {
tmp = x / 1.0;
} else {
tmp = -(a / b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.25e-73: tmp = t / b elif z <= 5.2e-62: tmp = x / 1.0 else: tmp = -(a / b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.25e-73) tmp = Float64(t / b); elseif (z <= 5.2e-62) tmp = Float64(x / 1.0); else tmp = Float64(-Float64(a / b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.25e-73) tmp = t / b; elseif (z <= 5.2e-62) tmp = x / 1.0; else tmp = -(a / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.25e-73], N[(t / b), $MachinePrecision], If[LessEqual[z, 5.2e-62], N[(x / 1.0), $MachinePrecision], (-N[(a / b), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{-73}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-62}:\\
\;\;\;\;\frac{x}{1}\\
\mathbf{else}:\\
\;\;\;\;-\frac{a}{b}\\
\end{array}
\end{array}
if z < -2.25e-73Initial program 58.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.f6458.1
Applied rewrites58.1%
Taylor expanded in a around 0
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6444.5
Applied rewrites44.5%
Taylor expanded in y around 0
Applied rewrites36.4%
if -2.25e-73 < z < 5.1999999999999999e-62Initial program 88.0%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6458.7
Applied rewrites58.7%
Taylor expanded in z around 0
Applied rewrites58.7%
if 5.1999999999999999e-62 < z Initial program 62.8%
Taylor expanded in t around 0
lower-/.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6439.5
Applied rewrites39.5%
Taylor expanded in y around 0
Applied rewrites25.0%
Final simplification41.1%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2.25e-73) (/ t b) (if (<= z 3.35e-62) (/ x 1.0) (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.25e-73) {
tmp = t / b;
} else if (z <= 3.35e-62) {
tmp = x / 1.0;
} else {
tmp = t / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-2.25d-73)) then
tmp = t / b
else if (z <= 3.35d-62) then
tmp = x / 1.0d0
else
tmp = t / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.25e-73) {
tmp = t / b;
} else if (z <= 3.35e-62) {
tmp = x / 1.0;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.25e-73: tmp = t / b elif z <= 3.35e-62: tmp = x / 1.0 else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.25e-73) tmp = Float64(t / b); elseif (z <= 3.35e-62) tmp = Float64(x / 1.0); else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.25e-73) tmp = t / b; elseif (z <= 3.35e-62) tmp = x / 1.0; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.25e-73], N[(t / b), $MachinePrecision], If[LessEqual[z, 3.35e-62], N[(x / 1.0), $MachinePrecision], N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{-73}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 3.35 \cdot 10^{-62}:\\
\;\;\;\;\frac{x}{1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -2.25e-73 or 3.34999999999999996e-62 < z Initial program 60.5%
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.f6460.6
Applied rewrites60.6%
Taylor expanded in a around 0
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6441.1
Applied rewrites41.1%
Taylor expanded in y around 0
Applied rewrites29.2%
if -2.25e-73 < z < 3.34999999999999996e-62Initial program 88.0%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6458.7
Applied rewrites58.7%
Taylor expanded in z around 0
Applied rewrites58.7%
(FPCore (x y z t a b) :precision binary64 (fma x z x))
double code(double x, double y, double z, double t, double a, double b) {
return fma(x, z, x);
}
function code(x, y, z, t, a, b) return fma(x, z, x) end
code[x_, y_, z_, t_, a_, b_] := N[(x * z + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, z, x\right)
\end{array}
Initial program 70.8%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6434.5
Applied rewrites34.5%
Taylor expanded in z around 0
Applied rewrites26.2%
(FPCore (x y z t a b) :precision binary64 (* x z))
double code(double x, double y, double z, double t, double a, double b) {
return x * 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 = x * z
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * z;
}
def code(x, y, z, t, a, b): return x * z
function code(x, y, z, t, a, b) return Float64(x * z) end
function tmp = code(x, y, z, t, a, b) tmp = x * z; end
code[x_, y_, z_, t_, a_, b_] := N[(x * z), $MachinePrecision]
\begin{array}{l}
\\
x \cdot z
\end{array}
Initial program 70.8%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6434.5
Applied rewrites34.5%
Taylor expanded in z around 0
Applied rewrites26.2%
Taylor expanded in z around inf
Applied rewrites4.7%
Final simplification4.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 2024219
(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)))))