
(FPCore (x y z t) :precision binary64 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
def code(x, y, z, t): return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
def code(x, y, z, t): return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (/ x (+ x 1.0)) (/ (- (/ y (+ x 1.0)) (/ x (fma x z z))) t))))
(if (<= z -6.5e+173)
t_1
(if (<= z 3.9e+112)
(/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))
t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (x / (x + 1.0)) + (((y / (x + 1.0)) - (x / fma(x, z, z))) / t);
double tmp;
if (z <= -6.5e+173) {
tmp = t_1;
} else if (z <= 3.9e+112) {
tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x / Float64(x + 1.0)) + Float64(Float64(Float64(y / Float64(x + 1.0)) - Float64(x / fma(x, z, z))) / t)) tmp = 0.0 if (z <= -6.5e+173) tmp = t_1; elseif (z <= 3.9e+112) tmp = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] - N[(x / N[(x * z + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e+173], t$95$1, If[LessEqual[z, 3.9e+112], N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + 1} + \frac{\frac{y}{x + 1} - \frac{x}{\mathsf{fma}\left(x, z, z\right)}}{t}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+173}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{+112}:\\
\;\;\;\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.4999999999999997e173 or 3.89999999999999968e112 < z Initial program 66.1%
Taylor expanded in t around -inf
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified88.6%
if -6.4999999999999997e173 < z < 3.89999999999999968e112Initial program 99.3%
Final simplification95.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z t) x))
(t_2 (/ (+ x (/ (- (* z y) x) t_1)) (+ x 1.0)))
(t_3 (/ (* z y) (* (+ x 1.0) t_1))))
(if (<= t_2 -2e+254)
(/ y (fma x t t))
(if (<= t_2 -1000000000.0)
t_3
(if (<= t_2 2e-63)
(+ x (/ (fma y z (- x)) (* z t)))
(if (<= t_2 2.0)
(/ (- x (/ x (fma z t (- x)))) (+ x 1.0))
(if (<= t_2 1e+205) t_3 (/ (+ x (/ y t)) (+ x 1.0)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((z * y) - x) / t_1)) / (x + 1.0);
double t_3 = (z * y) / ((x + 1.0) * t_1);
double tmp;
if (t_2 <= -2e+254) {
tmp = y / fma(x, t, t);
} else if (t_2 <= -1000000000.0) {
tmp = t_3;
} else if (t_2 <= 2e-63) {
tmp = x + (fma(y, z, -x) / (z * t));
} else if (t_2 <= 2.0) {
tmp = (x - (x / fma(z, t, -x))) / (x + 1.0);
} else if (t_2 <= 1e+205) {
tmp = t_3;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(z * t) - x) t_2 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / t_1)) / Float64(x + 1.0)) t_3 = Float64(Float64(z * y) / Float64(Float64(x + 1.0) * t_1)) tmp = 0.0 if (t_2 <= -2e+254) tmp = Float64(y / fma(x, t, t)); elseif (t_2 <= -1000000000.0) tmp = t_3; elseif (t_2 <= 2e-63) tmp = Float64(x + Float64(fma(y, z, Float64(-x)) / Float64(z * t))); elseif (t_2 <= 2.0) tmp = Float64(Float64(x - Float64(x / fma(z, t, Float64(-x)))) / Float64(x + 1.0)); elseif (t_2 <= 1e+205) tmp = t_3; else tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * y), $MachinePrecision] / N[(N[(x + 1.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+254], N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1000000000.0], t$95$3, If[LessEqual[t$95$2, 2e-63], N[(x + N[(N[(y * z + (-x)), $MachinePrecision] / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2.0], N[(N[(x - N[(x / N[(z * t + (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+205], t$95$3, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t - x\\
t_2 := \frac{x + \frac{z \cdot y - x}{t\_1}}{x + 1}\\
t_3 := \frac{z \cdot y}{\left(x + 1\right) \cdot t\_1}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+254}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
\mathbf{elif}\;t\_2 \leq -1000000000:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-63}:\\
\;\;\;\;x + \frac{\mathsf{fma}\left(y, z, -x\right)}{z \cdot t}\\
\mathbf{elif}\;t\_2 \leq 2:\\
\;\;\;\;\frac{x - \frac{x}{\mathsf{fma}\left(z, t, -x\right)}}{x + 1}\\
\mathbf{elif}\;t\_2 \leq 10^{+205}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.9999999999999999e254Initial program 31.1%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6461.7
Simplified61.7%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
accelerator-lowering-fma.f6474.1
Simplified74.1%
if -1.9999999999999999e254 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1e9 or 2 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000002e205Initial program 99.5%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6496.1
Simplified96.1%
if -1e9 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2.00000000000000013e-63Initial program 93.6%
Taylor expanded in t around inf
/-lowering-/.f64N/A
sub-negN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6493.1
Simplified93.1%
Taylor expanded in x around 0
Simplified93.1%
if 2.00000000000000013e-63 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2Initial program 100.0%
Taylor expanded in y around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6499.1
Simplified99.1%
sub-negN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6499.1
Applied egg-rr99.1%
if 1.00000000000000002e205 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 31.1%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6478.3
Simplified78.3%
Final simplification94.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z t) x))
(t_2 (/ (+ x (/ (- (* z y) x) t_1)) (+ x 1.0)))
(t_3 (/ (* z y) (* (+ x 1.0) t_1))))
(if (<= t_2 -2e+254)
(/ y (fma x t t))
(if (<= t_2 -1000000000.0)
t_3
(if (<= t_2 2e-63)
(fma (/ y t) (- 1.0 x) x)
(if (<= t_2 2.0)
(/ (- x (/ x (fma z t (- x)))) (+ x 1.0))
(if (<= t_2 1e+205) t_3 (/ (+ x (/ y t)) (+ x 1.0)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((z * y) - x) / t_1)) / (x + 1.0);
double t_3 = (z * y) / ((x + 1.0) * t_1);
double tmp;
if (t_2 <= -2e+254) {
tmp = y / fma(x, t, t);
} else if (t_2 <= -1000000000.0) {
tmp = t_3;
} else if (t_2 <= 2e-63) {
tmp = fma((y / t), (1.0 - x), x);
} else if (t_2 <= 2.0) {
tmp = (x - (x / fma(z, t, -x))) / (x + 1.0);
} else if (t_2 <= 1e+205) {
tmp = t_3;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(z * t) - x) t_2 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / t_1)) / Float64(x + 1.0)) t_3 = Float64(Float64(z * y) / Float64(Float64(x + 1.0) * t_1)) tmp = 0.0 if (t_2 <= -2e+254) tmp = Float64(y / fma(x, t, t)); elseif (t_2 <= -1000000000.0) tmp = t_3; elseif (t_2 <= 2e-63) tmp = fma(Float64(y / t), Float64(1.0 - x), x); elseif (t_2 <= 2.0) tmp = Float64(Float64(x - Float64(x / fma(z, t, Float64(-x)))) / Float64(x + 1.0)); elseif (t_2 <= 1e+205) tmp = t_3; else tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * y), $MachinePrecision] / N[(N[(x + 1.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+254], N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1000000000.0], t$95$3, If[LessEqual[t$95$2, 2e-63], N[(N[(y / t), $MachinePrecision] * N[(1.0 - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$2, 2.0], N[(N[(x - N[(x / N[(z * t + (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+205], t$95$3, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t - x\\
t_2 := \frac{x + \frac{z \cdot y - x}{t\_1}}{x + 1}\\
t_3 := \frac{z \cdot y}{\left(x + 1\right) \cdot t\_1}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+254}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
\mathbf{elif}\;t\_2 \leq -1000000000:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-63}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{t}, 1 - x, x\right)\\
\mathbf{elif}\;t\_2 \leq 2:\\
\;\;\;\;\frac{x - \frac{x}{\mathsf{fma}\left(z, t, -x\right)}}{x + 1}\\
\mathbf{elif}\;t\_2 \leq 10^{+205}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.9999999999999999e254Initial program 31.1%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6461.7
Simplified61.7%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
accelerator-lowering-fma.f6474.1
Simplified74.1%
if -1.9999999999999999e254 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1e9 or 2 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000002e205Initial program 99.5%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6496.1
Simplified96.1%
if -1e9 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2.00000000000000013e-63Initial program 93.6%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6485.7
Simplified85.7%
Taylor expanded in x around 0
+-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-lft-inN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
associate-/l*N/A
mul-1-negN/A
*-rgt-identityN/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
associate-/l*N/A
*-lft-identityN/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6485.7
Simplified85.7%
if 2.00000000000000013e-63 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2Initial program 100.0%
Taylor expanded in y around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6499.1
Simplified99.1%
sub-negN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
neg-lowering-neg.f6499.1
Applied egg-rr99.1%
if 1.00000000000000002e205 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 31.1%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6478.3
Simplified78.3%
Final simplification92.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z t) x))
(t_2 (/ (+ x (/ (- (* z y) x) t_1)) (+ x 1.0)))
(t_3 (/ (* z y) (* (+ x 1.0) t_1))))
(if (<= t_2 -2e+254)
(/ y (fma x t t))
(if (<= t_2 -1000000000.0)
t_3
(if (<= t_2 2e-63)
(fma (/ y t) (- 1.0 x) x)
(if (<= t_2 2.0)
(/ (+ x (/ x (- x (* z t)))) (+ x 1.0))
(if (<= t_2 1e+205) t_3 (/ (+ x (/ y t)) (+ x 1.0)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((z * y) - x) / t_1)) / (x + 1.0);
double t_3 = (z * y) / ((x + 1.0) * t_1);
double tmp;
if (t_2 <= -2e+254) {
tmp = y / fma(x, t, t);
} else if (t_2 <= -1000000000.0) {
tmp = t_3;
} else if (t_2 <= 2e-63) {
tmp = fma((y / t), (1.0 - x), x);
} else if (t_2 <= 2.0) {
tmp = (x + (x / (x - (z * t)))) / (x + 1.0);
} else if (t_2 <= 1e+205) {
tmp = t_3;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(z * t) - x) t_2 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / t_1)) / Float64(x + 1.0)) t_3 = Float64(Float64(z * y) / Float64(Float64(x + 1.0) * t_1)) tmp = 0.0 if (t_2 <= -2e+254) tmp = Float64(y / fma(x, t, t)); elseif (t_2 <= -1000000000.0) tmp = t_3; elseif (t_2 <= 2e-63) tmp = fma(Float64(y / t), Float64(1.0 - x), x); elseif (t_2 <= 2.0) tmp = Float64(Float64(x + Float64(x / Float64(x - Float64(z * t)))) / Float64(x + 1.0)); elseif (t_2 <= 1e+205) tmp = t_3; else tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * y), $MachinePrecision] / N[(N[(x + 1.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+254], N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1000000000.0], t$95$3, If[LessEqual[t$95$2, 2e-63], N[(N[(y / t), $MachinePrecision] * N[(1.0 - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$2, 2.0], N[(N[(x + N[(x / N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+205], t$95$3, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t - x\\
t_2 := \frac{x + \frac{z \cdot y - x}{t\_1}}{x + 1}\\
t_3 := \frac{z \cdot y}{\left(x + 1\right) \cdot t\_1}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+254}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
\mathbf{elif}\;t\_2 \leq -1000000000:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-63}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{t}, 1 - x, x\right)\\
\mathbf{elif}\;t\_2 \leq 2:\\
\;\;\;\;\frac{x + \frac{x}{x - z \cdot t}}{x + 1}\\
\mathbf{elif}\;t\_2 \leq 10^{+205}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.9999999999999999e254Initial program 31.1%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6461.7
Simplified61.7%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
accelerator-lowering-fma.f6474.1
Simplified74.1%
if -1.9999999999999999e254 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1e9 or 2 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000002e205Initial program 99.5%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6496.1
Simplified96.1%
if -1e9 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2.00000000000000013e-63Initial program 93.6%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6485.7
Simplified85.7%
Taylor expanded in x around 0
+-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-lft-inN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
associate-/l*N/A
mul-1-negN/A
*-rgt-identityN/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
associate-/l*N/A
*-lft-identityN/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6485.7
Simplified85.7%
if 2.00000000000000013e-63 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2Initial program 100.0%
Taylor expanded in y around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6499.1
Simplified99.1%
if 1.00000000000000002e205 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 31.1%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6478.3
Simplified78.3%
Final simplification92.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z t) x))
(t_2 (/ (+ x (/ (- (* z y) x) t_1)) (+ x 1.0)))
(t_3 (/ (* z y) (* (+ x 1.0) t_1)))
(t_4 (/ (+ x (/ y t)) (+ x 1.0))))
(if (<= t_2 -2e+254)
(/ y (fma x t t))
(if (<= t_2 -1000000000.0)
t_3
(if (<= t_2 0.9999999999999853)
t_4
(if (<= t_2 20.0)
(/ (- x (fma y (/ z x) -1.0)) (+ x 1.0))
(if (<= t_2 1e+205) t_3 t_4)))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((z * y) - x) / t_1)) / (x + 1.0);
double t_3 = (z * y) / ((x + 1.0) * t_1);
double t_4 = (x + (y / t)) / (x + 1.0);
double tmp;
if (t_2 <= -2e+254) {
tmp = y / fma(x, t, t);
} else if (t_2 <= -1000000000.0) {
tmp = t_3;
} else if (t_2 <= 0.9999999999999853) {
tmp = t_4;
} else if (t_2 <= 20.0) {
tmp = (x - fma(y, (z / x), -1.0)) / (x + 1.0);
} else if (t_2 <= 1e+205) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(z * t) - x) t_2 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / t_1)) / Float64(x + 1.0)) t_3 = Float64(Float64(z * y) / Float64(Float64(x + 1.0) * t_1)) t_4 = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)) tmp = 0.0 if (t_2 <= -2e+254) tmp = Float64(y / fma(x, t, t)); elseif (t_2 <= -1000000000.0) tmp = t_3; elseif (t_2 <= 0.9999999999999853) tmp = t_4; elseif (t_2 <= 20.0) tmp = Float64(Float64(x - fma(y, Float64(z / x), -1.0)) / Float64(x + 1.0)); elseif (t_2 <= 1e+205) tmp = t_3; else tmp = t_4; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * y), $MachinePrecision] / N[(N[(x + 1.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+254], N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1000000000.0], t$95$3, If[LessEqual[t$95$2, 0.9999999999999853], t$95$4, If[LessEqual[t$95$2, 20.0], N[(N[(x - N[(y * N[(z / x), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+205], t$95$3, t$95$4]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t - x\\
t_2 := \frac{x + \frac{z \cdot y - x}{t\_1}}{x + 1}\\
t_3 := \frac{z \cdot y}{\left(x + 1\right) \cdot t\_1}\\
t_4 := \frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+254}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
\mathbf{elif}\;t\_2 \leq -1000000000:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 0.9999999999999853:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_2 \leq 20:\\
\;\;\;\;\frac{x - \mathsf{fma}\left(y, \frac{z}{x}, -1\right)}{x + 1}\\
\mathbf{elif}\;t\_2 \leq 10^{+205}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.9999999999999999e254Initial program 31.1%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6461.7
Simplified61.7%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
accelerator-lowering-fma.f6474.1
Simplified74.1%
if -1.9999999999999999e254 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1e9 or 20 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000002e205Initial program 99.5%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6497.8
Simplified97.8%
if -1e9 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 0.99999999999998535 or 1.00000000000000002e205 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 75.8%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6480.7
Simplified80.7%
if 0.99999999999998535 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 20Initial program 100.0%
Taylor expanded in t around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
div-subN/A
sub-negN/A
associate-/l*N/A
*-inversesN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6499.5
Simplified99.5%
Final simplification91.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z t) x))
(t_2 (/ (+ x (/ (- (* z y) x) t_1)) (+ x 1.0)))
(t_3 (/ (* z y) (* (+ x 1.0) t_1)))
(t_4 (/ (+ x (/ y t)) (+ x 1.0))))
(if (<= t_2 -2e+254)
(/ y (fma x t t))
(if (<= t_2 -1000000000.0)
t_3
(if (<= t_2 0.9999999999999853)
t_4
(if (<= t_2 20.0)
(- 1.0 (* z (/ y (fma x x x))))
(if (<= t_2 1e+205) t_3 t_4)))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((z * y) - x) / t_1)) / (x + 1.0);
double t_3 = (z * y) / ((x + 1.0) * t_1);
double t_4 = (x + (y / t)) / (x + 1.0);
double tmp;
if (t_2 <= -2e+254) {
tmp = y / fma(x, t, t);
} else if (t_2 <= -1000000000.0) {
tmp = t_3;
} else if (t_2 <= 0.9999999999999853) {
tmp = t_4;
} else if (t_2 <= 20.0) {
tmp = 1.0 - (z * (y / fma(x, x, x)));
} else if (t_2 <= 1e+205) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(z * t) - x) t_2 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / t_1)) / Float64(x + 1.0)) t_3 = Float64(Float64(z * y) / Float64(Float64(x + 1.0) * t_1)) t_4 = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)) tmp = 0.0 if (t_2 <= -2e+254) tmp = Float64(y / fma(x, t, t)); elseif (t_2 <= -1000000000.0) tmp = t_3; elseif (t_2 <= 0.9999999999999853) tmp = t_4; elseif (t_2 <= 20.0) tmp = Float64(1.0 - Float64(z * Float64(y / fma(x, x, x)))); elseif (t_2 <= 1e+205) tmp = t_3; else tmp = t_4; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * y), $MachinePrecision] / N[(N[(x + 1.0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+254], N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1000000000.0], t$95$3, If[LessEqual[t$95$2, 0.9999999999999853], t$95$4, If[LessEqual[t$95$2, 20.0], N[(1.0 - N[(z * N[(y / N[(x * x + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+205], t$95$3, t$95$4]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t - x\\
t_2 := \frac{x + \frac{z \cdot y - x}{t\_1}}{x + 1}\\
t_3 := \frac{z \cdot y}{\left(x + 1\right) \cdot t\_1}\\
t_4 := \frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+254}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
\mathbf{elif}\;t\_2 \leq -1000000000:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 0.9999999999999853:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_2 \leq 20:\\
\;\;\;\;1 - z \cdot \frac{y}{\mathsf{fma}\left(x, x, x\right)}\\
\mathbf{elif}\;t\_2 \leq 10^{+205}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.9999999999999999e254Initial program 31.1%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6461.7
Simplified61.7%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
accelerator-lowering-fma.f6474.1
Simplified74.1%
if -1.9999999999999999e254 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1e9 or 20 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000002e205Initial program 99.5%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6497.8
Simplified97.8%
if -1e9 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 0.99999999999998535 or 1.00000000000000002e205 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 75.8%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6480.7
Simplified80.7%
if 0.99999999999998535 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 20Initial program 100.0%
Taylor expanded in t around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
div-subN/A
sub-negN/A
associate-/l*N/A
*-inversesN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6499.5
Simplified99.5%
Taylor expanded in y around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f6499.5
Simplified99.5%
Final simplification91.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))))
(if (<= t_1 -1e+100)
(/ y (fma x t t))
(if (<= t_1 0.0001)
(fma (/ y t) (- 1.0 x) x)
(if (<= t_1 20.0) 1.0 (/ y (* (+ x 1.0) t)))))))
double code(double x, double y, double z, double t) {
double t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
double tmp;
if (t_1 <= -1e+100) {
tmp = y / fma(x, t, t);
} else if (t_1 <= 0.0001) {
tmp = fma((y / t), (1.0 - x), x);
} else if (t_1 <= 20.0) {
tmp = 1.0;
} else {
tmp = y / ((x + 1.0) * t);
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)) tmp = 0.0 if (t_1 <= -1e+100) tmp = Float64(y / fma(x, t, t)); elseif (t_1 <= 0.0001) tmp = fma(Float64(y / t), Float64(1.0 - x), x); elseif (t_1 <= 20.0) tmp = 1.0; else tmp = Float64(y / Float64(Float64(x + 1.0) * t)); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+100], N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0001], N[(N[(y / t), $MachinePrecision] * N[(1.0 - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 20.0], 1.0, N[(y / N[(N[(x + 1.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+100}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
\mathbf{elif}\;t\_1 \leq 0.0001:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{t}, 1 - x, x\right)\\
\mathbf{elif}\;t\_1 \leq 20:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\left(x + 1\right) \cdot t}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.00000000000000002e100Initial program 63.0%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6466.4
Simplified66.4%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
accelerator-lowering-fma.f6473.1
Simplified73.1%
if -1.00000000000000002e100 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000005e-4Initial program 95.3%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6476.3
Simplified76.3%
Taylor expanded in x around 0
+-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-lft-inN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
associate-/l*N/A
mul-1-negN/A
*-rgt-identityN/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
associate-/l*N/A
*-lft-identityN/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6475.3
Simplified75.3%
if 1.00000000000000005e-4 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 20Initial program 100.0%
Taylor expanded in x around inf
Simplified97.3%
if 20 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 59.5%
Taylor expanded in x around 0
/-lowering-/.f6457.6
Simplified57.6%
associate-/l/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f6457.7
Applied egg-rr57.7%
Final simplification82.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))))
(if (<= t_1 -1e-46)
(/ y (fma x t t))
(if (<= t_1 0.0001)
(- x (/ x (* z t)))
(if (<= t_1 20.0) 1.0 (/ y (* (+ x 1.0) t)))))))
double code(double x, double y, double z, double t) {
double t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
double tmp;
if (t_1 <= -1e-46) {
tmp = y / fma(x, t, t);
} else if (t_1 <= 0.0001) {
tmp = x - (x / (z * t));
} else if (t_1 <= 20.0) {
tmp = 1.0;
} else {
tmp = y / ((x + 1.0) * t);
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)) tmp = 0.0 if (t_1 <= -1e-46) tmp = Float64(y / fma(x, t, t)); elseif (t_1 <= 0.0001) tmp = Float64(x - Float64(x / Float64(z * t))); elseif (t_1 <= 20.0) tmp = 1.0; else tmp = Float64(y / Float64(Float64(x + 1.0) * t)); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-46], N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0001], N[(x - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 20.0], 1.0, N[(y / N[(N[(x + 1.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-46}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
\mathbf{elif}\;t\_1 \leq 0.0001:\\
\;\;\;\;x - \frac{x}{z \cdot t}\\
\mathbf{elif}\;t\_1 \leq 20:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\left(x + 1\right) \cdot t}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.00000000000000002e-46Initial program 78.2%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6462.0
Simplified62.0%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
accelerator-lowering-fma.f6464.0
Simplified64.0%
if -1.00000000000000002e-46 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000005e-4Initial program 93.4%
Taylor expanded in y around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6468.4
Simplified68.4%
Taylor expanded in x around 0
sub-negN/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-/l*N/A
*-commutativeN/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
*-rgt-identityN/A
associate-*r/N/A
--lowering--.f64N/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
*-lowering-*.f6467.1
Simplified67.1%
if 1.00000000000000005e-4 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 20Initial program 100.0%
Taylor expanded in x around inf
Simplified97.3%
if 20 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 59.5%
Taylor expanded in x around 0
/-lowering-/.f6457.6
Simplified57.6%
associate-/l/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f6457.7
Applied egg-rr57.7%
Final simplification79.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ y (fma x t t)))
(t_2 (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))))
(if (<= t_2 -1e-46)
t_1
(if (<= t_2 0.0001) (- x (/ x (* z t))) (if (<= t_2 20.0) 1.0 t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y / fma(x, t, t);
double t_2 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
double tmp;
if (t_2 <= -1e-46) {
tmp = t_1;
} else if (t_2 <= 0.0001) {
tmp = x - (x / (z * t));
} else if (t_2 <= 20.0) {
tmp = 1.0;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(y / fma(x, t, t)) t_2 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)) tmp = 0.0 if (t_2 <= -1e-46) tmp = t_1; elseif (t_2 <= 0.0001) tmp = Float64(x - Float64(x / Float64(z * t))); elseif (t_2 <= 20.0) tmp = 1.0; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-46], t$95$1, If[LessEqual[t$95$2, 0.0001], N[(x - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 20.0], 1.0, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
t_2 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0.0001:\\
\;\;\;\;x - \frac{x}{z \cdot t}\\
\mathbf{elif}\;t\_2 \leq 20:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.00000000000000002e-46 or 20 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 69.5%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6466.1
Simplified66.1%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
accelerator-lowering-fma.f6461.1
Simplified61.1%
if -1.00000000000000002e-46 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000005e-4Initial program 93.4%
Taylor expanded in y around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6468.4
Simplified68.4%
Taylor expanded in x around 0
sub-negN/A
distribute-lft-inN/A
*-rgt-identityN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-/l*N/A
*-commutativeN/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
*-rgt-identityN/A
associate-*r/N/A
--lowering--.f64N/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
*-lowering-*.f6467.1
Simplified67.1%
if 1.00000000000000005e-4 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 20Initial program 100.0%
Taylor expanded in x around inf
Simplified97.3%
Final simplification79.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ y (fma x t t)))
(t_2 (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))))
(if (<= t_2 -2e-71)
t_1
(if (<= t_2 0.999995) (/ x (+ x 1.0)) (if (<= t_2 20.0) 1.0 t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y / fma(x, t, t);
double t_2 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
double tmp;
if (t_2 <= -2e-71) {
tmp = t_1;
} else if (t_2 <= 0.999995) {
tmp = x / (x + 1.0);
} else if (t_2 <= 20.0) {
tmp = 1.0;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(y / fma(x, t, t)) t_2 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)) tmp = 0.0 if (t_2 <= -2e-71) tmp = t_1; elseif (t_2 <= 0.999995) tmp = Float64(x / Float64(x + 1.0)); elseif (t_2 <= 20.0) tmp = 1.0; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-71], t$95$1, If[LessEqual[t$95$2, 0.999995], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 20.0], 1.0, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
t_2 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0.999995:\\
\;\;\;\;\frac{x}{x + 1}\\
\mathbf{elif}\;t\_2 \leq 20:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.9999999999999998e-71 or 20 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 72.6%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6468.6
Simplified68.6%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
accelerator-lowering-fma.f6460.1
Simplified60.1%
if -1.9999999999999998e-71 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 0.99999499999999997Initial program 92.0%
Taylor expanded in t around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6460.5
Simplified60.5%
if 0.99999499999999997 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 20Initial program 100.0%
Taylor expanded in x around inf
Simplified98.2%
Final simplification78.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))))
(if (<= t_1 -2e-71)
(/ y t)
(if (<= t_1 0.999995) (/ x (+ x 1.0)) (if (<= t_1 20.0) 1.0 (/ y t))))))
double code(double x, double y, double z, double t) {
double t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
double tmp;
if (t_1 <= -2e-71) {
tmp = y / t;
} else if (t_1 <= 0.999995) {
tmp = x / (x + 1.0);
} else if (t_1 <= 20.0) {
tmp = 1.0;
} else {
tmp = y / t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0d0)
if (t_1 <= (-2d-71)) then
tmp = y / t
else if (t_1 <= 0.999995d0) then
tmp = x / (x + 1.0d0)
else if (t_1 <= 20.0d0) then
tmp = 1.0d0
else
tmp = y / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
double tmp;
if (t_1 <= -2e-71) {
tmp = y / t;
} else if (t_1 <= 0.999995) {
tmp = x / (x + 1.0);
} else if (t_1 <= 20.0) {
tmp = 1.0;
} else {
tmp = y / t;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0) tmp = 0 if t_1 <= -2e-71: tmp = y / t elif t_1 <= 0.999995: tmp = x / (x + 1.0) elif t_1 <= 20.0: tmp = 1.0 else: tmp = y / t return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)) tmp = 0.0 if (t_1 <= -2e-71) tmp = Float64(y / t); elseif (t_1 <= 0.999995) tmp = Float64(x / Float64(x + 1.0)); elseif (t_1 <= 20.0) tmp = 1.0; else tmp = Float64(y / t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0); tmp = 0.0; if (t_1 <= -2e-71) tmp = y / t; elseif (t_1 <= 0.999995) tmp = x / (x + 1.0); elseif (t_1 <= 20.0) tmp = 1.0; else tmp = y / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-71], N[(y / t), $MachinePrecision], If[LessEqual[t$95$1, 0.999995], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 20.0], 1.0, N[(y / t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-71}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;t\_1 \leq 0.999995:\\
\;\;\;\;\frac{x}{x + 1}\\
\mathbf{elif}\;t\_1 \leq 20:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.9999999999999998e-71 or 20 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 72.6%
Taylor expanded in x around 0
/-lowering-/.f6452.7
Simplified52.7%
if -1.9999999999999998e-71 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 0.99999499999999997Initial program 92.0%
Taylor expanded in t around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6460.5
Simplified60.5%
if 0.99999499999999997 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 20Initial program 100.0%
Taylor expanded in x around inf
Simplified98.2%
Final simplification75.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))))
(if (<= t_1 -2e-71)
(/ y t)
(if (<= t_1 0.0001) (- x (* x x)) (if (<= t_1 20.0) 1.0 (/ y t))))))
double code(double x, double y, double z, double t) {
double t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
double tmp;
if (t_1 <= -2e-71) {
tmp = y / t;
} else if (t_1 <= 0.0001) {
tmp = x - (x * x);
} else if (t_1 <= 20.0) {
tmp = 1.0;
} else {
tmp = y / t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0d0)
if (t_1 <= (-2d-71)) then
tmp = y / t
else if (t_1 <= 0.0001d0) then
tmp = x - (x * x)
else if (t_1 <= 20.0d0) then
tmp = 1.0d0
else
tmp = y / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
double tmp;
if (t_1 <= -2e-71) {
tmp = y / t;
} else if (t_1 <= 0.0001) {
tmp = x - (x * x);
} else if (t_1 <= 20.0) {
tmp = 1.0;
} else {
tmp = y / t;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0) tmp = 0 if t_1 <= -2e-71: tmp = y / t elif t_1 <= 0.0001: tmp = x - (x * x) elif t_1 <= 20.0: tmp = 1.0 else: tmp = y / t return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)) tmp = 0.0 if (t_1 <= -2e-71) tmp = Float64(y / t); elseif (t_1 <= 0.0001) tmp = Float64(x - Float64(x * x)); elseif (t_1 <= 20.0) tmp = 1.0; else tmp = Float64(y / t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0); tmp = 0.0; if (t_1 <= -2e-71) tmp = y / t; elseif (t_1 <= 0.0001) tmp = x - (x * x); elseif (t_1 <= 20.0) tmp = 1.0; else tmp = y / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-71], N[(y / t), $MachinePrecision], If[LessEqual[t$95$1, 0.0001], N[(x - N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 20.0], 1.0, N[(y / t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-71}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;t\_1 \leq 0.0001:\\
\;\;\;\;x - x \cdot x\\
\mathbf{elif}\;t\_1 \leq 20:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.9999999999999998e-71 or 20 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 72.6%
Taylor expanded in x around 0
/-lowering-/.f6452.7
Simplified52.7%
if -1.9999999999999998e-71 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000005e-4Initial program 91.6%
Taylor expanded in t around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6461.0
Simplified61.0%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
mul-1-negN/A
distribute-lft-neg-outN/A
unpow2N/A
unsub-negN/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f6459.9
Simplified59.9%
if 1.00000000000000005e-4 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 20Initial program 100.0%
Taylor expanded in x around inf
Simplified97.3%
Final simplification74.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))))
(if (<= t_1 -2e+254)
(/ y (fma x t t))
(if (<= t_1 1e+205) t_1 (/ (+ x (/ y t)) (+ x 1.0))))))
double code(double x, double y, double z, double t) {
double t_1 = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
double tmp;
if (t_1 <= -2e+254) {
tmp = y / fma(x, t, t);
} else if (t_1 <= 1e+205) {
tmp = t_1;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)) tmp = 0.0 if (t_1 <= -2e+254) tmp = Float64(y / fma(x, t, t)); elseif (t_1 <= 1e+205) tmp = t_1; else tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+254], N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+205], t$95$1, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+254}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
\mathbf{elif}\;t\_1 \leq 10^{+205}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.9999999999999999e254Initial program 31.1%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6461.7
Simplified61.7%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
+-commutativeN/A
distribute-lft1-inN/A
accelerator-lowering-fma.f6474.1
Simplified74.1%
if -1.9999999999999999e254 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000002e205Initial program 98.5%
if 1.00000000000000002e205 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 31.1%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6478.3
Simplified78.3%
Final simplification95.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1
(+ (/ y (fma t x t)) (- (/ x (+ x 1.0)) (/ x (* (fma x z z) t))))))
(if (<= z -4.2e+173)
t_1
(if (<= z 1.9e+110)
(/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))
t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (y / fma(t, x, t)) + ((x / (x + 1.0)) - (x / (fma(x, z, z) * t)));
double tmp;
if (z <= -4.2e+173) {
tmp = t_1;
} else if (z <= 1.9e+110) {
tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(y / fma(t, x, t)) + Float64(Float64(x / Float64(x + 1.0)) - Float64(x / Float64(fma(x, z, z) * t)))) tmp = 0.0 if (z <= -4.2e+173) tmp = t_1; elseif (z <= 1.9e+110) tmp = Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / N[(t * x + t), $MachinePrecision]), $MachinePrecision] + N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] - N[(x / N[(N[(x * z + z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e+173], t$95$1, If[LessEqual[z, 1.9e+110], N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{\mathsf{fma}\left(t, x, t\right)} + \left(\frac{x}{x + 1} - \frac{x}{\mathsf{fma}\left(x, z, z\right) \cdot t}\right)\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+173}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+110}:\\
\;\;\;\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.2e173 or 1.89999999999999994e110 < z Initial program 66.1%
Taylor expanded in t around inf
+-commutativeN/A
associate--l+N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
accelerator-lowering-fma.f6488.6
Simplified88.6%
if -4.2e173 < z < 1.89999999999999994e110Initial program 99.3%
Final simplification95.7%
(FPCore (x y z t) :precision binary64 (if (<= (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0)) 0.0001) (- x (* x x)) 1.0))
double code(double x, double y, double z, double t) {
double tmp;
if (((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.0001) {
tmp = x - (x * x);
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0d0)) <= 0.0001d0) then
tmp = x - (x * x)
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.0001) {
tmp = x - (x * x);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.0001: tmp = x - (x * x) else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)) <= 0.0001) tmp = Float64(x - Float64(x * x)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.0001) tmp = x - (x * x); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], 0.0001], N[(x - N[(x * x), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 0.0001:\\
\;\;\;\;x - x \cdot x\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000005e-4Initial program 85.5%
Taylor expanded in t around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6430.9
Simplified30.9%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-lft-identityN/A
mul-1-negN/A
distribute-lft-neg-outN/A
unpow2N/A
unsub-negN/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f6429.8
Simplified29.8%
if 1.00000000000000005e-4 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 89.8%
Taylor expanded in x around inf
Simplified78.3%
Final simplification60.7%
(FPCore (x y z t) :precision binary64 (if (<= (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0)) 0.0001) x 1.0))
double code(double x, double y, double z, double t) {
double tmp;
if (((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.0001) {
tmp = x;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0d0)) <= 0.0001d0) then
tmp = x
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.0001) {
tmp = x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.0001: tmp = x else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(Float64(x + Float64(Float64(Float64(z * y) - x) / Float64(Float64(z * t) - x))) / Float64(x + 1.0)) <= 0.0001) tmp = x; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0)) <= 0.0001) tmp = x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(N[(x + N[(N[(N[(z * y), $MachinePrecision] - x), $MachinePrecision] / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], 0.0001], x, 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1} \leq 0.0001:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000005e-4Initial program 85.5%
Taylor expanded in t around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6430.9
Simplified30.9%
Taylor expanded in x around 0
Simplified29.4%
if 1.00000000000000005e-4 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 89.8%
Taylor expanded in x around inf
Simplified78.3%
Final simplification60.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (+ x (/ y t)) (+ x 1.0))))
(if (<= t -4.3e-100)
t_1
(if (<= t 2.65e-92) (- 1.0 (* z (/ y (fma x x x)))) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (x + (y / t)) / (x + 1.0);
double tmp;
if (t <= -4.3e-100) {
tmp = t_1;
} else if (t <= 2.65e-92) {
tmp = 1.0 - (z * (y / fma(x, x, x)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)) tmp = 0.0 if (t <= -4.3e-100) tmp = t_1; elseif (t <= 2.65e-92) tmp = Float64(1.0 - Float64(z * Float64(y / fma(x, x, x)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.3e-100], t$95$1, If[LessEqual[t, 2.65e-92], N[(1.0 - N[(z * N[(y / N[(x * x + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{if}\;t \leq -4.3 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.65 \cdot 10^{-92}:\\
\;\;\;\;1 - z \cdot \frac{y}{\mathsf{fma}\left(x, x, x\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.29999999999999998e-100 or 2.65000000000000015e-92 < t Initial program 87.7%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6487.8
Simplified87.8%
if -4.29999999999999998e-100 < t < 2.65000000000000015e-92Initial program 89.4%
Taylor expanded in t around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
div-subN/A
sub-negN/A
associate-/l*N/A
*-inversesN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6476.3
Simplified76.3%
Taylor expanded in y around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f6478.6
Simplified78.6%
Final simplification84.9%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- 1.0 (* z (/ y (fma x x x)))))) (if (<= x -8.5e-24) t_1 (if (<= x 1.7e-18) (fma (/ y t) (- 1.0 x) x) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = 1.0 - (z * (y / fma(x, x, x)));
double tmp;
if (x <= -8.5e-24) {
tmp = t_1;
} else if (x <= 1.7e-18) {
tmp = fma((y / t), (1.0 - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(1.0 - Float64(z * Float64(y / fma(x, x, x)))) tmp = 0.0 if (x <= -8.5e-24) tmp = t_1; elseif (x <= 1.7e-18) tmp = fma(Float64(y / t), Float64(1.0 - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 - N[(z * N[(y / N[(x * x + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.5e-24], t$95$1, If[LessEqual[x, 1.7e-18], N[(N[(y / t), $MachinePrecision] * N[(1.0 - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 - z \cdot \frac{y}{\mathsf{fma}\left(x, x, x\right)}\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{-18}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{t}, 1 - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -8.5000000000000002e-24 or 1.70000000000000001e-18 < x Initial program 87.3%
Taylor expanded in t around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
div-subN/A
sub-negN/A
associate-/l*N/A
*-inversesN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6487.6
Simplified87.6%
Taylor expanded in y around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f6488.9
Simplified88.9%
if -8.5000000000000002e-24 < x < 1.70000000000000001e-18Initial program 89.5%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6472.6
Simplified72.6%
Taylor expanded in x around 0
+-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-lft-inN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
associate-/l*N/A
mul-1-negN/A
*-rgt-identityN/A
associate-+r+N/A
mul-1-negN/A
unsub-negN/A
associate-/l*N/A
*-lft-identityN/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6472.6
Simplified72.6%
(FPCore (x y z t) :precision binary64 1.0)
double code(double x, double y, double z, double t) {
return 1.0;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = 1.0d0
end function
public static double code(double x, double y, double z, double t) {
return 1.0;
}
def code(x, y, z, t): return 1.0
function code(x, y, z, t) return 1.0 end
function tmp = code(x, y, z, t) tmp = 1.0; end
code[x_, y_, z_, t_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 88.2%
Taylor expanded in x around inf
Simplified51.2%
(FPCore (x y z t) :precision binary64 (/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0);
}
def code(x, y, z, t): return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(y / Float64(t - Float64(x / z))) - Float64(x / Float64(Float64(t * z) - x)))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(y / N[(t - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \left(\frac{y}{t - \frac{x}{z}} - \frac{x}{t \cdot z - x}\right)}{x + 1}
\end{array}
herbie shell --seed 2024198
(FPCore (x y z t)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, A"
:precision binary64
:alt
(! :herbie-platform default (/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1)))
(/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))