
(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 21 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 -5e-296) (not (<= t_1 0.0)))
(fma (- t x) (/ (- y z) (- a z)) x)
(- t (* (/ (- x) z) (- y a))))))
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 <= -5e-296) || !(t_1 <= 0.0)) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = t - ((-x / z) * (y - a));
}
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 <= -5e-296) || !(t_1 <= 0.0)) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); else tmp = Float64(t - Float64(Float64(Float64(-x) / z) * Float64(y - a))); 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, -5e-296], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t - N[(N[((-x) / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $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 -5 \cdot 10^{-296} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t - \frac{-x}{z} \cdot \left(y - a\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5.0000000000000003e-296 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 94.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6495.8
Applied rewrites95.8%
if -5.0000000000000003e-296 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f643.6
Applied rewrites3.6%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6499.8
Applied rewrites99.8%
Taylor expanded in x around inf
Applied rewrites99.8%
Final simplification96.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 (- INFINITY))
(* (/ x z) y)
(if (<= t_1 2e+292) (fma a (/ t z) t) (/ (* y x) z)))))
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 <= -((double) INFINITY)) {
tmp = (x / z) * y;
} else if (t_1 <= 2e+292) {
tmp = fma(a, (t / z), t);
} else {
tmp = (y * x) / z;
}
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 <= Float64(-Inf)) tmp = Float64(Float64(x / z) * y); elseif (t_1 <= 2e+292) tmp = fma(a, Float64(t / z), t); else tmp = Float64(Float64(y * x) / z); 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[LessEqual[t$95$1, (-Infinity)], N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$1, 2e+292], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / z), $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 -\infty:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+292}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -inf.0Initial program 85.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6495.1
Applied rewrites95.1%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6465.4
Applied rewrites65.4%
Taylor expanded in y around inf
Applied rewrites65.4%
Taylor expanded in x around inf
Applied rewrites50.6%
if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2e292Initial program 82.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6482.8
Applied rewrites82.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6448.7
Applied rewrites48.7%
Taylor expanded in y around 0
Applied rewrites35.4%
Taylor expanded in x around 0
Applied rewrites30.2%
if 2e292 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 93.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64100.0
Applied rewrites100.0%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6474.4
Applied rewrites74.4%
Taylor expanded in y around inf
Applied rewrites74.1%
Taylor expanded in x around inf
Applied rewrites55.3%
Final simplification34.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- x t) (/ y z))) (t_2 (* (/ (- t x) a) y)))
(if (<= y -4.15e+207)
t_2
(if (<= y -1.55e+109)
t_1
(if (<= y 2.2e+121)
(fma a (/ (- x) z) t)
(if (<= y 2.8e+247) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - t) * (y / z);
double t_2 = ((t - x) / a) * y;
double tmp;
if (y <= -4.15e+207) {
tmp = t_2;
} else if (y <= -1.55e+109) {
tmp = t_1;
} else if (y <= 2.2e+121) {
tmp = fma(a, (-x / z), t);
} else if (y <= 2.8e+247) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(x - t) * Float64(y / z)) t_2 = Float64(Float64(Float64(t - x) / a) * y) tmp = 0.0 if (y <= -4.15e+207) tmp = t_2; elseif (y <= -1.55e+109) tmp = t_1; elseif (y <= 2.2e+121) tmp = fma(a, Float64(Float64(-x) / z), t); elseif (y <= 2.8e+247) tmp = t_2; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.15e+207], t$95$2, If[LessEqual[y, -1.55e+109], t$95$1, If[LessEqual[y, 2.2e+121], N[(a * N[((-x) / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[y, 2.8e+247], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - t\right) \cdot \frac{y}{z}\\
t_2 := \frac{t - x}{a} \cdot y\\
\mathbf{if}\;y \leq -4.15 \cdot 10^{+207}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.55 \cdot 10^{+109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+121}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+247}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.1499999999999999e207 or 2.20000000000000001e121 < y < 2.7999999999999998e247Initial program 99.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6497.9
Applied rewrites97.9%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6477.1
Applied rewrites77.1%
Taylor expanded in y around inf
Applied rewrites76.9%
if -4.1499999999999999e207 < y < -1.54999999999999996e109 or 2.7999999999999998e247 < y Initial program 93.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6497.1
Applied rewrites97.1%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6479.1
Applied rewrites79.1%
Taylor expanded in y around inf
Applied rewrites72.6%
Applied rewrites75.9%
if -1.54999999999999996e109 < y < 2.20000000000000001e121Initial program 78.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6480.9
Applied rewrites80.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6448.2
Applied rewrites48.2%
Taylor expanded in y around 0
Applied rewrites39.1%
Taylor expanded in x around inf
Applied rewrites39.3%
Final simplification50.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ (- t x) a) y)))
(if (<= y -4.15e+207)
t_1
(if (<= y -1.35e+111)
(* (/ (- x t) z) y)
(if (<= y 2.2e+121)
(fma a (/ t z) t)
(if (<= y 2.8e+247) t_1 (* (- x t) (/ y z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((t - x) / a) * y;
double tmp;
if (y <= -4.15e+207) {
tmp = t_1;
} else if (y <= -1.35e+111) {
tmp = ((x - t) / z) * y;
} else if (y <= 2.2e+121) {
tmp = fma(a, (t / z), t);
} else if (y <= 2.8e+247) {
tmp = t_1;
} else {
tmp = (x - t) * (y / z);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(t - x) / a) * y) tmp = 0.0 if (y <= -4.15e+207) tmp = t_1; elseif (y <= -1.35e+111) tmp = Float64(Float64(Float64(x - t) / z) * y); elseif (y <= 2.2e+121) tmp = fma(a, Float64(t / z), t); elseif (y <= 2.8e+247) tmp = t_1; else tmp = Float64(Float64(x - t) * Float64(y / z)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.15e+207], t$95$1, If[LessEqual[y, -1.35e+111], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 2.2e+121], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[y, 2.8e+247], t$95$1, N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - x}{a} \cdot y\\
\mathbf{if}\;y \leq -4.15 \cdot 10^{+207}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{+111}:\\
\;\;\;\;\frac{x - t}{z} \cdot y\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+121}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+247}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x - t\right) \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -4.1499999999999999e207 or 2.20000000000000001e121 < y < 2.7999999999999998e247Initial program 99.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6497.9
Applied rewrites97.9%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6477.1
Applied rewrites77.1%
Taylor expanded in y around inf
Applied rewrites76.9%
if -4.1499999999999999e207 < y < -1.3499999999999999e111Initial program 100.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64100.0
Applied rewrites100.0%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6483.4
Applied rewrites83.4%
Taylor expanded in y around inf
Applied rewrites74.3%
if -1.3499999999999999e111 < y < 2.20000000000000001e121Initial program 78.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6481.0
Applied rewrites81.0%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6447.9
Applied rewrites47.9%
Taylor expanded in y around 0
Applied rewrites38.9%
Taylor expanded in x around 0
Applied rewrites33.2%
if 2.7999999999999998e247 < y Initial program 88.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6494.7
Applied rewrites94.7%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6480.6
Applied rewrites80.6%
Taylor expanded in y around inf
Applied rewrites75.7%
Applied rewrites81.9%
Final simplification46.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- x t) (/ y z))) (t_2 (* (/ (- t x) a) y)))
(if (<= y -4.15e+207)
t_2
(if (<= y -1.35e+111)
t_1
(if (<= y 2.2e+121) (fma a (/ t z) t) (if (<= y 2.8e+247) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - t) * (y / z);
double t_2 = ((t - x) / a) * y;
double tmp;
if (y <= -4.15e+207) {
tmp = t_2;
} else if (y <= -1.35e+111) {
tmp = t_1;
} else if (y <= 2.2e+121) {
tmp = fma(a, (t / z), t);
} else if (y <= 2.8e+247) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(x - t) * Float64(y / z)) t_2 = Float64(Float64(Float64(t - x) / a) * y) tmp = 0.0 if (y <= -4.15e+207) tmp = t_2; elseif (y <= -1.35e+111) tmp = t_1; elseif (y <= 2.2e+121) tmp = fma(a, Float64(t / z), t); elseif (y <= 2.8e+247) tmp = t_2; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.15e+207], t$95$2, If[LessEqual[y, -1.35e+111], t$95$1, If[LessEqual[y, 2.2e+121], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[y, 2.8e+247], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - t\right) \cdot \frac{y}{z}\\
t_2 := \frac{t - x}{a} \cdot y\\
\mathbf{if}\;y \leq -4.15 \cdot 10^{+207}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+121}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+247}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.1499999999999999e207 or 2.20000000000000001e121 < y < 2.7999999999999998e247Initial program 99.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6497.9
Applied rewrites97.9%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6477.1
Applied rewrites77.1%
Taylor expanded in y around inf
Applied rewrites76.9%
if -4.1499999999999999e207 < y < -1.3499999999999999e111 or 2.7999999999999998e247 < y Initial program 93.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6497.0
Applied rewrites97.0%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6481.9
Applied rewrites81.9%
Taylor expanded in y around inf
Applied rewrites75.1%
Applied rewrites78.5%
if -1.3499999999999999e111 < y < 2.20000000000000001e121Initial program 78.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6481.0
Applied rewrites81.0%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6447.9
Applied rewrites47.9%
Taylor expanded in y around 0
Applied rewrites38.9%
Taylor expanded in x around 0
Applied rewrites33.2%
Final simplification46.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* y t) a))))
(if (<= a -1.2e-29)
t_1
(if (<= a -7.2e-299)
(* (/ (- x t) z) y)
(if (<= a 1.16e-80) (fma a (/ (- x) z) t) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y * t) / a);
double tmp;
if (a <= -1.2e-29) {
tmp = t_1;
} else if (a <= -7.2e-299) {
tmp = ((x - t) / z) * y;
} else if (a <= 1.16e-80) {
tmp = fma(a, (-x / z), t);
} 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 (a <= -1.2e-29) tmp = t_1; elseif (a <= -7.2e-299) tmp = Float64(Float64(Float64(x - t) / z) * y); elseif (a <= 1.16e-80) tmp = fma(a, Float64(Float64(-x) / z), t); 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[a, -1.2e-29], t$95$1, If[LessEqual[a, -7.2e-299], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[a, 1.16e-80], N[(a * N[((-x) / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot t}{a}\\
\mathbf{if}\;a \leq -1.2 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -7.2 \cdot 10^{-299}:\\
\;\;\;\;\frac{x - t}{z} \cdot y\\
\mathbf{elif}\;a \leq 1.16 \cdot 10^{-80}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.19999999999999996e-29 or 1.15999999999999996e-80 < a Initial program 90.9%
Taylor expanded in z around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6465.5
Applied rewrites65.5%
Taylor expanded in x around 0
Applied rewrites61.0%
if -1.19999999999999996e-29 < a < -7.2e-299Initial program 82.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6483.9
Applied rewrites83.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6483.8
Applied rewrites83.8%
Taylor expanded in y around inf
Applied rewrites58.9%
if -7.2e-299 < a < 1.15999999999999996e-80Initial program 68.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6473.7
Applied rewrites73.7%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6489.0
Applied rewrites89.0%
Taylor expanded in y around 0
Applied rewrites59.7%
Taylor expanded in x around inf
Applied rewrites59.7%
Final simplification60.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ (- t x) a) y)))
(if (<= y -1.05e+107)
t_1
(if (<= y 2.2e+121)
(fma a (/ t z) t)
(if (<= y 2.3e+272) t_1 (* (/ (- t) z) y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((t - x) / a) * y;
double tmp;
if (y <= -1.05e+107) {
tmp = t_1;
} else if (y <= 2.2e+121) {
tmp = fma(a, (t / z), t);
} else if (y <= 2.3e+272) {
tmp = t_1;
} else {
tmp = (-t / z) * y;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(t - x) / a) * y) tmp = 0.0 if (y <= -1.05e+107) tmp = t_1; elseif (y <= 2.2e+121) tmp = fma(a, Float64(t / z), t); elseif (y <= 2.3e+272) tmp = t_1; else tmp = Float64(Float64(Float64(-t) / z) * y); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.05e+107], t$95$1, If[LessEqual[y, 2.2e+121], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[y, 2.3e+272], t$95$1, N[(N[((-t) / z), $MachinePrecision] * y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - x}{a} \cdot y\\
\mathbf{if}\;y \leq -1.05 \cdot 10^{+107}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+121}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+272}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-t}{z} \cdot y\\
\end{array}
\end{array}
if y < -1.05e107 or 2.20000000000000001e121 < y < 2.2999999999999999e272Initial program 98.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6498.4
Applied rewrites98.4%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6467.4
Applied rewrites67.4%
Taylor expanded in y around inf
Applied rewrites65.8%
if -1.05e107 < y < 2.20000000000000001e121Initial program 78.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6480.9
Applied rewrites80.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6448.2
Applied rewrites48.2%
Taylor expanded in y around 0
Applied rewrites39.1%
Taylor expanded in x around 0
Applied rewrites33.3%
if 2.2999999999999999e272 < y Initial program 91.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6491.3
Applied rewrites91.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6478.4
Applied rewrites78.4%
Taylor expanded in y around inf
Applied rewrites70.3%
Taylor expanded in x around 0
Applied rewrites68.8%
Final simplification42.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.25e+68)
(fma (- t x) (/ (- y z) a) x)
(if (<= a 7.2e-42)
(fma (- (- t x)) (/ (- y a) z) t)
(fma (- y z) (/ (- t x) a) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.25e+68) {
tmp = fma((t - x), ((y - z) / a), x);
} else if (a <= 7.2e-42) {
tmp = fma(-(t - x), ((y - a) / z), t);
} else {
tmp = fma((y - z), ((t - x) / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.25e+68) tmp = fma(Float64(t - x), Float64(Float64(y - z) / a), x); elseif (a <= 7.2e-42) tmp = fma(Float64(-Float64(t - x)), Float64(Float64(y - a) / z), t); else tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.25e+68], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 7.2e-42], N[((-N[(t - x), $MachinePrecision]) * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{+68}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\
\mathbf{elif}\;a \leq 7.2 \cdot 10^{-42}:\\
\;\;\;\;\mathsf{fma}\left(-\left(t - x\right), \frac{y - a}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\end{array}
\end{array}
if a < -1.2500000000000001e68Initial program 97.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6497.6
Applied rewrites97.6%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6488.5
Applied rewrites88.5%
if -1.2500000000000001e68 < a < 7.2000000000000004e-42Initial program 75.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
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6482.8
Applied rewrites82.8%
if 7.2000000000000004e-42 < a Initial program 91.7%
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.9
Applied rewrites80.9%
Final simplification83.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.5e-29) (not (<= a 7.2e-42))) (fma (- y z) (/ (- t x) a) x) (fma (/ (- t x) z) (- y) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.5e-29) || !(a <= 7.2e-42)) {
tmp = fma((y - z), ((t - x) / a), x);
} else {
tmp = fma(((t - x) / z), -y, t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.5e-29) || !(a <= 7.2e-42)) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); else tmp = fma(Float64(Float64(t - x) / z), Float64(-y), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.5e-29], N[Not[LessEqual[a, 7.2e-42]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * (-y) + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{-29} \lor \neg \left(a \leq 7.2 \cdot 10^{-42}\right):\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{z}, -y, t\right)\\
\end{array}
\end{array}
if a < -3.4999999999999997e-29 or 7.2000000000000004e-42 < a Initial 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--.f6479.5
Applied rewrites79.5%
if -3.4999999999999997e-29 < a < 7.2000000000000004e-42Initial program 76.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6479.5
Applied rewrites79.5%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6486.4
Applied rewrites86.4%
Taylor expanded in a around 0
Applied rewrites82.5%
Final simplification80.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.5e-29) (fma (/ (- t x) a) y x) (if (<= a 1.65e-31) (fma (/ (- t x) z) (- y) t) (fma (- t x) (/ y a) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.5e-29) {
tmp = fma(((t - x) / a), y, x);
} else if (a <= 1.65e-31) {
tmp = fma(((t - x) / z), -y, t);
} else {
tmp = fma((t - x), (y / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.5e-29) tmp = fma(Float64(Float64(t - x) / a), y, x); elseif (a <= 1.65e-31) tmp = fma(Float64(Float64(t - x) / z), Float64(-y), t); else tmp = fma(Float64(t - x), Float64(y / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.5e-29], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[a, 1.65e-31], N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * (-y) + t), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{-29}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{elif}\;a \leq 1.65 \cdot 10^{-31}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{z}, -y, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\end{array}
\end{array}
if a < -3.4999999999999997e-29Initial program 90.0%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6473.4
Applied rewrites73.4%
if -3.4999999999999997e-29 < a < 1.65e-31Initial program 76.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6479.9
Applied rewrites79.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6485.9
Applied rewrites85.9%
Taylor expanded in a around 0
Applied rewrites82.0%
if 1.65e-31 < a Initial program 91.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6491.6
Applied rewrites91.6%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6479.8
Applied rewrites79.8%
Taylor expanded in y around inf
Applied rewrites69.2%
Final simplification76.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -4e-29) (fma (/ (- t x) a) y x) (if (<= a 2.8e-30) (* (- y z) (/ t (- a z))) (fma (- t x) (/ y a) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4e-29) {
tmp = fma(((t - x) / a), y, x);
} else if (a <= 2.8e-30) {
tmp = (y - z) * (t / (a - z));
} else {
tmp = fma((t - x), (y / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4e-29) tmp = fma(Float64(Float64(t - x) / a), y, x); elseif (a <= 2.8e-30) tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z))); else tmp = fma(Float64(t - x), Float64(y / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4e-29], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[a, 2.8e-30], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{-29}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{-30}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\end{array}
\end{array}
if a < -3.99999999999999977e-29Initial program 90.0%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6473.4
Applied rewrites73.4%
if -3.99999999999999977e-29 < a < 2.79999999999999988e-30Initial program 76.6%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6464.0
Applied rewrites64.0%
if 2.79999999999999988e-30 < a Initial program 91.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6491.6
Applied rewrites91.6%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6479.8
Applied rewrites79.8%
Taylor expanded in y around inf
Applied rewrites69.2%
Final simplification67.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5.8e+87) (not (<= z 5.5e+121))) (fma a (/ (- x) z) t) (fma (/ (- t x) a) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.8e+87) || !(z <= 5.5e+121)) {
tmp = fma(a, (-x / z), t);
} else {
tmp = fma(((t - x) / a), y, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5.8e+87) || !(z <= 5.5e+121)) tmp = fma(a, Float64(Float64(-x) / z), 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, -5.8e+87], N[Not[LessEqual[z, 5.5e+121]], $MachinePrecision]], N[(a * N[((-x) / z), $MachinePrecision] + t), $MachinePrecision], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+87} \lor \neg \left(z \leq 5.5 \cdot 10^{+121}\right):\\
\;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\end{array}
\end{array}
if z < -5.7999999999999996e87 or 5.4999999999999998e121 < z Initial program 64.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6467.0
Applied rewrites67.0%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6481.8
Applied rewrites81.8%
Taylor expanded in y around 0
Applied rewrites65.5%
Taylor expanded in x around inf
Applied rewrites65.5%
if -5.7999999999999996e87 < z < 5.4999999999999998e121Initial program 93.8%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6466.6
Applied rewrites66.6%
Final simplification66.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -5.8e+87) (fma a (/ (- t x) z) t) (if (<= z 5.5e+121) (fma (- t x) (/ y a) x) (fma a (/ (- x) z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.8e+87) {
tmp = fma(a, ((t - x) / z), t);
} else if (z <= 5.5e+121) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = fma(a, (-x / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.8e+87) tmp = fma(a, Float64(Float64(t - x) / z), t); elseif (z <= 5.5e+121) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = fma(a, Float64(Float64(-x) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.8e+87], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 5.5e+121], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], N[(a * N[((-x) / z), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+87}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+121}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\
\end{array}
\end{array}
if z < -5.7999999999999996e87Initial program 68.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6471.4
Applied rewrites71.4%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6490.5
Applied rewrites90.5%
Taylor expanded in y around 0
Applied rewrites69.8%
if -5.7999999999999996e87 < z < 5.4999999999999998e121Initial program 93.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6494.8
Applied rewrites94.8%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6471.5
Applied rewrites71.5%
Taylor expanded in y around inf
Applied rewrites66.7%
if 5.4999999999999998e121 < z Initial program 57.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6461.3
Applied rewrites61.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6470.4
Applied rewrites70.4%
Taylor expanded in y around 0
Applied rewrites59.9%
Taylor expanded in x around inf
Applied rewrites60.2%
Final simplification66.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -5.8e+87) (fma a (/ (- t x) z) t) (if (<= z 5.5e+121) (fma (/ (- t x) a) y x) (fma a (/ (- x) z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.8e+87) {
tmp = fma(a, ((t - x) / z), t);
} else if (z <= 5.5e+121) {
tmp = fma(((t - x) / a), y, x);
} else {
tmp = fma(a, (-x / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.8e+87) tmp = fma(a, Float64(Float64(t - x) / z), t); elseif (z <= 5.5e+121) tmp = fma(Float64(Float64(t - x) / a), y, x); else tmp = fma(a, Float64(Float64(-x) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.8e+87], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 5.5e+121], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], N[(a * N[((-x) / z), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+87}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+121}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\
\end{array}
\end{array}
if z < -5.7999999999999996e87Initial program 68.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6471.4
Applied rewrites71.4%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6490.5
Applied rewrites90.5%
Taylor expanded in y around 0
Applied rewrites69.8%
if -5.7999999999999996e87 < z < 5.4999999999999998e121Initial program 93.8%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6466.6
Applied rewrites66.6%
if 5.4999999999999998e121 < z Initial program 57.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6461.3
Applied rewrites61.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6470.4
Applied rewrites70.4%
Taylor expanded in y around 0
Applied rewrites59.9%
Taylor expanded in x around inf
Applied rewrites60.2%
Final simplification66.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.2e-10) (not (<= z 6.8e-10))) (fma a (/ t z) t) (* t (/ y (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.2e-10) || !(z <= 6.8e-10)) {
tmp = fma(a, (t / z), t);
} else {
tmp = t * (y / (a - z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.2e-10) || !(z <= 6.8e-10)) tmp = fma(a, Float64(t / z), t); else tmp = Float64(t * Float64(y / Float64(a - z))); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.2e-10], N[Not[LessEqual[z, 6.8e-10]], $MachinePrecision]], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-10} \lor \neg \left(z \leq 6.8 \cdot 10^{-10}\right):\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if z < -1.2e-10 or 6.8000000000000003e-10 < z Initial program 74.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6476.3
Applied rewrites76.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6470.6
Applied rewrites70.6%
Taylor expanded in y around 0
Applied rewrites49.6%
Taylor expanded in x around 0
Applied rewrites43.5%
if -1.2e-10 < z < 6.8000000000000003e-10Initial program 93.9%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6453.6
Applied rewrites53.6%
Taylor expanded in x around 0
Applied rewrites36.5%
Final simplification40.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -5.8e+122) (not (<= y 1.65e+139))) (* (- t) (/ y z)) (fma a (/ t z) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.8e+122) || !(y <= 1.65e+139)) {
tmp = -t * (y / z);
} else {
tmp = fma(a, (t / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -5.8e+122) || !(y <= 1.65e+139)) tmp = Float64(Float64(-t) * Float64(y / z)); else tmp = fma(a, Float64(t / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.8e+122], N[Not[LessEqual[y, 1.65e+139]], $MachinePrecision]], N[((-t) * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+122} \lor \neg \left(y \leq 1.65 \cdot 10^{+139}\right):\\
\;\;\;\;\left(-t\right) \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\end{array}
\end{array}
if y < -5.8000000000000002e122 or 1.6500000000000001e139 < y Initial program 97.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6497.4
Applied rewrites97.4%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6466.2
Applied rewrites66.2%
Taylor expanded in y around inf
Applied rewrites60.8%
Taylor expanded in x around 0
Applied rewrites44.7%
if -5.8000000000000002e122 < y < 1.6500000000000001e139Initial program 79.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6481.4
Applied rewrites81.4%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6448.0
Applied rewrites48.0%
Taylor expanded in y around 0
Applied rewrites38.7%
Taylor expanded in x around 0
Applied rewrites33.1%
Final simplification36.2%
(FPCore (x y z t a) :precision binary64 (if (<= y -5.8e+122) (* (- t) (/ y z)) (if (<= y 1.65e+139) (fma a (/ t z) t) (* (/ (- t) z) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.8e+122) {
tmp = -t * (y / z);
} else if (y <= 1.65e+139) {
tmp = fma(a, (t / z), t);
} else {
tmp = (-t / z) * y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5.8e+122) tmp = Float64(Float64(-t) * Float64(y / z)); elseif (y <= 1.65e+139) tmp = fma(a, Float64(t / z), t); else tmp = Float64(Float64(Float64(-t) / z) * y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.8e+122], N[((-t) * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e+139], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision], N[(N[((-t) / z), $MachinePrecision] * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+122}:\\
\;\;\;\;\left(-t\right) \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+139}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-t}{z} \cdot y\\
\end{array}
\end{array}
if y < -5.8000000000000002e122Initial program 100.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6497.2
Applied rewrites97.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6464.0
Applied rewrites64.0%
Taylor expanded in y around inf
Applied rewrites55.5%
Taylor expanded in x around 0
Applied rewrites38.7%
if -5.8000000000000002e122 < y < 1.6500000000000001e139Initial program 79.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6481.4
Applied rewrites81.4%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6448.0
Applied rewrites48.0%
Taylor expanded in y around 0
Applied rewrites38.7%
Taylor expanded in x around 0
Applied rewrites33.1%
if 1.6500000000000001e139 < y Initial program 94.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6497.6
Applied rewrites97.6%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6468.5
Applied rewrites68.5%
Taylor expanded in y around inf
Applied rewrites66.4%
Taylor expanded in x around 0
Applied rewrites51.2%
Final simplification36.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.55e+109) (not (<= y 4.3e+77))) (/ (* y x) z) (+ x (- t x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.55e+109) || !(y <= 4.3e+77)) {
tmp = (y * x) / 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 ((y <= (-1.55d+109)) .or. (.not. (y <= 4.3d+77))) then
tmp = (y * x) / 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 ((y <= -1.55e+109) || !(y <= 4.3e+77)) {
tmp = (y * x) / z;
} else {
tmp = x + (t - x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.55e+109) or not (y <= 4.3e+77): tmp = (y * x) / z else: tmp = x + (t - x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.55e+109) || !(y <= 4.3e+77)) tmp = Float64(Float64(y * x) / 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 ((y <= -1.55e+109) || ~((y <= 4.3e+77))) tmp = (y * x) / z; else tmp = x + (t - x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.55e+109], N[Not[LessEqual[y, 4.3e+77]], $MachinePrecision]], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+109} \lor \neg \left(y \leq 4.3 \cdot 10^{+77}\right):\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right)\\
\end{array}
\end{array}
if y < -1.54999999999999996e109 or 4.29999999999999991e77 < y Initial program 96.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6496.4
Applied rewrites96.4%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6464.7
Applied rewrites64.7%
Taylor expanded in y around inf
Applied rewrites57.0%
Taylor expanded in x around inf
Applied rewrites36.9%
if -1.54999999999999996e109 < y < 4.29999999999999991e77Initial program 77.9%
Taylor expanded in z around inf
lower--.f6424.5
Applied rewrites24.5%
Final simplification28.6%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.55e+109) (* (/ x z) y) (if (<= y 4.3e+77) (+ x (- t x)) (/ (* y x) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.55e+109) {
tmp = (x / z) * y;
} else if (y <= 4.3e+77) {
tmp = x + (t - x);
} else {
tmp = (y * x) / z;
}
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 (y <= (-1.55d+109)) then
tmp = (x / z) * y
else if (y <= 4.3d+77) then
tmp = x + (t - x)
else
tmp = (y * x) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.55e+109) {
tmp = (x / z) * y;
} else if (y <= 4.3e+77) {
tmp = x + (t - x);
} else {
tmp = (y * x) / z;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.55e+109: tmp = (x / z) * y elif y <= 4.3e+77: tmp = x + (t - x) else: tmp = (y * x) / z return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.55e+109) tmp = Float64(Float64(x / z) * y); elseif (y <= 4.3e+77) tmp = Float64(x + Float64(t - x)); else tmp = Float64(Float64(y * x) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.55e+109) tmp = (x / z) * y; elseif (y <= 4.3e+77) tmp = x + (t - x); else tmp = (y * x) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.55e+109], N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 4.3e+77], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+109}:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{+77}:\\
\;\;\;\;x + \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\end{array}
\end{array}
if y < -1.54999999999999996e109Initial program 100.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6497.5
Applied rewrites97.5%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6462.9
Applied rewrites62.9%
Taylor expanded in y around inf
Applied rewrites55.2%
Taylor expanded in x around inf
Applied rewrites31.8%
if -1.54999999999999996e109 < y < 4.29999999999999991e77Initial program 77.9%
Taylor expanded in z around inf
lower--.f6424.5
Applied rewrites24.5%
if 4.29999999999999991e77 < y Initial program 93.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6495.4
Applied rewrites95.4%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
*-lft-identityN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6466.3
Applied rewrites66.3%
Taylor expanded in y around inf
Applied rewrites58.5%
Taylor expanded in x around inf
Applied rewrites41.4%
Final simplification28.7%
(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 84.1%
Taylor expanded in z around inf
lower--.f6419.0
Applied rewrites19.0%
(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 84.1%
Taylor expanded in z around inf
lower--.f6419.0
Applied rewrites19.0%
Taylor expanded in x around inf
Applied rewrites2.8%
herbie shell --seed 2024339
(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)))))