
(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 (+ (* (/ (- t x) (- a z)) (- y z)) x)))
(if (<= t_1 -5e-180)
(+ (/ (- y z) (/ (- z a) (- x t))) x)
(if (<= t_1 2e-290)
(fma (- y a) (/ (- x t) z) t)
(fma (/ (- x t) (- z a)) (- y z) x)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (((t - x) / (a - z)) * (y - z)) + x;
double tmp;
if (t_1 <= -5e-180) {
tmp = ((y - z) / ((z - a) / (x - t))) + x;
} else if (t_1 <= 2e-290) {
tmp = fma((y - a), ((x - t) / z), t);
} else {
tmp = fma(((x - t) / (z - a)), (y - z), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(Float64(t - x) / Float64(a - z)) * Float64(y - z)) + x) tmp = 0.0 if (t_1 <= -5e-180) tmp = Float64(Float64(Float64(y - z) / Float64(Float64(z - a) / Float64(x - t))) + x); elseif (t_1 <= 2e-290) tmp = fma(Float64(y - a), Float64(Float64(x - t) / z), t); else tmp = fma(Float64(Float64(x - t) / Float64(z - a)), Float64(y - z), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-180], N[(N[(N[(y - z), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 2e-290], N[(N[(y - a), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], N[(N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - x}{a - z} \cdot \left(y - z\right) + x\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-180}:\\
\;\;\;\;\frac{y - z}{\frac{z - a}{x - t}} + x\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-290}:\\
\;\;\;\;\mathsf{fma}\left(y - a, \frac{x - t}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z - a}, y - z, x\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5.0000000000000001e-180Initial program 96.8%
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--.f6497.2
Applied rewrites97.2%
if -5.0000000000000001e-180 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.0000000000000001e-290Initial program 8.4%
Taylor expanded in z around inf
Applied rewrites91.1%
Taylor expanded in z around inf
Applied rewrites91.1%
Applied rewrites94.7%
if 2.0000000000000001e-290 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 89.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6489.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--.f6489.4
Applied rewrites89.4%
Final simplification93.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* (/ (- t x) (- a z)) (- y z)) x)))
(if (<= t_1 -5e-180)
t_1
(if (<= t_1 2e-290)
(fma (- y a) (/ (- x t) z) t)
(fma (/ (- x t) (- z a)) (- y z) x)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (((t - x) / (a - z)) * (y - z)) + x;
double tmp;
if (t_1 <= -5e-180) {
tmp = t_1;
} else if (t_1 <= 2e-290) {
tmp = fma((y - a), ((x - t) / z), t);
} else {
tmp = fma(((x - t) / (z - a)), (y - z), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(Float64(t - x) / Float64(a - z)) * Float64(y - z)) + x) tmp = 0.0 if (t_1 <= -5e-180) tmp = t_1; elseif (t_1 <= 2e-290) tmp = fma(Float64(y - a), Float64(Float64(x - t) / z), t); else tmp = fma(Float64(Float64(x - t) / Float64(z - a)), Float64(y - z), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-180], t$95$1, If[LessEqual[t$95$1, 2e-290], N[(N[(y - a), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], N[(N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - x}{a - z} \cdot \left(y - z\right) + x\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-180}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-290}:\\
\;\;\;\;\mathsf{fma}\left(y - a, \frac{x - t}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z - a}, y - z, x\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5.0000000000000001e-180Initial program 96.8%
if -5.0000000000000001e-180 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.0000000000000001e-290Initial program 8.4%
Taylor expanded in z around inf
Applied rewrites91.1%
Taylor expanded in z around inf
Applied rewrites91.1%
Applied rewrites94.7%
if 2.0000000000000001e-290 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 89.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6489.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--.f6489.4
Applied rewrites89.4%
Final simplification93.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x t) (- z a)) (- y z) x))
(t_2 (+ (* (/ (- t x) (- a z)) (- y z)) x)))
(if (<= t_2 -5e-180)
t_1
(if (<= t_2 2e-290) (fma (- y a) (/ (- x t) z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - t) / (z - a)), (y - z), x);
double t_2 = (((t - x) / (a - z)) * (y - z)) + x;
double tmp;
if (t_2 <= -5e-180) {
tmp = t_1;
} else if (t_2 <= 2e-290) {
tmp = fma((y - a), ((x - t) / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - t) / Float64(z - a)), Float64(y - z), x) t_2 = Float64(Float64(Float64(Float64(t - x) / Float64(a - z)) * Float64(y - z)) + x) tmp = 0.0 if (t_2 <= -5e-180) tmp = t_1; elseif (t_2 <= 2e-290) tmp = fma(Float64(y - a), Float64(Float64(x - t) / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-180], t$95$1, If[LessEqual[t$95$2, 2e-290], N[(N[(y - a), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - t}{z - a}, y - z, x\right)\\
t_2 := \frac{t - x}{a - z} \cdot \left(y - z\right) + x\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-180}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-290}:\\
\;\;\;\;\mathsf{fma}\left(y - a, \frac{x - t}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5.0000000000000001e-180 or 2.0000000000000001e-290 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 93.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6493.1
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.1
Applied rewrites93.1%
if -5.0000000000000001e-180 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.0000000000000001e-290Initial program 8.4%
Taylor expanded in z around inf
Applied rewrites91.1%
Taylor expanded in z around inf
Applied rewrites91.1%
Applied rewrites94.7%
Final simplification93.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.18e+52)
(fma (- y a) (/ (- x t) z) t)
(if (<= z 1.7e+32)
(+ (* (/ y (- a z)) (- t x)) x)
(if (<= z 3.1e+146)
(* (/ t (- a z)) (- y z))
(fma (- x t) (/ (- y a) z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.18e+52) {
tmp = fma((y - a), ((x - t) / z), t);
} else if (z <= 1.7e+32) {
tmp = ((y / (a - z)) * (t - x)) + x;
} else if (z <= 3.1e+146) {
tmp = (t / (a - z)) * (y - z);
} else {
tmp = fma((x - t), ((y - a) / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.18e+52) tmp = fma(Float64(y - a), Float64(Float64(x - t) / z), t); elseif (z <= 1.7e+32) tmp = Float64(Float64(Float64(y / Float64(a - z)) * Float64(t - x)) + x); elseif (z <= 3.1e+146) tmp = Float64(Float64(t / Float64(a - z)) * Float64(y - z)); else tmp = fma(Float64(x - t), Float64(Float64(y - a) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.18e+52], N[(N[(y - a), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 1.7e+32], N[(N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 3.1e+146], N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision], N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.18 \cdot 10^{+52}:\\
\;\;\;\;\mathsf{fma}\left(y - a, \frac{x - t}{z}, t\right)\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+32}:\\
\;\;\;\;\frac{y}{a - z} \cdot \left(t - x\right) + x\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+146}:\\
\;\;\;\;\frac{t}{a - z} \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\
\end{array}
\end{array}
if z < -1.17999999999999997e52Initial program 64.1%
Taylor expanded in z around inf
Applied rewrites82.0%
Taylor expanded in z around inf
Applied rewrites83.3%
Applied rewrites84.0%
if -1.17999999999999997e52 < z < 1.69999999999999989e32Initial program 94.2%
Taylor expanded in y around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6485.7
Applied rewrites85.7%
if 1.69999999999999989e32 < z < 3.1000000000000002e146Initial program 87.8%
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--.f6483.6
Applied rewrites83.6%
if 3.1000000000000002e146 < z Initial program 51.6%
Taylor expanded in z around inf
Applied rewrites86.9%
Taylor expanded in z around inf
Applied rewrites87.2%
Final simplification85.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1e-25)
(fma (- y a) (/ (- x t) z) t)
(if (<= z 1.15e+32)
(fma (/ (- y z) a) (- t x) x)
(if (<= z 3.1e+146)
(* (/ t (- a z)) (- y z))
(fma (- x t) (/ (- y a) z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e-25) {
tmp = fma((y - a), ((x - t) / z), t);
} else if (z <= 1.15e+32) {
tmp = fma(((y - z) / a), (t - x), x);
} else if (z <= 3.1e+146) {
tmp = (t / (a - z)) * (y - z);
} else {
tmp = fma((x - t), ((y - a) / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1e-25) tmp = fma(Float64(y - a), Float64(Float64(x - t) / z), t); elseif (z <= 1.15e+32) tmp = fma(Float64(Float64(y - z) / a), Float64(t - x), x); elseif (z <= 3.1e+146) tmp = Float64(Float64(t / Float64(a - z)) * Float64(y - z)); else tmp = fma(Float64(x - t), Float64(Float64(y - a) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1e-25], N[(N[(y - a), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 1.15e+32], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 3.1e+146], N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision], N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-25}:\\
\;\;\;\;\mathsf{fma}\left(y - a, \frac{x - t}{z}, t\right)\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+32}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+146}:\\
\;\;\;\;\frac{t}{a - z} \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\
\end{array}
\end{array}
if z < -1.00000000000000004e-25Initial program 69.6%
Taylor expanded in z around inf
Applied rewrites78.6%
Taylor expanded in z around inf
Applied rewrites81.1%
Applied rewrites81.8%
if -1.00000000000000004e-25 < z < 1.15e32Initial program 94.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--.f6479.1
Applied rewrites79.1%
if 1.15e32 < z < 3.1000000000000002e146Initial program 87.8%
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--.f6483.6
Applied rewrites83.6%
if 3.1000000000000002e146 < z Initial program 51.6%
Taylor expanded in z around inf
Applied rewrites86.9%
Taylor expanded in z around inf
Applied rewrites87.2%
Final simplification81.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.5e-32)
(fma (- y a) (/ (- x t) z) t)
(if (<= z 1.06e+32)
(fma (/ y a) (- t x) x)
(if (<= z 3.1e+146)
(* (/ t (- a z)) (- y z))
(fma (- x t) (/ (- y a) z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.5e-32) {
tmp = fma((y - a), ((x - t) / z), t);
} else if (z <= 1.06e+32) {
tmp = fma((y / a), (t - x), x);
} else if (z <= 3.1e+146) {
tmp = (t / (a - z)) * (y - z);
} else {
tmp = fma((x - t), ((y - a) / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.5e-32) tmp = fma(Float64(y - a), Float64(Float64(x - t) / z), t); elseif (z <= 1.06e+32) tmp = fma(Float64(y / a), Float64(t - x), x); elseif (z <= 3.1e+146) tmp = Float64(Float64(t / Float64(a - z)) * Float64(y - z)); else tmp = fma(Float64(x - t), Float64(Float64(y - a) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.5e-32], N[(N[(y - a), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 1.06e+32], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 3.1e+146], N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision], N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{-32}:\\
\;\;\;\;\mathsf{fma}\left(y - a, \frac{x - t}{z}, t\right)\\
\mathbf{elif}\;z \leq 1.06 \cdot 10^{+32}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+146}:\\
\;\;\;\;\frac{t}{a - z} \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\
\end{array}
\end{array}
if z < -1.5e-32Initial program 70.4%
Taylor expanded in z around inf
Applied rewrites78.0%
Taylor expanded in z around inf
Applied rewrites80.3%
Applied rewrites81.0%
if -1.5e-32 < z < 1.0600000000000001e32Initial program 94.3%
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--.f6479.5
Applied rewrites79.5%
Taylor expanded in z around 0
Applied rewrites76.5%
if 1.0600000000000001e32 < z < 3.1000000000000002e146Initial program 87.8%
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--.f6483.6
Applied rewrites83.6%
if 3.1000000000000002e146 < z Initial program 51.6%
Taylor expanded in z around inf
Applied rewrites86.9%
Taylor expanded in z around inf
Applied rewrites87.2%
Final simplification80.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x t) (/ (- y a) z) t)))
(if (<= z -1.4e-32)
t_1
(if (<= z 1.06e+32)
(fma (/ y a) (- t x) x)
(if (<= z 3.1e+146) (* (/ t (- a z)) (- y z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - t), ((y - a) / z), t);
double tmp;
if (z <= -1.4e-32) {
tmp = t_1;
} else if (z <= 1.06e+32) {
tmp = fma((y / a), (t - x), x);
} else if (z <= 3.1e+146) {
tmp = (t / (a - z)) * (y - z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - t), Float64(Float64(y - a) / z), t) tmp = 0.0 if (z <= -1.4e-32) tmp = t_1; elseif (z <= 1.06e+32) tmp = fma(Float64(y / a), Float64(t - x), x); elseif (z <= 3.1e+146) tmp = Float64(Float64(t / Float64(a - z)) * Float64(y - z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.4e-32], t$95$1, If[LessEqual[z, 1.06e+32], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 3.1e+146], N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.06 \cdot 10^{+32}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+146}:\\
\;\;\;\;\frac{t}{a - z} \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.3999999999999999e-32 or 3.1000000000000002e146 < z Initial program 64.1%
Taylor expanded in z around inf
Applied rewrites80.9%
Taylor expanded in z around inf
Applied rewrites82.6%
if -1.3999999999999999e-32 < z < 1.0600000000000001e32Initial program 94.3%
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--.f6479.5
Applied rewrites79.5%
Taylor expanded in z around 0
Applied rewrites76.5%
if 1.0600000000000001e32 < z < 3.1000000000000002e146Initial program 87.8%
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--.f6483.6
Applied rewrites83.6%
Final simplification79.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1e-31)
(fma (/ (- x t) z) y t)
(if (<= z 1.06e+32)
(fma (/ y a) (- t x) x)
(if (<= z 5.5e+146) (* (/ t (- a z)) (- y z)) (fma (- x t) (/ y z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e-31) {
tmp = fma(((x - t) / z), y, t);
} else if (z <= 1.06e+32) {
tmp = fma((y / a), (t - x), x);
} else if (z <= 5.5e+146) {
tmp = (t / (a - z)) * (y - z);
} else {
tmp = fma((x - t), (y / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1e-31) tmp = fma(Float64(Float64(x - t) / z), y, t); elseif (z <= 1.06e+32) tmp = fma(Float64(y / a), Float64(t - x), x); elseif (z <= 5.5e+146) tmp = Float64(Float64(t / Float64(a - z)) * Float64(y - z)); else tmp = fma(Float64(x - t), Float64(y / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1e-31], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision], If[LessEqual[z, 1.06e+32], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 5.5e+146], N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-31}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\mathbf{elif}\;z \leq 1.06 \cdot 10^{+32}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+146}:\\
\;\;\;\;\frac{t}{a - z} \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\end{array}
\end{array}
if z < -1e-31Initial program 70.4%
Taylor expanded in z around inf
Applied rewrites78.0%
Taylor expanded in a around 0
Applied rewrites71.1%
if -1e-31 < z < 1.0600000000000001e32Initial program 94.3%
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--.f6479.5
Applied rewrites79.5%
Taylor expanded in z around 0
Applied rewrites76.5%
if 1.0600000000000001e32 < z < 5.5000000000000004e146Initial program 87.8%
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--.f6483.6
Applied rewrites83.6%
if 5.5000000000000004e146 < z Initial program 51.6%
Taylor expanded in z around inf
Applied rewrites86.9%
Taylor expanded in z around inf
Applied rewrites87.2%
Taylor expanded in a around 0
Applied rewrites79.5%
Final simplification76.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- t) (/ y z) t)))
(if (<= z -4e-12)
t_1
(if (<= z -4.3e-35)
(/ (* (- y a) x) z)
(if (<= z 1.1e-40) (* (/ y (- a z)) t) 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-12) {
tmp = t_1;
} else if (z <= -4.3e-35) {
tmp = ((y - a) * x) / z;
} else if (z <= 1.1e-40) {
tmp = (y / (a - z)) * t;
} 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-12) tmp = t_1; elseif (z <= -4.3e-35) tmp = Float64(Float64(Float64(y - a) * x) / z); elseif (z <= 1.1e-40) tmp = Float64(Float64(y / Float64(a - z)) * t); 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-12], t$95$1, If[LessEqual[z, -4.3e-35], N[(N[(N[(y - a), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.1e-40], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $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^{-12}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.3 \cdot 10^{-35}:\\
\;\;\;\;\frac{\left(y - a\right) \cdot x}{z}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-40}:\\
\;\;\;\;\frac{y}{a - z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.99999999999999992e-12 or 1.10000000000000004e-40 < z Initial program 70.6%
Taylor expanded in z around inf
Applied rewrites73.2%
Taylor expanded in z around inf
Applied rewrites75.3%
Taylor expanded in a around 0
Applied rewrites68.2%
Taylor expanded in t around inf
Applied rewrites58.0%
if -3.99999999999999992e-12 < z < -4.3000000000000002e-35Initial program 75.7%
Taylor expanded in z around inf
Applied rewrites62.9%
Taylor expanded in z around inf
Applied rewrites74.9%
Taylor expanded in t around 0
Applied rewrites68.0%
if -4.3000000000000002e-35 < z < 1.10000000000000004e-40Initial program 94.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--.f6466.3
Applied rewrites66.3%
Taylor expanded in t around inf
Applied rewrites42.0%
Final simplification51.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ y (- a z)) t)))
(if (<= y -6.6e+147)
t_1
(if (<= y -2.5e+73)
(* (/ (- y a) z) x)
(if (<= y 6.9e+16) (+ (- t x) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / (a - z)) * t;
double tmp;
if (y <= -6.6e+147) {
tmp = t_1;
} else if (y <= -2.5e+73) {
tmp = ((y - a) / z) * x;
} else if (y <= 6.9e+16) {
tmp = (t - x) + x;
} 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 = (y / (a - z)) * t
if (y <= (-6.6d+147)) then
tmp = t_1
else if (y <= (-2.5d+73)) then
tmp = ((y - a) / z) * x
else if (y <= 6.9d+16) then
tmp = (t - x) + x
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 = (y / (a - z)) * t;
double tmp;
if (y <= -6.6e+147) {
tmp = t_1;
} else if (y <= -2.5e+73) {
tmp = ((y - a) / z) * x;
} else if (y <= 6.9e+16) {
tmp = (t - x) + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / (a - z)) * t tmp = 0 if y <= -6.6e+147: tmp = t_1 elif y <= -2.5e+73: tmp = ((y - a) / z) * x elif y <= 6.9e+16: tmp = (t - x) + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / Float64(a - z)) * t) tmp = 0.0 if (y <= -6.6e+147) tmp = t_1; elseif (y <= -2.5e+73) tmp = Float64(Float64(Float64(y - a) / z) * x); elseif (y <= 6.9e+16) tmp = Float64(Float64(t - x) + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / (a - z)) * t; tmp = 0.0; if (y <= -6.6e+147) tmp = t_1; elseif (y <= -2.5e+73) tmp = ((y - a) / z) * x; elseif (y <= 6.9e+16) tmp = (t - x) + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[y, -6.6e+147], t$95$1, If[LessEqual[y, -2.5e+73], N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 6.9e+16], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a - z} \cdot t\\
\mathbf{if}\;y \leq -6.6 \cdot 10^{+147}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{+73}:\\
\;\;\;\;\frac{y - a}{z} \cdot x\\
\mathbf{elif}\;y \leq 6.9 \cdot 10^{+16}:\\
\;\;\;\;\left(t - x\right) + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.60000000000000049e147 or 6.9e16 < y Initial program 86.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--.f6477.1
Applied rewrites77.1%
Taylor expanded in t around inf
Applied rewrites52.0%
if -6.60000000000000049e147 < y < -2.49999999999999988e73Initial program 80.5%
Taylor expanded in z around inf
Applied rewrites47.3%
Taylor expanded in z around inf
Applied rewrites55.1%
Taylor expanded in a around 0
Applied rewrites55.1%
Taylor expanded in t around 0
Applied rewrites48.1%
if -2.49999999999999988e73 < y < 6.9e16Initial program 76.6%
Taylor expanded in z around inf
lower--.f6437.1
Applied rewrites37.1%
Final simplification43.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -1e-31) (fma (/ (- x t) z) y t) (if (<= z 1.15e+32) (fma (/ y a) (- t x) x) (fma (- x t) (/ y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e-31) {
tmp = fma(((x - t) / z), y, t);
} else if (z <= 1.15e+32) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = fma((x - t), (y / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1e-31) tmp = fma(Float64(Float64(x - t) / z), y, t); elseif (z <= 1.15e+32) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = fma(Float64(x - t), Float64(y / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1e-31], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision], If[LessEqual[z, 1.15e+32], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-31}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+32}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\end{array}
\end{array}
if z < -1e-31Initial program 70.4%
Taylor expanded in z around inf
Applied rewrites78.0%
Taylor expanded in a around 0
Applied rewrites71.1%
if -1e-31 < z < 1.15e32Initial program 94.3%
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--.f6479.5
Applied rewrites79.5%
Taylor expanded in z around 0
Applied rewrites76.5%
if 1.15e32 < z Initial program 65.6%
Taylor expanded in z around inf
Applied rewrites76.8%
Taylor expanded in z around inf
Applied rewrites78.4%
Taylor expanded in a around 0
Applied rewrites73.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.35e-32) (fma (/ (- x t) z) y t) (if (<= z 5.7e-117) (* (/ y a) (- t x)) (fma (- x t) (/ y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.35e-32) {
tmp = fma(((x - t) / z), y, t);
} else if (z <= 5.7e-117) {
tmp = (y / a) * (t - x);
} else {
tmp = fma((x - t), (y / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.35e-32) tmp = fma(Float64(Float64(x - t) / z), y, t); elseif (z <= 5.7e-117) tmp = Float64(Float64(y / a) * Float64(t - x)); else tmp = fma(Float64(x - t), Float64(y / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.35e-32], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision], If[LessEqual[z, 5.7e-117], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{-32}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{-117}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\end{array}
\end{array}
if z < -1.3499999999999999e-32Initial program 70.4%
Taylor expanded in z around inf
Applied rewrites78.0%
Taylor expanded in a around 0
Applied rewrites71.1%
if -1.3499999999999999e-32 < z < 5.6999999999999999e-117Initial program 95.6%
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--.f6469.1
Applied rewrites69.1%
Taylor expanded in a around inf
Applied rewrites58.7%
if 5.6999999999999999e-117 < z Initial program 73.7%
Taylor expanded in z around inf
Applied rewrites65.6%
Taylor expanded in z around inf
Applied rewrites67.9%
Taylor expanded in a around 0
Applied rewrites63.2%
Final simplification64.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- x t) (/ y z) t))) (if (<= z -1.35e-32) t_1 (if (<= z 5.7e-117) (* (/ y a) (- t x)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - t), (y / z), t);
double tmp;
if (z <= -1.35e-32) {
tmp = t_1;
} else if (z <= 5.7e-117) {
tmp = (y / a) * (t - x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - t), Float64(y / z), t) tmp = 0.0 if (z <= -1.35e-32) tmp = t_1; elseif (z <= 5.7e-117) tmp = Float64(Float64(y / a) * Float64(t - x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.35e-32], t$95$1, If[LessEqual[z, 5.7e-117], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - t, \frac{y}{z}, t\right)\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{-117}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.3499999999999999e-32 or 5.6999999999999999e-117 < z Initial program 72.2%
Taylor expanded in z around inf
Applied rewrites71.2%
Taylor expanded in z around inf
Applied rewrites73.5%
Taylor expanded in a around 0
Applied rewrites66.5%
if -1.3499999999999999e-32 < z < 5.6999999999999999e-117Initial program 95.6%
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--.f6469.1
Applied rewrites69.1%
Taylor expanded in a around inf
Applied rewrites58.7%
Final simplification63.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- t) (/ y z) t))) (if (<= z -6.4e-9) t_1 (if (<= z 5.8e-34) (* (/ 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 <= -6.4e-9) {
tmp = t_1;
} else if (z <= 5.8e-34) {
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 <= -6.4e-9) tmp = t_1; elseif (z <= 5.8e-34) tmp = Float64(Float64(y / a) * Float64(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, -6.4e-9], t$95$1, If[LessEqual[z, 5.8e-34], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision]), $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 -6.4 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-34}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.40000000000000023e-9 or 5.8000000000000004e-34 < z Initial program 70.2%
Taylor expanded in z around inf
Applied rewrites73.5%
Taylor expanded in z around inf
Applied rewrites75.6%
Taylor expanded in a around 0
Applied rewrites68.4%
Taylor expanded in t around inf
Applied rewrites58.1%
if -6.40000000000000023e-9 < z < 5.8000000000000004e-34Initial program 93.1%
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--.f6466.8
Applied rewrites66.8%
Taylor expanded in a around inf
Applied rewrites53.8%
Final simplification56.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- t) (/ y z) t))) (if (<= z -5.6e-9) t_1 (if (<= z 7.2e-35) (/ (* (- t x) y) a) 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 <= -5.6e-9) {
tmp = t_1;
} else if (z <= 7.2e-35) {
tmp = ((t - x) * y) / a;
} 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 <= -5.6e-9) tmp = t_1; elseif (z <= 7.2e-35) tmp = Float64(Float64(Float64(t - x) * y) / a); 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, -5.6e-9], t$95$1, If[LessEqual[z, 7.2e-35], N[(N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision] / a), $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 -5.6 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-35}:\\
\;\;\;\;\frac{\left(t - x\right) \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.59999999999999969e-9 or 7.20000000000000038e-35 < z Initial program 70.2%
Taylor expanded in z around inf
Applied rewrites73.5%
Taylor expanded in z around inf
Applied rewrites75.6%
Taylor expanded in a around 0
Applied rewrites68.4%
Taylor expanded in t around inf
Applied rewrites58.1%
if -5.59999999999999969e-9 < z < 7.20000000000000038e-35Initial program 93.1%
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--.f6479.3
Applied rewrites79.3%
Taylor expanded in y around inf
Applied rewrites47.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- t) (/ y z) t))) (if (<= z -7.8e-26) t_1 (if (<= z 3.4e-10) (* (/ (- y z) a) t) 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 <= -7.8e-26) {
tmp = t_1;
} else if (z <= 3.4e-10) {
tmp = ((y - z) / a) * t;
} 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 <= -7.8e-26) tmp = t_1; elseif (z <= 3.4e-10) tmp = Float64(Float64(Float64(y - z) / a) * t); 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, -7.8e-26], t$95$1, If[LessEqual[z, 3.4e-10], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * t), $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 -7.8 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-10}:\\
\;\;\;\;\frac{y - z}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.79999999999999973e-26 or 3.40000000000000015e-10 < z Initial program 70.0%
Taylor expanded in z around inf
Applied rewrites74.5%
Taylor expanded in z around inf
Applied rewrites77.3%
Taylor expanded in a around 0
Applied rewrites70.2%
Taylor expanded in t around inf
Applied rewrites58.0%
if -7.79999999999999973e-26 < z < 3.40000000000000015e-10Initial program 93.8%
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--.f6479.8
Applied rewrites79.8%
Taylor expanded in t around inf
Applied rewrites42.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (- t x) x))) (if (<= z -1.4e+52) t_1 (if (<= z 7e+45) (* (/ y (- a z)) 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 <= -1.4e+52) {
tmp = t_1;
} else if (z <= 7e+45) {
tmp = (y / (a - z)) * 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 <= (-1.4d+52)) then
tmp = t_1
else if (z <= 7d+45) then
tmp = (y / (a - z)) * 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 <= -1.4e+52) {
tmp = t_1;
} else if (z <= 7e+45) {
tmp = (y / (a - z)) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t - x) + x tmp = 0 if z <= -1.4e+52: tmp = t_1 elif z <= 7e+45: tmp = (y / (a - z)) * 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 <= -1.4e+52) tmp = t_1; elseif (z <= 7e+45) tmp = Float64(Float64(y / Float64(a - z)) * 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 <= -1.4e+52) tmp = t_1; elseif (z <= 7e+45) tmp = (y / (a - z)) * 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, -1.4e+52], t$95$1, If[LessEqual[z, 7e+45], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - x\right) + x\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+45}:\\
\;\;\;\;\frac{y}{a - z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.4e52 or 7.00000000000000046e45 < z Initial program 65.0%
Taylor expanded in z around inf
lower--.f6442.9
Applied rewrites42.9%
if -1.4e52 < z < 7.00000000000000046e45Initial program 93.7%
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--.f6462.1
Applied rewrites62.1%
Taylor expanded in t around inf
Applied rewrites39.5%
Final simplification41.1%
(FPCore (x y z t a) :precision binary64 (if (<= a 3.6e+111) (+ (- t x) x) (* (/ (- z) a) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 3.6e+111) {
tmp = (t - x) + x;
} else {
tmp = (-z / a) * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= 3.6d+111) then
tmp = (t - x) + x
else
tmp = (-z / a) * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 3.6e+111) {
tmp = (t - x) + x;
} else {
tmp = (-z / a) * t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= 3.6e+111: tmp = (t - x) + x else: tmp = (-z / a) * t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= 3.6e+111) tmp = Float64(Float64(t - x) + x); else tmp = Float64(Float64(Float64(-z) / a) * t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= 3.6e+111) tmp = (t - x) + x; else tmp = (-z / a) * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, 3.6e+111], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[((-z) / a), $MachinePrecision] * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.6 \cdot 10^{+111}:\\
\;\;\;\;\left(t - x\right) + x\\
\mathbf{else}:\\
\;\;\;\;\frac{-z}{a} \cdot t\\
\end{array}
\end{array}
if a < 3.6000000000000002e111Initial program 78.9%
Taylor expanded in z around inf
lower--.f6428.9
Applied rewrites28.9%
if 3.6000000000000002e111 < a Initial program 87.6%
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--.f6487.3
Applied rewrites87.3%
Taylor expanded in z around inf
Applied rewrites17.9%
Taylor expanded in t around inf
Applied rewrites18.6%
Final simplification27.3%
(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 80.2%
Taylor expanded in z around inf
lower--.f6425.2
Applied rewrites25.2%
Final simplification25.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 80.2%
Taylor expanded in z around inf
lower--.f6425.2
Applied rewrites25.2%
Taylor expanded in t around 0
Applied rewrites2.8%
Final simplification2.8%
herbie shell --seed 2024279
(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)))))