
(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 17 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 (fma (/ (- y z) (- a z)) (- t x) x))
(t_2 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_2 -5e-243) t_1 (if (<= t_2 0.0) (fma (/ x z) (- y a) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - z) / (a - z)), (t - x), x);
double t_2 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_2 <= -5e-243) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = fma((x / z), (y - a), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x) t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_2 <= -5e-243) tmp = t_1; elseif (t_2 <= 0.0) tmp = fma(Float64(x / z), Float64(y - a), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-243], t$95$1, If[LessEqual[t$95$2, 0.0], N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-243}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5e-243 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.2%
+-commutativeN/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
flip3--N/A
clear-numN/A
clear-numN/A
flip3--N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6497.2%
Applied egg-rr97.2%
if -5e-243 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 5.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified96.8%
Taylor expanded in x around inf
/-lowering-/.f6496.8%
Simplified96.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.55e+158)
(fma (/ x z) (- y a) t)
(if (<= z -4e+79)
(fma (- x t) (/ z (- a z)) x)
(if (<= z -5e-99)
(* t (/ (- y z) (- a z)))
(if (<= z 1.72e-22) (fma (/ y a) (- t x) x) (fma (/ (- x t) z) y t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.55e+158) {
tmp = fma((x / z), (y - a), t);
} else if (z <= -4e+79) {
tmp = fma((x - t), (z / (a - z)), x);
} else if (z <= -5e-99) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 1.72e-22) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = fma(((x - t) / z), y, t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.55e+158) tmp = fma(Float64(x / z), Float64(y - a), t); elseif (z <= -4e+79) tmp = fma(Float64(x - t), Float64(z / Float64(a - z)), x); elseif (z <= -5e-99) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (z <= 1.72e-22) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = fma(Float64(Float64(x - t) / z), y, t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.55e+158], N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, -4e+79], N[(N[(x - t), $MachinePrecision] * N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, -5e-99], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.72e-22], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+158}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\
\mathbf{elif}\;z \leq -4 \cdot 10^{+79}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{z}{a - z}, x\right)\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-99}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;z \leq 1.72 \cdot 10^{-22}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\end{array}
\end{array}
if z < -1.5500000000000001e158Initial program 76.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified81.5%
Taylor expanded in x around inf
/-lowering-/.f6478.3%
Simplified78.3%
if -1.5500000000000001e158 < z < -3.99999999999999987e79Initial program 99.8%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6482.0%
Simplified82.0%
if -3.99999999999999987e79 < z < -4.99999999999999969e-99Initial program 73.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6466.5%
Simplified66.5%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6468.8%
Applied egg-rr68.8%
if -4.99999999999999969e-99 < z < 1.72000000000000001e-22Initial program 86.5%
+-commutativeN/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
flip3--N/A
clear-numN/A
clear-numN/A
flip3--N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6495.9%
Applied egg-rr95.9%
Taylor expanded in z around 0
/-lowering-/.f6483.4%
Simplified83.4%
if 1.72000000000000001e-22 < z Initial program 73.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified81.3%
Taylor expanded in y around inf
Simplified78.8%
Final simplification79.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x t) z) (- y a) t)))
(if (<= z -1.25e+14)
t_1
(if (<= z -6.5e-100)
(+ x (* (- y z) (/ t (- a z))))
(if (<= z 2e-10) (fma (/ y (- a z)) (- t x) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - t) / z), (y - a), t);
double tmp;
if (z <= -1.25e+14) {
tmp = t_1;
} else if (z <= -6.5e-100) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 2e-10) {
tmp = fma((y / (a - z)), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - t) / z), Float64(y - a), t) tmp = 0.0 if (z <= -1.25e+14) tmp = t_1; elseif (z <= -6.5e-100) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); elseif (z <= 2e-10) tmp = fma(Float64(y / Float64(a - z)), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.25e+14], t$95$1, If[LessEqual[z, -6.5e-100], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e-10], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - t}{z}, y - a, t\right)\\
\mathbf{if}\;z \leq -1.25 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-100}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-10}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a - z}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.25e14 or 2.00000000000000007e-10 < z Initial program 73.1%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified79.6%
if -1.25e14 < z < -6.50000000000000013e-100Initial program 93.1%
Taylor expanded in t around inf
/-lowering-/.f64N/A
--lowering--.f6482.6%
Simplified82.6%
if -6.50000000000000013e-100 < z < 2.00000000000000007e-10Initial program 86.2%
+-commutativeN/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
flip3--N/A
clear-numN/A
clear-numN/A
flip3--N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6496.0%
Applied egg-rr96.0%
Taylor expanded in y around inf
/-lowering-/.f64N/A
--lowering--.f6490.2%
Simplified90.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.2e+72)
(fma (/ x z) (- y a) t)
(if (<= z -2.6e-99)
(* t (/ (- y z) (- a z)))
(if (<= z 1.55e-22) (fma (/ y a) (- t x) x) (fma (/ (- x t) z) y t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.2e+72) {
tmp = fma((x / z), (y - a), t);
} else if (z <= -2.6e-99) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 1.55e-22) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = fma(((x - t) / z), y, t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.2e+72) tmp = fma(Float64(x / z), Float64(y - a), t); elseif (z <= -2.6e-99) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (z <= 1.55e-22) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = fma(Float64(Float64(x - t) / z), y, t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.2e+72], N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, -2.6e-99], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e-22], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+72}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-99}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-22}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\end{array}
\end{array}
if z < -6.19999999999999977e72Initial program 81.1%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified74.4%
Taylor expanded in x around inf
/-lowering-/.f6469.8%
Simplified69.8%
if -6.19999999999999977e72 < z < -2.60000000000000005e-99Initial program 77.1%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6467.1%
Simplified67.1%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6469.5%
Applied egg-rr69.5%
if -2.60000000000000005e-99 < z < 1.55000000000000006e-22Initial program 86.5%
+-commutativeN/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
flip3--N/A
clear-numN/A
clear-numN/A
flip3--N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6495.9%
Applied egg-rr95.9%
Taylor expanded in z around 0
/-lowering-/.f6483.4%
Simplified83.4%
if 1.55000000000000006e-22 < z Initial program 73.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified81.3%
Taylor expanded in y around inf
Simplified78.8%
Final simplification77.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5e+71)
(fma (/ x z) (- y a) t)
(if (<= z -4.2e-99)
(* (- y z) (/ t (- a z)))
(if (<= z 2.55e-23) (fma (/ y a) (- t x) x) (fma (/ (- x t) z) y t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e+71) {
tmp = fma((x / z), (y - a), t);
} else if (z <= -4.2e-99) {
tmp = (y - z) * (t / (a - z));
} else if (z <= 2.55e-23) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = fma(((x - t) / z), y, t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5e+71) tmp = fma(Float64(x / z), Float64(y - a), t); elseif (z <= -4.2e-99) tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z))); elseif (z <= 2.55e-23) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = fma(Float64(Float64(x - t) / z), y, t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e+71], N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, -4.2e-99], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.55e-23], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+71}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-99}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{-23}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\end{array}
\end{array}
if z < -4.99999999999999972e71Initial program 79.6%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified74.9%
Taylor expanded in x around inf
/-lowering-/.f6470.4%
Simplified70.4%
if -4.99999999999999972e71 < z < -4.19999999999999968e-99Initial program 78.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6466.3%
Simplified66.3%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6468.8%
Applied egg-rr68.8%
if -4.19999999999999968e-99 < z < 2.55000000000000005e-23Initial program 86.5%
+-commutativeN/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
flip3--N/A
clear-numN/A
clear-numN/A
flip3--N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6495.9%
Applied egg-rr95.9%
Taylor expanded in z around 0
/-lowering-/.f6483.4%
Simplified83.4%
if 2.55000000000000005e-23 < z Initial program 73.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified81.3%
Taylor expanded in y around inf
Simplified78.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x t) z) (- y a) t)))
(if (<= z -5.2e-44)
t_1
(if (<= z 1.25e-10) (fma (/ y (- a z)) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - t) / z), (y - a), t);
double tmp;
if (z <= -5.2e-44) {
tmp = t_1;
} else if (z <= 1.25e-10) {
tmp = fma((y / (a - z)), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - t) / z), Float64(y - a), t) tmp = 0.0 if (z <= -5.2e-44) tmp = t_1; elseif (z <= 1.25e-10) tmp = fma(Float64(y / Float64(a - z)), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -5.2e-44], t$95$1, If[LessEqual[z, 1.25e-10], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - t}{z}, y - a, t\right)\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-10}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a - z}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.1999999999999996e-44 or 1.25000000000000008e-10 < z Initial program 75.4%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified78.2%
if -5.1999999999999996e-44 < z < 1.25000000000000008e-10Initial program 86.9%
+-commutativeN/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
flip3--N/A
clear-numN/A
clear-numN/A
flip3--N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6495.7%
Applied egg-rr95.7%
Taylor expanded in y around inf
/-lowering-/.f64N/A
--lowering--.f6487.7%
Simplified87.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.35e+14) (fma (/ x z) (- y a) t) (if (<= z 2.6e-10) (fma (/ y (- a z)) (- t x) x) (fma (/ (- x t) z) y t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.35e+14) {
tmp = fma((x / z), (y - a), t);
} else if (z <= 2.6e-10) {
tmp = fma((y / (a - z)), (t - x), x);
} else {
tmp = fma(((x - t) / z), y, t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.35e+14) tmp = fma(Float64(x / z), Float64(y - a), t); elseif (z <= 2.6e-10) tmp = fma(Float64(y / Float64(a - z)), Float64(t - x), x); else tmp = fma(Float64(Float64(x - t) / z), y, t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.35e+14], N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 2.6e-10], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+14}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-10}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a - z}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\end{array}
\end{array}
if z < -1.35e14Initial program 73.0%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified76.5%
Taylor expanded in x around inf
/-lowering-/.f6469.8%
Simplified69.8%
if -1.35e14 < z < 2.59999999999999981e-10Initial program 87.6%
+-commutativeN/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
flip3--N/A
clear-numN/A
clear-numN/A
flip3--N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6495.4%
Applied egg-rr95.4%
Taylor expanded in y around inf
/-lowering-/.f64N/A
--lowering--.f6484.3%
Simplified84.3%
if 2.59999999999999981e-10 < z Initial program 73.1%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified83.3%
Taylor expanded in y around inf
Simplified80.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- x t) z) y t))) (if (<= z -4e-75) t_1 (if (<= z 1.01e-22) (fma (/ y a) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - t) / z), y, t);
double tmp;
if (z <= -4e-75) {
tmp = t_1;
} else if (z <= 1.01e-22) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - t) / z), y, t) tmp = 0.0 if (z <= -4e-75) tmp = t_1; elseif (z <= 1.01e-22) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y + t), $MachinePrecision]}, If[LessEqual[z, -4e-75], t$95$1, If[LessEqual[z, 1.01e-22], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\
\mathbf{if}\;z \leq -4 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.01 \cdot 10^{-22}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.9999999999999998e-75 or 1.01e-22 < z Initial program 77.0%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified76.1%
Taylor expanded in y around inf
Simplified70.8%
if -3.9999999999999998e-75 < z < 1.01e-22Initial program 86.2%
+-commutativeN/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
flip3--N/A
clear-numN/A
clear-numN/A
flip3--N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6495.2%
Applied egg-rr95.2%
Taylor expanded in z around 0
/-lowering-/.f6482.4%
Simplified82.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ x z) (- y a) t))) (if (<= z -5e-44) t_1 (if (<= z 2.6e-7) (fma (/ y a) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x / z), (y - a), t);
double tmp;
if (z <= -5e-44) {
tmp = t_1;
} else if (z <= 2.6e-7) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x / z), Float64(y - a), t) tmp = 0.0 if (z <= -5e-44) tmp = t_1; elseif (z <= 2.6e-7) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -5e-44], t$95$1, If[LessEqual[z, 2.6e-7], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\
\mathbf{if}\;z \leq -5 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-7}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.00000000000000039e-44 or 2.59999999999999999e-7 < z Initial program 75.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified78.1%
Taylor expanded in x around inf
/-lowering-/.f6469.7%
Simplified69.7%
if -5.00000000000000039e-44 < z < 2.59999999999999999e-7Initial program 87.0%
+-commutativeN/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
flip3--N/A
clear-numN/A
clear-numN/A
flip3--N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6495.7%
Applied egg-rr95.7%
Taylor expanded in z around 0
/-lowering-/.f6478.0%
Simplified78.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ x z) (- y a) t))) (if (<= z -5.2e-44) t_1 (if (<= z 1.15e-22) (fma y (/ (- t x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x / z), (y - a), t);
double tmp;
if (z <= -5.2e-44) {
tmp = t_1;
} else if (z <= 1.15e-22) {
tmp = fma(y, ((t - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x / z), Float64(y - a), t) tmp = 0.0 if (z <= -5.2e-44) tmp = t_1; elseif (z <= 1.15e-22) tmp = fma(y, Float64(Float64(t - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -5.2e-44], t$95$1, If[LessEqual[z, 1.15e-22], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x}{z}, y - a, t\right)\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-22}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.1999999999999996e-44 or 1.1499999999999999e-22 < z Initial program 75.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified77.6%
Taylor expanded in x around inf
/-lowering-/.f6468.2%
Simplified68.2%
if -5.1999999999999996e-44 < z < 1.1499999999999999e-22Initial program 87.1%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6472.6%
Simplified72.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ x z) y t))) (if (<= z -3.5e-44) t_1 (if (<= z 2.35e-22) (fma y (/ (- t x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x / z), y, t);
double tmp;
if (z <= -3.5e-44) {
tmp = t_1;
} else if (z <= 2.35e-22) {
tmp = fma(y, ((t - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x / z), y, t) tmp = 0.0 if (z <= -3.5e-44) tmp = t_1; elseif (z <= 2.35e-22) tmp = fma(y, Float64(Float64(t - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * y + t), $MachinePrecision]}, If[LessEqual[z, -3.5e-44], t$95$1, If[LessEqual[z, 2.35e-22], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x}{z}, y, t\right)\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{-22}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.4999999999999998e-44 or 2.3500000000000001e-22 < z Initial program 75.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified77.6%
Taylor expanded in y around inf
Simplified71.9%
Taylor expanded in x around inf
/-lowering-/.f6462.8%
Simplified62.8%
if -3.4999999999999998e-44 < z < 2.3500000000000001e-22Initial program 87.1%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6472.6%
Simplified72.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -1e-6) (+ x t) (if (<= a 2.2e-70) (* t (/ (- z y) z)) (if (<= a 1.9e+206) (+ x t) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1e-6) {
tmp = x + t;
} else if (a <= 2.2e-70) {
tmp = t * ((z - y) / z);
} else if (a <= 1.9e+206) {
tmp = x + t;
} else {
tmp = 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 (a <= (-1d-6)) then
tmp = x + t
else if (a <= 2.2d-70) then
tmp = t * ((z - y) / z)
else if (a <= 1.9d+206) then
tmp = x + t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1e-6) {
tmp = x + t;
} else if (a <= 2.2e-70) {
tmp = t * ((z - y) / z);
} else if (a <= 1.9e+206) {
tmp = x + t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1e-6: tmp = x + t elif a <= 2.2e-70: tmp = t * ((z - y) / z) elif a <= 1.9e+206: tmp = x + t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1e-6) tmp = Float64(x + t); elseif (a <= 2.2e-70) tmp = Float64(t * Float64(Float64(z - y) / z)); elseif (a <= 1.9e+206) tmp = Float64(x + t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1e-6) tmp = x + t; elseif (a <= 2.2e-70) tmp = t * ((z - y) / z); elseif (a <= 1.9e+206) tmp = x + t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1e-6], N[(x + t), $MachinePrecision], If[LessEqual[a, 2.2e-70], N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.9e+206], N[(x + t), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{-6}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{-70}:\\
\;\;\;\;t \cdot \frac{z - y}{z}\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{+206}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -9.99999999999999955e-7 or 2.1999999999999999e-70 < a < 1.8999999999999999e206Initial program 90.0%
Taylor expanded in z around inf
--lowering--.f6418.4%
Simplified18.4%
Taylor expanded in t around inf
Simplified47.7%
if -9.99999999999999955e-7 < a < 2.1999999999999999e-70Initial program 71.7%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6455.3%
Simplified55.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6466.9%
Applied egg-rr66.9%
Taylor expanded in a around 0
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6461.9%
Simplified61.9%
if 1.8999999999999999e206 < a Initial program 88.2%
Taylor expanded in a around inf
Simplified70.6%
Final simplification56.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.25e-11) (+ x t) (if (<= a 1.2e+31) (fma (/ x z) y t) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.25e-11) {
tmp = x + t;
} else if (a <= 1.2e+31) {
tmp = fma((x / z), y, t);
} else {
tmp = x;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.25e-11) tmp = Float64(x + t); elseif (a <= 1.2e+31) tmp = fma(Float64(x / z), y, t); else tmp = x; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.25e-11], N[(x + t), $MachinePrecision], If[LessEqual[a, 1.2e+31], N[(N[(x / z), $MachinePrecision] * y + t), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{-11}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y, t\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.25000000000000005e-11Initial program 98.0%
Taylor expanded in z around inf
--lowering--.f6417.0%
Simplified17.0%
Taylor expanded in t around inf
Simplified52.4%
if -1.25000000000000005e-11 < a < 1.19999999999999991e31Initial program 72.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified76.4%
Taylor expanded in y around inf
Simplified71.7%
Taylor expanded in x around inf
/-lowering-/.f6455.9%
Simplified55.9%
if 1.19999999999999991e31 < a Initial program 85.1%
Taylor expanded in a around inf
Simplified51.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* t (/ y a)))) (if (<= y -2.05e+149) t_1 (if (<= y 7.6e+85) (+ x t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (y <= -2.05e+149) {
tmp = t_1;
} else if (y <= 7.6e+85) {
tmp = x + 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 * (y / a)
if (y <= (-2.05d+149)) then
tmp = t_1
else if (y <= 7.6d+85) then
tmp = x + 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 * (y / a);
double tmp;
if (y <= -2.05e+149) {
tmp = t_1;
} else if (y <= 7.6e+85) {
tmp = x + t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) tmp = 0 if y <= -2.05e+149: tmp = t_1 elif y <= 7.6e+85: tmp = x + t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / a)) tmp = 0.0 if (y <= -2.05e+149) tmp = t_1; elseif (y <= 7.6e+85) tmp = Float64(x + t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / a); tmp = 0.0; if (y <= -2.05e+149) tmp = t_1; elseif (y <= 7.6e+85) tmp = x + t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.05e+149], t$95$1, If[LessEqual[y, 7.6e+85], N[(x + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;y \leq -2.05 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{+85}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.0499999999999998e149 or 7.59999999999999984e85 < y Initial program 89.0%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6446.3%
Simplified46.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6455.1%
Applied egg-rr55.1%
Taylor expanded in z around 0
/-lowering-/.f6438.0%
Simplified38.0%
if -2.0499999999999998e149 < y < 7.59999999999999984e85Initial program 77.9%
Taylor expanded in z around inf
--lowering--.f6429.4%
Simplified29.4%
Taylor expanded in t around inf
Simplified53.0%
Final simplification48.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.5e-75) (+ x t) (if (<= z 17.0) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.5e-75) {
tmp = x + t;
} else if (z <= 17.0) {
tmp = x;
} else {
tmp = 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 (z <= (-3.5d-75)) then
tmp = x + t
else if (z <= 17.0d0) then
tmp = x
else
tmp = t
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.5e-75) {
tmp = x + t;
} else if (z <= 17.0) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.5e-75: tmp = x + t elif z <= 17.0: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.5e-75) tmp = Float64(x + t); elseif (z <= 17.0) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.5e-75) tmp = x + t; elseif (z <= 17.0) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.5e-75], N[(x + t), $MachinePrecision], If[LessEqual[z, 17.0], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{-75}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 17:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.49999999999999985e-75Initial program 79.2%
Taylor expanded in z around inf
--lowering--.f6433.0%
Simplified33.0%
Taylor expanded in t around inf
Simplified46.0%
if -3.49999999999999985e-75 < z < 17Initial program 84.9%
Taylor expanded in a around inf
Simplified39.7%
if 17 < z Initial program 74.9%
Taylor expanded in z around inf
Simplified55.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -1e-76) t (if (<= z 15.5) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e-76) {
tmp = t;
} else if (z <= 15.5) {
tmp = x;
} else {
tmp = 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 (z <= (-1d-76)) then
tmp = t
else if (z <= 15.5d0) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e-76) {
tmp = t;
} else if (z <= 15.5) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1e-76: tmp = t elif z <= 15.5: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1e-76) tmp = t; elseif (z <= 15.5) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1e-76) tmp = t; elseif (z <= 15.5) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1e-76], t, If[LessEqual[z, 15.5], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-76}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 15.5:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -9.99999999999999927e-77 or 15.5 < z Initial program 77.6%
Taylor expanded in z around inf
Simplified47.2%
if -9.99999999999999927e-77 < z < 15.5Initial program 84.9%
Taylor expanded in a around inf
Simplified39.7%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return t;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 81.1%
Taylor expanded in z around inf
Simplified27.7%
herbie shell --seed 2024193
(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)))))