
(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 17 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 (fma (- x y) (/ (- z a) t) y)))
(if (<= t -2.9e+209)
t_1
(if (<= t 4e+156) (fma (* (/ -1.0 (- t a)) (- z t)) (- 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 <= -2.9e+209) {
tmp = t_1;
} else if (t <= 4e+156) {
tmp = fma(((-1.0 / (t - a)) * (z - t)), (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 <= -2.9e+209) tmp = t_1; elseif (t <= 4e+156) tmp = fma(Float64(Float64(-1.0 / Float64(t - a)) * Float64(z - t)), 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, -2.9e+209], t$95$1, If[LessEqual[t, 4e+156], N[(N[(N[(-1.0 / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(z - t), $MachinePrecision]), $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 -2.9 \cdot 10^{+209}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+156}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-1}{t - a} \cdot \left(z - t\right), y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.89999999999999999e209 or 3.9999999999999999e156 < t Initial program 35.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
Simplified93.2%
if -2.89999999999999999e209 < t < 3.9999999999999999e156Initial program 75.9%
+-commutativeN/A
clear-numN/A
associate-/r/N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6490.8
Applied egg-rr90.8%
Final simplification91.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- z t) (/ y (- a t)))))
(if (<= t -1.06e+205)
y
(if (<= t -1.55e+33)
t_1
(if (<= t 4e+41) (fma (/ z a) (- y x) x) (if (<= t 1.3e+207) t_1 y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) * (y / (a - t));
double tmp;
if (t <= -1.06e+205) {
tmp = y;
} else if (t <= -1.55e+33) {
tmp = t_1;
} else if (t <= 4e+41) {
tmp = fma((z / a), (y - x), x);
} else if (t <= 1.3e+207) {
tmp = t_1;
} else {
tmp = y;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) * Float64(y / Float64(a - t))) tmp = 0.0 if (t <= -1.06e+205) tmp = y; elseif (t <= -1.55e+33) tmp = t_1; elseif (t <= 4e+41) tmp = fma(Float64(z / a), Float64(y - x), x); elseif (t <= 1.3e+207) tmp = t_1; else tmp = y; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.06e+205], y, If[LessEqual[t, -1.55e+33], t$95$1, If[LessEqual[t, 4e+41], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 1.3e+207], t$95$1, y]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{if}\;t \leq -1.06 \cdot 10^{+205}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -1.55 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+41}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+207}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -1.06e205 or 1.2999999999999999e207 < t Initial program 41.7%
Taylor expanded in t around inf
Simplified64.2%
if -1.06e205 < t < -1.55e33 or 4.00000000000000002e41 < t < 1.2999999999999999e207Initial program 48.5%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6440.0
Simplified40.0%
associate-/l*N/A
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
flip--N/A
clear-numN/A
clear-numN/A
flip--N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6459.7
Applied egg-rr59.7%
if -1.55e33 < t < 4.00000000000000002e41Initial program 84.0%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6494.7
Applied egg-rr94.7%
Taylor expanded in t around 0
/-lowering-/.f6476.0
Simplified76.0%
Final simplification69.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.8e+55)
(fma (/ z a) (- y x) x)
(if (<= a -2.7e-89)
(* y (/ (- z t) (- a t)))
(if (<= a 2.8e+19)
(fma (- x y) (/ (- z a) t) y)
(fma (- z t) (/ y a) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.8e+55) {
tmp = fma((z / a), (y - x), x);
} else if (a <= -2.7e-89) {
tmp = y * ((z - t) / (a - t));
} else if (a <= 2.8e+19) {
tmp = fma((x - y), ((z - a) / t), y);
} else {
tmp = fma((z - t), (y / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.8e+55) tmp = fma(Float64(z / a), Float64(y - x), x); elseif (a <= -2.7e-89) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); elseif (a <= 2.8e+19) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); else tmp = fma(Float64(z - t), Float64(y / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.8e+55], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, -2.7e-89], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.8e+19], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.8 \cdot 10^{+55}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{elif}\;a \leq -2.7 \cdot 10^{-89}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{+19}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{a}, x\right)\\
\end{array}
\end{array}
if a < -2.8000000000000001e55Initial program 64.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.0
Applied egg-rr91.0%
Taylor expanded in t around 0
/-lowering-/.f6473.2
Simplified73.2%
if -2.8000000000000001e55 < a < -2.69999999999999988e-89Initial program 79.1%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6470.7
Simplified70.7%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6479.0
Applied egg-rr79.0%
if -2.69999999999999988e-89 < a < 2.8e19Initial 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
Simplified84.6%
if 2.8e19 < a Initial program 73.7%
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--.f6473.0
Simplified73.0%
Taylor expanded in y around inf
/-lowering-/.f6470.0
Simplified70.0%
Final simplification77.8%
(FPCore (x y z t a)
:precision binary64
(if (<= t -8.5e+199)
y
(if (<= t -2.5e+59)
(fma (- z t) (/ y a) x)
(if (<= t 1.04e+68) (fma (/ z a) (- y x) x) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8.5e+199) {
tmp = y;
} else if (t <= -2.5e+59) {
tmp = fma((z - t), (y / a), x);
} else if (t <= 1.04e+68) {
tmp = fma((z / a), (y - x), x);
} else {
tmp = y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8.5e+199) tmp = y; elseif (t <= -2.5e+59) tmp = fma(Float64(z - t), Float64(y / a), x); elseif (t <= 1.04e+68) tmp = fma(Float64(z / a), Float64(y - x), x); else tmp = y; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8.5e+199], y, If[LessEqual[t, -2.5e+59], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 1.04e+68], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], y]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{+199}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -2.5 \cdot 10^{+59}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{a}, x\right)\\
\mathbf{elif}\;t \leq 1.04 \cdot 10^{+68}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -8.49999999999999923e199 or 1.04e68 < t Initial program 37.9%
Taylor expanded in t around inf
Simplified53.6%
if -8.49999999999999923e199 < t < -2.4999999999999999e59Initial program 53.4%
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--.f6444.2
Simplified44.2%
Taylor expanded in y around inf
/-lowering-/.f6444.8
Simplified44.8%
if -2.4999999999999999e59 < t < 1.04e68Initial program 83.2%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6493.8
Applied egg-rr93.8%
Taylor expanded in t around 0
/-lowering-/.f6472.7
Simplified72.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -9e+199)
y
(if (<= t -6.5e+57)
(fma (- z t) (/ y a) x)
(if (<= t 2.15e+70) (fma z (/ (- y x) a) x) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9e+199) {
tmp = y;
} else if (t <= -6.5e+57) {
tmp = fma((z - t), (y / a), x);
} else if (t <= 2.15e+70) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9e+199) tmp = y; elseif (t <= -6.5e+57) tmp = fma(Float64(z - t), Float64(y / a), x); elseif (t <= 2.15e+70) tmp = fma(z, Float64(Float64(y - x) / a), x); else tmp = y; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9e+199], y, If[LessEqual[t, -6.5e+57], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 2.15e+70], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], y]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{+199}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{+57}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{a}, x\right)\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{+70}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -8.9999999999999994e199 or 2.15e70 < t Initial program 37.9%
Taylor expanded in t around inf
Simplified53.6%
if -8.9999999999999994e199 < t < -6.4999999999999997e57Initial program 53.4%
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--.f6444.2
Simplified44.2%
Taylor expanded in y around inf
/-lowering-/.f6444.8
Simplified44.8%
if -6.4999999999999997e57 < t < 2.15e70Initial program 83.2%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6469.5
Simplified69.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
(if (<= t -3.5e+205)
t_1
(if (<= t 8e+156) (fma (/ (- z t) (- a t)) (- 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 <= -3.5e+205) {
tmp = t_1;
} else if (t <= 8e+156) {
tmp = fma(((z - t) / (a - t)), (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 <= -3.5e+205) tmp = t_1; elseif (t <= 8e+156) tmp = fma(Float64(Float64(z - t) / Float64(a - t)), 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, -3.5e+205], t$95$1, If[LessEqual[t, 8e+156], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $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 -3.5 \cdot 10^{+205}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+156}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.4999999999999998e205 or 7.9999999999999999e156 < t Initial program 35.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
Simplified93.2%
if -3.4999999999999998e205 < t < 7.9999999999999999e156Initial program 75.9%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6490.8
Applied egg-rr90.8%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.4e+202)
(+ y (* (- z a) (/ (- x y) t)))
(if (<= t 8e+155)
(fma (- z t) (/ (- y x) (- a t)) x)
(fma (- x y) (/ (- z a) t) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.4e+202) {
tmp = y + ((z - a) * ((x - y) / t));
} else if (t <= 8e+155) {
tmp = fma((z - t), ((y - x) / (a - t)), x);
} else {
tmp = fma((x - y), ((z - a) / t), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.4e+202) tmp = Float64(y + Float64(Float64(z - a) * Float64(Float64(x - y) / t))); elseif (t <= 8e+155) tmp = fma(Float64(z - t), Float64(Float64(y - x) / Float64(a - t)), x); else tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.4e+202], N[(y + N[(N[(z - a), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e+155], N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{+202}:\\
\;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+155}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\end{array}
\end{array}
if t < -1.40000000000000008e202Initial program 39.1%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6463.3
Applied egg-rr63.3%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6495.8
Simplified95.8%
if -1.40000000000000008e202 < t < 8.00000000000000006e155Initial program 75.8%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6485.8
Applied egg-rr85.8%
if 8.00000000000000006e155 < t Initial program 34.4%
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
Simplified88.4%
Final simplification87.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -5.6e+39)
(fma x (/ t a) x)
(if (<= a -1e-283)
y
(if (<= a 2.95e-173) (fma x (/ z t) 0.0) (if (<= a 8.5e+108) y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.6e+39) {
tmp = fma(x, (t / a), x);
} else if (a <= -1e-283) {
tmp = y;
} else if (a <= 2.95e-173) {
tmp = fma(x, (z / t), 0.0);
} else if (a <= 8.5e+108) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.6e+39) tmp = fma(x, Float64(t / a), x); elseif (a <= -1e-283) tmp = y; elseif (a <= 2.95e-173) tmp = fma(x, Float64(z / t), 0.0); elseif (a <= 8.5e+108) tmp = y; else tmp = x; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.6e+39], N[(x * N[(t / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, -1e-283], y, If[LessEqual[a, 2.95e-173], N[(x * N[(z / t), $MachinePrecision] + 0.0), $MachinePrecision], If[LessEqual[a, 8.5e+108], y, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.6 \cdot 10^{+39}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{t}{a}, x\right)\\
\mathbf{elif}\;a \leq -1 \cdot 10^{-283}:\\
\;\;\;\;y\\
\mathbf{elif}\;a \leq 2.95 \cdot 10^{-173}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{z}{t}, 0\right)\\
\mathbf{elif}\;a \leq 8.5 \cdot 10^{+108}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -5.60000000000000003e39Initial program 66.5%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
+-lowering-+.f64N/A
neg-lowering-neg.f6458.7
Simplified58.7%
Taylor expanded in z around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6446.3
Simplified46.3%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6444.3
Simplified44.3%
if -5.60000000000000003e39 < a < -9.99999999999999947e-284 or 2.94999999999999998e-173 < a < 8.50000000000000016e108Initial program 68.7%
Taylor expanded in t around inf
Simplified36.5%
if -9.99999999999999947e-284 < a < 2.94999999999999998e-173Initial program 58.1%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
+-lowering-+.f64N/A
neg-lowering-neg.f6431.2
Simplified31.2%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-lft-outN/A
associate-/l*N/A
*-commutativeN/A
associate-+l+N/A
associate-/l*N/A
distribute-lft1-inN/A
metadata-evalN/A
mul0-lftN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6453.1
Simplified53.1%
if 8.50000000000000016e108 < a Initial program 73.6%
Taylor expanded in a around inf
Simplified46.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- z t) (/ (- y x) a) x)))
(if (<= a -8800000.0)
t_1
(if (<= a 1.8e-29) (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), x);
double tmp;
if (a <= -8800000.0) {
tmp = t_1;
} else if (a <= 1.8e-29) {
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) / a), x) tmp = 0.0 if (a <= -8800000.0) tmp = t_1; elseif (a <= 1.8e-29) 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] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -8800000.0], t$95$1, If[LessEqual[a, 1.8e-29], 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}, x\right)\\
\mathbf{if}\;a \leq -8800000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{-29}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -8.8e6 or 1.79999999999999987e-29 < a Initial program 69.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--.f6472.9
Simplified72.9%
if -8.8e6 < a < 1.79999999999999987e-29Initial program 64.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
Simplified84.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.65e+43)
(fma x (/ t a) x)
(if (<= a -1.05e-282)
y
(if (<= a 2.6e-173) (/ (* x z) t) (if (<= a 8.5e+108) y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.65e+43) {
tmp = fma(x, (t / a), x);
} else if (a <= -1.05e-282) {
tmp = y;
} else if (a <= 2.6e-173) {
tmp = (x * z) / t;
} else if (a <= 8.5e+108) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.65e+43) tmp = fma(x, Float64(t / a), x); elseif (a <= -1.05e-282) tmp = y; elseif (a <= 2.6e-173) tmp = Float64(Float64(x * z) / t); elseif (a <= 8.5e+108) tmp = y; else tmp = x; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.65e+43], N[(x * N[(t / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, -1.05e-282], y, If[LessEqual[a, 2.6e-173], N[(N[(x * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[a, 8.5e+108], y, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.65 \cdot 10^{+43}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{t}{a}, x\right)\\
\mathbf{elif}\;a \leq -1.05 \cdot 10^{-282}:\\
\;\;\;\;y\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{-173}:\\
\;\;\;\;\frac{x \cdot z}{t}\\
\mathbf{elif}\;a \leq 8.5 \cdot 10^{+108}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.6500000000000001e43Initial program 66.5%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
+-lowering-+.f64N/A
neg-lowering-neg.f6458.7
Simplified58.7%
Taylor expanded in z around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6446.3
Simplified46.3%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6444.3
Simplified44.3%
if -1.6500000000000001e43 < a < -1.05000000000000006e-282 or 2.60000000000000003e-173 < a < 8.50000000000000016e108Initial program 68.7%
Taylor expanded in t around inf
Simplified36.5%
if -1.05000000000000006e-282 < a < 2.60000000000000003e-173Initial program 58.1%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
+-lowering-+.f64N/A
neg-lowering-neg.f6431.2
Simplified31.2%
Taylor expanded in t around inf
Simplified31.2%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f6450.7
Simplified50.7%
if 8.50000000000000016e108 < a Initial program 73.6%
Taylor expanded in a around inf
Simplified46.2%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.2e+43)
x
(if (<= a -3.7e-284)
y
(if (<= a 2.4e-173) (/ (* x z) t) (if (<= a 3.4e+109) y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.2e+43) {
tmp = x;
} else if (a <= -3.7e-284) {
tmp = y;
} else if (a <= 2.4e-173) {
tmp = (x * z) / t;
} else if (a <= 3.4e+109) {
tmp = y;
} 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 <= (-2.2d+43)) then
tmp = x
else if (a <= (-3.7d-284)) then
tmp = y
else if (a <= 2.4d-173) then
tmp = (x * z) / t
else if (a <= 3.4d+109) then
tmp = y
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 <= -2.2e+43) {
tmp = x;
} else if (a <= -3.7e-284) {
tmp = y;
} else if (a <= 2.4e-173) {
tmp = (x * z) / t;
} else if (a <= 3.4e+109) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.2e+43: tmp = x elif a <= -3.7e-284: tmp = y elif a <= 2.4e-173: tmp = (x * z) / t elif a <= 3.4e+109: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.2e+43) tmp = x; elseif (a <= -3.7e-284) tmp = y; elseif (a <= 2.4e-173) tmp = Float64(Float64(x * z) / t); elseif (a <= 3.4e+109) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.2e+43) tmp = x; elseif (a <= -3.7e-284) tmp = y; elseif (a <= 2.4e-173) tmp = (x * z) / t; elseif (a <= 3.4e+109) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.2e+43], x, If[LessEqual[a, -3.7e-284], y, If[LessEqual[a, 2.4e-173], N[(N[(x * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[a, 3.4e+109], y, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{+43}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -3.7 \cdot 10^{-284}:\\
\;\;\;\;y\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{-173}:\\
\;\;\;\;\frac{x \cdot z}{t}\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{+109}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.20000000000000001e43 or 3.40000000000000006e109 < a Initial program 69.3%
Taylor expanded in a around inf
Simplified44.8%
if -2.20000000000000001e43 < a < -3.7e-284 or 2.40000000000000017e-173 < a < 3.40000000000000006e109Initial program 68.7%
Taylor expanded in t around inf
Simplified36.5%
if -3.7e-284 < a < 2.40000000000000017e-173Initial program 58.1%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
+-lowering-+.f64N/A
neg-lowering-neg.f6431.2
Simplified31.2%
Taylor expanded in t around inf
Simplified31.2%
Taylor expanded in z around inf
/-lowering-/.f64N/A
*-lowering-*.f6450.7
Simplified50.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (/ (- z t) (- a t))))) (if (<= t -6.5e+27) t_1 (if (<= t 3.5e+40) (fma (/ z a) (- y x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (t <= -6.5e+27) {
tmp = t_1;
} else if (t <= 3.5e+40) {
tmp = fma((z / a), (y - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) tmp = 0.0 if (t <= -6.5e+27) tmp = t_1; elseif (t <= 3.5e+40) 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[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.5e+27], t$95$1, If[LessEqual[t, 3.5e+40], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{+40}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.5000000000000005e27 or 3.4999999999999999e40 < t Initial program 45.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6442.7
Simplified42.7%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6463.3
Applied egg-rr63.3%
if -6.5000000000000005e27 < t < 3.4999999999999999e40Initial program 84.0%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6494.7
Applied egg-rr94.7%
Taylor expanded in t around 0
/-lowering-/.f6476.0
Simplified76.0%
Final simplification70.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.75e+113) y (if (<= t 9e+64) (fma z (/ (- y x) a) x) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.75e+113) {
tmp = y;
} else if (t <= 9e+64) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.75e+113) tmp = y; elseif (t <= 9e+64) tmp = fma(z, Float64(Float64(y - x) / a), x); else tmp = y; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.75e+113], y, If[LessEqual[t, 9e+64], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.75 \cdot 10^{+113}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+64}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -1.75e113 or 8.99999999999999946e64 < t Initial program 40.7%
Taylor expanded in t around inf
Simplified46.7%
if -1.75e113 < t < 8.99999999999999946e64Initial program 82.0%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6466.9
Simplified66.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.5e+114) y (if (<= t 2.6e+70) (fma z (/ y a) x) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.5e+114) {
tmp = y;
} else if (t <= 2.6e+70) {
tmp = fma(z, (y / a), x);
} else {
tmp = y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.5e+114) tmp = y; elseif (t <= 2.6e+70) tmp = fma(z, Float64(y / a), x); else tmp = y; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.5e+114], y, If[LessEqual[t, 2.6e+70], N[(z * N[(y / a), $MachinePrecision] + x), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+114}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+70}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -1.5e114 or 2.6e70 < t Initial program 40.7%
Taylor expanded in t around inf
Simplified46.7%
if -1.5e114 < t < 2.6e70Initial program 82.0%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6466.9
Simplified66.9%
Taylor expanded in y around inf
/-lowering-/.f6456.7
Simplified56.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.5e+38) x (if (<= a 2.6e+108) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.5e+38) {
tmp = x;
} else if (a <= 2.6e+108) {
tmp = y;
} 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 <= (-1.5d+38)) then
tmp = x
else if (a <= 2.6d+108) then
tmp = y
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 <= -1.5e+38) {
tmp = x;
} else if (a <= 2.6e+108) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.5e+38: tmp = x elif a <= 2.6e+108: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.5e+38) tmp = x; elseif (a <= 2.6e+108) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.5e+38) tmp = x; elseif (a <= 2.6e+108) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.5e+38], x, If[LessEqual[a, 2.6e+108], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{+38}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{+108}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.5000000000000001e38 or 2.6000000000000002e108 < a Initial program 69.3%
Taylor expanded in a around inf
Simplified44.8%
if -1.5000000000000001e38 < a < 2.6000000000000002e108Initial program 66.1%
Taylor expanded in t around inf
Simplified33.0%
(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 67.5%
Taylor expanded in a around inf
Simplified24.4%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 67.5%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
*-lft-identityN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
+-lowering-+.f64N/A
neg-lowering-neg.f6439.1
Simplified39.1%
Taylor expanded in t around inf
distribute-rgt1-inN/A
metadata-evalN/A
mul0-lft2.9
Simplified2.9%
(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 2024205
(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))))