
(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 (/ (* (- z y) (- x t)) (- z a))))
(t_2 (/ (- x t) (- z a)))
(t_3 (- x (* (- z y) t_2))))
(if (<= t_3 -5e-227)
(fma t_2 (- y z) x)
(if (<= t_3 0.0)
(fma (fma t -1.0 x) (/ (- y a) z) t)
(if (<= t_3 2e+46) t_1 (if (<= t_3 1e+296) t_3 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((z - y) * (x - t)) / (z - a));
double t_2 = (x - t) / (z - a);
double t_3 = x - ((z - y) * t_2);
double tmp;
if (t_3 <= -5e-227) {
tmp = fma(t_2, (y - z), x);
} else if (t_3 <= 0.0) {
tmp = fma(fma(t, -1.0, x), ((y - a) / z), t);
} else if (t_3 <= 2e+46) {
tmp = t_1;
} else if (t_3 <= 1e+296) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(Float64(z - y) * Float64(x - t)) / Float64(z - a))) t_2 = Float64(Float64(x - t) / Float64(z - a)) t_3 = Float64(x - Float64(Float64(z - y) * t_2)) tmp = 0.0 if (t_3 <= -5e-227) tmp = fma(t_2, Float64(y - z), x); elseif (t_3 <= 0.0) tmp = fma(fma(t, -1.0, x), Float64(Float64(y - a) / z), t); elseif (t_3 <= 2e+46) tmp = t_1; elseif (t_3 <= 1e+296) tmp = t_3; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(z - y), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(N[(z - y), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -5e-227], N[(t$95$2 * N[(y - z), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(N[(t * -1.0 + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[t$95$3, 2e+46], t$95$1, If[LessEqual[t$95$3, 1e+296], t$95$3, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{\left(z - y\right) \cdot \left(x - t\right)}{z - a}\\
t_2 := \frac{x - t}{z - a}\\
t_3 := x - \left(z - y\right) \cdot t\_2\\
\mathbf{if}\;t\_3 \leq -5 \cdot 10^{-227}:\\
\;\;\;\;\mathsf{fma}\left(t\_2, y - z, x\right)\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(t, -1, x\right), \frac{y - a}{z}, t\right)\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_3 \leq 10^{+296}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999961e-227Initial program 99.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6499.6
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--.f6499.6
Applied rewrites99.6%
if -4.99999999999999961e-227 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.2%
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 rewrites96.0%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2e46 or 9.99999999999999981e295 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 79.1%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
frac-2negN/A
lower-/.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/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--.f6497.2
Applied rewrites97.2%
if 2e46 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999981e295Initial program 99.0%
Final simplification98.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ y (- z a)) (- x t)))
(t_2 (- x (* (- z y) (/ (- x t) (- z a)))))
(t_3 (- x (* (- z y) (/ t (- a z))))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -5e-227)
t_3
(if (<= t_2 2e-309)
(- t (/ (* (- a y) (- x t)) z))
(if (<= t_2 1e+296) t_3 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / (z - a)) * (x - t);
double t_2 = x - ((z - y) * ((x - t) / (z - a)));
double t_3 = x - ((z - y) * (t / (a - z)));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -5e-227) {
tmp = t_3;
} else if (t_2 <= 2e-309) {
tmp = t - (((a - y) * (x - t)) / z);
} else if (t_2 <= 1e+296) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y / (z - a)) * (x - t);
double t_2 = x - ((z - y) * ((x - t) / (z - a)));
double t_3 = x - ((z - y) * (t / (a - z)));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -5e-227) {
tmp = t_3;
} else if (t_2 <= 2e-309) {
tmp = t - (((a - y) * (x - t)) / z);
} else if (t_2 <= 1e+296) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / (z - a)) * (x - t) t_2 = x - ((z - y) * ((x - t) / (z - a))) t_3 = x - ((z - y) * (t / (a - z))) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -5e-227: tmp = t_3 elif t_2 <= 2e-309: tmp = t - (((a - y) * (x - t)) / z) elif t_2 <= 1e+296: tmp = t_3 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / Float64(z - a)) * Float64(x - t)) t_2 = Float64(x - Float64(Float64(z - y) * Float64(Float64(x - t) / Float64(z - a)))) t_3 = Float64(x - Float64(Float64(z - y) * Float64(t / Float64(a - z)))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -5e-227) tmp = t_3; elseif (t_2 <= 2e-309) tmp = Float64(t - Float64(Float64(Float64(a - y) * Float64(x - t)) / z)); elseif (t_2 <= 1e+296) tmp = t_3; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / (z - a)) * (x - t); t_2 = x - ((z - y) * ((x - t) / (z - a))); t_3 = x - ((z - y) * (t / (a - z))); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -5e-227) tmp = t_3; elseif (t_2 <= 2e-309) tmp = t - (((a - y) * (x - t)) / z); elseif (t_2 <= 1e+296) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(z - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(N[(z - y), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -5e-227], t$95$3, If[LessEqual[t$95$2, 2e-309], N[(t - N[(N[(N[(a - y), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+296], t$95$3, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z - a} \cdot \left(x - t\right)\\
t_2 := x - \left(z - y\right) \cdot \frac{x - t}{z - a}\\
t_3 := x - \left(z - y\right) \cdot \frac{t}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-227}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-309}:\\
\;\;\;\;t - \frac{\left(a - y\right) \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;t\_2 \leq 10^{+296}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -inf.0 or 9.99999999999999981e295 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 89.4%
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--.f6490.8
Applied rewrites90.8%
if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999961e-227 or 1.9999999999999988e-309 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999981e295Initial program 94.4%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f6479.3
Applied rewrites79.3%
if -4.99999999999999961e-227 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.9999999999999988e-309Initial program 3.2%
Taylor expanded in z around inf
lower--.f643.2
Applied rewrites3.2%
Taylor expanded in t around 0
Applied rewrites3.2%
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 rewrites87.9%
Final simplification82.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x t) (- z a))) (t_2 (- x (* (- z y) t_1))))
(if (<= t_2 -5e-227)
(fma t_1 (- y z) x)
(if (<= t_2 2e-309)
(fma (fma t -1.0 x) (/ (- y a) z) t)
(if (<= t_2 1e-80)
(fma (/ (- z y) (- z a)) (fma x (/ t x) (- x)) x)
(- x (/ (- z y) (/ (- z a) (- x t)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - t) / (z - a);
double t_2 = x - ((z - y) * t_1);
double tmp;
if (t_2 <= -5e-227) {
tmp = fma(t_1, (y - z), x);
} else if (t_2 <= 2e-309) {
tmp = fma(fma(t, -1.0, x), ((y - a) / z), t);
} else if (t_2 <= 1e-80) {
tmp = fma(((z - y) / (z - a)), fma(x, (t / x), -x), x);
} else {
tmp = x - ((z - y) / ((z - a) / (x - t)));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(x - t) / Float64(z - a)) t_2 = Float64(x - Float64(Float64(z - y) * t_1)) tmp = 0.0 if (t_2 <= -5e-227) tmp = fma(t_1, Float64(y - z), x); elseif (t_2 <= 2e-309) tmp = fma(fma(t, -1.0, x), Float64(Float64(y - a) / z), t); elseif (t_2 <= 1e-80) tmp = fma(Float64(Float64(z - y) / Float64(z - a)), fma(x, Float64(t / x), Float64(-x)), x); else tmp = Float64(x - Float64(Float64(z - y) / Float64(Float64(z - a) / Float64(x - t)))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(z - y), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-227], N[(t$95$1 * N[(y - z), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$2, 2e-309], N[(N[(t * -1.0 + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[t$95$2, 1e-80], N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x * N[(t / x), $MachinePrecision] + (-x)), $MachinePrecision] + x), $MachinePrecision], N[(x - N[(N[(z - y), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - t}{z - a}\\
t_2 := x - \left(z - y\right) \cdot t\_1\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-227}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, y - z, x\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-309}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(t, -1, x\right), \frac{y - a}{z}, t\right)\\
\mathbf{elif}\;t\_2 \leq 10^{-80}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - y}{z - a}, \mathsf{fma}\left(x, \frac{t}{x}, -x\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z - y}{\frac{z - a}{x - t}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999961e-227Initial program 99.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6499.6
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--.f6499.6
Applied rewrites99.6%
if -4.99999999999999961e-227 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.9999999999999988e-309Initial program 3.2%
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 rewrites96.1%
if 1.9999999999999988e-309 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999961e-81Initial program 52.6%
Taylor expanded in x around inf
+-commutativeN/A
distribute-lft-inN/A
+-commutativeN/A
distribute-lft-inN/A
times-fracN/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
distribute-rgt-outN/A
*-rgt-identityN/A
Applied rewrites90.1%
if 9.99999999999999961e-81 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 95.4%
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
un-div-invN/A
lower-/.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--.f6496.6
Applied rewrites96.6%
Final simplification97.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x t) (- z a))) (t_2 (- x (* (- z y) t_1))))
(if (<= t_2 -5e-227)
(fma t_1 (- y z) x)
(if (<= t_2 0.0)
(fma (fma t -1.0 x) (/ (- y a) z) t)
(if (<= t_2 1e-80)
(- x (/ (* (- z y) (- x t)) (- z a)))
(- x (/ (- z y) (/ (- z a) (- x t)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - t) / (z - a);
double t_2 = x - ((z - y) * t_1);
double tmp;
if (t_2 <= -5e-227) {
tmp = fma(t_1, (y - z), x);
} else if (t_2 <= 0.0) {
tmp = fma(fma(t, -1.0, x), ((y - a) / z), t);
} else if (t_2 <= 1e-80) {
tmp = x - (((z - y) * (x - t)) / (z - a));
} else {
tmp = x - ((z - y) / ((z - a) / (x - t)));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(x - t) / Float64(z - a)) t_2 = Float64(x - Float64(Float64(z - y) * t_1)) tmp = 0.0 if (t_2 <= -5e-227) tmp = fma(t_1, Float64(y - z), x); elseif (t_2 <= 0.0) tmp = fma(fma(t, -1.0, x), Float64(Float64(y - a) / z), t); elseif (t_2 <= 1e-80) tmp = Float64(x - Float64(Float64(Float64(z - y) * Float64(x - t)) / Float64(z - a))); else tmp = Float64(x - Float64(Float64(z - y) / Float64(Float64(z - a) / Float64(x - t)))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(z - y), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-227], N[(t$95$1 * N[(y - z), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(t * -1.0 + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[t$95$2, 1e-80], N[(x - N[(N[(N[(z - y), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z - y), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - t}{z - a}\\
t_2 := x - \left(z - y\right) \cdot t\_1\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-227}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, y - z, x\right)\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(t, -1, x\right), \frac{y - a}{z}, t\right)\\
\mathbf{elif}\;t\_2 \leq 10^{-80}:\\
\;\;\;\;x - \frac{\left(z - y\right) \cdot \left(x - t\right)}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z - y}{\frac{z - a}{x - t}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999961e-227Initial program 99.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6499.6
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--.f6499.6
Applied rewrites99.6%
if -4.99999999999999961e-227 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.2%
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 rewrites96.0%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999961e-81Initial program 50.2%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
frac-2negN/A
lower-/.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/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.4
Applied rewrites90.4%
if 9.99999999999999961e-81 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 95.4%
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
un-div-invN/A
lower-/.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--.f6496.6
Applied rewrites96.6%
Final simplification97.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x t) (- z a))) (t_2 (- x (* (- z y) t_1))))
(if (<= t_2 -5e-227)
(fma t_1 (- y z) x)
(if (<= t_2 2e-309) (fma (fma t -1.0 x) (/ (- y a) z) t) t_2))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - t) / (z - a);
double t_2 = x - ((z - y) * t_1);
double tmp;
if (t_2 <= -5e-227) {
tmp = fma(t_1, (y - z), x);
} else if (t_2 <= 2e-309) {
tmp = fma(fma(t, -1.0, x), ((y - a) / z), t);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(x - t) / Float64(z - a)) t_2 = Float64(x - Float64(Float64(z - y) * t_1)) tmp = 0.0 if (t_2 <= -5e-227) tmp = fma(t_1, Float64(y - z), x); elseif (t_2 <= 2e-309) tmp = fma(fma(t, -1.0, x), Float64(Float64(y - a) / z), t); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(z - y), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-227], N[(t$95$1 * N[(y - z), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$2, 2e-309], N[(N[(t * -1.0 + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - t}{z - a}\\
t_2 := x - \left(z - y\right) \cdot t\_1\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-227}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, y - z, x\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-309}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(t, -1, x\right), \frac{y - a}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999961e-227Initial program 99.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6499.6
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--.f6499.6
Applied rewrites99.6%
if -4.99999999999999961e-227 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.9999999999999988e-309Initial program 3.2%
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 rewrites96.1%
if 1.9999999999999988e-309 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 89.3%
Final simplification93.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x t) (- z a)))
(t_2 (fma t_1 (- y z) x))
(t_3 (- x (* (- z y) t_1))))
(if (<= t_3 -5e-227)
t_2
(if (<= t_3 2e-309) (fma (fma t -1.0 x) (/ (- y a) z) t) t_2))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - t) / (z - a);
double t_2 = fma(t_1, (y - z), x);
double t_3 = x - ((z - y) * t_1);
double tmp;
if (t_3 <= -5e-227) {
tmp = t_2;
} else if (t_3 <= 2e-309) {
tmp = fma(fma(t, -1.0, x), ((y - a) / z), t);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(x - t) / Float64(z - a)) t_2 = fma(t_1, Float64(y - z), x) t_3 = Float64(x - Float64(Float64(z - y) * t_1)) tmp = 0.0 if (t_3 <= -5e-227) tmp = t_2; elseif (t_3 <= 2e-309) tmp = fma(fma(t, -1.0, x), Float64(Float64(y - a) / z), t); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(y - z), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(N[(z - y), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -5e-227], t$95$2, If[LessEqual[t$95$3, 2e-309], N[(N[(t * -1.0 + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - t}{z - a}\\
t_2 := \mathsf{fma}\left(t\_1, y - z, x\right)\\
t_3 := x - \left(z - y\right) \cdot t\_1\\
\mathbf{if}\;t\_3 \leq -5 \cdot 10^{-227}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{-309}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(t, -1, x\right), \frac{y - a}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999961e-227 or 1.9999999999999988e-309 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 93.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6493.4
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--.f6493.4
Applied rewrites93.4%
if -4.99999999999999961e-227 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.9999999999999988e-309Initial program 3.2%
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 rewrites96.1%
Final simplification93.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* (- z y) (/ t (- a z)))))
(t_2 (fma (fma t -1.0 x) (/ (- y a) z) t)))
(if (<= z -1.12e+120)
t_2
(if (<= z -4.6e-178)
t_1
(if (<= z 8e-135)
(fma (/ (- y z) a) (- t x) x)
(if (<= z 9.3e+80) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((z - y) * (t / (a - z)));
double t_2 = fma(fma(t, -1.0, x), ((y - a) / z), t);
double tmp;
if (z <= -1.12e+120) {
tmp = t_2;
} else if (z <= -4.6e-178) {
tmp = t_1;
} else if (z <= 8e-135) {
tmp = fma(((y - z) / a), (t - x), x);
} else if (z <= 9.3e+80) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(z - y) * Float64(t / Float64(a - z)))) t_2 = fma(fma(t, -1.0, x), Float64(Float64(y - a) / z), t) tmp = 0.0 if (z <= -1.12e+120) tmp = t_2; elseif (z <= -4.6e-178) tmp = t_1; elseif (z <= 8e-135) tmp = fma(Float64(Float64(y - z) / a), Float64(t - x), x); elseif (z <= 9.3e+80) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(z - y), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t * -1.0 + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.12e+120], t$95$2, If[LessEqual[z, -4.6e-178], t$95$1, If[LessEqual[z, 8e-135], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 9.3e+80], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \left(z - y\right) \cdot \frac{t}{a - z}\\
t_2 := \mathsf{fma}\left(\mathsf{fma}\left(t, -1, x\right), \frac{y - a}{z}, t\right)\\
\mathbf{if}\;z \leq -1.12 \cdot 10^{+120}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{-178}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-135}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{elif}\;z \leq 9.3 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.12000000000000005e120 or 9.30000000000000017e80 < z Initial program 60.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 rewrites92.0%
if -1.12000000000000005e120 < z < -4.59999999999999989e-178 or 8.0000000000000003e-135 < z < 9.30000000000000017e80Initial program 92.4%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f6477.2
Applied rewrites77.2%
if -4.59999999999999989e-178 < z < 8.0000000000000003e-135Initial program 95.4%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6492.5
Applied rewrites92.5%
Final simplification86.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y z) a) (- t x) x)))
(if (<= a -1.35e+50)
t_1
(if (<= a -6.1e-173)
(- t (/ (* (- a y) (- x t)) z))
(if (<= a 2.25e-107)
(fma (/ (- x t) z) y t)
(if (<= a 7.5e+28) (* (/ t (- z a)) (- z y)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - z) / a), (t - x), x);
double tmp;
if (a <= -1.35e+50) {
tmp = t_1;
} else if (a <= -6.1e-173) {
tmp = t - (((a - y) * (x - t)) / z);
} else if (a <= 2.25e-107) {
tmp = fma(((x - t) / z), y, t);
} else if (a <= 7.5e+28) {
tmp = (t / (z - a)) * (z - y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - z) / a), Float64(t - x), x) tmp = 0.0 if (a <= -1.35e+50) tmp = t_1; elseif (a <= -6.1e-173) tmp = Float64(t - Float64(Float64(Float64(a - y) * Float64(x - t)) / z)); elseif (a <= 2.25e-107) tmp = fma(Float64(Float64(x - t) / z), y, t); elseif (a <= 7.5e+28) tmp = Float64(Float64(t / Float64(z - a)) * Float64(z - y)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.35e+50], t$95$1, If[LessEqual[a, -6.1e-173], N[(t - N[(N[(N[(a - y), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.25e-107], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision], If[LessEqual[a, 7.5e+28], N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{if}\;a \leq -1.35 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -6.1 \cdot 10^{-173}:\\
\;\;\;\;t - \frac{\left(a - y\right) \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;a \leq 2.25 \cdot 10^{-107}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{+28}:\\
\;\;\;\;\frac{t}{z - a} \cdot \left(z - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.35e50 or 7.4999999999999998e28 < a Initial program 87.9%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6478.8
Applied rewrites78.8%
if -1.35e50 < a < -6.0999999999999998e-173Initial program 75.1%
Taylor expanded in z around inf
lower--.f6422.6
Applied rewrites22.6%
Taylor expanded in t around 0
Applied rewrites2.5%
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 rewrites75.3%
if -6.0999999999999998e-173 < a < 2.25000000000000008e-107Initial program 79.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 rewrites91.1%
Taylor expanded in a around 0
Applied rewrites93.6%
if 2.25000000000000008e-107 < a < 7.4999999999999998e28Initial program 78.2%
Taylor expanded in t 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--.f6467.8
Applied rewrites67.8%
Final simplification80.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y z) a) (- t x) x)))
(if (<= a -5.3e+78)
t_1
(if (<= a 2.25e-107)
(fma (/ (- x t) z) y t)
(if (<= a 7.5e+28) (* (/ t (- z a)) (- z y)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - z) / a), (t - x), x);
double tmp;
if (a <= -5.3e+78) {
tmp = t_1;
} else if (a <= 2.25e-107) {
tmp = fma(((x - t) / z), y, t);
} else if (a <= 7.5e+28) {
tmp = (t / (z - a)) * (z - y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - z) / a), Float64(t - x), x) tmp = 0.0 if (a <= -5.3e+78) tmp = t_1; elseif (a <= 2.25e-107) tmp = fma(Float64(Float64(x - t) / z), y, t); elseif (a <= 7.5e+28) tmp = Float64(Float64(t / Float64(z - a)) * Float64(z - y)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -5.3e+78], t$95$1, If[LessEqual[a, 2.25e-107], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision], If[LessEqual[a, 7.5e+28], N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{if}\;a \leq -5.3 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.25 \cdot 10^{-107}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{+28}:\\
\;\;\;\;\frac{t}{z - a} \cdot \left(z - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -5.29999999999999961e78 or 7.4999999999999998e28 < a Initial program 88.5%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6480.0
Applied rewrites80.0%
if -5.29999999999999961e78 < a < 2.25000000000000008e-107Initial program 77.5%
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 rewrites85.1%
Taylor expanded in a around 0
Applied rewrites80.9%
if 2.25000000000000008e-107 < a < 7.4999999999999998e28Initial program 78.2%
Taylor expanded in t 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--.f6467.8
Applied rewrites67.8%
Final simplification78.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ y a) (- t x) x)))
(if (<= a -5.3e+78)
t_1
(if (<= a 2.25e-107)
(fma (/ (- x t) z) y t)
(if (<= a 7.5e+28) (* (/ t (- z a)) (- z y)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y / a), (t - x), x);
double tmp;
if (a <= -5.3e+78) {
tmp = t_1;
} else if (a <= 2.25e-107) {
tmp = fma(((x - t) / z), y, t);
} else if (a <= 7.5e+28) {
tmp = (t / (z - a)) * (z - y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y / a), Float64(t - x), x) tmp = 0.0 if (a <= -5.3e+78) tmp = t_1; elseif (a <= 2.25e-107) tmp = fma(Float64(Float64(x - t) / z), y, t); elseif (a <= 7.5e+28) tmp = Float64(Float64(t / Float64(z - a)) * Float64(z - y)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -5.3e+78], t$95$1, If[LessEqual[a, 2.25e-107], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision], If[LessEqual[a, 7.5e+28], N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{if}\;a \leq -5.3 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.25 \cdot 10^{-107}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{+28}:\\
\;\;\;\;\frac{t}{z - a} \cdot \left(z - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -5.29999999999999961e78 or 7.4999999999999998e28 < a Initial program 88.5%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6471.8
Applied rewrites71.8%
Applied rewrites72.6%
if -5.29999999999999961e78 < a < 2.25000000000000008e-107Initial program 77.5%
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 rewrites85.1%
Taylor expanded in a around 0
Applied rewrites80.9%
if 2.25000000000000008e-107 < a < 7.4999999999999998e28Initial program 78.2%
Taylor expanded in t 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--.f6467.8
Applied rewrites67.8%
Final simplification75.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ y a) (- t x) x)))
(if (<= a -5.3e+78)
t_1
(if (<= a 14200000000.0) (fma (/ (- x t) z) y t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y / a), (t - x), x);
double tmp;
if (a <= -5.3e+78) {
tmp = t_1;
} else if (a <= 14200000000.0) {
tmp = fma(((x - t) / z), y, t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y / a), Float64(t - x), x) tmp = 0.0 if (a <= -5.3e+78) tmp = t_1; elseif (a <= 14200000000.0) tmp = fma(Float64(Float64(x - t) / z), y, t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -5.3e+78], t$95$1, If[LessEqual[a, 14200000000.0], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{if}\;a \leq -5.3 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 14200000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -5.29999999999999961e78 or 1.42e10 < a Initial program 88.8%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6471.7
Applied rewrites71.7%
Applied rewrites72.4%
if -5.29999999999999961e78 < a < 1.42e10Initial program 77.2%
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.7%
Taylor expanded in a around 0
Applied rewrites73.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.3e+78) (* (- 1.0 (/ y a)) x) (if (<= a 8.2e+40) (fma (/ (- x t) z) y t) (+ (* (/ y a) t) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.3e+78) {
tmp = (1.0 - (y / a)) * x;
} else if (a <= 8.2e+40) {
tmp = fma(((x - t) / z), y, t);
} else {
tmp = ((y / a) * t) + x;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.3e+78) tmp = Float64(Float64(1.0 - Float64(y / a)) * x); elseif (a <= 8.2e+40) tmp = fma(Float64(Float64(x - t) / z), y, t); else tmp = Float64(Float64(Float64(y / a) * t) + x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.3e+78], N[(N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[a, 8.2e+40], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision], N[(N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.3 \cdot 10^{+78}:\\
\;\;\;\;\left(1 - \frac{y}{a}\right) \cdot x\\
\mathbf{elif}\;a \leq 8.2 \cdot 10^{+40}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot t + x\\
\end{array}
\end{array}
if a < -5.29999999999999961e78Initial program 88.3%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6472.1
Applied rewrites72.1%
Taylor expanded in t around inf
Applied rewrites10.9%
Taylor expanded in x around inf
Applied rewrites62.8%
if -5.29999999999999961e78 < a < 8.2000000000000003e40Initial program 77.7%
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 rewrites77.8%
Taylor expanded in a around 0
Applied rewrites73.0%
if 8.2000000000000003e40 < a Initial program 89.6%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6471.1
Applied rewrites71.1%
Taylor expanded in t around inf
Applied rewrites63.9%
Final simplification69.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- t) (/ y z) t))) (if (<= z -4e+136) t_1 (if (<= z 3.05e+80) (+ (* (/ y a) t) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-t, (y / z), t);
double tmp;
if (z <= -4e+136) {
tmp = t_1;
} else if (z <= 3.05e+80) {
tmp = ((y / a) * t) + x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(-t), Float64(y / z), t) tmp = 0.0 if (z <= -4e+136) tmp = t_1; elseif (z <= 3.05e+80) tmp = Float64(Float64(Float64(y / a) * t) + x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) * N[(y / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -4e+136], t$95$1, If[LessEqual[z, 3.05e+80], N[(N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -4 \cdot 10^{+136}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.05 \cdot 10^{+80}:\\
\;\;\;\;\frac{y}{a} \cdot t + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.00000000000000023e136 or 3.04999999999999988e80 < z Initial program 60.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 rewrites92.8%
Taylor expanded in t around inf
Applied rewrites68.0%
Taylor expanded in a around 0
Applied rewrites68.0%
if -4.00000000000000023e136 < z < 3.04999999999999988e80Initial program 92.9%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6464.8
Applied rewrites64.8%
Taylor expanded in t around inf
Applied rewrites55.9%
Final simplification59.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- t) (/ y z) t))) (if (<= z -4e+136) t_1 (if (<= z 3.05e+80) (fma (/ t a) y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-t, (y / z), t);
double tmp;
if (z <= -4e+136) {
tmp = t_1;
} else if (z <= 3.05e+80) {
tmp = fma((t / a), y, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(-t), Float64(y / z), t) tmp = 0.0 if (z <= -4e+136) tmp = t_1; elseif (z <= 3.05e+80) tmp = fma(Float64(t / a), y, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) * N[(y / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -4e+136], t$95$1, If[LessEqual[z, 3.05e+80], N[(N[(t / a), $MachinePrecision] * y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, \frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -4 \cdot 10^{+136}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.05 \cdot 10^{+80}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.00000000000000023e136 or 3.04999999999999988e80 < z Initial program 60.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 rewrites92.8%
Taylor expanded in t around inf
Applied rewrites68.0%
Taylor expanded in a around 0
Applied rewrites68.0%
if -4.00000000000000023e136 < z < 3.04999999999999988e80Initial program 92.9%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6464.8
Applied rewrites64.8%
Taylor expanded in t around inf
Applied rewrites54.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.1e-6) (* (- 1.0 (/ y a)) x) (if (<= a 6.8e-108) (* (/ (- x t) z) y) (fma (/ t a) y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.1e-6) {
tmp = (1.0 - (y / a)) * x;
} else if (a <= 6.8e-108) {
tmp = ((x - t) / z) * y;
} else {
tmp = fma((t / a), y, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.1e-6) tmp = Float64(Float64(1.0 - Float64(y / a)) * x); elseif (a <= 6.8e-108) tmp = Float64(Float64(Float64(x - t) / z) * y); else tmp = fma(Float64(t / a), y, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.1e-6], N[(N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[a, 6.8e-108], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision], N[(N[(t / a), $MachinePrecision] * y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{-6}:\\
\;\;\;\;\left(1 - \frac{y}{a}\right) \cdot x\\
\mathbf{elif}\;a \leq 6.8 \cdot 10^{-108}:\\
\;\;\;\;\frac{x - t}{z} \cdot y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t}{a}, y, x\right)\\
\end{array}
\end{array}
if a < -1.1000000000000001e-6Initial program 85.5%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6463.3
Applied rewrites63.3%
Taylor expanded in t around inf
Applied rewrites13.3%
Taylor expanded in x around inf
Applied rewrites53.5%
if -1.1000000000000001e-6 < a < 6.80000000000000004e-108Initial program 78.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 rewrites87.9%
Taylor expanded in y around inf
Applied rewrites50.7%
if 6.80000000000000004e-108 < a Initial program 83.7%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6460.1
Applied rewrites60.1%
Taylor expanded in t around inf
Applied rewrites50.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (- t x) x))) (if (<= z -7.6e+136) t_1 (if (<= z 3.9e+82) (fma (/ t a) y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) + x;
double tmp;
if (z <= -7.6e+136) {
tmp = t_1;
} else if (z <= 3.9e+82) {
tmp = fma((t / a), y, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) + x) tmp = 0.0 if (z <= -7.6e+136) tmp = t_1; elseif (z <= 3.9e+82) tmp = fma(Float64(t / a), y, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -7.6e+136], t$95$1, If[LessEqual[z, 3.9e+82], N[(N[(t / a), $MachinePrecision] * y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - x\right) + x\\
\mathbf{if}\;z \leq -7.6 \cdot 10^{+136}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{+82}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t}{a}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.60000000000000029e136 or 3.89999999999999976e82 < z Initial program 60.6%
Taylor expanded in z around inf
lower--.f6444.6
Applied rewrites44.6%
if -7.60000000000000029e136 < z < 3.89999999999999976e82Initial program 92.9%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6464.8
Applied rewrites64.8%
Taylor expanded in t around inf
Applied rewrites54.8%
Final simplification51.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (- t x) x))) (if (<= z -8e-101) t_1 (if (<= z 0.000185) (* (/ y a) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) + x;
double tmp;
if (z <= -8e-101) {
tmp = t_1;
} else if (z <= 0.000185) {
tmp = (y / a) * t;
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: tmp
t_1 = (t - x) + x
if (z <= (-8d-101)) then
tmp = t_1
else if (z <= 0.000185d0) then
tmp = (y / a) * t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) + x;
double tmp;
if (z <= -8e-101) {
tmp = t_1;
} else if (z <= 0.000185) {
tmp = (y / a) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t - x) + x tmp = 0 if z <= -8e-101: tmp = t_1 elif z <= 0.000185: tmp = (y / a) * t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) + x) tmp = 0.0 if (z <= -8e-101) tmp = t_1; elseif (z <= 0.000185) tmp = Float64(Float64(y / a) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (t - x) + x; tmp = 0.0; if (z <= -8e-101) tmp = t_1; elseif (z <= 0.000185) tmp = (y / a) * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -8e-101], t$95$1, If[LessEqual[z, 0.000185], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - x\right) + x\\
\mathbf{if}\;z \leq -8 \cdot 10^{-101}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.000185:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.00000000000000041e-101 or 1.85e-4 < z Initial program 73.7%
Taylor expanded in z around inf
lower--.f6433.1
Applied rewrites33.1%
if -8.00000000000000041e-101 < z < 1.85e-4Initial program 95.2%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6480.2
Applied rewrites80.2%
Taylor expanded in t around inf
Applied rewrites35.0%
Applied rewrites40.8%
Final simplification36.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (- t x) x))) (if (<= z -8e-101) t_1 (if (<= z 0.000185) (* (/ t a) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) + x;
double tmp;
if (z <= -8e-101) {
tmp = t_1;
} else if (z <= 0.000185) {
tmp = (t / a) * y;
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: tmp
t_1 = (t - x) + x
if (z <= (-8d-101)) then
tmp = t_1
else if (z <= 0.000185d0) then
tmp = (t / a) * y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) + x;
double tmp;
if (z <= -8e-101) {
tmp = t_1;
} else if (z <= 0.000185) {
tmp = (t / a) * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t - x) + x tmp = 0 if z <= -8e-101: tmp = t_1 elif z <= 0.000185: tmp = (t / a) * y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) + x) tmp = 0.0 if (z <= -8e-101) tmp = t_1; elseif (z <= 0.000185) tmp = Float64(Float64(t / a) * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (t - x) + x; tmp = 0.0; if (z <= -8e-101) tmp = t_1; elseif (z <= 0.000185) tmp = (t / a) * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -8e-101], t$95$1, If[LessEqual[z, 0.000185], N[(N[(t / a), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - x\right) + x\\
\mathbf{if}\;z \leq -8 \cdot 10^{-101}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.000185:\\
\;\;\;\;\frac{t}{a} \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.00000000000000041e-101 or 1.85e-4 < z Initial program 73.7%
Taylor expanded in z around inf
lower--.f6433.1
Applied rewrites33.1%
if -8.00000000000000041e-101 < z < 1.85e-4Initial program 95.2%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6480.2
Applied rewrites80.2%
Taylor expanded in t around inf
Applied rewrites35.0%
Applied rewrites39.0%
Final simplification35.4%
(FPCore (x y z t a) :precision binary64 (+ (- t x) x))
double code(double x, double y, double z, double t, double a) {
return (t - 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 = (t - x) + x
end function
public static double code(double x, double y, double z, double t, double a) {
return (t - x) + x;
}
def code(x, y, z, t, a): return (t - x) + x
function code(x, y, z, t, a) return Float64(Float64(t - x) + x) end
function tmp = code(x, y, z, t, a) tmp = (t - x) + x; end
code[x_, y_, z_, t_, a_] := N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\left(t - x\right) + x
\end{array}
Initial program 82.2%
Taylor expanded in z around inf
lower--.f6422.2
Applied rewrites22.2%
Final simplification22.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(Float64(-x) + 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}
\\
\left(-x\right) + x
\end{array}
Initial program 82.2%
Taylor expanded in z around inf
lower--.f6422.2
Applied rewrites22.2%
Taylor expanded in t around 0
Applied rewrites2.7%
Final simplification2.7%
herbie shell --seed 2024249
(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)))))