
(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 16 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 -4.3e+15)
t_3
(if (<= z 13000000.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 <= -4.3e+15) {
tmp = t_3;
} else if (z <= 13000000.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 <= -4.3e+15) tmp = t_3; elseif (z <= 13000000.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, -4.3e+15], t$95$3, If[LessEqual[z, 13000000.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 -4.3 \cdot 10^{+15}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 13000000:\\
\;\;\;\;\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 < -4.3e15 or 1.3e7 < z Initial program 48.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--.f6449.1
Applied rewrites49.1%
Taylor expanded in z around inf
Applied rewrites90.1%
if -4.3e15 < z < 1.3e7Initial program 87.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--.f6499.8
Applied rewrites99.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* z (- t a)) (* x y)) (+ y (* z (- b y)))))
(t_2 (fma x (/ y (fma z (- b y) y)) (/ (- t a) (- b y)))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 -2e-186)
t_1
(if (<= t_1 0.0) t_2 (if (<= t_1 1e+270) t_1 t_2))))))
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 = fma(x, (y / fma(z, (b - y), y)), ((t - a) / (b - y)));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= -2e-186) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = t_2;
} else if (t_1 <= 1e+270) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = fma(x, Float64(y / fma(z, Float64(b - y), y)), Float64(Float64(t - a) / Float64(b - y))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= -2e-186) tmp = t_1; elseif (t_1 <= 0.0) tmp = t_2; elseif (t_1 <= 1e+270) tmp = t_1; else tmp = t_2; 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[(x * N[(y / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -2e-186], t$95$1, If[LessEqual[t$95$1, 0.0], t$95$2, If[LessEqual[t$95$1, 1e+270], t$95$1, t$95$2]]]]]]
\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 := \mathsf{fma}\left(x, \frac{y}{\mathsf{fma}\left(z, b - y, y\right)}, \frac{t - a}{b - y}\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-186}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{+270}:\\
\;\;\;\;t\_1\\
\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)))) < -inf.0 or -1.9999999999999998e-186 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or 1e270 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 28.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--.f6445.1
Applied rewrites45.1%
Taylor expanded in z around inf
Applied rewrites88.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.9999999999999998e-186 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1e270Initial program 99.6%
Final simplification94.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y)))
(t_2 (/ (+ (* z (- t a)) (* x y)) (+ y (* z (- b y)))))
(t_3 (fma x (/ 1.0 (- 1.0 z)) t_1)))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 -5e-308)
t_2
(if (<= t_2 0.0) t_1 (if (<= t_2 1e+270) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
double t_3 = fma(x, (1.0 / (1.0 - z)), t_1);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= -5e-308) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1;
} else if (t_2 <= 1e+270) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) t_2 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y + Float64(z * Float64(b - y)))) t_3 = fma(x, Float64(1.0 / Float64(1.0 - z)), t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= -5e-308) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1; elseif (t_2 <= 1e+270) tmp = t_2; else tmp = t_3; 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]}, 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]}, Block[{t$95$3 = N[(x * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -5e-308], t$95$2, If[LessEqual[t$95$2, 0.0], t$95$1, If[LessEqual[t$95$2, 1e+270], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := \frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)}\\
t_3 := \mathsf{fma}\left(x, \frac{1}{1 - z}, t\_1\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-308}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+270}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 1e270 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 21.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--.f6444.5
Applied rewrites44.5%
Taylor expanded in z around inf
Applied rewrites91.6%
Taylor expanded in y around inf
Applied rewrites88.0%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.99999999999999955e-308 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1e270Initial program 99.7%
if -4.99999999999999955e-308 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 33.6%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6474.1
Applied rewrites74.1%
Final simplification93.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 -5.2e+16)
t_2
(if (<= z 8.5e-8)
(/ (fma z t (* x y)) t_1)
(if (<= z 3.9e+68)
(/ (fma z (- a) (* x y)) t_1)
(fma x (/ 1.0 (- 1.0 z)) 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 <= -5.2e+16) {
tmp = t_2;
} else if (z <= 8.5e-8) {
tmp = fma(z, t, (x * y)) / t_1;
} else if (z <= 3.9e+68) {
tmp = fma(z, -a, (x * y)) / t_1;
} else {
tmp = fma(x, (1.0 / (1.0 - z)), 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 <= -5.2e+16) tmp = t_2; elseif (z <= 8.5e-8) tmp = Float64(fma(z, t, Float64(x * y)) / t_1); elseif (z <= 3.9e+68) tmp = Float64(fma(z, Float64(-a), Float64(x * y)) / t_1); else tmp = fma(x, Float64(1.0 / Float64(1.0 - z)), 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, -5.2e+16], t$95$2, If[LessEqual[z, 8.5e-8], N[(N[(z * t + N[(x * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z, 3.9e+68], N[(N[(z * (-a) + N[(x * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], N[(x * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]]]]]]
\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 -5.2 \cdot 10^{+16}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-8}:\\
\;\;\;\;\frac{\mathsf{fma}\left(z, t, x \cdot y\right)}{t\_1}\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{+68}:\\
\;\;\;\;\frac{\mathsf{fma}\left(z, -a, x \cdot y\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{1}{1 - z}, t\_2\right)\\
\end{array}
\end{array}
if z < -5.2e16Initial program 39.3%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.0
Applied rewrites84.0%
if -5.2e16 < z < 8.49999999999999935e-8Initial program 86.5%
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.0
Applied rewrites71.0%
if 8.49999999999999935e-8 < z < 3.90000000000000019e68Initial program 99.7%
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--.f6477.4
Applied rewrites77.4%
if 3.90000000000000019e68 < z Initial program 45.4%
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--.f6449.3
Applied rewrites49.3%
Taylor expanded in z around inf
Applied rewrites92.1%
Taylor expanded in y around inf
Applied rewrites89.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* z (- t a)) (fma z (- b y) y))) (t_2 (/ (- t a) (- b y))))
(if (<= z -23000000000000.0)
t_2
(if (<= z -4.6e-138)
t_1
(if (<= z 4.2e-152) (fma z x x) (if (<= z 13000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (t - a)) / fma(z, (b - y), y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -23000000000000.0) {
tmp = t_2;
} else if (z <= -4.6e-138) {
tmp = t_1;
} else if (z <= 4.2e-152) {
tmp = fma(z, x, x);
} else if (z <= 13000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(t - a)) / fma(z, Float64(b - y), y)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -23000000000000.0) tmp = t_2; elseif (z <= -4.6e-138) tmp = t_1; elseif (z <= 4.2e-152) tmp = fma(z, x, x); elseif (z <= 13000000.0) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -23000000000000.0], t$95$2, If[LessEqual[z, -4.6e-138], t$95$1, If[LessEqual[z, 4.2e-152], N[(z * x + x), $MachinePrecision], If[LessEqual[z, 13000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(t - a\right)}{\mathsf{fma}\left(z, b - y, y\right)}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -23000000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{-138}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-152}:\\
\;\;\;\;\mathsf{fma}\left(z, x, x\right)\\
\mathbf{elif}\;z \leq 13000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.3e13 or 1.3e7 < z Initial program 47.9%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6480.3
Applied rewrites80.3%
if -2.3e13 < z < -4.5999999999999998e-138 or 4.19999999999999998e-152 < z < 1.3e7Initial program 90.4%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f6463.7
Applied rewrites63.7%
if -4.5999999999999998e-138 < z < 4.19999999999999998e-152Initial program 83.5%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6468.0
Applied rewrites68.0%
Taylor expanded in z around 0
Applied rewrites68.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -5.2e+16)
t_1
(if (<= z 2.2e-7) (/ (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 <= -5.2e+16) {
tmp = t_1;
} else if (z <= 2.2e-7) {
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 <= -5.2e+16) tmp = t_1; elseif (z <= 2.2e-7) 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, -5.2e+16], t$95$1, If[LessEqual[z, 2.2e-7], 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 -5.2 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-7}:\\
\;\;\;\;\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.2e16 or 2.2000000000000001e-7 < z Initial program 50.7%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6480.3
Applied rewrites80.3%
if -5.2e16 < z < 2.2000000000000001e-7Initial program 86.5%
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.0
Applied rewrites71.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (- t a) (- b y)))) (if (<= z -2.8e-33) t_1 (if (<= z 7e-50) (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 <= -2.8e-33) {
tmp = t_1;
} else if (z <= 7e-50) {
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 <= -2.8e-33) tmp = t_1; elseif (z <= 7e-50) 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, -2.8e-33], t$95$1, If[LessEqual[z, 7e-50], 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 -2.8 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-50}:\\
\;\;\;\;\mathsf{fma}\left(z, x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.8e-33 or 6.99999999999999993e-50 < z Initial program 57.8%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6471.0
Applied rewrites71.0%
if -2.8e-33 < z < 6.99999999999999993e-50Initial program 86.2%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6453.6
Applied rewrites53.6%
Taylor expanded in z around 0
Applied rewrites53.6%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ x (- 1.0 z)))) (if (<= y -2.6e+135) t_1 (if (<= y 7.5e+54) (/ (- 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.6e+135) {
tmp = t_1;
} else if (y <= 7.5e+54) {
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.6d+135)) then
tmp = t_1
else if (y <= 7.5d+54) 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.6e+135) {
tmp = t_1;
} else if (y <= 7.5e+54) {
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.6e+135: tmp = t_1 elif y <= 7.5e+54: 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.6e+135) tmp = t_1; elseif (y <= 7.5e+54) 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.6e+135) tmp = t_1; elseif (y <= 7.5e+54) 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.6e+135], t$95$1, If[LessEqual[y, 7.5e+54], 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.6 \cdot 10^{+135}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+54}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.6e135 or 7.50000000000000042e54 < y Initial program 47.1%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6457.2
Applied rewrites57.2%
if -2.6e135 < y < 7.50000000000000042e54Initial program 79.8%
Taylor expanded in y around 0
lower-/.f64N/A
lower--.f6451.2
Applied rewrites51.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -7e-33) (/ t (- b y)) (if (<= z 2.9e-10) (fma z x x) (/ a (- y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7e-33) {
tmp = t / (b - y);
} else if (z <= 2.9e-10) {
tmp = fma(z, x, x);
} else {
tmp = a / (y - b);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -7e-33) tmp = Float64(t / Float64(b - y)); elseif (z <= 2.9e-10) tmp = fma(z, x, x); else tmp = Float64(a / Float64(y - b)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -7e-33], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e-10], N[(z * x + x), $MachinePrecision], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{-33}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-10}:\\
\;\;\;\;\mathsf{fma}\left(z, x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y - b}\\
\end{array}
\end{array}
if z < -6.9999999999999997e-33Initial program 49.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--.f6433.5
Applied rewrites33.5%
Taylor expanded in z around inf
Applied rewrites43.9%
if -6.9999999999999997e-33 < z < 2.89999999999999981e-10Initial program 86.4%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6449.5
Applied rewrites49.5%
Taylor expanded in z around 0
Applied rewrites49.5%
if 2.89999999999999981e-10 < z Initial program 60.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--.f6435.8
Applied rewrites35.8%
Taylor expanded in z around inf
Applied rewrites49.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ a (- y b)))) (if (<= z -1.45e-21) t_1 (if (<= z 2.9e-10) (fma z x x) 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.45e-21) {
tmp = t_1;
} else if (z <= 2.9e-10) {
tmp = fma(z, x, x);
} 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.45e-21) tmp = t_1; elseif (z <= 2.9e-10) 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[(a / N[(y - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e-21], t$95$1, If[LessEqual[z, 2.9e-10], N[(z * x + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{y - b}\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-10}:\\
\;\;\;\;\mathsf{fma}\left(z, x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.45e-21 or 2.89999999999999981e-10 < z Initial program 53.8%
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--.f6427.4
Applied rewrites27.4%
Taylor expanded in z around inf
Applied rewrites42.0%
if -1.45e-21 < z < 2.89999999999999981e-10Initial program 86.7%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6448.7
Applied rewrites48.7%
Taylor expanded in z around 0
Applied rewrites48.7%
(FPCore (x y z t a b) :precision binary64 (if (<= z -3.2e-29) (/ t b) (if (<= z 2.9e-10) (fma z x x) (/ (- a) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.2e-29) {
tmp = t / b;
} else if (z <= 2.9e-10) {
tmp = fma(z, x, x);
} else {
tmp = -a / b;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.2e-29) tmp = Float64(t / b); elseif (z <= 2.9e-10) tmp = fma(z, x, x); else tmp = Float64(Float64(-a) / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.2e-29], N[(t / b), $MachinePrecision], If[LessEqual[z, 2.9e-10], N[(z * x + x), $MachinePrecision], N[((-a) / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{-29}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-10}:\\
\;\;\;\;\mathsf{fma}\left(z, x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-a}{b}\\
\end{array}
\end{array}
if z < -3.2e-29Initial program 49.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--.f6433.5
Applied rewrites33.5%
Taylor expanded in y around 0
Applied rewrites27.6%
if -3.2e-29 < z < 2.89999999999999981e-10Initial program 86.4%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6449.5
Applied rewrites49.5%
Taylor expanded in z around 0
Applied rewrites49.5%
if 2.89999999999999981e-10 < z Initial program 60.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--.f6435.8
Applied rewrites35.8%
Taylor expanded in b around inf
Applied rewrites33.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -8.2e-35) (/ x 1.0) (if (<= y 1.46e-36) (/ t b) (/ x 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.2e-35) {
tmp = x / 1.0;
} else if (y <= 1.46e-36) {
tmp = t / b;
} else {
tmp = x / 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-8.2d-35)) then
tmp = x / 1.0d0
else if (y <= 1.46d-36) then
tmp = t / b
else
tmp = x / 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.2e-35) {
tmp = x / 1.0;
} else if (y <= 1.46e-36) {
tmp = t / b;
} else {
tmp = x / 1.0;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -8.2e-35: tmp = x / 1.0 elif y <= 1.46e-36: tmp = t / b else: tmp = x / 1.0 return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -8.2e-35) tmp = Float64(x / 1.0); elseif (y <= 1.46e-36) tmp = Float64(t / b); else tmp = Float64(x / 1.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -8.2e-35) tmp = x / 1.0; elseif (y <= 1.46e-36) tmp = t / b; else tmp = x / 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -8.2e-35], N[(x / 1.0), $MachinePrecision], If[LessEqual[y, 1.46e-36], N[(t / b), $MachinePrecision], N[(x / 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{-35}:\\
\;\;\;\;\frac{x}{1}\\
\mathbf{elif}\;y \leq 1.46 \cdot 10^{-36}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1}\\
\end{array}
\end{array}
if y < -8.20000000000000052e-35 or 1.4599999999999999e-36 < y Initial program 55.6%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6443.7
Applied rewrites43.7%
Taylor expanded in z around 0
Applied rewrites34.2%
if -8.20000000000000052e-35 < y < 1.4599999999999999e-36Initial program 84.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--.f6458.0
Applied rewrites58.0%
Taylor expanded in y around 0
Applied rewrites39.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -8.2e-35) (fma z x x) (if (<= y 1.46e-36) (/ t b) (fma z x x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.2e-35) {
tmp = fma(z, x, x);
} else if (y <= 1.46e-36) {
tmp = t / b;
} else {
tmp = fma(z, x, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -8.2e-35) tmp = fma(z, x, x); elseif (y <= 1.46e-36) tmp = Float64(t / b); else tmp = fma(z, x, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -8.2e-35], N[(z * x + x), $MachinePrecision], If[LessEqual[y, 1.46e-36], N[(t / b), $MachinePrecision], N[(z * x + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{-35}:\\
\;\;\;\;\mathsf{fma}\left(z, x, x\right)\\
\mathbf{elif}\;y \leq 1.46 \cdot 10^{-36}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, x, x\right)\\
\end{array}
\end{array}
if y < -8.20000000000000052e-35 or 1.4599999999999999e-36 < y Initial program 55.6%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6443.7
Applied rewrites43.7%
Taylor expanded in z around 0
Applied rewrites33.6%
if -8.20000000000000052e-35 < y < 1.4599999999999999e-36Initial program 84.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--.f6458.0
Applied rewrites58.0%
Taylor expanded in y around 0
Applied rewrites39.1%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.55e-21) (/ a y) (if (<= z 4.8e-7) (fma z x x) (/ a y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.55e-21) {
tmp = a / y;
} else if (z <= 4.8e-7) {
tmp = fma(z, x, x);
} else {
tmp = a / y;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.55e-21) tmp = Float64(a / y); elseif (z <= 4.8e-7) tmp = fma(z, x, x); else tmp = Float64(a / y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.55e-21], N[(a / y), $MachinePrecision], If[LessEqual[z, 4.8e-7], N[(z * x + x), $MachinePrecision], N[(a / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{-21}:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-7}:\\
\;\;\;\;\mathsf{fma}\left(z, x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -1.5499999999999999e-21 or 4.79999999999999957e-7 < z Initial program 53.8%
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--.f6427.4
Applied rewrites27.4%
Taylor expanded in z around inf
Applied rewrites42.0%
Taylor expanded in y around inf
Applied rewrites17.5%
if -1.5499999999999999e-21 < z < 4.79999999999999957e-7Initial program 86.7%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6448.7
Applied rewrites48.7%
Taylor expanded in z around 0
Applied rewrites48.7%
(FPCore (x y z t a b) :precision binary64 (fma z x x))
double code(double x, double y, double z, double t, double a, double b) {
return fma(z, x, x);
}
function code(x, y, z, t, a, b) return fma(z, x, x) end
code[x_, y_, z_, t_, a_, b_] := N[(z * x + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(z, x, x\right)
\end{array}
Initial program 68.6%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6430.4
Applied rewrites30.4%
Taylor expanded in z around 0
Applied rewrites23.9%
(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 68.6%
Taylor expanded in y around inf
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f6430.4
Applied rewrites30.4%
Taylor expanded in z around 0
Applied rewrites23.9%
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 2024220
(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)))))