
(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 22 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
(if (<= z -1.9e+111)
(fma (fma -1.0 t x) (/ (- y a) z) t)
(if (<= z 1.55e+168)
(+ x (/ (- y z) (/ (- z a) (- x t))))
(- t (* (/ (- t x) z) (- y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.9e+111) {
tmp = fma(fma(-1.0, t, x), ((y - a) / z), t);
} else if (z <= 1.55e+168) {
tmp = x + ((y - z) / ((z - a) / (x - t)));
} else {
tmp = t - (((t - x) / z) * (y - a));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.9e+111) tmp = fma(fma(-1.0, t, x), Float64(Float64(y - a) / z), t); elseif (z <= 1.55e+168) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(z - a) / Float64(x - t)))); else tmp = Float64(t - Float64(Float64(Float64(t - x) / z) * Float64(y - a))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.9e+111], N[(N[(-1.0 * t + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 1.55e+168], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+111}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-1, t, x\right), \frac{y - a}{z}, t\right)\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+168}:\\
\;\;\;\;x + \frac{y - z}{\frac{z - a}{x - t}}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{t - x}{z} \cdot \left(y - a\right)\\
\end{array}
\end{array}
if z < -1.89999999999999988e111Initial program 48.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 rewrites90.2%
if -1.89999999999999988e111 < z < 1.54999999999999998e168Initial program 89.6%
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--.f6489.7
Applied rewrites89.7%
if 1.54999999999999998e168 < z Initial program 47.4%
Taylor expanded in z around inf
lower--.f6435.3
Applied rewrites35.3%
Taylor expanded in x around inf
Applied rewrites3.0%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/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--.f6493.7
Applied rewrites93.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ t (- a z))))))
(if (<= z -6.5e+15)
(fma (fma -1.0 t x) (/ (- y a) z) t)
(if (<= z -4e-74)
t_1
(if (<= z 8e-162)
(+ x (* (/ (- y z) a) (- t x)))
(if (<= z 6.4e+134) t_1 (- t (* (/ (- t x) z) (- y a)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * (t / (a - z)));
double tmp;
if (z <= -6.5e+15) {
tmp = fma(fma(-1.0, t, x), ((y - a) / z), t);
} else if (z <= -4e-74) {
tmp = t_1;
} else if (z <= 8e-162) {
tmp = x + (((y - z) / a) * (t - x));
} else if (z <= 6.4e+134) {
tmp = t_1;
} else {
tmp = t - (((t - x) / z) * (y - a));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))) tmp = 0.0 if (z <= -6.5e+15) tmp = fma(fma(-1.0, t, x), Float64(Float64(y - a) / z), t); elseif (z <= -4e-74) tmp = t_1; elseif (z <= 8e-162) tmp = Float64(x + Float64(Float64(Float64(y - z) / a) * Float64(t - x))); elseif (z <= 6.4e+134) tmp = t_1; else tmp = Float64(t - Float64(Float64(Float64(t - 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[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e+15], N[(N[(-1.0 * t + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, -4e-74], t$95$1, If[LessEqual[z, 8e-162], N[(x + N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.4e+134], t$95$1, N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-1, t, x\right), \frac{y - a}{z}, t\right)\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-162}:\\
\;\;\;\;x + \frac{y - z}{a} \cdot \left(t - x\right)\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t - \frac{t - x}{z} \cdot \left(y - a\right)\\
\end{array}
\end{array}
if z < -6.5e15Initial 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 rewrites84.9%
if -6.5e15 < z < -3.99999999999999983e-74 or 7.99999999999999963e-162 < z < 6.4000000000000001e134Initial program 89.7%
Taylor expanded in x around 0
lower-/.f64N/A
lower--.f6477.5
Applied rewrites77.5%
if -3.99999999999999983e-74 < z < 7.99999999999999963e-162Initial program 90.6%
Taylor expanded in a around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6485.6
Applied rewrites85.6%
if 6.4000000000000001e134 < z Initial program 54.7%
Taylor expanded in z around inf
lower--.f6432.8
Applied rewrites32.8%
Taylor expanded in x around inf
Applied rewrites2.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/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.2
Applied rewrites90.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ t (- a z)))))
(t_2 (- t (* (/ (- t x) z) (- y a)))))
(if (<= z -6.5e+15)
t_2
(if (<= z -4e-74)
t_1
(if (<= z 8e-162)
(+ x (* (/ (- y z) a) (- t x)))
(if (<= z 6.4e+134) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * (t / (a - z)));
double t_2 = t - (((t - x) / z) * (y - a));
double tmp;
if (z <= -6.5e+15) {
tmp = t_2;
} else if (z <= -4e-74) {
tmp = t_1;
} else if (z <= 8e-162) {
tmp = x + (((y - z) / a) * (t - x));
} else if (z <= 6.4e+134) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = x + ((y - z) * (t / (a - z)))
t_2 = t - (((t - x) / z) * (y - a))
if (z <= (-6.5d+15)) then
tmp = t_2
else if (z <= (-4d-74)) then
tmp = t_1
else if (z <= 8d-162) then
tmp = x + (((y - z) / a) * (t - x))
else if (z <= 6.4d+134) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * (t / (a - z)));
double t_2 = t - (((t - x) / z) * (y - a));
double tmp;
if (z <= -6.5e+15) {
tmp = t_2;
} else if (z <= -4e-74) {
tmp = t_1;
} else if (z <= 8e-162) {
tmp = x + (((y - z) / a) * (t - x));
} else if (z <= 6.4e+134) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * (t / (a - z))) t_2 = t - (((t - x) / z) * (y - a)) tmp = 0 if z <= -6.5e+15: tmp = t_2 elif z <= -4e-74: tmp = t_1 elif z <= 8e-162: tmp = x + (((y - z) / a) * (t - x)) elif z <= 6.4e+134: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))) t_2 = Float64(t - Float64(Float64(Float64(t - x) / z) * Float64(y - a))) tmp = 0.0 if (z <= -6.5e+15) tmp = t_2; elseif (z <= -4e-74) tmp = t_1; elseif (z <= 8e-162) tmp = Float64(x + Float64(Float64(Float64(y - z) / a) * Float64(t - x))); elseif (z <= 6.4e+134) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * (t / (a - z))); t_2 = t - (((t - x) / z) * (y - a)); tmp = 0.0; if (z <= -6.5e+15) tmp = t_2; elseif (z <= -4e-74) tmp = t_1; elseif (z <= 8e-162) tmp = x + (((y - z) / a) * (t - x)); elseif (z <= 6.4e+134) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e+15], t$95$2, If[LessEqual[z, -4e-74], t$95$1, If[LessEqual[z, 8e-162], N[(x + N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.4e+134], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t}{a - z}\\
t_2 := t - \frac{t - x}{z} \cdot \left(y - a\right)\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+15}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-162}:\\
\;\;\;\;x + \frac{y - z}{a} \cdot \left(t - x\right)\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6.5e15 or 6.4000000000000001e134 < z Initial program 58.3%
Taylor expanded in z around inf
lower--.f6435.4
Applied rewrites35.4%
Taylor expanded in x around inf
Applied rewrites3.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/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--.f6487.0
Applied rewrites87.0%
if -6.5e15 < z < -3.99999999999999983e-74 or 7.99999999999999963e-162 < z < 6.4000000000000001e134Initial program 89.7%
Taylor expanded in x around 0
lower-/.f64N/A
lower--.f6477.5
Applied rewrites77.5%
if -3.99999999999999983e-74 < z < 7.99999999999999963e-162Initial program 90.6%
Taylor expanded in a around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6485.6
Applied rewrites85.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma x (/ (- y) a) x)))
(if (<= a -9e-15)
t_1
(if (<= a -3.1e-90)
(* (/ (- t x) a) y)
(if (<= a 1.75e-158)
(* (/ (- x t) z) y)
(if (<= a 1.15e+90) (* (- t x) (/ y a)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(x, (-y / a), x);
double tmp;
if (a <= -9e-15) {
tmp = t_1;
} else if (a <= -3.1e-90) {
tmp = ((t - x) / a) * y;
} else if (a <= 1.75e-158) {
tmp = ((x - t) / z) * y;
} else if (a <= 1.15e+90) {
tmp = (t - x) * (y / a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(x, Float64(Float64(-y) / a), x) tmp = 0.0 if (a <= -9e-15) tmp = t_1; elseif (a <= -3.1e-90) tmp = Float64(Float64(Float64(t - x) / a) * y); elseif (a <= 1.75e-158) tmp = Float64(Float64(Float64(x - t) / z) * y); elseif (a <= 1.15e+90) tmp = Float64(Float64(t - x) * Float64(y / a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[((-y) / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -9e-15], t$95$1, If[LessEqual[a, -3.1e-90], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[a, 1.75e-158], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[a, 1.15e+90], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x, \frac{-y}{a}, x\right)\\
\mathbf{if}\;a \leq -9 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -3.1 \cdot 10^{-90}:\\
\;\;\;\;\frac{t - x}{a} \cdot y\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{-158}:\\
\;\;\;\;\frac{x - t}{z} \cdot y\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{+90}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -8.9999999999999995e-15 or 1.15e90 < a Initial program 88.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6488.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--.f6488.4
Applied rewrites88.4%
Taylor expanded in x around inf
associate--l+N/A
div-subN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-/l*N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6462.4
Applied rewrites62.4%
Taylor expanded in z around 0
Applied rewrites59.8%
if -8.9999999999999995e-15 < a < -3.1000000000000001e-90Initial program 76.4%
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--.f6448.0
Applied rewrites48.0%
Taylor expanded in y around inf
Applied rewrites49.3%
if -3.1000000000000001e-90 < a < 1.75000000000000006e-158Initial program 69.4%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites87.9%
Taylor expanded in y around inf
Applied rewrites44.0%
if 1.75000000000000006e-158 < a < 1.15e90Initial program 68.0%
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--.f6446.9
Applied rewrites46.9%
Taylor expanded in z around 0
Applied rewrites38.0%
Final simplification50.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- z) (/ t a) x)))
(if (<= a -2.7e-8)
t_1
(if (<= a -3.1e-90)
(* (/ (- t x) a) y)
(if (<= a 1.75e-158)
(* (/ (- x t) z) y)
(if (<= a 1e+99) (* (- t x) (/ y a)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-z, (t / a), x);
double tmp;
if (a <= -2.7e-8) {
tmp = t_1;
} else if (a <= -3.1e-90) {
tmp = ((t - x) / a) * y;
} else if (a <= 1.75e-158) {
tmp = ((x - t) / z) * y;
} else if (a <= 1e+99) {
tmp = (t - x) * (y / a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(-z), Float64(t / a), x) tmp = 0.0 if (a <= -2.7e-8) tmp = t_1; elseif (a <= -3.1e-90) tmp = Float64(Float64(Float64(t - x) / a) * y); elseif (a <= 1.75e-158) tmp = Float64(Float64(Float64(x - t) / z) * y); elseif (a <= 1e+99) tmp = Float64(Float64(t - x) * Float64(y / a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-z) * N[(t / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2.7e-8], t$95$1, If[LessEqual[a, -3.1e-90], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[a, 1.75e-158], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[a, 1e+99], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-z, \frac{t}{a}, x\right)\\
\mathbf{if}\;a \leq -2.7 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -3.1 \cdot 10^{-90}:\\
\;\;\;\;\frac{t - x}{a} \cdot y\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{-158}:\\
\;\;\;\;\frac{x - t}{z} \cdot y\\
\mathbf{elif}\;a \leq 10^{+99}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.70000000000000002e-8 or 9.9999999999999997e98 < a Initial program 89.0%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6477.7
Applied rewrites77.7%
Taylor expanded in x around 0
Applied rewrites72.8%
Taylor expanded in y around 0
Applied rewrites59.4%
if -2.70000000000000002e-8 < a < -3.1000000000000001e-90Initial program 76.4%
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--.f6448.0
Applied rewrites48.0%
Taylor expanded in y around inf
Applied rewrites49.3%
if -3.1000000000000001e-90 < a < 1.75000000000000006e-158Initial program 69.4%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites87.9%
Taylor expanded in y around inf
Applied rewrites44.0%
if 1.75000000000000006e-158 < a < 9.9999999999999997e98Initial program 67.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--.f6445.1
Applied rewrites45.1%
Taylor expanded in z around 0
Applied rewrites36.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.72e+83)
(fma (fma -1.0 t x) (/ (- y a) z) t)
(if (<= z 1.55e+168)
(+ x (* (- y z) (/ (- t x) (- a z))))
(- t (* (/ (- t x) z) (- y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.72e+83) {
tmp = fma(fma(-1.0, t, x), ((y - a) / z), t);
} else if (z <= 1.55e+168) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else {
tmp = t - (((t - x) / z) * (y - a));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.72e+83) tmp = fma(fma(-1.0, t, x), Float64(Float64(y - a) / z), t); elseif (z <= 1.55e+168) tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); else tmp = Float64(t - Float64(Float64(Float64(t - x) / z) * Float64(y - a))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.72e+83], N[(N[(-1.0 * t + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 1.55e+168], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.72 \cdot 10^{+83}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-1, t, x\right), \frac{y - a}{z}, t\right)\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+168}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{t - x}{z} \cdot \left(y - a\right)\\
\end{array}
\end{array}
if z < -1.72000000000000006e83Initial program 53.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 rewrites91.3%
if -1.72000000000000006e83 < z < 1.54999999999999998e168Initial program 89.3%
if 1.54999999999999998e168 < z Initial program 47.4%
Taylor expanded in z around inf
lower--.f6435.3
Applied rewrites35.3%
Taylor expanded in x around inf
Applied rewrites3.0%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/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--.f6493.7
Applied rewrites93.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.72e+83)
(fma (fma -1.0 t x) (/ (- y a) z) t)
(if (<= z 1.55e+168)
(fma (/ (- x t) (- z a)) (- y z) x)
(- t (* (/ (- t x) z) (- y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.72e+83) {
tmp = fma(fma(-1.0, t, x), ((y - a) / z), t);
} else if (z <= 1.55e+168) {
tmp = fma(((x - t) / (z - a)), (y - z), x);
} else {
tmp = t - (((t - x) / z) * (y - a));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.72e+83) tmp = fma(fma(-1.0, t, x), Float64(Float64(y - a) / z), t); elseif (z <= 1.55e+168) tmp = fma(Float64(Float64(x - t) / Float64(z - a)), Float64(y - z), x); else tmp = Float64(t - Float64(Float64(Float64(t - x) / z) * Float64(y - a))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.72e+83], N[(N[(-1.0 * t + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 1.55e+168], N[(N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision], N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.72 \cdot 10^{+83}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-1, t, x\right), \frac{y - a}{z}, t\right)\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+168}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z - a}, y - z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t - \frac{t - x}{z} \cdot \left(y - a\right)\\
\end{array}
\end{array}
if z < -1.72000000000000006e83Initial program 53.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 rewrites91.3%
if -1.72000000000000006e83 < z < 1.54999999999999998e168Initial program 89.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6489.3
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--.f6489.3
Applied rewrites89.3%
if 1.54999999999999998e168 < z Initial program 47.4%
Taylor expanded in z around inf
lower--.f6435.3
Applied rewrites35.3%
Taylor expanded in x around inf
Applied rewrites3.0%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/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--.f6493.7
Applied rewrites93.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6e+15) (not (<= z 3.5e+74))) (- t (* (/ (- t x) z) (- y a))) (+ x (* (/ (- y z) a) (- t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6e+15) || !(z <= 3.5e+74)) {
tmp = t - (((t - x) / z) * (y - a));
} else {
tmp = x + (((y - z) / a) * (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 ((z <= (-6d+15)) .or. (.not. (z <= 3.5d+74))) then
tmp = t - (((t - x) / z) * (y - a))
else
tmp = x + (((y - z) / a) * (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 ((z <= -6e+15) || !(z <= 3.5e+74)) {
tmp = t - (((t - x) / z) * (y - a));
} else {
tmp = x + (((y - z) / a) * (t - x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6e+15) or not (z <= 3.5e+74): tmp = t - (((t - x) / z) * (y - a)) else: tmp = x + (((y - z) / a) * (t - x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6e+15) || !(z <= 3.5e+74)) tmp = Float64(t - Float64(Float64(Float64(t - x) / z) * Float64(y - a))); else tmp = Float64(x + Float64(Float64(Float64(y - z) / a) * Float64(t - x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -6e+15) || ~((z <= 3.5e+74))) tmp = t - (((t - x) / z) * (y - a)); else tmp = x + (((y - z) / a) * (t - x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6e+15], N[Not[LessEqual[z, 3.5e+74]], $MachinePrecision]], N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+15} \lor \neg \left(z \leq 3.5 \cdot 10^{+74}\right):\\
\;\;\;\;t - \frac{t - x}{z} \cdot \left(y - a\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{a} \cdot \left(t - x\right)\\
\end{array}
\end{array}
if z < -6e15 or 3.50000000000000014e74 < z Initial program 59.9%
Taylor expanded in z around inf
lower--.f6434.6
Applied rewrites34.6%
Taylor expanded in x around inf
Applied rewrites3.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/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--.f6484.6
Applied rewrites84.6%
if -6e15 < z < 3.50000000000000014e74Initial program 90.9%
Taylor expanded in a around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6474.9
Applied rewrites74.9%
Final simplification79.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6e+15) (not (<= z 3.5e+74))) (- t (* (/ (- t x) z) (- y a))) (fma (- y z) (/ (- t x) a) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6e+15) || !(z <= 3.5e+74)) {
tmp = t - (((t - x) / z) * (y - a));
} else {
tmp = fma((y - z), ((t - x) / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6e+15) || !(z <= 3.5e+74)) tmp = Float64(t - Float64(Float64(Float64(t - x) / z) * Float64(y - a))); else tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6e+15], N[Not[LessEqual[z, 3.5e+74]], $MachinePrecision]], N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+15} \lor \neg \left(z \leq 3.5 \cdot 10^{+74}\right):\\
\;\;\;\;t - \frac{t - x}{z} \cdot \left(y - a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\end{array}
\end{array}
if z < -6e15 or 3.50000000000000014e74 < z Initial program 59.9%
Taylor expanded in z around inf
lower--.f6434.6
Applied rewrites34.6%
Taylor expanded in x around inf
Applied rewrites3.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/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--.f6484.6
Applied rewrites84.6%
if -6e15 < z < 3.50000000000000014e74Initial program 90.9%
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--.f6473.8
Applied rewrites73.8%
Final simplification78.3%
(FPCore (x y z t a)
:precision binary64
(if (<= a -7.2e+77)
(fma (- z) (/ t a) x)
(if (<= a 2.3e+22)
(fma (/ (- x t) z) y t)
(if (<= a 1.15e+90) (* (/ (- t x) a) y) (fma x (/ (- y) a) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.2e+77) {
tmp = fma(-z, (t / a), x);
} else if (a <= 2.3e+22) {
tmp = fma(((x - t) / z), y, t);
} else if (a <= 1.15e+90) {
tmp = ((t - x) / a) * y;
} else {
tmp = fma(x, (-y / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.2e+77) tmp = fma(Float64(-z), Float64(t / a), x); elseif (a <= 2.3e+22) tmp = fma(Float64(Float64(x - t) / z), y, t); elseif (a <= 1.15e+90) tmp = Float64(Float64(Float64(t - x) / a) * y); else tmp = fma(x, Float64(Float64(-y) / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.2e+77], N[((-z) * N[(t / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 2.3e+22], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision], If[LessEqual[a, 1.15e+90], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision], N[(x * N[((-y) / a), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{+77}:\\
\;\;\;\;\mathsf{fma}\left(-z, \frac{t}{a}, x\right)\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{+22}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{+90}:\\
\;\;\;\;\frac{t - x}{a} \cdot y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{-y}{a}, x\right)\\
\end{array}
\end{array}
if a < -7.1999999999999996e77Initial program 85.9%
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--.f6481.0
Applied rewrites81.0%
Taylor expanded in x around 0
Applied rewrites77.8%
Taylor expanded in y around 0
Applied rewrites64.3%
if -7.1999999999999996e77 < a < 2.3000000000000002e22Initial program 71.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 rewrites74.0%
Taylor expanded in a around 0
Applied rewrites70.4%
if 2.3000000000000002e22 < a < 1.15e90Initial program 77.6%
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--.f6475.3
Applied rewrites75.3%
Taylor expanded in y around inf
Applied rewrites60.6%
if 1.15e90 < a Initial program 90.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6490.8
lift-/.f64N/A
frac-2negN/A
lower-/.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f64N/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f6490.8
Applied rewrites90.8%
Taylor expanded in x around inf
associate--l+N/A
div-subN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-/l*N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6465.2
Applied rewrites65.2%
Taylor expanded in z around 0
Applied rewrites63.1%
Final simplification67.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- t x))))
(if (<= z -9e+92)
t_1
(if (<= z -3.5e-67)
(* (/ (- x t) z) y)
(if (<= z 1.2e+140) (* (- t x) (/ y a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t - x);
double tmp;
if (z <= -9e+92) {
tmp = t_1;
} else if (z <= -3.5e-67) {
tmp = ((x - t) / z) * y;
} else if (z <= 1.2e+140) {
tmp = (t - x) * (y / a);
} 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 = x + (t - x)
if (z <= (-9d+92)) then
tmp = t_1
else if (z <= (-3.5d-67)) then
tmp = ((x - t) / z) * y
else if (z <= 1.2d+140) then
tmp = (t - x) * (y / a)
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 = x + (t - x);
double tmp;
if (z <= -9e+92) {
tmp = t_1;
} else if (z <= -3.5e-67) {
tmp = ((x - t) / z) * y;
} else if (z <= 1.2e+140) {
tmp = (t - x) * (y / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t - x) tmp = 0 if z <= -9e+92: tmp = t_1 elif z <= -3.5e-67: tmp = ((x - t) / z) * y elif z <= 1.2e+140: tmp = (t - x) * (y / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t - x)) tmp = 0.0 if (z <= -9e+92) tmp = t_1; elseif (z <= -3.5e-67) tmp = Float64(Float64(Float64(x - t) / z) * y); elseif (z <= 1.2e+140) tmp = Float64(Float64(t - x) * Float64(y / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t - x); tmp = 0.0; if (z <= -9e+92) tmp = t_1; elseif (z <= -3.5e-67) tmp = ((x - t) / z) * y; elseif (z <= 1.2e+140) tmp = (t - x) * (y / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e+92], t$95$1, If[LessEqual[z, -3.5e-67], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 1.2e+140], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right)\\
\mathbf{if}\;z \leq -9 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-67}:\\
\;\;\;\;\frac{x - t}{z} \cdot y\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+140}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.9999999999999998e92 or 1.2e140 < z Initial program 51.8%
Taylor expanded in z around inf
lower--.f6440.5
Applied rewrites40.5%
if -8.9999999999999998e92 < z < -3.5e-67Initial program 90.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites46.7%
Taylor expanded in y around inf
Applied rewrites32.3%
if -3.5e-67 < z < 1.2e140Initial program 88.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.8
Applied rewrites53.8%
Taylor expanded in z around 0
Applied rewrites40.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- t x))))
(if (<= z -9e+92)
t_1
(if (<= z -3.5e-67)
(* (/ (- x t) z) y)
(if (<= z 5.6e+91) (* (/ (- t x) a) y) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t - x);
double tmp;
if (z <= -9e+92) {
tmp = t_1;
} else if (z <= -3.5e-67) {
tmp = ((x - t) / z) * y;
} else if (z <= 5.6e+91) {
tmp = ((t - x) / 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 = x + (t - x)
if (z <= (-9d+92)) then
tmp = t_1
else if (z <= (-3.5d-67)) then
tmp = ((x - t) / z) * y
else if (z <= 5.6d+91) then
tmp = ((t - x) / 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 = x + (t - x);
double tmp;
if (z <= -9e+92) {
tmp = t_1;
} else if (z <= -3.5e-67) {
tmp = ((x - t) / z) * y;
} else if (z <= 5.6e+91) {
tmp = ((t - x) / a) * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t - x) tmp = 0 if z <= -9e+92: tmp = t_1 elif z <= -3.5e-67: tmp = ((x - t) / z) * y elif z <= 5.6e+91: tmp = ((t - x) / a) * y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t - x)) tmp = 0.0 if (z <= -9e+92) tmp = t_1; elseif (z <= -3.5e-67) tmp = Float64(Float64(Float64(x - t) / z) * y); elseif (z <= 5.6e+91) tmp = Float64(Float64(Float64(t - x) / a) * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t - x); tmp = 0.0; if (z <= -9e+92) tmp = t_1; elseif (z <= -3.5e-67) tmp = ((x - t) / z) * y; elseif (z <= 5.6e+91) tmp = ((t - x) / a) * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e+92], t$95$1, If[LessEqual[z, -3.5e-67], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 5.6e+91], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right)\\
\mathbf{if}\;z \leq -9 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-67}:\\
\;\;\;\;\frac{x - t}{z} \cdot y\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{+91}:\\
\;\;\;\;\frac{t - x}{a} \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.9999999999999998e92 or 5.5999999999999997e91 < z Initial program 54.7%
Taylor expanded in z around inf
lower--.f6438.1
Applied rewrites38.1%
if -8.9999999999999998e92 < z < -3.5e-67Initial program 90.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites46.7%
Taylor expanded in y around inf
Applied rewrites32.3%
if -3.5e-67 < z < 5.5999999999999997e91Initial program 90.1%
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--.f6475.3
Applied rewrites75.3%
Taylor expanded in y around inf
Applied rewrites41.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- t x))))
(if (<= z -9e+92)
t_1
(if (<= z -4.1e+15)
(* (/ (- x t) z) y)
(if (<= z 5.6e+91) (* t (/ y (- a z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t - x);
double tmp;
if (z <= -9e+92) {
tmp = t_1;
} else if (z <= -4.1e+15) {
tmp = ((x - t) / z) * y;
} else if (z <= 5.6e+91) {
tmp = t * (y / (a - z));
} 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 = x + (t - x)
if (z <= (-9d+92)) then
tmp = t_1
else if (z <= (-4.1d+15)) then
tmp = ((x - t) / z) * y
else if (z <= 5.6d+91) then
tmp = t * (y / (a - z))
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 = x + (t - x);
double tmp;
if (z <= -9e+92) {
tmp = t_1;
} else if (z <= -4.1e+15) {
tmp = ((x - t) / z) * y;
} else if (z <= 5.6e+91) {
tmp = t * (y / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t - x) tmp = 0 if z <= -9e+92: tmp = t_1 elif z <= -4.1e+15: tmp = ((x - t) / z) * y elif z <= 5.6e+91: tmp = t * (y / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t - x)) tmp = 0.0 if (z <= -9e+92) tmp = t_1; elseif (z <= -4.1e+15) tmp = Float64(Float64(Float64(x - t) / z) * y); elseif (z <= 5.6e+91) tmp = Float64(t * Float64(y / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t - x); tmp = 0.0; if (z <= -9e+92) tmp = t_1; elseif (z <= -4.1e+15) tmp = ((x - t) / z) * y; elseif (z <= 5.6e+91) tmp = t * (y / (a - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e+92], t$95$1, If[LessEqual[z, -4.1e+15], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 5.6e+91], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right)\\
\mathbf{if}\;z \leq -9 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{+15}:\\
\;\;\;\;\frac{x - t}{z} \cdot y\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{+91}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.9999999999999998e92 or 5.5999999999999997e91 < z Initial program 54.7%
Taylor expanded in z around inf
lower--.f6438.1
Applied rewrites38.1%
if -8.9999999999999998e92 < z < -4.1e15Initial program 87.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 rewrites69.9%
Taylor expanded in y around inf
Applied rewrites51.4%
if -4.1e15 < z < 5.5999999999999997e91Initial program 90.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--.f6450.3
Applied rewrites50.3%
Taylor expanded in x around 0
Applied rewrites33.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.65e+30) (not (<= a 1.15e-38))) (fma (- y z) (/ (- t x) a) x) (fma (fma -1.0 t x) (/ y z) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.65e+30) || !(a <= 1.15e-38)) {
tmp = fma((y - z), ((t - x) / a), x);
} else {
tmp = fma(fma(-1.0, t, x), (y / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.65e+30) || !(a <= 1.15e-38)) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); else tmp = fma(fma(-1.0, t, x), Float64(y / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.65e+30], N[Not[LessEqual[a, 1.15e-38]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(-1.0 * t + x), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.65 \cdot 10^{+30} \lor \neg \left(a \leq 1.15 \cdot 10^{-38}\right):\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-1, t, x\right), \frac{y}{z}, t\right)\\
\end{array}
\end{array}
if a < -1.65000000000000013e30 or 1.15000000000000001e-38 < a Initial program 86.5%
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--.f6476.5
Applied rewrites76.5%
if -1.65000000000000013e30 < a < 1.15000000000000001e-38Initial program 69.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 rewrites76.9%
Taylor expanded in y around inf
Applied rewrites74.6%
Final simplification75.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.65e+30) (not (<= a 1.15e-38))) (fma (- y z) (/ (- t x) a) x) (fma (/ (- x t) z) y t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.65e+30) || !(a <= 1.15e-38)) {
tmp = fma((y - z), ((t - x) / a), x);
} else {
tmp = fma(((x - t) / z), y, t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.65e+30) || !(a <= 1.15e-38)) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); else tmp = fma(Float64(Float64(x - t) / z), y, t); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.65e+30], N[Not[LessEqual[a, 1.15e-38]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.65 \cdot 10^{+30} \lor \neg \left(a \leq 1.15 \cdot 10^{-38}\right):\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\end{array}
\end{array}
if a < -1.65000000000000013e30 or 1.15000000000000001e-38 < a Initial program 86.5%
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--.f6476.5
Applied rewrites76.5%
if -1.65000000000000013e30 < a < 1.15000000000000001e-38Initial program 69.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 rewrites76.9%
Taylor expanded in a around 0
Applied rewrites72.9%
Final simplification74.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6.5e+77) (not (<= a 3.1e+21))) (fma (- y z) (/ t a) x) (fma (/ (- x t) z) y t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6.5e+77) || !(a <= 3.1e+21)) {
tmp = fma((y - z), (t / a), x);
} else {
tmp = fma(((x - t) / z), y, t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -6.5e+77) || !(a <= 3.1e+21)) tmp = fma(Float64(y - z), Float64(t / a), x); else tmp = fma(Float64(Float64(x - t) / z), y, t); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -6.5e+77], N[Not[LessEqual[a, 3.1e+21]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{+77} \lor \neg \left(a \leq 3.1 \cdot 10^{+21}\right):\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\end{array}
\end{array}
if a < -6.5e77 or 3.1e21 < a Initial program 86.9%
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.5
Applied rewrites80.5%
Taylor expanded in x around 0
Applied rewrites75.5%
if -6.5e77 < a < 3.1e21Initial program 71.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 rewrites74.0%
Taylor expanded in a around 0
Applied rewrites70.4%
Final simplification72.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -6.5e+77) (fma (- y z) (/ t a) x) (if (<= a 1.15e-38) (fma (/ (- x t) z) y t) (fma (/ (- t x) a) y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.5e+77) {
tmp = fma((y - z), (t / a), x);
} else if (a <= 1.15e-38) {
tmp = fma(((x - t) / z), y, t);
} else {
tmp = fma(((t - x) / a), y, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.5e+77) tmp = fma(Float64(y - z), Float64(t / a), x); elseif (a <= 1.15e-38) tmp = fma(Float64(Float64(x - t) / z), y, t); else tmp = fma(Float64(Float64(t - x) / a), y, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.5e+77], N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 1.15e-38], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{+77}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a}, x\right)\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{-38}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
\end{array}
\end{array}
if a < -6.5e77Initial program 85.9%
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--.f6481.0
Applied rewrites81.0%
Taylor expanded in x around 0
Applied rewrites77.8%
if -6.5e77 < a < 1.15000000000000001e-38Initial program 70.9%
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 rewrites75.6%
Taylor expanded in a around 0
Applied rewrites71.8%
if 1.15000000000000001e-38 < a Initial program 86.6%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6472.7
Applied rewrites72.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -3.2e-80) (not (<= x 5.4e+20))) (* (/ (- y a) z) x) (* t (/ y (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -3.2e-80) || !(x <= 5.4e+20)) {
tmp = ((y - a) / z) * x;
} else {
tmp = t * (y / (a - 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 ((x <= (-3.2d-80)) .or. (.not. (x <= 5.4d+20))) then
tmp = ((y - a) / z) * x
else
tmp = t * (y / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -3.2e-80) || !(x <= 5.4e+20)) {
tmp = ((y - a) / z) * x;
} else {
tmp = t * (y / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -3.2e-80) or not (x <= 5.4e+20): tmp = ((y - a) / z) * x else: tmp = t * (y / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -3.2e-80) || !(x <= 5.4e+20)) tmp = Float64(Float64(Float64(y - a) / z) * x); else tmp = Float64(t * Float64(y / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -3.2e-80) || ~((x <= 5.4e+20))) tmp = ((y - a) / z) * x; else tmp = t * (y / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -3.2e-80], N[Not[LessEqual[x, 5.4e+20]], $MachinePrecision]], N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{-80} \lor \neg \left(x \leq 5.4 \cdot 10^{+20}\right):\\
\;\;\;\;\frac{y - a}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if x < -3.1999999999999999e-80 or 5.4e20 < x Initial program 74.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites56.9%
Taylor expanded in x around inf
Applied rewrites32.4%
if -3.1999999999999999e-80 < x < 5.4e20Initial program 82.3%
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--.f6448.2
Applied rewrites48.2%
Taylor expanded in x around 0
Applied rewrites41.5%
Final simplification36.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.5e+15) (not (<= z 5.6e+91))) (+ x (- t x)) (* t (/ y (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.5e+15) || !(z <= 5.6e+91)) {
tmp = x + (t - x);
} else {
tmp = t * (y / (a - 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 ((z <= (-6.5d+15)) .or. (.not. (z <= 5.6d+91))) then
tmp = x + (t - x)
else
tmp = t * (y / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.5e+15) || !(z <= 5.6e+91)) {
tmp = x + (t - x);
} else {
tmp = t * (y / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6.5e+15) or not (z <= 5.6e+91): tmp = x + (t - x) else: tmp = t * (y / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6.5e+15) || !(z <= 5.6e+91)) tmp = Float64(x + Float64(t - x)); else tmp = Float64(t * Float64(y / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -6.5e+15) || ~((z <= 5.6e+91))) tmp = x + (t - x); else tmp = t * (y / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.5e+15], N[Not[LessEqual[z, 5.6e+91]], $MachinePrecision]], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+15} \lor \neg \left(z \leq 5.6 \cdot 10^{+91}\right):\\
\;\;\;\;x + \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if z < -6.5e15 or 5.5999999999999997e91 < z Initial program 59.7%
Taylor expanded in z around inf
lower--.f6435.5
Applied rewrites35.5%
if -6.5e15 < z < 5.5999999999999997e91Initial program 90.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--.f6450.3
Applied rewrites50.3%
Taylor expanded in x around 0
Applied rewrites33.9%
Final simplification34.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.4e-90) (not (<= z 1.2e+140))) (+ x (- t x)) (* t (/ y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.4e-90) || !(z <= 1.2e+140)) {
tmp = x + (t - x);
} else {
tmp = t * (y / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-3.4d-90)) .or. (.not. (z <= 1.2d+140))) then
tmp = x + (t - x)
else
tmp = t * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.4e-90) || !(z <= 1.2e+140)) {
tmp = x + (t - x);
} else {
tmp = t * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.4e-90) or not (z <= 1.2e+140): tmp = x + (t - x) else: tmp = t * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.4e-90) || !(z <= 1.2e+140)) tmp = Float64(x + Float64(t - x)); else tmp = Float64(t * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.4e-90) || ~((z <= 1.2e+140))) tmp = x + (t - x); else tmp = t * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.4e-90], N[Not[LessEqual[z, 1.2e+140]], $MachinePrecision]], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{-90} \lor \neg \left(z \leq 1.2 \cdot 10^{+140}\right):\\
\;\;\;\;x + \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -3.39999999999999994e-90 or 1.2e140 < z Initial program 65.6%
Taylor expanded in z around inf
lower--.f6432.4
Applied rewrites32.4%
if -3.39999999999999994e-90 < z < 1.2e140Initial program 89.2%
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--.f6454.3
Applied rewrites54.3%
Taylor expanded in x around 0
Applied rewrites35.0%
Taylor expanded in z around 0
Applied rewrites29.4%
Final simplification30.8%
(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 77.8%
Taylor expanded in z around inf
lower--.f6419.8
Applied rewrites19.8%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 77.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6477.8
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--.f6477.8
Applied rewrites77.8%
Taylor expanded in x around inf
associate--l+N/A
div-subN/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-/l*N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.0
Applied rewrites43.0%
Taylor expanded in z around inf
Applied rewrites2.9%
Final simplification2.9%
herbie shell --seed 2024324
(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)))))