
(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 21 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 (- 0.0 x)) (* z t))) (+ x 1.0))
(if (<= t_2 2.0)
(/ (- x (/ x (fma z t (- 0.0 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, (0.0 - x)) / (z * t))) / (x + 1.0);
} else if (t_2 <= 2.0) {
tmp = (x - (x / fma(z, t, (0.0 - 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(Float64(x + Float64(fma(y, z, Float64(0.0 - x)) / Float64(z * t))) / Float64(x + 1.0)); elseif (t_2 <= 2.0) tmp = Float64(Float64(x - Float64(x / fma(z, t, Float64(0.0 - 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[(x + N[(N[(y * z + N[(0.0 - x), $MachinePrecision]), $MachinePrecision] / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2.0], N[(N[(x - N[(x / N[(z * t + N[(0.0 - x), $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}:\\
\;\;\;\;\frac{x + \frac{\mathsf{fma}\left(y, z, 0 - x\right)}{z \cdot t}}{x + 1}\\
\mathbf{elif}\;t\_2 \leq 2:\\
\;\;\;\;\frac{x - \frac{x}{\mathsf{fma}\left(z, t, 0 - 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
distribute-lft-inN/A
*-commutativeN/A
*-rgt-identityN/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-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6493.1
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
sub0-negN/A
accelerator-lowering-fma.f64N/A
--lowering--.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 y) x))
(t_2 (- (* z t) x))
(t_3 (/ (+ x (/ t_1 t_2)) (+ x 1.0)))
(t_4 (/ (* z y) (* (+ x 1.0) t_2))))
(if (<= t_3 -2e+254)
(/ y (fma x t t))
(if (<= t_3 -1000000000.0)
t_4
(if (<= t_3 2e-63)
(/ (+ x (/ t_1 (* z t))) (+ x 1.0))
(if (<= t_3 2.0)
(/ (- x (/ x (fma z t (- 0.0 x)))) (+ x 1.0))
(if (<= t_3 1e+205) t_4 (/ (+ x (/ y t)) (+ x 1.0)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * y) - x;
double t_2 = (z * t) - x;
double t_3 = (x + (t_1 / t_2)) / (x + 1.0);
double t_4 = (z * y) / ((x + 1.0) * t_2);
double tmp;
if (t_3 <= -2e+254) {
tmp = y / fma(x, t, t);
} else if (t_3 <= -1000000000.0) {
tmp = t_4;
} else if (t_3 <= 2e-63) {
tmp = (x + (t_1 / (z * t))) / (x + 1.0);
} else if (t_3 <= 2.0) {
tmp = (x - (x / fma(z, t, (0.0 - x)))) / (x + 1.0);
} else if (t_3 <= 1e+205) {
tmp = t_4;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(z * y) - x) t_2 = Float64(Float64(z * t) - x) t_3 = Float64(Float64(x + Float64(t_1 / t_2)) / Float64(x + 1.0)) t_4 = Float64(Float64(z * y) / Float64(Float64(x + 1.0) * t_2)) tmp = 0.0 if (t_3 <= -2e+254) tmp = Float64(y / fma(x, t, t)); elseif (t_3 <= -1000000000.0) tmp = t_4; elseif (t_3 <= 2e-63) tmp = Float64(Float64(x + Float64(t_1 / Float64(z * t))) / Float64(x + 1.0)); elseif (t_3 <= 2.0) tmp = Float64(Float64(x - Float64(x / fma(z, t, Float64(0.0 - x)))) / Float64(x + 1.0)); elseif (t_3 <= 1e+205) tmp = t_4; 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 * y), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z * y), $MachinePrecision] / N[(N[(x + 1.0), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -2e+254], N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -1000000000.0], t$95$4, If[LessEqual[t$95$3, 2e-63], N[(N[(x + N[(t$95$1 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2.0], N[(N[(x - N[(x / N[(z * t + N[(0.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+205], t$95$4, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot y - x\\
t_2 := z \cdot t - x\\
t_3 := \frac{x + \frac{t\_1}{t\_2}}{x + 1}\\
t_4 := \frac{z \cdot y}{\left(x + 1\right) \cdot t\_2}\\
\mathbf{if}\;t\_3 \leq -2 \cdot 10^{+254}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
\mathbf{elif}\;t\_3 \leq -1000000000:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{-63}:\\
\;\;\;\;\frac{x + \frac{t\_1}{z \cdot t}}{x + 1}\\
\mathbf{elif}\;t\_3 \leq 2:\\
\;\;\;\;\frac{x - \frac{x}{\mathsf{fma}\left(z, t, 0 - x\right)}}{x + 1}\\
\mathbf{elif}\;t\_3 \leq 10^{+205}:\\
\;\;\;\;t\_4\\
\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
distribute-lft-inN/A
*-commutativeN/A
*-rgt-identityN/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-*.f6492.9
Simplified92.9%
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
sub0-negN/A
accelerator-lowering-fma.f64N/A
--lowering--.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.0%
(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 (- 1.0 x) (/ y t) x)
(if (<= t_2 2.0)
(/ (- x (/ x (fma z t (- 0.0 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((1.0 - x), (y / t), x);
} else if (t_2 <= 2.0) {
tmp = (x - (x / fma(z, t, (0.0 - 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(1.0 - x), Float64(y / t), x); elseif (t_2 <= 2.0) tmp = Float64(Float64(x - Float64(x / fma(z, t, Float64(0.0 - 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[(1.0 - x), $MachinePrecision] * N[(y / t), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$2, 2.0], N[(N[(x - N[(x / N[(z * t + N[(0.0 - x), $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(1 - x, \frac{y}{t}, x\right)\\
\mathbf{elif}\;t\_2 \leq 2:\\
\;\;\;\;\frac{x - \frac{x}{\mathsf{fma}\left(z, t, 0 - 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
distribute-lft-inN/A
*-commutativeN/A
*-rgt-identityN/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 t around 0
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-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
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
sub0-negN/A
accelerator-lowering-fma.f64N/A
--lowering--.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 (- 1.0 x) (/ y t) 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((1.0 - x), (y / t), 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(1.0 - x), Float64(y / t), 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[(1.0 - x), $MachinePrecision] * N[(y / t), $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(1 - x, \frac{y}{t}, 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
distribute-lft-inN/A
*-commutativeN/A
*-rgt-identityN/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 t around 0
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-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
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)
(fma (- 0.0 y) (/ z (fma x x 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 = fma((0.0 - y), (z / fma(x, x, 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 = fma(Float64(0.0 - y), Float64(z / fma(x, x, 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[(0.0 - y), $MachinePrecision] * N[(z / N[(x * x + x), $MachinePrecision]), $MachinePrecision] + 1.0), $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:\\
\;\;\;\;\mathsf{fma}\left(0 - y, \frac{z}{\mathsf{fma}\left(x, x, x\right)}, 1\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
distribute-lft-inN/A
*-commutativeN/A
*-rgt-identityN/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-sub0N/A
--lowering--.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
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/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.8%
(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 (- 1.0 x) (/ y t) 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((1.0 - x), (y / t), 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(1.0 - x), Float64(y / t), x); elseif (t_1 <= 20.0) tmp = 1.0; else tmp = Float64(Float64(y / 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[(1.0 - x), $MachinePrecision] * N[(y / t), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 20.0], 1.0, N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / 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 -1 \cdot 10^{+100}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
\mathbf{elif}\;t\_1 \leq 0.0001:\\
\;\;\;\;\mathsf{fma}\left(1 - x, \frac{y}{t}, x\right)\\
\mathbf{elif}\;t\_1 \leq 20:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{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
distribute-lft-inN/A
*-commutativeN/A
*-rgt-identityN/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 t around 0
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6476.2
Simplified76.2%
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
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 z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6470.8
Simplified70.8%
Taylor expanded in t around 0
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6470.9
Simplified70.9%
Taylor expanded in t around 0
/-lowering-/.f64N/A
+-lowering-+.f6457.8
Simplified57.8%
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+100)
(/ y (fma x t t))
(if (<= t_1 0.0001)
(fma (- 1.0 x) (/ y t) x)
(if (<= t_1 20.0) 1.0 (/ (/ 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 <= -1e+100) {
tmp = y / fma(x, t, t);
} else if (t_1 <= 0.0001) {
tmp = fma((1.0 - x), (y / t), x);
} else if (t_1 <= 20.0) {
tmp = 1.0;
} else {
tmp = (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 <= -1e+100) tmp = Float64(y / fma(x, t, t)); elseif (t_1 <= 0.0001) tmp = fma(Float64(1.0 - x), Float64(y / t), x); elseif (t_1 <= 20.0) tmp = 1.0; else tmp = Float64(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, -1e+100], N[(y / N[(x * t + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0001], N[(N[(1.0 - x), $MachinePrecision] * N[(y / t), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 20.0], 1.0, N[(N[(y / t), $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 -1 \cdot 10^{+100}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, t, t\right)}\\
\mathbf{elif}\;t\_1 \leq 0.0001:\\
\;\;\;\;\mathsf{fma}\left(1 - x, \frac{y}{t}, x\right)\\
\mathbf{elif}\;t\_1 \leq 20:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{\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.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
distribute-lft-inN/A
*-commutativeN/A
*-rgt-identityN/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 t around 0
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6476.2
Simplified76.2%
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
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%
Final simplification82.7%
(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+100)
t_1
(if (<= t_2 0.0001)
(fma (- 1.0 x) (/ y t) x)
(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+100) {
tmp = t_1;
} else if (t_2 <= 0.0001) {
tmp = fma((1.0 - x), (y / t), x);
} 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+100) tmp = t_1; elseif (t_2 <= 0.0001) tmp = fma(Float64(1.0 - x), Float64(y / t), x); 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+100], t$95$1, If[LessEqual[t$95$2, 0.0001], N[(N[(1.0 - x), $MachinePrecision] * N[(y / t), $MachinePrecision] + x), $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^{+100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0.0001:\\
\;\;\;\;\mathsf{fma}\left(1 - x, \frac{y}{t}, x\right)\\
\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.00000000000000002e100 or 20 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 60.9%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6469.0
Simplified69.0%
Taylor expanded in y around inf
/-lowering-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
*-rgt-identityN/A
accelerator-lowering-fma.f6463.9
Simplified63.9%
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 t around 0
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6476.2
Simplified76.2%
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
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%
Final simplification82.7%
(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
distribute-lft-inN/A
*-commutativeN/A
*-rgt-identityN/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-rgt-neg-inN/A
associate-*r/N/A
*-rgt-identityN/A
mul-1-negN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/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
distribute-lft-inN/A
*-commutativeN/A
*-rgt-identityN/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+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
distribute-lft-inN/A
*-commutativeN/A
*-rgt-identityN/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 (/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0)))) (if (<= t_1 5e-98) (/ y t) (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 <= 5e-98) {
tmp = y / t;
} 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 <= 5d-98) then
tmp = y / t
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 <= 5e-98) {
tmp = y / t;
} 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 <= 5e-98: tmp = y / t 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 <= 5e-98) tmp = Float64(y / t); 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 <= 5e-98) tmp = y / t; 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, 5e-98], N[(y / t), $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 5 \cdot 10^{-98}:\\
\;\;\;\;\frac{y}{t}\\
\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))) < 5.00000000000000018e-98 or 20 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 76.3%
Taylor expanded in x around 0
/-lowering-/.f6448.2
Simplified48.2%
if 5.00000000000000018e-98 < (/.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
Simplified92.4%
Final simplification70.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (+ x 1.0))))
(if (<= z -4.2e+173)
(/ (fma t t_1 (/ y (+ x 1.0))) t)
(if (<= z 1.9e+110)
(/ (+ x (/ (- (* z y) x) (- (* z t) x))) (+ x 1.0))
(+ (/ y (fma t x t)) (- t_1 (/ x (* (fma x z z) t))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (x + 1.0);
double tmp;
if (z <= -4.2e+173) {
tmp = fma(t, t_1, (y / (x + 1.0))) / t;
} else if (z <= 1.9e+110) {
tmp = (x + (((z * y) - x) / ((z * t) - x))) / (x + 1.0);
} else {
tmp = (y / fma(t, x, t)) + (t_1 - (x / (fma(x, z, z) * t)));
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(x / Float64(x + 1.0)) tmp = 0.0 if (z <= -4.2e+173) tmp = Float64(fma(t, t_1, Float64(y / Float64(x + 1.0))) / t); 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 = Float64(Float64(y / fma(t, x, t)) + Float64(t_1 - Float64(x / Float64(fma(x, z, z) * t)))); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e+173], N[(N[(t * t$95$1 + N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], 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], N[(N[(y / N[(t * x + t), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 - N[(x / N[(N[(x * z + z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + 1}\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+173}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t, t\_1, \frac{y}{x + 1}\right)}{t}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+110}:\\
\;\;\;\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(t, x, t\right)} + \left(t\_1 - \frac{x}{\mathsf{fma}\left(x, z, z\right) \cdot t}\right)\\
\end{array}
\end{array}
if z < -4.2e173Initial program 62.4%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6480.2
Simplified80.2%
Taylor expanded in t around 0
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6480.3
Simplified80.3%
if -4.2e173 < z < 1.89999999999999994e110Initial program 99.3%
if 1.89999999999999994e110 < z Initial program 68.2%
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.f6493.3
Simplified93.3%
Final simplification95.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (fma t (/ x (+ x 1.0)) (/ y (+ x 1.0))) t)))
(if (<= z -9.5e+174)
t_1
(if (<= z 1.25e+109)
(/ (+ 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 = fma(t, (x / (x + 1.0)), (y / (x + 1.0))) / t;
double tmp;
if (z <= -9.5e+174) {
tmp = t_1;
} else if (z <= 1.25e+109) {
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(fma(t, Float64(x / Float64(x + 1.0)), Float64(y / Float64(x + 1.0))) / t) tmp = 0.0 if (z <= -9.5e+174) tmp = t_1; elseif (z <= 1.25e+109) 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[(t * N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -9.5e+174], t$95$1, If[LessEqual[z, 1.25e+109], 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{\mathsf{fma}\left(t, \frac{x}{x + 1}, \frac{y}{x + 1}\right)}{t}\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+109}:\\
\;\;\;\;\frac{x + \frac{z \cdot y - x}{z \cdot t - x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.4999999999999992e174 or 1.25e109 < z Initial program 66.1%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6486.3
Simplified86.3%
Taylor expanded in t around 0
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6488.6
Simplified88.6%
if -9.4999999999999992e174 < z < 1.25e109Initial program 99.3%
Final simplification95.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (+ x (/ y t)) (+ x 1.0))))
(if (<= t -2.4e-99)
t_1
(if (<= t 1.55e-91) (fma z (- 0.0 (/ y (fma x x x))) 1.0) 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 <= -2.4e-99) {
tmp = t_1;
} else if (t <= 1.55e-91) {
tmp = fma(z, (0.0 - (y / fma(x, x, x))), 1.0);
} 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 <= -2.4e-99) tmp = t_1; elseif (t <= 1.55e-91) tmp = fma(z, Float64(0.0 - Float64(y / fma(x, x, x))), 1.0); 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, -2.4e-99], t$95$1, If[LessEqual[t, 1.55e-91], N[(z * N[(0.0 - N[(y / N[(x * x + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{-99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-91}:\\
\;\;\;\;\mathsf{fma}\left(z, 0 - \frac{y}{\mathsf{fma}\left(x, x, x\right)}, 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.4e-99 or 1.5499999999999999e-91 < 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 -2.4e-99 < t < 1.5499999999999999e-91Initial program 89.4%
Taylor expanded in t around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.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 z around inf
distribute-lft-inN/A
rgt-mult-inverseN/A
accelerator-lowering-fma.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f6478.6
Simplified78.6%
sub0-negN/A
neg-lowering-neg.f6478.6
Applied egg-rr78.6%
Final simplification84.9%
(FPCore (x y z t)
:precision binary64
(if (<= x -8.8e-26)
(fma (- 0.0 y) (/ z (fma x x x)) 1.0)
(if (<= x 2.15e-18)
(fma (- 1.0 x) (/ y t) x)
(fma z (- 0.0 (/ y (fma x x x))) 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -8.8e-26) {
tmp = fma((0.0 - y), (z / fma(x, x, x)), 1.0);
} else if (x <= 2.15e-18) {
tmp = fma((1.0 - x), (y / t), x);
} else {
tmp = fma(z, (0.0 - (y / fma(x, x, x))), 1.0);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (x <= -8.8e-26) tmp = fma(Float64(0.0 - y), Float64(z / fma(x, x, x)), 1.0); elseif (x <= 2.15e-18) tmp = fma(Float64(1.0 - x), Float64(y / t), x); else tmp = fma(z, Float64(0.0 - Float64(y / fma(x, x, x))), 1.0); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[x, -8.8e-26], N[(N[(0.0 - y), $MachinePrecision] * N[(z / N[(x * x + x), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], If[LessEqual[x, 2.15e-18], N[(N[(1.0 - x), $MachinePrecision] * N[(y / t), $MachinePrecision] + x), $MachinePrecision], N[(z * N[(0.0 - N[(y / N[(x * x + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.8 \cdot 10^{-26}:\\
\;\;\;\;\mathsf{fma}\left(0 - y, \frac{z}{\mathsf{fma}\left(x, x, x\right)}, 1\right)\\
\mathbf{elif}\;x \leq 2.15 \cdot 10^{-18}:\\
\;\;\;\;\mathsf{fma}\left(1 - x, \frac{y}{t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, 0 - \frac{y}{\mathsf{fma}\left(x, x, x\right)}, 1\right)\\
\end{array}
\end{array}
if x < -8.8000000000000003e-26Initial program 83.9%
Taylor expanded in t around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
div-subN/A
sub-negN/A
associate-/l*N/A
*-inversesN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6488.0
Simplified88.0%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f6490.6
Simplified90.6%
if -8.8000000000000003e-26 < x < 2.1500000000000001e-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 t around 0
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-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
Simplified72.6%
if 2.1500000000000001e-18 < x Initial program 90.6%
Taylor expanded in t around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
div-subN/A
sub-negN/A
associate-/l*N/A
*-inversesN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6487.2
Simplified87.2%
Taylor expanded in z around inf
distribute-lft-inN/A
rgt-mult-inverseN/A
accelerator-lowering-fma.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f6487.2
Simplified87.2%
sub0-negN/A
neg-lowering-neg.f6487.2
Applied egg-rr87.2%
Final simplification81.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (fma z (- 0.0 (/ y (fma x x x))) 1.0)))
(if (<= x -1.55e-23)
t_1
(if (<= x 4.8e-19) (fma (- 1.0 x) (/ y t) x) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = fma(z, (0.0 - (y / fma(x, x, x))), 1.0);
double tmp;
if (x <= -1.55e-23) {
tmp = t_1;
} else if (x <= 4.8e-19) {
tmp = fma((1.0 - x), (y / t), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = fma(z, Float64(0.0 - Float64(y / fma(x, x, x))), 1.0) tmp = 0.0 if (x <= -1.55e-23) tmp = t_1; elseif (x <= 4.8e-19) tmp = fma(Float64(1.0 - x), Float64(y / t), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(0.0 - N[(y / N[(x * x + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x, -1.55e-23], t$95$1, If[LessEqual[x, 4.8e-19], N[(N[(1.0 - x), $MachinePrecision] * N[(y / t), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, 0 - \frac{y}{\mathsf{fma}\left(x, x, x\right)}, 1\right)\\
\mathbf{if}\;x \leq -1.55 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-19}:\\
\;\;\;\;\mathsf{fma}\left(1 - x, \frac{y}{t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.5499999999999999e-23 or 4.80000000000000046e-19 < x Initial program 87.3%
Taylor expanded in t around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.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 z around inf
distribute-lft-inN/A
rgt-mult-inverseN/A
accelerator-lowering-fma.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f6488.9
Simplified88.9%
sub0-negN/A
neg-lowering-neg.f6488.9
Applied egg-rr88.9%
if -1.5499999999999999e-23 < x < 4.80000000000000046e-19Initial 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 t around 0
/-lowering-/.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-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
Simplified72.6%
Final simplification81.8%
(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 -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 z around inf
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6473.5
Simplified73.5%
unpow1N/A
metadata-evalN/A
pow-divN/A
sqr-powN/A
unpow-prod-downN/A
sqr-negN/A
sub0-negN/A
sub0-negN/A
unpow-prod-downN/A
sqr-powN/A
pow2N/A
sub0-negN/A
cube-negN/A
sub0-negN/A
+-rgt-identityN/A
distribute-rgt-outN/A
+-lft-identityN/A
metadata-evalN/A
metadata-evalN/A
flip3--N/A
sub0-negN/A
sub-negN/A
Applied egg-rr27.0%
Taylor expanded in x around inf
Simplified2.8%
(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)))