
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- a t)))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t))))
(t_3 (* (- x y) (- z a))))
(if (<= t_2 -5e-308)
(+ x (* (- y x) t_1))
(if (<= t_2 0.0) (+ y (/ (fma a (/ t_3 t) t_3) t)) (fma t_1 (- y x) x)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double t_3 = (x - y) * (z - a);
double tmp;
if (t_2 <= -5e-308) {
tmp = x + ((y - x) * t_1);
} else if (t_2 <= 0.0) {
tmp = y + (fma(a, (t_3 / t), t_3) / t);
} else {
tmp = fma(t_1, (y - x), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(a - t)) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) t_3 = Float64(Float64(x - y) * Float64(z - a)) tmp = 0.0 if (t_2 <= -5e-308) tmp = Float64(x + Float64(Float64(y - x) * t_1)); elseif (t_2 <= 0.0) tmp = Float64(y + Float64(fma(a, Float64(t_3 / t), t_3) / t)); else tmp = fma(t_1, Float64(y - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x - y), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-308], N[(x + N[(N[(y - x), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(y + N[(N[(a * N[(t$95$3 / t), $MachinePrecision] + t$95$3), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(y - x), $MachinePrecision] + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
t_3 := \left(x - y\right) \cdot \left(z - a\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-308}:\\
\;\;\;\;x + \left(y - x\right) \cdot t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y + \frac{\mathsf{fma}\left(a, \frac{t\_3}{t}, t\_3\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, y - x, x\right)\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.99999999999999955e-308Initial program 67.8%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6490.2
Applied egg-rr90.2%
if -4.99999999999999955e-308 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.1%
Taylor expanded in t around -inf
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified99.8%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 70.0%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6492.3
Applied egg-rr92.3%
Final simplification91.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- a t))) (t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 -5e-308)
(+ x (* (- y x) t_1))
(if (<= t_2 0.0) (fma x (/ (- z a) t) y) (fma t_1 (- y x) x)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -5e-308) {
tmp = x + ((y - x) * t_1);
} else if (t_2 <= 0.0) {
tmp = fma(x, ((z - a) / t), y);
} else {
tmp = fma(t_1, (y - x), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(a - t)) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -5e-308) tmp = Float64(x + Float64(Float64(y - x) * t_1)); elseif (t_2 <= 0.0) tmp = fma(x, Float64(Float64(z - a) / t), y); else tmp = fma(t_1, Float64(y - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-308], N[(x + N[(N[(y - x), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], N[(t$95$1 * N[(y - x), $MachinePrecision] + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-308}:\\
\;\;\;\;x + \left(y - x\right) \cdot t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{z - a}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, y - x, x\right)\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.99999999999999955e-308Initial program 67.8%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6490.2
Applied egg-rr90.2%
if -4.99999999999999955e-308 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.1%
Taylor expanded in t 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
accelerator-lowering-fma.f64N/A
Simplified99.7%
Taylor expanded in x around inf
Simplified99.7%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 70.0%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6492.3
Applied egg-rr92.3%
Final simplification91.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- z t) (- a t)) (- y x) x))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 -5e-308) t_1 (if (<= t_2 0.0) (fma x (/ (- z a) t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((z - t) / (a - t)), (y - x), x);
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -5e-308) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = fma(x, ((z - a) / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -5e-308) tmp = t_1; elseif (t_2 <= 0.0) tmp = fma(x, Float64(Float64(z - a) / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-308], t$95$1, If[LessEqual[t$95$2, 0.0], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-308}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{z - a}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.99999999999999955e-308 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 68.9%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6491.3
Applied egg-rr91.3%
if -4.99999999999999955e-308 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.1%
Taylor expanded in t 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
accelerator-lowering-fma.f64N/A
Simplified99.7%
Taylor expanded in x around inf
Simplified99.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.1e+124)
(fma x (/ (- z a) t) y)
(if (<= t -7.6e-115)
(* y (/ (- z t) (- a t)))
(if (<= t 1.85e+14) (fma (/ z a) (- y x) x) (fma (- x y) (/ z t) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.1e+124) {
tmp = fma(x, ((z - a) / t), y);
} else if (t <= -7.6e-115) {
tmp = y * ((z - t) / (a - t));
} else if (t <= 1.85e+14) {
tmp = fma((z / a), (y - x), x);
} else {
tmp = fma((x - y), (z / t), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.1e+124) tmp = fma(x, Float64(Float64(z - a) / t), y); elseif (t <= -7.6e-115) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); elseif (t <= 1.85e+14) tmp = fma(Float64(z / a), Float64(y - x), x); else tmp = fma(Float64(x - y), Float64(z / t), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.1e+124], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, -7.6e-115], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e+14], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+124}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{z - a}{t}, y\right)\\
\mathbf{elif}\;t \leq -7.6 \cdot 10^{-115}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+14}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\end{array}
\end{array}
if t < -2.10000000000000011e124Initial program 32.5%
Taylor expanded in t 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
accelerator-lowering-fma.f64N/A
Simplified89.3%
Taylor expanded in x around inf
Simplified82.7%
if -2.10000000000000011e124 < t < -7.59999999999999984e-115Initial program 73.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6454.5
Simplified54.5%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6463.9
Applied egg-rr63.9%
if -7.59999999999999984e-115 < t < 1.85e14Initial program 86.5%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6498.9
Applied egg-rr98.9%
Taylor expanded in t around 0
/-lowering-/.f6477.5
Simplified77.5%
if 1.85e14 < t Initial program 45.8%
Taylor expanded in t 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
accelerator-lowering-fma.f64N/A
Simplified82.1%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f6477.2
Simplified77.2%
Final simplification75.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- z t) (/ (- y x) (- a t)) x)))
(if (<= a -1.75e-160)
t_1
(if (<= a 2.85e-117) (fma (- x y) (/ (- z a) t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z - t), ((y - x) / (a - t)), x);
double tmp;
if (a <= -1.75e-160) {
tmp = t_1;
} else if (a <= 2.85e-117) {
tmp = fma((x - y), ((z - a) / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z - t), Float64(Float64(y - x) / Float64(a - t)), x) tmp = 0.0 if (a <= -1.75e-160) tmp = t_1; elseif (a <= 2.85e-117) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.75e-160], t$95$1, If[LessEqual[a, 2.85e-117], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)\\
\mathbf{if}\;a \leq -1.75 \cdot 10^{-160}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.85 \cdot 10^{-117}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.7500000000000001e-160 or 2.85e-117 < a Initial program 65.1%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6487.1
Applied egg-rr87.1%
if -1.7500000000000001e-160 < a < 2.85e-117Initial program 63.3%
Taylor expanded in t 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
accelerator-lowering-fma.f64N/A
Simplified94.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.6e+52)
(fma (- z t) (/ (- y x) a) x)
(if (<= a 6.5e-117)
(fma (- x y) (/ (- z a) t) y)
(fma (- z t) (/ y (- a t)) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e+52) {
tmp = fma((z - t), ((y - x) / a), x);
} else if (a <= 6.5e-117) {
tmp = fma((x - y), ((z - a) / t), y);
} else {
tmp = fma((z - t), (y / (a - t)), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.6e+52) tmp = fma(Float64(z - t), Float64(Float64(y - x) / a), x); elseif (a <= 6.5e-117) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); else tmp = fma(Float64(z - t), Float64(y / Float64(a - t)), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.6e+52], N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 6.5e-117], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{+52}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a}, x\right)\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-117}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{a - t}, x\right)\\
\end{array}
\end{array}
if a < -1.6e52Initial program 54.5%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6480.8
Simplified80.8%
if -1.6e52 < a < 6.5000000000000001e-117Initial program 64.3%
Taylor expanded in t 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
accelerator-lowering-fma.f64N/A
Simplified84.8%
if 6.5000000000000001e-117 < a Initial program 71.5%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6487.3
Applied egg-rr87.3%
Taylor expanded in y around inf
Simplified77.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.5e+53)
(fma z (/ (- y x) a) x)
(if (<= a 3.4e-117)
(fma (- x y) (/ (- z a) t) y)
(fma (- z t) (/ y (- a t)) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.5e+53) {
tmp = fma(z, ((y - x) / a), x);
} else if (a <= 3.4e-117) {
tmp = fma((x - y), ((z - a) / t), y);
} else {
tmp = fma((z - t), (y / (a - t)), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.5e+53) tmp = fma(z, Float64(Float64(y - x) / a), x); elseif (a <= 3.4e-117) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); else tmp = fma(Float64(z - t), Float64(y / Float64(a - t)), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.5e+53], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 3.4e-117], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{+53}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{-117}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{a - t}, x\right)\\
\end{array}
\end{array}
if a < -4.5000000000000002e53Initial program 54.5%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6477.5
Simplified77.5%
if -4.5000000000000002e53 < a < 3.40000000000000035e-117Initial program 64.3%
Taylor expanded in t 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
accelerator-lowering-fma.f64N/A
Simplified84.8%
if 3.40000000000000035e-117 < a Initial program 71.5%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6487.3
Applied egg-rr87.3%
Taylor expanded in y around inf
Simplified77.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
(if (<= t -1.18e-116)
t_1
(if (<= t 1.65e-18) (fma (/ z a) (- y x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), ((z - a) / t), y);
double tmp;
if (t <= -1.18e-116) {
tmp = t_1;
} else if (t <= 1.65e-18) {
tmp = fma((z / a), (y - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y) tmp = 0.0 if (t <= -1.18e-116) tmp = t_1; elseif (t <= 1.65e-18) tmp = fma(Float64(z / a), Float64(y - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.18e-116], t$95$1, If[LessEqual[t, 1.65e-18], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -1.18 \cdot 10^{-116}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-18}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.1800000000000001e-116 or 1.6500000000000001e-18 < t Initial program 52.6%
Taylor expanded in t 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
accelerator-lowering-fma.f64N/A
Simplified75.8%
if -1.1800000000000001e-116 < t < 1.6500000000000001e-18Initial program 87.0%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6499.6
Applied egg-rr99.6%
Taylor expanded in t around 0
/-lowering-/.f6480.7
Simplified80.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.1e-25) (fma z (/ (- y x) a) x) (if (<= a 2.05e+29) (fma (- x y) (/ z t) y) (fma (/ z a) (- y x) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.1e-25) {
tmp = fma(z, ((y - x) / a), x);
} else if (a <= 2.05e+29) {
tmp = fma((x - y), (z / t), y);
} else {
tmp = fma((z / a), (y - x), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.1e-25) tmp = fma(z, Float64(Float64(y - x) / a), x); elseif (a <= 2.05e+29) tmp = fma(Float64(x - y), Float64(z / t), y); else tmp = fma(Float64(z / a), Float64(y - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.1e-25], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 2.05e+29], N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{-25}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{elif}\;a \leq 2.05 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\end{array}
\end{array}
if a < -1.1000000000000001e-25Initial program 55.7%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6467.0
Simplified67.0%
if -1.1000000000000001e-25 < a < 2.0500000000000002e29Initial program 66.2%
Taylor expanded in t 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
accelerator-lowering-fma.f64N/A
Simplified84.0%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f6481.1
Simplified81.1%
if 2.0500000000000002e29 < a Initial program 73.3%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6491.1
Applied egg-rr91.1%
Taylor expanded in t around 0
/-lowering-/.f6461.7
Simplified61.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma z (/ (- y x) a) x))) (if (<= a -2.35e-23) t_1 (if (<= a 1.16e+29) (fma (- x y) (/ z t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(z, ((y - x) / a), x);
double tmp;
if (a <= -2.35e-23) {
tmp = t_1;
} else if (a <= 1.16e+29) {
tmp = fma((x - y), (z / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(z, Float64(Float64(y - x) / a), x) tmp = 0.0 if (a <= -2.35e-23) tmp = t_1; elseif (a <= 1.16e+29) tmp = fma(Float64(x - y), Float64(z / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2.35e-23], t$95$1, If[LessEqual[a, 1.16e+29], N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{if}\;a \leq -2.35 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.16 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.35e-23 or 1.16e29 < a Initial program 62.8%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6464.9
Simplified64.9%
if -2.35e-23 < a < 1.16e29Initial program 66.2%
Taylor expanded in t 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
accelerator-lowering-fma.f64N/A
Simplified84.0%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f6481.1
Simplified81.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma x (/ (- z a) t) y))) (if (<= t -2.2e+17) t_1 (if (<= t 7.3e-13) (fma z (/ (- y x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(x, ((z - a) / t), y);
double tmp;
if (t <= -2.2e+17) {
tmp = t_1;
} else if (t <= 7.3e-13) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(x, Float64(Float64(z - a) / t), y) tmp = 0.0 if (t <= -2.2e+17) tmp = t_1; elseif (t <= 7.3e-13) tmp = fma(z, Float64(Float64(y - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -2.2e+17], t$95$1, If[LessEqual[t, 7.3e-13], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -2.2 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.3 \cdot 10^{-13}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.2e17 or 7.3000000000000002e-13 < t Initial program 46.9%
Taylor expanded in t 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
accelerator-lowering-fma.f64N/A
Simplified79.4%
Taylor expanded in x around inf
Simplified69.2%
if -2.2e17 < t < 7.3000000000000002e-13Initial program 85.6%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6471.7
Simplified71.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma x (/ (- z a) t) y))) (if (<= t -2.35e+17) t_1 (if (<= t 2.2e-12) (fma x (/ z (- a)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(x, ((z - a) / t), y);
double tmp;
if (t <= -2.35e+17) {
tmp = t_1;
} else if (t <= 2.2e-12) {
tmp = fma(x, (z / -a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(x, Float64(Float64(z - a) / t), y) tmp = 0.0 if (t <= -2.35e+17) tmp = t_1; elseif (t <= 2.2e-12) tmp = fma(x, Float64(z / Float64(-a)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -2.35e+17], t$95$1, If[LessEqual[t, 2.2e-12], N[(x * N[(z / (-a)), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -2.35 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-12}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{z}{-a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.35e17 or 2.19999999999999992e-12 < t Initial program 46.9%
Taylor expanded in t 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
accelerator-lowering-fma.f64N/A
Simplified79.4%
Taylor expanded in x around inf
Simplified69.2%
if -2.35e17 < t < 2.19999999999999992e-12Initial program 85.6%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6464.7
Simplified64.7%
Taylor expanded in x around inf
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-lowering-neg.f6454.4
Simplified54.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* z (/ (- y x) a)))) (if (<= z -5e+106) t_1 (if (<= z 4e+147) (+ x y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * ((y - x) / a);
double tmp;
if (z <= -5e+106) {
tmp = t_1;
} else if (z <= 4e+147) {
tmp = x + 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 = z * ((y - x) / a)
if (z <= (-5d+106)) then
tmp = t_1
else if (z <= 4d+147) then
tmp = x + 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 = z * ((y - x) / a);
double tmp;
if (z <= -5e+106) {
tmp = t_1;
} else if (z <= 4e+147) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * ((y - x) / a) tmp = 0 if z <= -5e+106: tmp = t_1 elif z <= 4e+147: tmp = x + y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(Float64(y - x) / a)) tmp = 0.0 if (z <= -5e+106) tmp = t_1; elseif (z <= 4e+147) tmp = Float64(x + y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * ((y - x) / a); tmp = 0.0; if (z <= -5e+106) tmp = t_1; elseif (z <= 4e+147) tmp = x + y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e+106], t$95$1, If[LessEqual[z, 4e+147], N[(x + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y - x}{a}\\
\mathbf{if}\;z \leq -5 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+147}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.9999999999999998e106 or 3.9999999999999999e147 < z Initial program 65.9%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6439.5
Simplified39.5%
Taylor expanded in z around inf
div-subN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6455.0
Simplified55.0%
if -4.9999999999999998e106 < z < 3.9999999999999999e147Initial program 64.1%
Taylor expanded in t around inf
--lowering--.f6431.4
Simplified31.4%
Taylor expanded in y around inf
Simplified50.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* z (/ y (- a t))))) (if (<= z -1.2e+95) t_1 (if (<= z 2.1e+160) (+ x y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / (a - t));
double tmp;
if (z <= -1.2e+95) {
tmp = t_1;
} else if (z <= 2.1e+160) {
tmp = x + 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 = z * (y / (a - t))
if (z <= (-1.2d+95)) then
tmp = t_1
else if (z <= 2.1d+160) then
tmp = x + 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 = z * (y / (a - t));
double tmp;
if (z <= -1.2e+95) {
tmp = t_1;
} else if (z <= 2.1e+160) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / (a - t)) tmp = 0 if z <= -1.2e+95: tmp = t_1 elif z <= 2.1e+160: tmp = x + y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / Float64(a - t))) tmp = 0.0 if (z <= -1.2e+95) tmp = t_1; elseif (z <= 2.1e+160) tmp = Float64(x + y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (y / (a - t)); tmp = 0.0; if (z <= -1.2e+95) tmp = t_1; elseif (z <= 2.1e+160) tmp = x + y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e+95], t$95$1, If[LessEqual[z, 2.1e+160], N[(x + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{a - t}\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+160}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.2e95 or 2.09999999999999997e160 < z Initial program 63.7%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6440.6
Simplified40.6%
Taylor expanded in z around inf
*-commutativeN/A
associate-*r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6452.7
Simplified52.7%
if -1.2e95 < z < 2.09999999999999997e160Initial program 64.9%
Taylor expanded in t around inf
--lowering--.f6431.6
Simplified31.6%
Taylor expanded in y around inf
Simplified50.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.5e+60) x (if (<= a 2.4e-189) (fma a (/ y t) y) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.5e+60) {
tmp = x;
} else if (a <= 2.4e-189) {
tmp = fma(a, (y / t), y);
} else {
tmp = x + y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.5e+60) tmp = x; elseif (a <= 2.4e-189) tmp = fma(a, Float64(y / t), y); else tmp = Float64(x + y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.5e+60], x, If[LessEqual[a, 2.4e-189], N[(a * N[(y / t), $MachinePrecision] + y), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{+60}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{-189}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -2.49999999999999987e60Initial program 54.5%
Taylor expanded in a around inf
Simplified49.4%
if -2.49999999999999987e60 < a < 2.3999999999999998e-189Initial program 64.1%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6450.0
Simplified50.0%
Taylor expanded in z around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6437.8
Simplified37.8%
Taylor expanded in t around inf
sub-negN/A
associate-/l*N/A
mul-1-negN/A
remove-double-negN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6443.8
Simplified43.8%
if 2.3999999999999998e-189 < a Initial program 70.7%
Taylor expanded in t around inf
--lowering--.f6425.0
Simplified25.0%
Taylor expanded in y around inf
Simplified44.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (* y z) a))) (if (<= z -4.7e+107) t_1 (if (<= z 3.4e+160) (+ x y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * z) / a;
double tmp;
if (z <= -4.7e+107) {
tmp = t_1;
} else if (z <= 3.4e+160) {
tmp = x + 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 = (y * z) / a
if (z <= (-4.7d+107)) then
tmp = t_1
else if (z <= 3.4d+160) then
tmp = x + 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 = (y * z) / a;
double tmp;
if (z <= -4.7e+107) {
tmp = t_1;
} else if (z <= 3.4e+160) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * z) / a tmp = 0 if z <= -4.7e+107: tmp = t_1 elif z <= 3.4e+160: tmp = x + y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * z) / a) tmp = 0.0 if (z <= -4.7e+107) tmp = t_1; elseif (z <= 3.4e+160) tmp = Float64(x + y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * z) / a; tmp = 0.0; if (z <= -4.7e+107) tmp = t_1; elseif (z <= 3.4e+160) tmp = x + y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[z, -4.7e+107], t$95$1, If[LessEqual[z, 3.4e+160], N[(x + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot z}{a}\\
\mathbf{if}\;z \leq -4.7 \cdot 10^{+107}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+160}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.7000000000000001e107 or 3.4000000000000003e160 < z Initial program 65.4%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6438.7
Simplified38.7%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f6430.3
Simplified30.3%
if -4.7000000000000001e107 < z < 3.4000000000000003e160Initial program 64.3%
Taylor expanded in t around inf
--lowering--.f6431.3
Simplified31.3%
Taylor expanded in y around inf
Simplified50.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.9e+60) x (if (<= a 2.4e-189) y (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.9e+60) {
tmp = x;
} else if (a <= 2.4e-189) {
tmp = y;
} else {
tmp = x + y;
}
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 <= (-1.9d+60)) then
tmp = x
else if (a <= 2.4d-189) then
tmp = y
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.9e+60) {
tmp = x;
} else if (a <= 2.4e-189) {
tmp = y;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.9e+60: tmp = x elif a <= 2.4e-189: tmp = y else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.9e+60) tmp = x; elseif (a <= 2.4e-189) tmp = y; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.9e+60) tmp = x; elseif (a <= 2.4e-189) tmp = y; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.9e+60], x, If[LessEqual[a, 2.4e-189], y, N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{+60}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{-189}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.90000000000000005e60Initial program 54.5%
Taylor expanded in a around inf
Simplified49.4%
if -1.90000000000000005e60 < a < 2.3999999999999998e-189Initial program 64.1%
Taylor expanded in t around inf
Simplified41.9%
if 2.3999999999999998e-189 < a Initial program 70.7%
Taylor expanded in t around inf
--lowering--.f6425.0
Simplified25.0%
Taylor expanded in y around inf
Simplified44.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.4e-114) y (if (<= t 3.7e+14) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.4e-114) {
tmp = y;
} else if (t <= 3.7e+14) {
tmp = x;
} else {
tmp = y;
}
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 (t <= (-1.4d-114)) then
tmp = y
else if (t <= 3.7d+14) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.4e-114) {
tmp = y;
} else if (t <= 3.7e+14) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.4e-114: tmp = y elif t <= 3.7e+14: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.4e-114) tmp = y; elseif (t <= 3.7e+14) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.4e-114) tmp = y; elseif (t <= 3.7e+14) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.4e-114], y, If[LessEqual[t, 3.7e+14], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{-114}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{+14}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -1.4000000000000001e-114 or 3.7e14 < t Initial program 51.2%
Taylor expanded in t around inf
Simplified46.2%
if -1.4000000000000001e-114 < t < 3.7e14Initial program 86.5%
Taylor expanded in a around inf
Simplified39.1%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return 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
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 64.6%
Taylor expanded in a around inf
Simplified23.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(if (< a -1.6153062845442575e-142)
t_1
(if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - 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 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
if (a < (-1.6153062845442575d-142)) then
tmp = t_1
else if (a < 3.774403170083174d-182) then
tmp = y - ((z / t) * (y - 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 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))) tmp = 0 if a < -1.6153062845442575e-142: tmp = t_1 elif a < 3.774403170083174e-182: tmp = y - ((z / t) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))); tmp = 0.0; if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = y - ((z / t) * (y - x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024204
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))