
(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 20 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 -1.8e+178)
t_1
(if (<= t 1.02e+183) (+ x (/ (/ (- z t) (- a t)) (/ 1.0 (- y 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.8e+178) {
tmp = t_1;
} else if (t <= 1.02e+183) {
tmp = x + (((z - t) / (a - t)) / (1.0 / (y - 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.8e+178) tmp = t_1; elseif (t <= 1.02e+183) tmp = Float64(x + Float64(Float64(Float64(z - t) / Float64(a - t)) / Float64(1.0 / Float64(y - 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.8e+178], t$95$1, If[LessEqual[t, 1.02e+183], N[(x + N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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.8 \cdot 10^{+178}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{+183}:\\
\;\;\;\;x + \frac{\frac{z - t}{a - t}}{\frac{1}{y - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.7999999999999999e178 or 1.02000000000000002e183 < t Initial 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
Simplified92.5%
if -1.7999999999999999e178 < t < 1.02000000000000002e183Initial program 82.3%
associate-/l*N/A
*-commutativeN/A
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
--lowering--.f6492.6
Applied egg-rr92.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
(if (<= t -8e+144)
t_1
(if (<= t -4.2e-40)
(fma (- x y) (/ t (- a t)) x)
(if (<= t 7e-57)
(fma (- y x) (/ z a) x)
(if (<= t 2.6e+111) (* y (/ (- z t) (- a t))) 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 <= -8e+144) {
tmp = t_1;
} else if (t <= -4.2e-40) {
tmp = fma((x - y), (t / (a - t)), x);
} else if (t <= 7e-57) {
tmp = fma((y - x), (z / a), x);
} else if (t <= 2.6e+111) {
tmp = y * ((z - t) / (a - t));
} 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 <= -8e+144) tmp = t_1; elseif (t <= -4.2e-40) tmp = fma(Float64(x - y), Float64(t / Float64(a - t)), x); elseif (t <= 7e-57) tmp = fma(Float64(y - x), Float64(z / a), x); elseif (t <= 2.6e+111) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); 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, -8e+144], t$95$1, If[LessEqual[t, -4.2e-40], N[(N[(x - y), $MachinePrecision] * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 7e-57], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 2.6e+111], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $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 -8 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.2 \cdot 10^{-40}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{t}{a - t}, x\right)\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-57}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+111}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.00000000000000019e144 or 2.5999999999999999e111 < t Initial program 32.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
Simplified86.0%
if -8.00000000000000019e144 < t < -4.20000000000000036e-40Initial program 82.8%
Taylor expanded in z 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--.f6467.7
Simplified67.7%
if -4.20000000000000036e-40 < t < 6.99999999999999983e-57Initial program 91.4%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6476.9
Simplified76.9%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f6482.8
Applied egg-rr82.8%
if 6.99999999999999983e-57 < t < 2.5999999999999999e111Initial program 75.3%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6463.3
Simplified63.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6472.7
Applied egg-rr72.7%
Final simplification80.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6.2e+159)
(fma z (/ (- x y) t) y)
(if (<= t -3e-43)
(fma (- x y) (/ t (- a t)) x)
(if (<= t 2.1e-52)
(fma (- y x) (/ z a) x)
(if (<= t 2.5e+130)
(* y (/ (- z t) (- a t)))
(fma (- x y) (/ z t) y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.2e+159) {
tmp = fma(z, ((x - y) / t), y);
} else if (t <= -3e-43) {
tmp = fma((x - y), (t / (a - t)), x);
} else if (t <= 2.1e-52) {
tmp = fma((y - x), (z / a), x);
} else if (t <= 2.5e+130) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = fma((x - y), (z / t), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.2e+159) tmp = fma(z, Float64(Float64(x - y) / t), y); elseif (t <= -3e-43) tmp = fma(Float64(x - y), Float64(t / Float64(a - t)), x); elseif (t <= 2.1e-52) tmp = fma(Float64(y - x), Float64(z / a), x); elseif (t <= 2.5e+130) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = fma(Float64(x - y), Float64(z / t), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.2e+159], N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, -3e-43], N[(N[(x - y), $MachinePrecision] * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 2.1e-52], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 2.5e+130], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+159}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{x - y}{t}, y\right)\\
\mathbf{elif}\;t \leq -3 \cdot 10^{-43}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{t}{a - t}, x\right)\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-52}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+130}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\end{array}
\end{array}
if t < -6.1999999999999996e159Initial program 23.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
Simplified83.2%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
div-subN/A
accelerator-lowering-fma.f64N/A
div-subN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
--lowering--.f6480.5
Simplified80.5%
if -6.1999999999999996e159 < t < -3.00000000000000003e-43Initial program 78.6%
Taylor expanded in z 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--.f6467.0
Simplified67.0%
if -3.00000000000000003e-43 < t < 2.0999999999999999e-52Initial program 91.4%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6476.9
Simplified76.9%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f6482.8
Applied egg-rr82.8%
if 2.0999999999999999e-52 < t < 2.4999999999999998e130Initial program 70.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6462.1
Simplified62.1%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6470.6
Applied egg-rr70.6%
if 2.4999999999999998e130 < t Initial program 43.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
Simplified94.0%
Taylor expanded in z around inf
/-lowering-/.f6482.8
Simplified82.8%
Final simplification78.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- a t)))))
(if (<= t -6.2e+165)
(fma z (/ (- x y) t) y)
(if (<= t -9.2e-18)
t_1
(if (<= t 2.1e-56)
(fma (- y x) (/ z a) x)
(if (<= t 2.2e+130) t_1 (fma (- x y) (/ z t) y)))))))
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.2e+165) {
tmp = fma(z, ((x - y) / t), y);
} else if (t <= -9.2e-18) {
tmp = t_1;
} else if (t <= 2.1e-56) {
tmp = fma((y - x), (z / a), x);
} else if (t <= 2.2e+130) {
tmp = t_1;
} else {
tmp = fma((x - y), (z / t), y);
}
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.2e+165) tmp = fma(z, Float64(Float64(x - y) / t), y); elseif (t <= -9.2e-18) tmp = t_1; elseif (t <= 2.1e-56) tmp = fma(Float64(y - x), Float64(z / a), x); elseif (t <= 2.2e+130) tmp = t_1; else tmp = fma(Float64(x - y), Float64(z / t), y); 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.2e+165], N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, -9.2e-18], t$95$1, If[LessEqual[t, 2.1e-56], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 2.2e+130], t$95$1, N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{+165}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{x - y}{t}, y\right)\\
\mathbf{elif}\;t \leq -9.2 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-56}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+130}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\end{array}
\end{array}
if t < -6.2000000000000003e165Initial program 24.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
Simplified82.6%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
div-subN/A
accelerator-lowering-fma.f64N/A
div-subN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
--lowering--.f6479.8
Simplified79.8%
if -6.2000000000000003e165 < t < -9.2000000000000004e-18 or 2.10000000000000006e-56 < t < 2.19999999999999993e130Initial program 72.2%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6458.8
Simplified58.8%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6466.0
Applied egg-rr66.0%
if -9.2000000000000004e-18 < t < 2.10000000000000006e-56Initial program 91.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6476.0
Simplified76.0%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f6481.7
Applied egg-rr81.7%
if 2.19999999999999993e130 < t Initial program 43.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
Simplified94.0%
Taylor expanded in z around inf
/-lowering-/.f6482.8
Simplified82.8%
Final simplification76.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
(if (<= t -1.5e+177)
t_1
(if (<= t 6.2e+130) (+ x (/ (- y x) (/ (- a t) (- z t)))) 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.5e+177) {
tmp = t_1;
} else if (t <= 6.2e+130) {
tmp = x + ((y - x) / ((a - t) / (z - t)));
} 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.5e+177) tmp = t_1; elseif (t <= 6.2e+130) tmp = Float64(x + Float64(Float64(y - x) / Float64(Float64(a - t) / Float64(z - t)))); 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.5e+177], t$95$1, If[LessEqual[t, 6.2e+130], N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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.5 \cdot 10^{+177}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+130}:\\
\;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.5e177 or 6.1999999999999999e130 < t Initial program 36.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
Simplified91.6%
if -1.5e177 < t < 6.1999999999999999e130Initial program 82.7%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6492.9
Applied egg-rr92.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
(if (<= t -4e+178)
t_1
(if (<= t 6e+130) (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 <= -4e+178) {
tmp = t_1;
} else if (t <= 6e+130) {
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 <= -4e+178) tmp = t_1; elseif (t <= 6e+130) 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, -4e+178], t$95$1, If[LessEqual[t, 6e+130], 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 -4 \cdot 10^{+178}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+130}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.0000000000000002e178 or 5.9999999999999999e130 < t Initial program 36.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
Simplified91.6%
if -4.0000000000000002e178 < t < 5.9999999999999999e130Initial program 82.7%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6492.8
Applied egg-rr92.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y x) (/ (- z t) a) x)))
(if (<= a -3.3e-8)
t_1
(if (<= a 1.65e-9) (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((y - x), ((z - t) / a), x);
double tmp;
if (a <= -3.3e-8) {
tmp = t_1;
} else if (a <= 1.65e-9) {
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(y - x), Float64(Float64(z - t) / a), x) tmp = 0.0 if (a <= -3.3e-8) tmp = t_1; elseif (a <= 1.65e-9) 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[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -3.3e-8], t$95$1, If[LessEqual[a, 1.65e-9], 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(y - x, \frac{z - t}{a}, x\right)\\
\mathbf{if}\;a \leq -3.3 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.65 \cdot 10^{-9}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.29999999999999977e-8 or 1.65000000000000009e-9 < a Initial program 73.7%
associate-/l*N/A
*-commutativeN/A
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
--lowering--.f6493.2
Applied egg-rr93.2%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6482.2
Simplified82.2%
if -3.29999999999999977e-8 < a < 1.65000000000000009e-9Initial program 70.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
Simplified80.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- y x) (/ z a) x))) (if (<= a -5.4e-37) t_1 (if (<= a 3.8e-9) (fma (- x y) (/ z t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - x), (z / a), x);
double tmp;
if (a <= -5.4e-37) {
tmp = t_1;
} else if (a <= 3.8e-9) {
tmp = fma((x - y), (z / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - x), Float64(z / a), x) tmp = 0.0 if (a <= -5.4e-37) tmp = t_1; elseif (a <= 3.8e-9) 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[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -5.4e-37], t$95$1, If[LessEqual[a, 3.8e-9], 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(y - x, \frac{z}{a}, x\right)\\
\mathbf{if}\;a \leq -5.4 \cdot 10^{-37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{-9}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -5.40000000000000032e-37 or 3.80000000000000011e-9 < a Initial program 73.8%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6458.3
Simplified58.3%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
/-lowering-/.f6468.4
Applied egg-rr68.4%
if -5.40000000000000032e-37 < a < 3.80000000000000011e-9Initial program 69.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.3%
Taylor expanded in z around inf
/-lowering-/.f6479.9
Simplified79.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma z (/ (- y x) a) x))) (if (<= a -1.5e-44) t_1 (if (<= a 1.4e-13) (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 <= -1.5e-44) {
tmp = t_1;
} else if (a <= 1.4e-13) {
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 <= -1.5e-44) tmp = t_1; elseif (a <= 1.4e-13) 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, -1.5e-44], t$95$1, If[LessEqual[a, 1.4e-13], 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 -1.5 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{-13}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.5000000000000001e-44 or 1.4000000000000001e-13 < a Initial program 73.8%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6466.6
Simplified66.6%
if -1.5000000000000001e-44 < a < 1.4000000000000001e-13Initial program 69.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.3%
Taylor expanded in z around inf
/-lowering-/.f6479.9
Simplified79.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma z (/ (- x y) t) y))) (if (<= t -2.6e+17) t_1 (if (<= t 8e+67) (fma z (/ (- y x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(z, ((x - y) / t), y);
double tmp;
if (t <= -2.6e+17) {
tmp = t_1;
} else if (t <= 8e+67) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(z, Float64(Float64(x - y) / t), y) tmp = 0.0 if (t <= -2.6e+17) tmp = t_1; elseif (t <= 8e+67) 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[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -2.6e+17], t$95$1, If[LessEqual[t, 8e+67], 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(z, \frac{x - y}{t}, y\right)\\
\mathbf{if}\;t \leq -2.6 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+67}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.6e17 or 7.99999999999999986e67 < t Initial program 46.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
Simplified76.7%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
div-subN/A
accelerator-lowering-fma.f64N/A
div-subN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
--lowering--.f6469.8
Simplified69.8%
if -2.6e17 < t < 7.99999999999999986e67Initial program 89.7%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6473.8
Simplified73.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (/ (* y z) a)))) (if (<= a -3.2e-37) t_1 (if (<= a 5.1e-11) (fma z (/ (- x y) t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y * z) / a);
double tmp;
if (a <= -3.2e-37) {
tmp = t_1;
} else if (a <= 5.1e-11) {
tmp = fma(z, ((x - y) / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y * z) / a)) tmp = 0.0 if (a <= -3.2e-37) tmp = t_1; elseif (a <= 5.1e-11) tmp = fma(z, Float64(Float64(x - y) / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.2e-37], t$95$1, If[LessEqual[a, 5.1e-11], N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{a}\\
\mathbf{if}\;a \leq -3.2 \cdot 10^{-37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 5.1 \cdot 10^{-11}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{x - y}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.1999999999999999e-37 or 5.09999999999999984e-11 < a Initial program 73.8%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6458.3
Simplified58.3%
Taylor expanded in y around inf
Simplified57.5%
if -3.1999999999999999e-37 < a < 5.09999999999999984e-11Initial program 69.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.3%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
div-subN/A
accelerator-lowering-fma.f64N/A
div-subN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
+-commutativeN/A
sub-negN/A
--lowering--.f6478.2
Simplified78.2%
Final simplification66.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma a (/ (- y x) t) y))) (if (<= t -3.3e+131) t_1 (if (<= t 820.0) (+ x (/ (* y z) a)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(a, ((y - x) / t), y);
double tmp;
if (t <= -3.3e+131) {
tmp = t_1;
} else if (t <= 820.0) {
tmp = x + ((y * z) / a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(a, Float64(Float64(y - x) / t), y) tmp = 0.0 if (t <= -3.3e+131) tmp = t_1; elseif (t <= 820.0) tmp = Float64(x + Float64(Float64(y * z) / a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -3.3e+131], t$95$1, If[LessEqual[t, 820.0], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 820:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.2999999999999998e131 or 820 < t Initial program 41.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
Simplified79.3%
Taylor expanded in z around 0
+-commutativeN/A
associate-*r/N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
distribute-rgt-neg-inN/A
remove-double-negN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6455.7
Simplified55.7%
if -3.2999999999999998e131 < t < 820Initial program 90.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6466.7
Simplified66.7%
Taylor expanded in y around inf
Simplified57.5%
Final simplification56.8%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.6e+129) y (if (<= t 0.00022) (+ x (/ (* y z) a)) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.6e+129) {
tmp = y;
} else if (t <= 0.00022) {
tmp = x + ((y * z) / a);
} 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 (t <= (-2.6d+129)) then
tmp = y
else if (t <= 0.00022d0) then
tmp = x + ((y * z) / a)
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 (t <= -2.6e+129) {
tmp = y;
} else if (t <= 0.00022) {
tmp = x + ((y * z) / a);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.6e+129: tmp = y elif t <= 0.00022: tmp = x + ((y * z) / a) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.6e+129) tmp = y; elseif (t <= 0.00022) tmp = Float64(x + Float64(Float64(y * z) / a)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.6e+129) tmp = y; elseif (t <= 0.00022) tmp = x + ((y * z) / a); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.6e+129], y, If[LessEqual[t, 0.00022], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{+129}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 0.00022:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -2.60000000000000012e129Initial program 24.0%
Taylor expanded in t around inf
Simplified56.6%
if -2.60000000000000012e129 < t < 2.20000000000000008e-4Initial program 90.7%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6466.7
Simplified66.7%
Taylor expanded in y around inf
Simplified57.5%
if 2.20000000000000008e-4 < t Initial program 50.4%
Taylor expanded in t around inf
--lowering--.f6438.2
Simplified38.2%
Taylor expanded in y around inf
Simplified47.6%
Final simplification54.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (- y x) (/ z a)))) (if (<= z -5e+50) t_1 (if (<= z 2.1e+79) (+ x y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - x) * (z / a);
double tmp;
if (z <= -5e+50) {
tmp = t_1;
} else if (z <= 2.1e+79) {
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 - x) * (z / a)
if (z <= (-5d+50)) then
tmp = t_1
else if (z <= 2.1d+79) 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 - x) * (z / a);
double tmp;
if (z <= -5e+50) {
tmp = t_1;
} else if (z <= 2.1e+79) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y - x) * (z / a) tmp = 0 if z <= -5e+50: tmp = t_1 elif z <= 2.1e+79: tmp = x + y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y - x) * Float64(z / a)) tmp = 0.0 if (z <= -5e+50) tmp = t_1; elseif (z <= 2.1e+79) tmp = Float64(x + y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y - x) * (z / a); tmp = 0.0; if (z <= -5e+50) tmp = t_1; elseif (z <= 2.1e+79) 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 - x), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e+50], t$95$1, If[LessEqual[z, 2.1e+79], N[(x + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - x\right) \cdot \frac{z}{a}\\
\mathbf{if}\;z \leq -5 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+79}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5e50 or 2.10000000000000008e79 < z Initial program 73.3%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6451.5
Simplified51.5%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6445.7
Simplified45.7%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6453.1
Applied egg-rr53.1%
if -5e50 < z < 2.10000000000000008e79Initial program 71.2%
Taylor expanded in t around inf
--lowering--.f6427.5
Simplified27.5%
Taylor expanded in y around inf
Simplified49.4%
Final simplification50.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* z (/ y (- a t))))) (if (<= z -1.2e+42) t_1 (if (<= z 2.05e+57) (+ 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+42) {
tmp = t_1;
} else if (z <= 2.05e+57) {
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+42)) then
tmp = t_1
else if (z <= 2.05d+57) 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+42) {
tmp = t_1;
} else if (z <= 2.05e+57) {
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+42: tmp = t_1 elif z <= 2.05e+57: 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+42) tmp = t_1; elseif (z <= 2.05e+57) 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+42) tmp = t_1; elseif (z <= 2.05e+57) 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+42], t$95$1, If[LessEqual[z, 2.05e+57], 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^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{+57}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1999999999999999e42 or 2.05e57 < z Initial program 72.1%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6444.5
Simplified44.5%
Taylor expanded in z around inf
*-commutativeN/A
associate-*r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6444.7
Simplified44.7%
if -1.1999999999999999e42 < z < 2.05e57Initial program 71.9%
Taylor expanded in t around inf
--lowering--.f6429.1
Simplified29.1%
Taylor expanded in y around inf
Simplified51.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.4e+135) (- (* x (/ z a))) (if (<= z 2.7e+57) (+ x y) (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.4e+135) {
tmp = -(x * (z / a));
} else if (z <= 2.7e+57) {
tmp = x + y;
} else {
tmp = z * (y / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-7.4d+135)) then
tmp = -(x * (z / a))
else if (z <= 2.7d+57) then
tmp = x + y
else
tmp = z * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.4e+135) {
tmp = -(x * (z / a));
} else if (z <= 2.7e+57) {
tmp = x + y;
} else {
tmp = z * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.4e+135: tmp = -(x * (z / a)) elif z <= 2.7e+57: tmp = x + y else: tmp = z * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.4e+135) tmp = Float64(-Float64(x * Float64(z / a))); elseif (z <= 2.7e+57) tmp = Float64(x + y); else tmp = Float64(z * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7.4e+135) tmp = -(x * (z / a)); elseif (z <= 2.7e+57) tmp = x + y; else tmp = z * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.4e+135], (-N[(x * N[(z / a), $MachinePrecision]), $MachinePrecision]), If[LessEqual[z, 2.7e+57], N[(x + y), $MachinePrecision], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.4 \cdot 10^{+135}:\\
\;\;\;\;-x \cdot \frac{z}{a}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+57}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -7.39999999999999994e135Initial program 69.2%
Taylor expanded in t around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6442.8
Simplified42.8%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6440.2
Simplified40.2%
Taylor expanded in y around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-lowering-neg.f6441.6
Simplified41.6%
if -7.39999999999999994e135 < z < 2.6999999999999998e57Initial program 71.6%
Taylor expanded in t around inf
--lowering--.f6427.0
Simplified27.0%
Taylor expanded in y around inf
Simplified48.4%
if 2.6999999999999998e57 < z Initial program 75.0%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6447.4
Simplified47.4%
Taylor expanded in a around inf
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f6437.9
Simplified37.9%
Taylor expanded in z around inf
Simplified36.3%
Final simplification44.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* z (/ y a)))) (if (<= z -1.5e+52) t_1 (if (<= z 2e+57) (+ x y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / a);
double tmp;
if (z <= -1.5e+52) {
tmp = t_1;
} else if (z <= 2e+57) {
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)
if (z <= (-1.5d+52)) then
tmp = t_1
else if (z <= 2d+57) 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);
double tmp;
if (z <= -1.5e+52) {
tmp = t_1;
} else if (z <= 2e+57) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / a) tmp = 0 if z <= -1.5e+52: tmp = t_1 elif z <= 2e+57: tmp = x + y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / a)) tmp = 0.0 if (z <= -1.5e+52) tmp = t_1; elseif (z <= 2e+57) 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); tmp = 0.0; if (z <= -1.5e+52) tmp = t_1; elseif (z <= 2e+57) 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 / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5e+52], t$95$1, If[LessEqual[z, 2e+57], N[(x + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+57}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.5e52 or 2.0000000000000001e57 < z Initial program 71.4%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6443.8
Simplified43.8%
Taylor expanded in a around inf
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f6432.9
Simplified32.9%
Taylor expanded in z around inf
Simplified32.2%
if -1.5e52 < z < 2.0000000000000001e57Initial program 72.4%
Taylor expanded in t around inf
--lowering--.f6428.7
Simplified28.7%
Taylor expanded in y around inf
Simplified50.3%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.6e+129) y (if (<= t 1.4e-72) x (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.6e+129) {
tmp = y;
} else if (t <= 1.4e-72) {
tmp = x;
} 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 (t <= (-2.6d+129)) then
tmp = y
else if (t <= 1.4d-72) then
tmp = x
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 (t <= -2.6e+129) {
tmp = y;
} else if (t <= 1.4e-72) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.6e+129: tmp = y elif t <= 1.4e-72: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.6e+129) tmp = y; elseif (t <= 1.4e-72) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.6e+129) tmp = y; elseif (t <= 1.4e-72) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.6e+129], y, If[LessEqual[t, 1.4e-72], x, N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{+129}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-72}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -2.60000000000000012e129Initial program 24.0%
Taylor expanded in t around inf
Simplified56.6%
if -2.60000000000000012e129 < t < 1.3999999999999999e-72Initial program 89.7%
Taylor expanded in a around inf
Simplified32.8%
if 1.3999999999999999e-72 < t Initial program 59.7%
Taylor expanded in t around inf
--lowering--.f6433.4
Simplified33.4%
Taylor expanded in y around inf
Simplified44.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.9e+129) y (if (<= t 5.8e+20) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.9e+129) {
tmp = y;
} else if (t <= 5.8e+20) {
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 <= (-4.9d+129)) then
tmp = y
else if (t <= 5.8d+20) 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 <= -4.9e+129) {
tmp = y;
} else if (t <= 5.8e+20) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.9e+129: tmp = y elif t <= 5.8e+20: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.9e+129) tmp = y; elseif (t <= 5.8e+20) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.9e+129) tmp = y; elseif (t <= 5.8e+20) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.9e+129], y, If[LessEqual[t, 5.8e+20], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.9 \cdot 10^{+129}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+20}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -4.9e129 or 5.8e20 < t Initial program 40.9%
Taylor expanded in t around inf
Simplified49.3%
if -4.9e129 < t < 5.8e20Initial program 90.6%
Taylor expanded in a around inf
Simplified31.6%
(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 72.0%
Taylor expanded in a around inf
Simplified25.2%
(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 2024199
(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))))