
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - 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) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - 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) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -4e-257) (not (<= t_1 0.0)))
(fma (/ (- y z) (- a z)) (- t x) x)
(fma (fma -1.0 t x) (pow (/ z (- y a)) -1.0) t))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -4e-257) || !(t_1 <= 0.0)) {
tmp = fma(((y - z) / (a - z)), (t - x), x);
} else {
tmp = fma(fma(-1.0, t, x), pow((z / (y - a)), -1.0), t);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -4e-257) || !(t_1 <= 0.0)) tmp = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x); else tmp = fma(fma(-1.0, t, x), (Float64(z / Float64(y - a)) ^ -1.0), t); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e-257], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(-1.0 * t + x), $MachinePrecision] * N[Power[N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{-257} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-1, t, x\right), {\left(\frac{z}{y - a}\right)}^{-1}, t\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -3.9999999999999999e-257 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6494.3
Applied rewrites94.3%
if -3.9999999999999999e-257 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.1%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites99.7%
Applied rewrites99.8%
Final simplification94.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -4e-257) (not (<= t_1 0.0)))
(fma (/ (- y z) (- a z)) (- t x) x)
(fma (fma -1.0 t x) (/ (- y a) z) t))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -4e-257) || !(t_1 <= 0.0)) {
tmp = fma(((y - z) / (a - z)), (t - x), x);
} else {
tmp = fma(fma(-1.0, t, x), ((y - a) / z), t);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -4e-257) || !(t_1 <= 0.0)) tmp = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x); else tmp = fma(fma(-1.0, t, x), Float64(Float64(y - a) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e-257], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(-1.0 * t + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{-257} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-1, t, x\right), \frac{y - a}{z}, t\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -3.9999999999999999e-257 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6494.3
Applied rewrites94.3%
if -3.9999999999999999e-257 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.1%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites99.7%
Final simplification94.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -4e-257) (not (<= t_1 0.0)))
(fma (/ (- x t) (- z a)) (- y z) x)
(fma (fma -1.0 t x) (/ (- y a) z) t))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -4e-257) || !(t_1 <= 0.0)) {
tmp = fma(((x - t) / (z - a)), (y - z), x);
} else {
tmp = fma(fma(-1.0, t, x), ((y - a) / z), t);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -4e-257) || !(t_1 <= 0.0)) tmp = fma(Float64(Float64(x - t) / Float64(z - a)), Float64(y - z), x); else tmp = fma(fma(-1.0, t, x), Float64(Float64(y - a) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e-257], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision], N[(N[(-1.0 * t + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{-257} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z - a}, y - z, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-1, t, x\right), \frac{y - a}{z}, t\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -3.9999999999999999e-257 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6490.7
lift-/.f64N/A
frac-2negN/A
lower-/.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f6490.7
Applied rewrites90.7%
if -3.9999999999999999e-257 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.1%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites99.7%
Final simplification91.6%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.6e+33)
(fma (- y z) (/ (- t x) a) x)
(if (<= a 2.5e-52)
(fma (fma -1.0 t x) (/ (- y a) z) t)
(+ x (* (/ (- y z) a) (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e+33) {
tmp = fma((y - z), ((t - x) / a), x);
} else if (a <= 2.5e-52) {
tmp = fma(fma(-1.0, t, x), ((y - a) / z), t);
} else {
tmp = x + (((y - z) / a) * (t - x));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.6e+33) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); elseif (a <= 2.5e-52) tmp = fma(fma(-1.0, t, x), Float64(Float64(y - a) / z), t); else tmp = Float64(x + Float64(Float64(Float64(y - z) / a) * Float64(t - x))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.6e+33], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 2.5e-52], N[(N[(-1.0 * t + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], N[(x + N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{-52}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-1, t, x\right), \frac{y - a}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{a} \cdot \left(t - x\right)\\
\end{array}
\end{array}
if a < -1.60000000000000009e33Initial program 90.8%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6485.6
Applied rewrites85.6%
if -1.60000000000000009e33 < a < 2.5e-52Initial program 74.6%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites83.1%
if 2.5e-52 < a Initial program 87.8%
Taylor expanded in a around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6477.9
Applied rewrites77.9%
Final simplification82.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.9e+31)
(fma (- y z) (/ (- t x) a) x)
(if (<= a 2.2e-52)
(- t (/ (* (- t x) (- y a)) z))
(+ x (* (/ (- y z) a) (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.9e+31) {
tmp = fma((y - z), ((t - x) / a), x);
} else if (a <= 2.2e-52) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = x + (((y - z) / a) * (t - x));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.9e+31) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); elseif (a <= 2.2e-52) tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); else tmp = Float64(x + Float64(Float64(Float64(y - z) / a) * Float64(t - x))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.9e+31], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 2.2e-52], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.9 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{-52}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{a} \cdot \left(t - x\right)\\
\end{array}
\end{array}
if a < -3.89999999999999999e31Initial program 90.8%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6485.6
Applied rewrites85.6%
if -3.89999999999999999e31 < a < 2.20000000000000009e-52Initial program 74.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6480.9
Applied rewrites80.9%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites79.2%
if 2.20000000000000009e-52 < a Initial program 87.8%
Taylor expanded in a around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6477.9
Applied rewrites77.9%
Final simplification80.2%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.9e+31)
(fma (- y z) (/ (- t x) a) x)
(if (<= a 2.2e-52)
(- t (/ (* (- t x) (- y a)) z))
(fma (/ (- y z) a) (- t x) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.9e+31) {
tmp = fma((y - z), ((t - x) / a), x);
} else if (a <= 2.2e-52) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = fma(((y - z) / a), (t - x), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.9e+31) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); elseif (a <= 2.2e-52) tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); else tmp = fma(Float64(Float64(y - z) / a), Float64(t - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.9e+31], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 2.2e-52], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.9 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{-52}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\end{array}
\end{array}
if a < -3.89999999999999999e31Initial program 90.8%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6485.6
Applied rewrites85.6%
if -3.89999999999999999e31 < a < 2.20000000000000009e-52Initial program 74.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6480.9
Applied rewrites80.9%
Taylor expanded in z around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites79.2%
if 2.20000000000000009e-52 < a Initial program 87.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6489.9
Applied rewrites89.9%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6477.9
Applied rewrites77.9%
Final simplification80.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.9e+31) (not (<= a 2.5e-52))) (fma (- y z) (/ (- t x) a) x) (fma (/ (- x t) z) y t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.9e+31) || !(a <= 2.5e-52)) {
tmp = fma((y - z), ((t - x) / a), x);
} else {
tmp = fma(((x - t) / z), y, t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.9e+31) || !(a <= 2.5e-52)) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); else tmp = fma(Float64(Float64(x - t) / z), y, t); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.9e+31], N[Not[LessEqual[a, 2.5e-52]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.9 \cdot 10^{+31} \lor \neg \left(a \leq 2.5 \cdot 10^{-52}\right):\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\end{array}
\end{array}
if a < -3.89999999999999999e31 or 2.5e-52 < a Initial program 89.0%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6480.4
Applied rewrites80.4%
if -3.89999999999999999e31 < a < 2.5e-52Initial program 74.6%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites83.1%
Taylor expanded in a around 0
Applied rewrites77.3%
Final simplification79.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.9e+31) (fma (- y z) (/ (- t x) a) x) (if (<= a 2.5e-52) (fma (/ (- x t) z) y t) (fma (/ (- y z) a) (- t x) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.9e+31) {
tmp = fma((y - z), ((t - x) / a), x);
} else if (a <= 2.5e-52) {
tmp = fma(((x - t) / z), y, t);
} else {
tmp = fma(((y - z) / a), (t - x), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.9e+31) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); elseif (a <= 2.5e-52) tmp = fma(Float64(Float64(x - t) / z), y, t); else tmp = fma(Float64(Float64(y - z) / a), Float64(t - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.9e+31], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 2.5e-52], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.9 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{-52}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\end{array}
\end{array}
if a < -3.89999999999999999e31Initial program 90.8%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6485.6
Applied rewrites85.6%
if -3.89999999999999999e31 < a < 2.5e-52Initial program 74.6%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites83.1%
Taylor expanded in a around 0
Applied rewrites77.3%
if 2.5e-52 < a Initial program 87.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6489.9
Applied rewrites89.9%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6477.9
Applied rewrites77.9%
Final simplification79.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.25e+50) (not (<= z 1.08e+27))) (fma (/ (- x t) z) y t) (fma (/ y a) (- t x) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.25e+50) || !(z <= 1.08e+27)) {
tmp = fma(((x - t) / z), y, t);
} else {
tmp = fma((y / a), (t - x), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.25e+50) || !(z <= 1.08e+27)) tmp = fma(Float64(Float64(x - t) / z), y, t); else tmp = fma(Float64(y / a), Float64(t - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.25e+50], N[Not[LessEqual[z, 1.08e+27]], $MachinePrecision]], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+50} \lor \neg \left(z \leq 1.08 \cdot 10^{+27}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\end{array}
\end{array}
if z < -1.25e50 or 1.08e27 < z Initial program 64.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites84.2%
Taylor expanded in a around 0
Applied rewrites75.9%
if -1.25e50 < z < 1.08e27Initial program 93.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6494.8
Applied rewrites94.8%
Taylor expanded in z around 0
lower-/.f6476.1
Applied rewrites76.1%
Final simplification76.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.25e+50) (not (<= z 1.08e+27))) (fma (/ (- x t) z) y t) (fma (/ (- t x) a) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.25e+50) || !(z <= 1.08e+27)) {
tmp = fma(((x - t) / z), y, t);
} else {
tmp = fma(((t - x) / a), y, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.25e+50) || !(z <= 1.08e+27)) tmp = fma(Float64(Float64(x - t) / z), y, t); else tmp = fma(Float64(Float64(t - x) / a), y, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.25e+50], N[Not[LessEqual[z, 1.08e+27]], $MachinePrecision]], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+50} \lor \neg \left(z \leq 1.08 \cdot 10^{+27}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\end{array}
\end{array}
if z < -1.25e50 or 1.08e27 < z Initial program 64.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites84.2%
Taylor expanded in a around 0
Applied rewrites75.9%
if -1.25e50 < z < 1.08e27Initial program 93.2%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6475.2
Applied rewrites75.2%
Final simplification75.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.66e+36) (not (<= a 5.5e+38))) (fma y (/ t a) x) (fma (/ (- x t) z) y t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.66e+36) || !(a <= 5.5e+38)) {
tmp = fma(y, (t / a), x);
} else {
tmp = fma(((x - t) / z), y, t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.66e+36) || !(a <= 5.5e+38)) tmp = fma(y, Float64(t / a), x); else tmp = fma(Float64(Float64(x - t) / z), y, t); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.66e+36], N[Not[LessEqual[a, 5.5e+38]], $MachinePrecision]], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.66 \cdot 10^{+36} \lor \neg \left(a \leq 5.5 \cdot 10^{+38}\right):\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\end{array}
\end{array}
if a < -1.6599999999999999e36 or 5.5000000000000003e38 < a Initial program 91.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6491.7
Applied rewrites91.7%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6476.1
Applied rewrites76.1%
Taylor expanded in x around 0
Applied rewrites68.8%
if -1.6599999999999999e36 < a < 5.5000000000000003e38Initial program 75.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites78.0%
Taylor expanded in a around 0
Applied rewrites72.2%
Final simplification70.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.6e+35) (not (<= a 5.5e+38))) (fma y (/ t a) x) (fma (/ (- a y) z) t t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.6e+35) || !(a <= 5.5e+38)) {
tmp = fma(y, (t / a), x);
} else {
tmp = fma(((a - y) / z), t, t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.6e+35) || !(a <= 5.5e+38)) tmp = fma(y, Float64(t / a), x); else tmp = fma(Float64(Float64(a - y) / z), t, t); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.6e+35], N[Not[LessEqual[a, 5.5e+38]], $MachinePrecision]], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision] * t + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{+35} \lor \neg \left(a \leq 5.5 \cdot 10^{+38}\right):\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a - y}{z}, t, t\right)\\
\end{array}
\end{array}
if a < -1.59999999999999991e35 or 5.5000000000000003e38 < a Initial program 91.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6491.7
Applied rewrites91.7%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6476.1
Applied rewrites76.1%
Taylor expanded in x around 0
Applied rewrites68.8%
if -1.59999999999999991e35 < a < 5.5000000000000003e38Initial program 75.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites78.0%
Taylor expanded in y around inf
Applied rewrites40.9%
Taylor expanded in t around inf
Applied rewrites55.0%
Final simplification61.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.6e+35) (not (<= a 5.5e+38))) (fma y (/ t a) x) (fma (- t) (/ y z) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.6e+35) || !(a <= 5.5e+38)) {
tmp = fma(y, (t / a), x);
} else {
tmp = fma(-t, (y / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.6e+35) || !(a <= 5.5e+38)) tmp = fma(y, Float64(t / a), x); else tmp = fma(Float64(-t), Float64(y / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.6e+35], N[Not[LessEqual[a, 5.5e+38]], $MachinePrecision]], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], N[((-t) * N[(y / z), $MachinePrecision] + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{+35} \lor \neg \left(a \leq 5.5 \cdot 10^{+38}\right):\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\
\end{array}
\end{array}
if a < -1.59999999999999991e35 or 5.5000000000000003e38 < a Initial program 91.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6491.7
Applied rewrites91.7%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6476.1
Applied rewrites76.1%
Taylor expanded in x around 0
Applied rewrites68.8%
if -1.59999999999999991e35 < a < 5.5000000000000003e38Initial program 75.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites78.0%
Taylor expanded in x around 0
Applied rewrites55.0%
Taylor expanded in y around inf
Applied rewrites55.0%
Final simplification61.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -8.5e+34) (not (<= a 1.5e+30))) (fma y (/ t a) x) (/ (* (- x t) y) z)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8.5e+34) || !(a <= 1.5e+30)) {
tmp = fma(y, (t / a), x);
} else {
tmp = ((x - t) * y) / z;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -8.5e+34) || !(a <= 1.5e+30)) tmp = fma(y, Float64(t / a), x); else tmp = Float64(Float64(Float64(x - t) * y) / z); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8.5e+34], N[Not[LessEqual[a, 1.5e+30]], $MachinePrecision]], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - t), $MachinePrecision] * y), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.5 \cdot 10^{+34} \lor \neg \left(a \leq 1.5 \cdot 10^{+30}\right):\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - t\right) \cdot y}{z}\\
\end{array}
\end{array}
if a < -8.5000000000000003e34 or 1.49999999999999989e30 < a Initial program 90.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6491.1
Applied rewrites91.1%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6474.3
Applied rewrites74.3%
Taylor expanded in x around 0
Applied rewrites67.2%
if -8.5000000000000003e34 < a < 1.49999999999999989e30Initial program 75.4%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites78.9%
Taylor expanded in y around inf
Applied rewrites41.7%
Taylor expanded in y around inf
Applied rewrites42.7%
Final simplification53.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -8.5e+34) (not (<= a 1.5e+30))) (fma y (/ t a) x) (* (/ (- x t) z) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8.5e+34) || !(a <= 1.5e+30)) {
tmp = fma(y, (t / a), x);
} else {
tmp = ((x - t) / z) * y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -8.5e+34) || !(a <= 1.5e+30)) tmp = fma(y, Float64(t / a), x); else tmp = Float64(Float64(Float64(x - t) / z) * y); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8.5e+34], N[Not[LessEqual[a, 1.5e+30]], $MachinePrecision]], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.5 \cdot 10^{+34} \lor \neg \left(a \leq 1.5 \cdot 10^{+30}\right):\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x - t}{z} \cdot y\\
\end{array}
\end{array}
if a < -8.5000000000000003e34 or 1.49999999999999989e30 < a Initial program 90.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6491.1
Applied rewrites91.1%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6474.3
Applied rewrites74.3%
Taylor expanded in x around 0
Applied rewrites67.2%
if -8.5000000000000003e34 < a < 1.49999999999999989e30Initial program 75.4%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites78.9%
Taylor expanded in y around inf
Applied rewrites41.7%
Final simplification53.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.8e+95) (not (<= z 5.4e+32))) (+ x (- t x)) (fma y (/ t a) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.8e+95) || !(z <= 5.4e+32)) {
tmp = x + (t - x);
} else {
tmp = fma(y, (t / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.8e+95) || !(z <= 5.4e+32)) tmp = Float64(x + Float64(t - x)); else tmp = fma(y, Float64(t / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.8e+95], N[Not[LessEqual[z, 5.4e+32]], $MachinePrecision]], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+95} \lor \neg \left(z \leq 5.4 \cdot 10^{+32}\right):\\
\;\;\;\;x + \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\end{array}
\end{array}
if z < -4.8000000000000001e95 or 5.40000000000000025e32 < z Initial program 62.3%
Taylor expanded in z around inf
lower--.f6440.0
Applied rewrites40.0%
if -4.8000000000000001e95 < z < 5.40000000000000025e32Initial program 92.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6494.5
Applied rewrites94.5%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6472.4
Applied rewrites72.4%
Taylor expanded in x around 0
Applied rewrites54.9%
Final simplification49.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.7e+80) (not (<= z 8.8e+26))) (+ x (- t x)) (/ (* t y) a)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.7e+80) || !(z <= 8.8e+26)) {
tmp = x + (t - x);
} else {
tmp = (t * y) / 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 <= (-4.7d+80)) .or. (.not. (z <= 8.8d+26))) then
tmp = x + (t - x)
else
tmp = (t * y) / 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 <= -4.7e+80) || !(z <= 8.8e+26)) {
tmp = x + (t - x);
} else {
tmp = (t * y) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.7e+80) or not (z <= 8.8e+26): tmp = x + (t - x) else: tmp = (t * y) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.7e+80) || !(z <= 8.8e+26)) tmp = Float64(x + Float64(t - x)); else tmp = Float64(Float64(t * y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.7e+80) || ~((z <= 8.8e+26))) tmp = x + (t - x); else tmp = (t * y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.7e+80], N[Not[LessEqual[z, 8.8e+26]], $MachinePrecision]], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision], N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.7 \cdot 10^{+80} \lor \neg \left(z \leq 8.8 \cdot 10^{+26}\right):\\
\;\;\;\;x + \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot y}{a}\\
\end{array}
\end{array}
if z < -4.70000000000000009e80 or 8.80000000000000028e26 < z Initial program 63.8%
Taylor expanded in z around inf
lower--.f6439.3
Applied rewrites39.3%
if -4.70000000000000009e80 < z < 8.80000000000000028e26Initial program 92.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
lift--.f64N/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-fma.f64N/A
lower-/.f6494.4
Applied rewrites94.4%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6473.5
Applied rewrites73.5%
Taylor expanded in x around 0
Applied rewrites25.2%
Final simplification30.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.4e-39) (not (<= x 1.02e-28))) (* x (/ y z)) (+ x (- t x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.4e-39) || !(x <= 1.02e-28)) {
tmp = x * (y / z);
} else {
tmp = x + (t - x);
}
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 ((x <= (-1.4d-39)) .or. (.not. (x <= 1.02d-28))) then
tmp = x * (y / z)
else
tmp = x + (t - x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.4e-39) || !(x <= 1.02e-28)) {
tmp = x * (y / z);
} else {
tmp = x + (t - x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.4e-39) or not (x <= 1.02e-28): tmp = x * (y / z) else: tmp = x + (t - x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.4e-39) || !(x <= 1.02e-28)) tmp = Float64(x * Float64(y / z)); else tmp = Float64(x + Float64(t - x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.4e-39) || ~((x <= 1.02e-28))) tmp = x * (y / z); else tmp = x + (t - x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.4e-39], N[Not[LessEqual[x, 1.02e-28]], $MachinePrecision]], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \cdot 10^{-39} \lor \neg \left(x \leq 1.02 \cdot 10^{-28}\right):\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right)\\
\end{array}
\end{array}
if x < -1.4000000000000001e-39 or 1.01999999999999997e-28 < x Initial program 77.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites49.3%
Taylor expanded in y around inf
Applied rewrites30.8%
Taylor expanded in x around inf
Applied rewrites29.2%
if -1.4000000000000001e-39 < x < 1.01999999999999997e-28Initial program 88.2%
Taylor expanded in z around inf
lower--.f6430.1
Applied rewrites30.1%
Final simplification29.6%
(FPCore (x y z t a) :precision binary64 (+ x (- t x)))
double code(double x, double y, double z, double t, double a) {
return x + (t - x);
}
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 + (t - x)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (t - x);
}
def code(x, y, z, t, a): return x + (t - x)
function code(x, y, z, t, a) return Float64(x + Float64(t - x)) end
function tmp = code(x, y, z, t, a) tmp = x + (t - x); end
code[x_, y_, z_, t_, a_] := N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(t - x\right)
\end{array}
Initial program 82.1%
Taylor expanded in z around inf
lower--.f6417.2
Applied rewrites17.2%
(FPCore (x y z t a) :precision binary64 (+ x (- x)))
double code(double x, double y, double z, double t, double a) {
return x + -x;
}
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 + -x
end function
public static double code(double x, double y, double z, double t, double a) {
return x + -x;
}
def code(x, y, z, t, a): return x + -x
function code(x, y, z, t, a) return Float64(x + Float64(-x)) end
function tmp = code(x, y, z, t, a) tmp = x + -x; end
code[x_, y_, z_, t_, a_] := N[(x + (-x)), $MachinePrecision]
\begin{array}{l}
\\
x + \left(-x\right)
\end{array}
Initial program 82.1%
Taylor expanded in z around inf
lower--.f6417.2
Applied rewrites17.2%
Taylor expanded in x around inf
Applied rewrites2.7%
herbie shell --seed 2024317
(FPCore (x y z t a)
:name "Numeric.Signal:interpolate from hsignal-0.2.7.1"
:precision binary64
(+ x (* (- y z) (/ (- t x) (- a z)))))