
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
(FPCore (x y z t a) :precision binary64 (- x (* (- y z) (/ a (+ 1.0 (- t z))))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) * (a / (1.0 + (t - z))));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y - z) * (a / (1.0d0 + (t - z))))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) * (a / (1.0 + (t - z))));
}
def code(x, y, z, t, a): return x - ((y - z) * (a / (1.0 + (t - z))))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) * Float64(a / Float64(1.0 + Float64(t - z))))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) * (a / (1.0 + (t - z)))); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] * N[(a / N[(1.0 + N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \left(y - z\right) \cdot \frac{a}{1 + \left(t - z\right)}
\end{array}
Initial program 96.9%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6497.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6497.3
Applied rewrites97.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* (/ y t) a))))
(if (<= t -7.8e+139)
t_1
(if (<= t -1.4e-61)
(fma (/ z (- 1.0 z)) a x)
(if (<= t 6.2e+15) (- x (* y (/ a (- 1.0 z)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y / t) * a);
double tmp;
if (t <= -7.8e+139) {
tmp = t_1;
} else if (t <= -1.4e-61) {
tmp = fma((z / (1.0 - z)), a, x);
} else if (t <= 6.2e+15) {
tmp = x - (y * (a / (1.0 - z)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(y / t) * a)) tmp = 0.0 if (t <= -7.8e+139) tmp = t_1; elseif (t <= -1.4e-61) tmp = fma(Float64(z / Float64(1.0 - z)), a, x); elseif (t <= 6.2e+15) tmp = Float64(x - Float64(y * Float64(a / Float64(1.0 - z)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.8e+139], t$95$1, If[LessEqual[t, -1.4e-61], N[(N[(z / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[t, 6.2e+15], N[(x - N[(y * N[(a / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{t} \cdot a\\
\mathbf{if}\;t \leq -7.8 \cdot 10^{+139}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.4 \cdot 10^{-61}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+15}:\\
\;\;\;\;x - y \cdot \frac{a}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.80000000000000012e139 or 6.2e15 < t Initial program 96.9%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6486.5
Applied rewrites86.5%
Taylor expanded in t around inf
Applied rewrites86.6%
if -7.80000000000000012e139 < t < -1.4000000000000001e-61Initial program 93.7%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6485.2
Applied rewrites85.2%
Taylor expanded in t around 0
Applied rewrites74.7%
if -1.4000000000000001e-61 < t < 6.2e15Initial program 98.2%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6479.3
Applied rewrites79.3%
Taylor expanded in t around 0
Applied rewrites79.3%
Applied rewrites77.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ 1.0 t) z)))
(if (or (<= y -1.6e+14) (not (<= y 1.1e+65)))
(- x (* (/ y t_1) a))
(fma (/ z t_1) a x))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (1.0 + t) - z;
double tmp;
if ((y <= -1.6e+14) || !(y <= 1.1e+65)) {
tmp = x - ((y / t_1) * a);
} else {
tmp = fma((z / t_1), a, x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(1.0 + t) - z) tmp = 0.0 if ((y <= -1.6e+14) || !(y <= 1.1e+65)) tmp = Float64(x - Float64(Float64(y / t_1) * a)); else tmp = fma(Float64(z / t_1), a, x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(1.0 + t), $MachinePrecision] - z), $MachinePrecision]}, If[Or[LessEqual[y, -1.6e+14], N[Not[LessEqual[y, 1.1e+65]], $MachinePrecision]], N[(x - N[(N[(y / t$95$1), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(z / t$95$1), $MachinePrecision] * a + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 + t\right) - z\\
\mathbf{if}\;y \leq -1.6 \cdot 10^{+14} \lor \neg \left(y \leq 1.1 \cdot 10^{+65}\right):\\
\;\;\;\;x - \frac{y}{t\_1} \cdot a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t\_1}, a, x\right)\\
\end{array}
\end{array}
if y < -1.6e14 or 1.0999999999999999e65 < y Initial program 96.3%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6490.5
Applied rewrites90.5%
if -1.6e14 < y < 1.0999999999999999e65Initial program 97.4%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6493.9
Applied rewrites93.9%
Final simplification92.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9.5e+27)
(- x a)
(if (<= z -1.75e-126)
(fma z (/ a (+ 1.0 t)) x)
(if (<= z 4.4e+39) (- x (* (/ y t) a)) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e+27) {
tmp = x - a;
} else if (z <= -1.75e-126) {
tmp = fma(z, (a / (1.0 + t)), x);
} else if (z <= 4.4e+39) {
tmp = x - ((y / t) * a);
} else {
tmp = x - a;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.5e+27) tmp = Float64(x - a); elseif (z <= -1.75e-126) tmp = fma(z, Float64(a / Float64(1.0 + t)), x); elseif (z <= 4.4e+39) tmp = Float64(x - Float64(Float64(y / t) * a)); else tmp = Float64(x - a); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e+27], N[(x - a), $MachinePrecision], If[LessEqual[z, -1.75e-126], N[(z * N[(a / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 4.4e+39], N[(x - N[(N[(y / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+27}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -1.75 \cdot 10^{-126}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{a}{1 + t}, x\right)\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+39}:\\
\;\;\;\;x - \frac{y}{t} \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -9.4999999999999997e27 or 4.4000000000000003e39 < z Initial program 94.2%
Taylor expanded in z around inf
lower--.f6486.2
Applied rewrites86.2%
if -9.4999999999999997e27 < z < -1.75e-126Initial program 99.9%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6468.1
Applied rewrites68.1%
Taylor expanded in z around 0
Applied rewrites64.5%
Applied rewrites67.5%
if -1.75e-126 < z < 4.4000000000000003e39Initial program 98.9%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6494.1
Applied rewrites94.1%
Taylor expanded in t around inf
Applied rewrites71.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -0.245)
(- x a)
(if (<= z -9.6e-130)
(- x (* (- y z) (fma (- a) t a)))
(if (<= z 4.4e+39) (- x (* (/ y t) a)) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.245) {
tmp = x - a;
} else if (z <= -9.6e-130) {
tmp = x - ((y - z) * fma(-a, t, a));
} else if (z <= 4.4e+39) {
tmp = x - ((y / t) * a);
} else {
tmp = x - a;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -0.245) tmp = Float64(x - a); elseif (z <= -9.6e-130) tmp = Float64(x - Float64(Float64(y - z) * fma(Float64(-a), t, a))); elseif (z <= 4.4e+39) tmp = Float64(x - Float64(Float64(y / t) * a)); else tmp = Float64(x - a); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -0.245], N[(x - a), $MachinePrecision], If[LessEqual[z, -9.6e-130], N[(x - N[(N[(y - z), $MachinePrecision] * N[((-a) * t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e+39], N[(x - N[(N[(y / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.245:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -9.6 \cdot 10^{-130}:\\
\;\;\;\;x - \left(y - z\right) \cdot \mathsf{fma}\left(-a, t, a\right)\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+39}:\\
\;\;\;\;x - \frac{y}{t} \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -0.245 or 4.4000000000000003e39 < z Initial program 94.4%
Taylor expanded in z around inf
lower--.f6484.6
Applied rewrites84.6%
if -0.245 < z < -9.59999999999999987e-130Initial program 99.9%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6499.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.9
Applied rewrites99.9%
Taylor expanded in z around 0
lower-/.f64N/A
lower-+.f6496.4
Applied rewrites96.4%
Taylor expanded in t around 0
Applied rewrites64.5%
if -9.59999999999999987e-130 < z < 4.4000000000000003e39Initial program 98.9%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6494.0
Applied rewrites94.0%
Taylor expanded in t around inf
Applied rewrites72.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8e+46)
(- x (fma a (/ (- (+ 1.0 t) y) z) a))
(if (<= z 2.25e-26)
(- x (* (- y z) (/ a (+ 1.0 t))))
(- x (* (- y z) (/ a (- 1.0 z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8e+46) {
tmp = x - fma(a, (((1.0 + t) - y) / z), a);
} else if (z <= 2.25e-26) {
tmp = x - ((y - z) * (a / (1.0 + t)));
} else {
tmp = x - ((y - z) * (a / (1.0 - z)));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8e+46) tmp = Float64(x - fma(a, Float64(Float64(Float64(1.0 + t) - y) / z), a)); elseif (z <= 2.25e-26) tmp = Float64(x - Float64(Float64(y - z) * Float64(a / Float64(1.0 + t)))); else tmp = Float64(x - Float64(Float64(y - z) * Float64(a / Float64(1.0 - z)))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8e+46], N[(x - N[(a * N[(N[(N[(1.0 + t), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e-26], N[(x - N[(N[(y - z), $MachinePrecision] * N[(a / N[(1.0 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y - z), $MachinePrecision] * N[(a / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+46}:\\
\;\;\;\;x - \mathsf{fma}\left(a, \frac{\left(1 + t\right) - y}{z}, a\right)\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{-26}:\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{a}{1 + t}\\
\mathbf{else}:\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{a}{1 - z}\\
\end{array}
\end{array}
if z < -7.9999999999999999e46Initial program 93.5%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
Applied rewrites91.3%
if -7.9999999999999999e46 < z < 2.2499999999999999e-26Initial program 99.1%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6499.2
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.2
Applied rewrites99.2%
Taylor expanded in z around 0
lower-/.f64N/A
lower-+.f6497.4
Applied rewrites97.4%
if 2.2499999999999999e-26 < z Initial program 96.0%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6493.1
Applied rewrites93.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8e+46)
(fma (/ z (- (+ 1.0 t) z)) a x)
(if (<= z 2.25e-26)
(- x (* (- y z) (/ a (+ 1.0 t))))
(- x (* (- y z) (/ a (- 1.0 z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8e+46) {
tmp = fma((z / ((1.0 + t) - z)), a, x);
} else if (z <= 2.25e-26) {
tmp = x - ((y - z) * (a / (1.0 + t)));
} else {
tmp = x - ((y - z) * (a / (1.0 - z)));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8e+46) tmp = fma(Float64(z / Float64(Float64(1.0 + t) - z)), a, x); elseif (z <= 2.25e-26) tmp = Float64(x - Float64(Float64(y - z) * Float64(a / Float64(1.0 + t)))); else tmp = Float64(x - Float64(Float64(y - z) * Float64(a / Float64(1.0 - z)))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8e+46], N[(N[(z / N[(N[(1.0 + t), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[z, 2.25e-26], N[(x - N[(N[(y - z), $MachinePrecision] * N[(a / N[(1.0 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y - z), $MachinePrecision] * N[(a / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+46}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{-26}:\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{a}{1 + t}\\
\mathbf{else}:\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{a}{1 - z}\\
\end{array}
\end{array}
if z < -7.9999999999999999e46Initial program 93.5%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6489.0
Applied rewrites89.0%
if -7.9999999999999999e46 < z < 2.2499999999999999e-26Initial program 99.1%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6499.2
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.2
Applied rewrites99.2%
Taylor expanded in z around 0
lower-/.f64N/A
lower-+.f6497.4
Applied rewrites97.4%
if 2.2499999999999999e-26 < z Initial program 96.0%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6493.1
Applied rewrites93.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.2e-6)
(fma (/ z (- (+ 1.0 t) z)) a x)
(if (<= z 1.85e-53)
(- x (* (/ y (+ 1.0 t)) a))
(- x (* (- y z) (/ a (- 1.0 z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.2e-6) {
tmp = fma((z / ((1.0 + t) - z)), a, x);
} else if (z <= 1.85e-53) {
tmp = x - ((y / (1.0 + t)) * a);
} else {
tmp = x - ((y - z) * (a / (1.0 - z)));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.2e-6) tmp = fma(Float64(z / Float64(Float64(1.0 + t) - z)), a, x); elseif (z <= 1.85e-53) tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a)); else tmp = Float64(x - Float64(Float64(y - z) * Float64(a / Float64(1.0 - z)))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.2e-6], N[(N[(z / N[(N[(1.0 + t), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[z, 1.85e-53], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y - z), $MachinePrecision] * N[(a / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-6}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-53}:\\
\;\;\;\;x - \frac{y}{1 + t} \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{a}{1 - z}\\
\end{array}
\end{array}
if z < -4.1999999999999996e-6Initial program 94.4%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6486.3
Applied rewrites86.3%
if -4.1999999999999996e-6 < z < 1.84999999999999991e-53Initial program 99.0%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6494.3
Applied rewrites94.3%
if 1.84999999999999991e-53 < z Initial program 96.2%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6492.6
Applied rewrites92.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.2e-6) (fma (/ z (- (+ 1.0 t) z)) a x) (if (<= z 4.8) (- x (* (/ y (+ 1.0 t)) a)) (- x (* (- y z) (/ (- a) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.2e-6) {
tmp = fma((z / ((1.0 + t) - z)), a, x);
} else if (z <= 4.8) {
tmp = x - ((y / (1.0 + t)) * a);
} else {
tmp = x - ((y - z) * (-a / z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.2e-6) tmp = fma(Float64(z / Float64(Float64(1.0 + t) - z)), a, x); elseif (z <= 4.8) tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a)); else tmp = Float64(x - Float64(Float64(y - z) * Float64(Float64(-a) / z))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.2e-6], N[(N[(z / N[(N[(1.0 + t), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[z, 4.8], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y - z), $MachinePrecision] * N[((-a) / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-6}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\
\mathbf{elif}\;z \leq 4.8:\\
\;\;\;\;x - \frac{y}{1 + t} \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{-a}{z}\\
\end{array}
\end{array}
if z < -4.1999999999999996e-6Initial program 94.4%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6486.3
Applied rewrites86.3%
if -4.1999999999999996e-6 < z < 4.79999999999999982Initial program 99.1%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6493.1
Applied rewrites93.1%
if 4.79999999999999982 < z Initial program 95.7%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6496.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6496.4
Applied rewrites96.4%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f6491.7
Applied rewrites91.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.2e-6) (not (<= z 0.051))) (fma (/ z (- (+ 1.0 t) z)) a x) (- x (* (/ y (+ 1.0 t)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.2e-6) || !(z <= 0.051)) {
tmp = fma((z / ((1.0 + t) - z)), a, x);
} else {
tmp = x - ((y / (1.0 + t)) * a);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.2e-6) || !(z <= 0.051)) tmp = fma(Float64(z / Float64(Float64(1.0 + t) - z)), a, x); else tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a)); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.2e-6], N[Not[LessEqual[z, 0.051]], $MachinePrecision]], N[(N[(z / N[(N[(1.0 + t), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-6} \lor \neg \left(z \leq 0.051\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{1 + t} \cdot a\\
\end{array}
\end{array}
if z < -4.1999999999999996e-6 or 0.0509999999999999967 < z Initial program 95.0%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6487.2
Applied rewrites87.2%
if -4.1999999999999996e-6 < z < 0.0509999999999999967Initial program 99.1%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6493.1
Applied rewrites93.1%
Final simplification89.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.2e-6) (not (<= z 0.053))) (fma z (/ a (- (+ t 1.0) z)) x) (- x (* (/ y (+ 1.0 t)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.2e-6) || !(z <= 0.053)) {
tmp = fma(z, (a / ((t + 1.0) - z)), x);
} else {
tmp = x - ((y / (1.0 + t)) * a);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.2e-6) || !(z <= 0.053)) tmp = fma(z, Float64(a / Float64(Float64(t + 1.0) - z)), x); else tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a)); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.2e-6], N[Not[LessEqual[z, 0.053]], $MachinePrecision]], N[(z * N[(a / N[(N[(t + 1.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-6} \lor \neg \left(z \leq 0.053\right):\\
\;\;\;\;\mathsf{fma}\left(z, \frac{a}{\left(t + 1\right) - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{1 + t} \cdot a\\
\end{array}
\end{array}
if z < -4.1999999999999996e-6 or 0.0529999999999999985 < z Initial program 95.0%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6487.2
Applied rewrites87.2%
Applied rewrites84.3%
if -4.1999999999999996e-6 < z < 0.0529999999999999985Initial program 99.1%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6493.1
Applied rewrites93.1%
Final simplification88.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.5e+51) (not (<= z 5.8))) (- x a) (- x (* (/ y (+ 1.0 t)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.5e+51) || !(z <= 5.8)) {
tmp = x - a;
} else {
tmp = x - ((y / (1.0 + t)) * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.5d+51)) .or. (.not. (z <= 5.8d0))) then
tmp = x - a
else
tmp = x - ((y / (1.0d0 + t)) * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.5e+51) || !(z <= 5.8)) {
tmp = x - a;
} else {
tmp = x - ((y / (1.0 + t)) * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.5e+51) or not (z <= 5.8): tmp = x - a else: tmp = x - ((y / (1.0 + t)) * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.5e+51) || !(z <= 5.8)) tmp = Float64(x - a); else tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.5e+51) || ~((z <= 5.8))) tmp = x - a; else tmp = x - ((y / (1.0 + t)) * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.5e+51], N[Not[LessEqual[z, 5.8]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+51} \lor \neg \left(z \leq 5.8\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{1 + t} \cdot a\\
\end{array}
\end{array}
if z < -1.5e51 or 5.79999999999999982 < z Initial program 94.6%
Taylor expanded in z around inf
lower--.f6484.1
Applied rewrites84.1%
if -1.5e51 < z < 5.79999999999999982Initial program 99.1%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6490.7
Applied rewrites90.7%
Final simplification87.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -7.8e+139) (not (<= t 1.5e+79))) (- x (* (/ y t) a)) (fma (/ z (- 1.0 z)) a x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -7.8e+139) || !(t <= 1.5e+79)) {
tmp = x - ((y / t) * a);
} else {
tmp = fma((z / (1.0 - z)), a, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -7.8e+139) || !(t <= 1.5e+79)) tmp = Float64(x - Float64(Float64(y / t) * a)); else tmp = fma(Float64(z / Float64(1.0 - z)), a, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -7.8e+139], N[Not[LessEqual[t, 1.5e+79]], $MachinePrecision]], N[(x - N[(N[(y / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(z / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.8 \cdot 10^{+139} \lor \neg \left(t \leq 1.5 \cdot 10^{+79}\right):\\
\;\;\;\;x - \frac{y}{t} \cdot a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\
\end{array}
\end{array}
if t < -7.80000000000000012e139 or 1.49999999999999987e79 < t Initial program 96.5%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6490.4
Applied rewrites90.4%
Taylor expanded in t around inf
Applied rewrites90.5%
if -7.80000000000000012e139 < t < 1.49999999999999987e79Initial program 97.1%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6475.5
Applied rewrites75.5%
Taylor expanded in t around 0
Applied rewrites71.1%
Final simplification77.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -7.8e+139) (not (<= t 1.3e+79))) (- x (* (/ y t) a)) (fma z (/ a (- 1.0 z)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -7.8e+139) || !(t <= 1.3e+79)) {
tmp = x - ((y / t) * a);
} else {
tmp = fma(z, (a / (1.0 - z)), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -7.8e+139) || !(t <= 1.3e+79)) tmp = Float64(x - Float64(Float64(y / t) * a)); else tmp = fma(z, Float64(a / Float64(1.0 - z)), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -7.8e+139], N[Not[LessEqual[t, 1.3e+79]], $MachinePrecision]], N[(x - N[(N[(y / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(z * N[(a / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.8 \cdot 10^{+139} \lor \neg \left(t \leq 1.3 \cdot 10^{+79}\right):\\
\;\;\;\;x - \frac{y}{t} \cdot a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{a}{1 - z}, x\right)\\
\end{array}
\end{array}
if t < -7.80000000000000012e139 or 1.30000000000000007e79 < t Initial program 96.5%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6490.4
Applied rewrites90.4%
Taylor expanded in t around inf
Applied rewrites90.5%
if -7.80000000000000012e139 < t < 1.30000000000000007e79Initial program 97.1%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6475.5
Applied rewrites75.5%
Applied rewrites74.1%
Taylor expanded in t around 0
Applied rewrites69.7%
Final simplification76.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8e+46) (not (<= z 4.4e+39))) (- x a) (- x (* (/ y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8e+46) || !(z <= 4.4e+39)) {
tmp = x - a;
} else {
tmp = x - ((y / t) * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-8d+46)) .or. (.not. (z <= 4.4d+39))) then
tmp = x - a
else
tmp = x - ((y / t) * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8e+46) || !(z <= 4.4e+39)) {
tmp = x - a;
} else {
tmp = x - ((y / t) * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8e+46) or not (z <= 4.4e+39): tmp = x - a else: tmp = x - ((y / t) * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8e+46) || !(z <= 4.4e+39)) tmp = Float64(x - a); else tmp = Float64(x - Float64(Float64(y / t) * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8e+46) || ~((z <= 4.4e+39))) tmp = x - a; else tmp = x - ((y / t) * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8e+46], N[Not[LessEqual[z, 4.4e+39]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(N[(y / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+46} \lor \neg \left(z \leq 4.4 \cdot 10^{+39}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{t} \cdot a\\
\end{array}
\end{array}
if z < -7.9999999999999999e46 or 4.4000000000000003e39 < z Initial program 94.1%
Taylor expanded in z around inf
lower--.f6486.7
Applied rewrites86.7%
if -7.9999999999999999e46 < z < 4.4000000000000003e39Initial program 99.2%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6490.6
Applied rewrites90.6%
Taylor expanded in t around inf
Applied rewrites65.9%
Final simplification75.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.6e+46) (not (<= z 2.25e+39))) (- x a) (- x (/ (* a y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.6e+46) || !(z <= 2.25e+39)) {
tmp = x - a;
} else {
tmp = x - ((a * y) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-4.6d+46)) .or. (.not. (z <= 2.25d+39))) then
tmp = x - a
else
tmp = x - ((a * y) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.6e+46) || !(z <= 2.25e+39)) {
tmp = x - a;
} else {
tmp = x - ((a * y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.6e+46) or not (z <= 2.25e+39): tmp = x - a else: tmp = x - ((a * y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.6e+46) || !(z <= 2.25e+39)) tmp = Float64(x - a); else tmp = Float64(x - Float64(Float64(a * y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.6e+46) || ~((z <= 2.25e+39))) tmp = x - a; else tmp = x - ((a * y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.6e+46], N[Not[LessEqual[z, 2.25e+39]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(N[(a * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+46} \lor \neg \left(z \leq 2.25 \cdot 10^{+39}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a \cdot y}{t}\\
\end{array}
\end{array}
if z < -4.6000000000000001e46 or 2.24999999999999998e39 < z Initial program 94.1%
Taylor expanded in z around inf
lower--.f6486.7
Applied rewrites86.7%
if -4.6000000000000001e46 < z < 2.24999999999999998e39Initial program 99.2%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6490.6
Applied rewrites90.6%
Taylor expanded in t around inf
Applied rewrites61.2%
Final simplification72.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8e+22) (not (<= z 1.6e+26))) (- x a) (fma z (/ a t) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8e+22) || !(z <= 1.6e+26)) {
tmp = x - a;
} else {
tmp = fma(z, (a / t), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8e+22) || !(z <= 1.6e+26)) tmp = Float64(x - a); else tmp = fma(z, Float64(a / t), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8e+22], N[Not[LessEqual[z, 1.6e+26]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(z * N[(a / t), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+22} \lor \neg \left(z \leq 1.6 \cdot 10^{+26}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{a}{t}, x\right)\\
\end{array}
\end{array}
if z < -8e22 or 1.60000000000000014e26 < z Initial program 94.4%
Taylor expanded in z around inf
lower--.f6485.0
Applied rewrites85.0%
if -8e22 < z < 1.60000000000000014e26Initial program 99.2%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6464.5
Applied rewrites64.5%
Applied rewrites65.3%
Taylor expanded in t around inf
Applied rewrites58.6%
Final simplification71.1%
(FPCore (x y z t a) :precision binary64 (- x a))
double code(double x, double y, double z, double t, double a) {
return x - a;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - a
end function
public static double code(double x, double y, double z, double t, double a) {
return x - a;
}
def code(x, y, z, t, a): return x - a
function code(x, y, z, t, a) return Float64(x - a) end
function tmp = code(x, y, z, t, a) tmp = x - a; end
code[x_, y_, z_, t_, a_] := N[(x - a), $MachinePrecision]
\begin{array}{l}
\\
x - a
\end{array}
Initial program 96.9%
Taylor expanded in z around inf
lower--.f6461.1
Applied rewrites61.1%
(FPCore (x y z t a) :precision binary64 (- a))
double code(double x, double y, double z, double t, double a) {
return -a;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = -a
end function
public static double code(double x, double y, double z, double t, double a) {
return -a;
}
def code(x, y, z, t, a): return -a
function code(x, y, z, t, a) return Float64(-a) end
function tmp = code(x, y, z, t, a) tmp = -a; end
code[x_, y_, z_, t_, a_] := (-a)
\begin{array}{l}
\\
-a
\end{array}
Initial program 96.9%
Taylor expanded in z around inf
lower--.f6461.1
Applied rewrites61.1%
Taylor expanded in x around 0
Applied rewrites17.1%
(FPCore (x y z t a) :precision binary64 (- x (* (/ (- y z) (+ (- t z) 1.0)) a)))
double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - (((y - z) / ((t - z) + 1.0d0)) * a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
def code(x, y, z, t, a): return x - (((y - z) / ((t - z) + 1.0)) * a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(Float64(y - z) / Float64(Float64(t - z) + 1.0)) * a)) end
function tmp = code(x, y, z, t, a) tmp = x - (((y - z) / ((t - z) + 1.0)) * a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\left(t - z\right) + 1} \cdot a
\end{array}
herbie shell --seed 2024329
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (- x (* (/ (- y z) (+ (- t z) 1)) a)))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))