
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (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) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (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) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.25e-219)
(- (+ x y) (* y (* (- z t) (/ -1.0 (- t a)))))
(if (<= a 2.6e-18)
(- x (/ (* y (- a z)) t))
(fma (- z t) (/ y (- t a)) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.25e-219) {
tmp = (x + y) - (y * ((z - t) * (-1.0 / (t - a))));
} else if (a <= 2.6e-18) {
tmp = x - ((y * (a - z)) / t);
} else {
tmp = fma((z - t), (y / (t - a)), (x + y));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.25e-219) tmp = Float64(Float64(x + y) - Float64(y * Float64(Float64(z - t) * Float64(-1.0 / Float64(t - a))))); elseif (a <= 2.6e-18) tmp = Float64(x - Float64(Float64(y * Float64(a - z)) / t)); else tmp = fma(Float64(z - t), Float64(y / Float64(t - a)), Float64(x + y)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.25e-219], N[(N[(x + y), $MachinePrecision] - N[(y * N[(N[(z - t), $MachinePrecision] * N[(-1.0 / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.6e-18], N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.25 \cdot 10^{-219}:\\
\;\;\;\;\left(x + y\right) - y \cdot \left(\left(z - t\right) \cdot \frac{-1}{t - a}\right)\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{-18}:\\
\;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)\\
\end{array}
\end{array}
if a < -2.25000000000000007e-219Initial program 82.8%
div-inv82.8%
*-commutative82.8%
associate-*l*93.2%
Applied egg-rr93.2%
if -2.25000000000000007e-219 < a < 2.6e-18Initial program 56.8%
Taylor expanded in t around inf 88.9%
associate--l+88.9%
distribute-lft-out--88.9%
div-sub88.9%
mul-1-neg88.9%
unsub-neg88.9%
*-commutative88.9%
distribute-lft-out--88.9%
Simplified88.9%
if 2.6e-18 < a Initial program 80.8%
sub-neg80.8%
+-commutative80.8%
distribute-frac-neg80.8%
distribute-rgt-neg-out80.8%
associate-/l*93.8%
fma-define94.0%
distribute-frac-neg94.0%
distribute-neg-frac294.0%
sub-neg94.0%
distribute-neg-in94.0%
remove-double-neg94.0%
+-commutative94.0%
sub-neg94.0%
Simplified94.0%
Final simplification92.2%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.15e-192)
(+ x y)
(if (<= a 1e-279)
(* y (/ z (- t a)))
(if (<= a 1.5e-79) x (if (<= a 4.4e-58) (* y (/ (- z a) t)) (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.15e-192) {
tmp = x + y;
} else if (a <= 1e-279) {
tmp = y * (z / (t - a));
} else if (a <= 1.5e-79) {
tmp = x;
} else if (a <= 4.4e-58) {
tmp = y * ((z - a) / t);
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.15d-192)) then
tmp = x + y
else if (a <= 1d-279) then
tmp = y * (z / (t - a))
else if (a <= 1.5d-79) then
tmp = x
else if (a <= 4.4d-58) then
tmp = y * ((z - a) / t)
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.15e-192) {
tmp = x + y;
} else if (a <= 1e-279) {
tmp = y * (z / (t - a));
} else if (a <= 1.5e-79) {
tmp = x;
} else if (a <= 4.4e-58) {
tmp = y * ((z - a) / t);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.15e-192: tmp = x + y elif a <= 1e-279: tmp = y * (z / (t - a)) elif a <= 1.5e-79: tmp = x elif a <= 4.4e-58: tmp = y * ((z - a) / t) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.15e-192) tmp = Float64(x + y); elseif (a <= 1e-279) tmp = Float64(y * Float64(z / Float64(t - a))); elseif (a <= 1.5e-79) tmp = x; elseif (a <= 4.4e-58) tmp = Float64(y * Float64(Float64(z - a) / t)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.15e-192) tmp = x + y; elseif (a <= 1e-279) tmp = y * (z / (t - a)); elseif (a <= 1.5e-79) tmp = x; elseif (a <= 4.4e-58) tmp = y * ((z - a) / t); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.15e-192], N[(x + y), $MachinePrecision], If[LessEqual[a, 1e-279], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.5e-79], x, If[LessEqual[a, 4.4e-58], N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.15 \cdot 10^{-192}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 10^{-279}:\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-79}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 4.4 \cdot 10^{-58}:\\
\;\;\;\;y \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.15000000000000009e-192 or 4.40000000000000011e-58 < a Initial program 79.7%
Taylor expanded in a around inf 74.6%
+-commutative74.6%
Simplified74.6%
if -1.15000000000000009e-192 < a < 1.00000000000000006e-279Initial program 69.8%
sub-neg69.8%
+-commutative69.8%
distribute-frac-neg69.8%
distribute-rgt-neg-out69.8%
associate-/l*73.3%
fma-define73.3%
distribute-frac-neg73.3%
distribute-neg-frac273.3%
sub-neg73.3%
distribute-neg-in73.3%
remove-double-neg73.3%
+-commutative73.3%
sub-neg73.3%
Simplified73.3%
Taylor expanded in z around inf 64.7%
associate-/l*61.4%
Simplified61.4%
if 1.00000000000000006e-279 < a < 1.5e-79Initial program 59.6%
Taylor expanded in x around inf 53.9%
if 1.5e-79 < a < 4.40000000000000011e-58Initial program 48.7%
Taylor expanded in t around inf 77.2%
associate--l+77.2%
distribute-lft-out--77.2%
div-sub77.2%
mul-1-neg77.2%
unsub-neg77.2%
*-commutative77.2%
distribute-lft-out--77.2%
Simplified77.2%
Taylor expanded in x around 0 77.2%
neg-mul-177.2%
distribute-neg-frac277.2%
distribute-rgt-out--77.2%
div-sub77.2%
distribute-frac-neg277.2%
distribute-frac-neg277.2%
*-commutative77.2%
mul-1-neg77.2%
associate-*r/77.5%
cancel-sign-sub-inv77.5%
metadata-eval77.5%
*-lft-identity77.5%
+-commutative77.5%
associate-*r/77.2%
sub-neg77.2%
div-sub77.2%
Simplified77.5%
Final simplification70.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.2e+138) (not (<= t 1.38e+125))) (+ (- x (* a (/ y t))) (* y (/ z t))) (+ (+ x y) (* (- z t) (/ y (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.2e+138) || !(t <= 1.38e+125)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = (x + y) + ((z - t) * (y / (t - 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 ((t <= (-1.2d+138)) .or. (.not. (t <= 1.38d+125))) then
tmp = (x - (a * (y / t))) + (y * (z / t))
else
tmp = (x + y) + ((z - t) * (y / (t - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.2e+138) || !(t <= 1.38e+125)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = (x + y) + ((z - t) * (y / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.2e+138) or not (t <= 1.38e+125): tmp = (x - (a * (y / t))) + (y * (z / t)) else: tmp = (x + y) + ((z - t) * (y / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.2e+138) || !(t <= 1.38e+125)) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); else tmp = Float64(Float64(x + y) + Float64(Float64(z - t) * Float64(y / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.2e+138) || ~((t <= 1.38e+125))) tmp = (x - (a * (y / t))) + (y * (z / t)); else tmp = (x + y) + ((z - t) * (y / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.2e+138], N[Not[LessEqual[t, 1.38e+125]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+138} \lor \neg \left(t \leq 1.38 \cdot 10^{+125}\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\
\end{array}
\end{array}
if t < -1.2e138 or 1.38e125 < t Initial program 45.2%
div-inv45.0%
*-commutative45.0%
associate-*l*65.9%
Applied egg-rr65.9%
Taylor expanded in t around inf 78.8%
sub-neg78.8%
mul-1-neg78.8%
unsub-neg78.8%
associate-/l*84.4%
mul-1-neg84.4%
remove-double-neg84.4%
associate-/l*88.6%
Simplified88.6%
if -1.2e138 < t < 1.38e125Initial program 86.5%
Taylor expanded in y around 0 86.5%
associate-*l/93.1%
Simplified93.1%
Final simplification91.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.5e-222)
(- (+ x y) (* y (* (- z t) (/ -1.0 (- t a)))))
(if (<= a 8.5e-14)
(- x (/ (* y (- a z)) t))
(+ (+ x y) (* (- z t) (/ y (- t a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.5e-222) {
tmp = (x + y) - (y * ((z - t) * (-1.0 / (t - a))));
} else if (a <= 8.5e-14) {
tmp = x - ((y * (a - z)) / t);
} else {
tmp = (x + y) + ((z - t) * (y / (t - 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 (a <= (-4.5d-222)) then
tmp = (x + y) - (y * ((z - t) * ((-1.0d0) / (t - a))))
else if (a <= 8.5d-14) then
tmp = x - ((y * (a - z)) / t)
else
tmp = (x + y) + ((z - t) * (y / (t - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.5e-222) {
tmp = (x + y) - (y * ((z - t) * (-1.0 / (t - a))));
} else if (a <= 8.5e-14) {
tmp = x - ((y * (a - z)) / t);
} else {
tmp = (x + y) + ((z - t) * (y / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.5e-222: tmp = (x + y) - (y * ((z - t) * (-1.0 / (t - a)))) elif a <= 8.5e-14: tmp = x - ((y * (a - z)) / t) else: tmp = (x + y) + ((z - t) * (y / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.5e-222) tmp = Float64(Float64(x + y) - Float64(y * Float64(Float64(z - t) * Float64(-1.0 / Float64(t - a))))); elseif (a <= 8.5e-14) tmp = Float64(x - Float64(Float64(y * Float64(a - z)) / t)); else tmp = Float64(Float64(x + y) + Float64(Float64(z - t) * Float64(y / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.5e-222) tmp = (x + y) - (y * ((z - t) * (-1.0 / (t - a)))); elseif (a <= 8.5e-14) tmp = x - ((y * (a - z)) / t); else tmp = (x + y) + ((z - t) * (y / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.5e-222], N[(N[(x + y), $MachinePrecision] - N[(y * N[(N[(z - t), $MachinePrecision] * N[(-1.0 / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.5e-14], N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{-222}:\\
\;\;\;\;\left(x + y\right) - y \cdot \left(\left(z - t\right) \cdot \frac{-1}{t - a}\right)\\
\mathbf{elif}\;a \leq 8.5 \cdot 10^{-14}:\\
\;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\
\end{array}
\end{array}
if a < -4.50000000000000014e-222Initial program 82.8%
div-inv82.8%
*-commutative82.8%
associate-*l*93.2%
Applied egg-rr93.2%
if -4.50000000000000014e-222 < a < 8.50000000000000038e-14Initial program 56.8%
Taylor expanded in t around inf 88.9%
associate--l+88.9%
distribute-lft-out--88.9%
div-sub88.9%
mul-1-neg88.9%
unsub-neg88.9%
*-commutative88.9%
distribute-lft-out--88.9%
Simplified88.9%
if 8.50000000000000038e-14 < a Initial program 80.8%
Taylor expanded in y around 0 80.8%
associate-*l/93.8%
Simplified93.8%
Final simplification92.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.15e-54) (not (<= a 13.5))) (- (+ x y) (* y (/ z a))) (- x (/ (* y (- a z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.15e-54) || !(a <= 13.5)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x - ((y * (a - z)) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.15d-54)) .or. (.not. (a <= 13.5d0))) then
tmp = (x + y) - (y * (z / a))
else
tmp = x - ((y * (a - z)) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.15e-54) || !(a <= 13.5)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x - ((y * (a - z)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.15e-54) or not (a <= 13.5): tmp = (x + y) - (y * (z / a)) else: tmp = x - ((y * (a - z)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.15e-54) || !(a <= 13.5)) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = Float64(x - Float64(Float64(y * Float64(a - z)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.15e-54) || ~((a <= 13.5))) tmp = (x + y) - (y * (z / a)); else tmp = x - ((y * (a - z)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.15e-54], N[Not[LessEqual[a, 13.5]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.15 \cdot 10^{-54} \lor \neg \left(a \leq 13.5\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\
\end{array}
\end{array}
if a < -1.1499999999999999e-54 or 13.5 < a Initial program 81.7%
Taylor expanded in t around 0 84.1%
+-commutative84.1%
associate-/l*92.0%
Simplified92.0%
if -1.1499999999999999e-54 < a < 13.5Initial program 65.7%
Taylor expanded in t around inf 84.6%
associate--l+84.6%
distribute-lft-out--84.6%
div-sub84.6%
mul-1-neg84.6%
unsub-neg84.6%
*-commutative84.6%
distribute-lft-out--84.6%
Simplified84.6%
Final simplification89.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.55e-52) (not (<= a 0.88))) (+ x y) (- x (/ (* y (- a z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.55e-52) || !(a <= 0.88)) {
tmp = x + y;
} else {
tmp = x - ((y * (a - z)) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.55d-52)) .or. (.not. (a <= 0.88d0))) then
tmp = x + y
else
tmp = x - ((y * (a - z)) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.55e-52) || !(a <= 0.88)) {
tmp = x + y;
} else {
tmp = x - ((y * (a - z)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.55e-52) or not (a <= 0.88): tmp = x + y else: tmp = x - ((y * (a - z)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.55e-52) || !(a <= 0.88)) tmp = Float64(x + y); else tmp = Float64(x - Float64(Float64(y * Float64(a - z)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.55e-52) || ~((a <= 0.88))) tmp = x + y; else tmp = x - ((y * (a - z)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.55e-52], N[Not[LessEqual[a, 0.88]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.55 \cdot 10^{-52} \lor \neg \left(a \leq 0.88\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\
\end{array}
\end{array}
if a < -2.54999999999999995e-52 or 0.880000000000000004 < a Initial program 81.8%
Taylor expanded in a around inf 80.9%
+-commutative80.9%
Simplified80.9%
if -2.54999999999999995e-52 < a < 0.880000000000000004Initial program 65.4%
Taylor expanded in t around inf 84.5%
associate--l+84.5%
distribute-lft-out--84.5%
div-sub84.5%
mul-1-neg84.5%
unsub-neg84.5%
*-commutative84.5%
distribute-lft-out--84.5%
Simplified84.5%
Final simplification82.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.2e-51) (not (<= a 0.0038))) (+ x y) (- x (* y (/ (- a z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.2e-51) || !(a <= 0.0038)) {
tmp = x + y;
} else {
tmp = x - (y * ((a - z) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.2d-51)) .or. (.not. (a <= 0.0038d0))) then
tmp = x + y
else
tmp = x - (y * ((a - z) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.2e-51) || !(a <= 0.0038)) {
tmp = x + y;
} else {
tmp = x - (y * ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.2e-51) or not (a <= 0.0038): tmp = x + y else: tmp = x - (y * ((a - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.2e-51) || !(a <= 0.0038)) tmp = Float64(x + y); else tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.2e-51) || ~((a <= 0.0038))) tmp = x + y; else tmp = x - (y * ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.2e-51], N[Not[LessEqual[a, 0.0038]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.2 \cdot 10^{-51} \lor \neg \left(a \leq 0.0038\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\end{array}
\end{array}
if a < -1.2e-51 or 0.00379999999999999999 < a Initial program 81.8%
Taylor expanded in a around inf 80.9%
+-commutative80.9%
Simplified80.9%
if -1.2e-51 < a < 0.00379999999999999999Initial program 65.4%
sub-neg65.4%
+-commutative65.4%
distribute-frac-neg65.4%
distribute-rgt-neg-out65.4%
associate-/l*71.1%
fma-define71.0%
distribute-frac-neg71.0%
distribute-neg-frac271.0%
sub-neg71.0%
distribute-neg-in71.0%
remove-double-neg71.0%
+-commutative71.0%
sub-neg71.0%
Simplified71.0%
Taylor expanded in t around -inf 63.4%
associate-+r+79.7%
mul-1-neg79.7%
unsub-neg79.7%
distribute-rgt1-in79.7%
metadata-eval79.7%
mul0-lft79.7%
neg-sub079.7%
distribute-neg-frac279.7%
Simplified77.8%
Taylor expanded in t around inf 84.5%
associate-*r/84.4%
Simplified84.4%
Final simplification82.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.8e-52) (+ (+ x y) (* y (* z (/ -1.0 a)))) (if (<= a 6.4) (- x (/ (* y (- a z)) t)) (- (+ x y) (* y (/ z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.8e-52) {
tmp = (x + y) + (y * (z * (-1.0 / a)));
} else if (a <= 6.4) {
tmp = x - ((y * (a - z)) / t);
} else {
tmp = (x + y) - (y * (z / 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 (a <= (-3.8d-52)) then
tmp = (x + y) + (y * (z * ((-1.0d0) / a)))
else if (a <= 6.4d0) then
tmp = x - ((y * (a - z)) / t)
else
tmp = (x + y) - (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.8e-52) {
tmp = (x + y) + (y * (z * (-1.0 / a)));
} else if (a <= 6.4) {
tmp = x - ((y * (a - z)) / t);
} else {
tmp = (x + y) - (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.8e-52: tmp = (x + y) + (y * (z * (-1.0 / a))) elif a <= 6.4: tmp = x - ((y * (a - z)) / t) else: tmp = (x + y) - (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.8e-52) tmp = Float64(Float64(x + y) + Float64(y * Float64(z * Float64(-1.0 / a)))); elseif (a <= 6.4) tmp = Float64(x - Float64(Float64(y * Float64(a - z)) / t)); else tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.8e-52) tmp = (x + y) + (y * (z * (-1.0 / a))); elseif (a <= 6.4) tmp = x - ((y * (a - z)) / t); else tmp = (x + y) - (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.8e-52], N[(N[(x + y), $MachinePrecision] + N[(y * N[(z * N[(-1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.4], N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{-52}:\\
\;\;\;\;\left(x + y\right) + y \cdot \left(z \cdot \frac{-1}{a}\right)\\
\mathbf{elif}\;a \leq 6.4:\\
\;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if a < -3.8000000000000003e-52Initial program 82.6%
Taylor expanded in t around 0 83.8%
+-commutative83.8%
associate-/l*92.1%
Simplified92.1%
associate-*r/83.8%
clear-num83.7%
Applied egg-rr83.7%
associate-/r/83.7%
*-commutative83.7%
associate-*r*92.1%
Simplified92.1%
if -3.8000000000000003e-52 < a < 6.4000000000000004Initial program 65.7%
Taylor expanded in t around inf 84.6%
associate--l+84.6%
distribute-lft-out--84.6%
div-sub84.6%
mul-1-neg84.6%
unsub-neg84.6%
*-commutative84.6%
distribute-lft-out--84.6%
Simplified84.6%
if 6.4000000000000004 < a Initial program 80.5%
Taylor expanded in t around 0 84.6%
+-commutative84.6%
associate-/l*91.9%
Simplified91.9%
Final simplification89.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.5e-46) (not (<= a 1.6e-16))) (+ x y) (+ x (/ (* y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.5e-46) || !(a <= 1.6e-16)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-3.5d-46)) .or. (.not. (a <= 1.6d-16))) then
tmp = x + y
else
tmp = x + ((y * z) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.5e-46) || !(a <= 1.6e-16)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.5e-46) or not (a <= 1.6e-16): tmp = x + y else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.5e-46) || !(a <= 1.6e-16)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(y * z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.5e-46) || ~((a <= 1.6e-16))) tmp = x + y; else tmp = x + ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.5e-46], N[Not[LessEqual[a, 1.6e-16]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{-46} \lor \neg \left(a \leq 1.6 \cdot 10^{-16}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -3.5000000000000002e-46 or 1.60000000000000011e-16 < a Initial program 81.4%
Taylor expanded in a around inf 80.5%
+-commutative80.5%
Simplified80.5%
if -3.5000000000000002e-46 < a < 1.60000000000000011e-16Initial program 66.4%
div-inv66.3%
*-commutative66.3%
associate-*l*71.0%
Applied egg-rr71.0%
Taylor expanded in t around inf 83.2%
sub-neg83.2%
mul-1-neg83.2%
unsub-neg83.2%
associate-/l*81.3%
mul-1-neg81.3%
remove-double-neg81.3%
associate-/l*82.2%
Simplified82.2%
Taylor expanded in a around 0 80.2%
Final simplification80.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.55e-190) (not (<= a 8.4e-164))) (+ x y) (* y (/ z (- t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.55e-190) || !(a <= 8.4e-164)) {
tmp = x + y;
} else {
tmp = y * (z / (t - 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 ((a <= (-1.55d-190)) .or. (.not. (a <= 8.4d-164))) then
tmp = x + y
else
tmp = y * (z / (t - a))
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.55e-190) || !(a <= 8.4e-164)) {
tmp = x + y;
} else {
tmp = y * (z / (t - a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.55e-190) or not (a <= 8.4e-164): tmp = x + y else: tmp = y * (z / (t - a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.55e-190) || !(a <= 8.4e-164)) tmp = Float64(x + y); else tmp = Float64(y * Float64(z / Float64(t - a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.55e-190) || ~((a <= 8.4e-164))) tmp = x + y; else tmp = y * (z / (t - a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.55e-190], N[Not[LessEqual[a, 8.4e-164]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.55 \cdot 10^{-190} \lor \neg \left(a \leq 8.4 \cdot 10^{-164}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\end{array}
\end{array}
if a < -1.54999999999999997e-190 or 8.3999999999999996e-164 < a Initial program 79.0%
Taylor expanded in a around inf 72.1%
+-commutative72.1%
Simplified72.1%
if -1.54999999999999997e-190 < a < 8.3999999999999996e-164Initial program 60.0%
sub-neg60.0%
+-commutative60.0%
distribute-frac-neg60.0%
distribute-rgt-neg-out60.0%
associate-/l*68.1%
fma-define68.0%
distribute-frac-neg68.0%
distribute-neg-frac268.0%
sub-neg68.0%
distribute-neg-in68.0%
remove-double-neg68.0%
+-commutative68.0%
sub-neg68.0%
Simplified68.0%
Taylor expanded in z around inf 59.0%
associate-/l*55.2%
Simplified55.2%
Final simplification68.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.4e-227) (not (<= a 7e-233))) (+ x y) (/ (* y z) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.4e-227) || !(a <= 7e-233)) {
tmp = x + y;
} else {
tmp = (y * z) / t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-3.4d-227)) .or. (.not. (a <= 7d-233))) then
tmp = x + y
else
tmp = (y * z) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.4e-227) || !(a <= 7e-233)) {
tmp = x + y;
} else {
tmp = (y * z) / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.4e-227) or not (a <= 7e-233): tmp = x + y else: tmp = (y * z) / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.4e-227) || !(a <= 7e-233)) tmp = Float64(x + y); else tmp = Float64(Float64(y * z) / t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.4e-227) || ~((a <= 7e-233))) tmp = x + y; else tmp = (y * z) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.4e-227], N[Not[LessEqual[a, 7e-233]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{-227} \lor \neg \left(a \leq 7 \cdot 10^{-233}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -3.39999999999999979e-227 or 6.99999999999999982e-233 < a Initial program 79.0%
Taylor expanded in a around inf 69.8%
+-commutative69.8%
Simplified69.8%
if -3.39999999999999979e-227 < a < 6.99999999999999982e-233Initial program 52.8%
sub-neg52.8%
+-commutative52.8%
distribute-frac-neg52.8%
distribute-rgt-neg-out52.8%
associate-/l*63.6%
fma-define63.5%
distribute-frac-neg63.5%
distribute-neg-frac263.5%
sub-neg63.5%
distribute-neg-in63.5%
remove-double-neg63.5%
+-commutative63.5%
sub-neg63.5%
Simplified63.5%
Taylor expanded in z around inf 59.4%
Taylor expanded in t around inf 59.3%
Final simplification68.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6.5e-225) (not (<= a 1.4e-233))) (+ x y) (* z (/ y t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6.5e-225) || !(a <= 1.4e-233)) {
tmp = x + y;
} else {
tmp = z * (y / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-6.5d-225)) .or. (.not. (a <= 1.4d-233))) then
tmp = x + y
else
tmp = z * (y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6.5e-225) || !(a <= 1.4e-233)) {
tmp = x + y;
} else {
tmp = z * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -6.5e-225) or not (a <= 1.4e-233): tmp = x + y else: tmp = z * (y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -6.5e-225) || !(a <= 1.4e-233)) tmp = Float64(x + y); else tmp = Float64(z * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -6.5e-225) || ~((a <= 1.4e-233))) tmp = x + y; else tmp = z * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -6.5e-225], N[Not[LessEqual[a, 1.4e-233]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{-225} \lor \neg \left(a \leq 1.4 \cdot 10^{-233}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\end{array}
\end{array}
if a < -6.5000000000000005e-225 or 1.4000000000000001e-233 < a Initial program 79.0%
Taylor expanded in a around inf 69.8%
+-commutative69.8%
Simplified69.8%
if -6.5000000000000005e-225 < a < 1.4000000000000001e-233Initial program 52.8%
Taylor expanded in t around inf 97.2%
associate--l+97.2%
distribute-lft-out--97.2%
div-sub97.2%
mul-1-neg97.2%
unsub-neg97.2%
*-commutative97.2%
distribute-lft-out--97.2%
Simplified97.2%
Taylor expanded in z around inf 59.3%
*-commutative59.3%
associate-/l*54.2%
Simplified54.2%
Final simplification67.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.5e-223) (not (<= a 5.8e-233))) (+ x y) (* y (/ z t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.5e-223) || !(a <= 5.8e-233)) {
tmp = x + y;
} else {
tmp = y * (z / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.5d-223)) .or. (.not. (a <= 5.8d-233))) then
tmp = x + y
else
tmp = y * (z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.5e-223) || !(a <= 5.8e-233)) {
tmp = x + y;
} else {
tmp = y * (z / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.5e-223) or not (a <= 5.8e-233): tmp = x + y else: tmp = y * (z / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.5e-223) || !(a <= 5.8e-233)) tmp = Float64(x + y); else tmp = Float64(y * Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.5e-223) || ~((a <= 5.8e-233))) tmp = x + y; else tmp = y * (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.5e-223], N[Not[LessEqual[a, 5.8e-233]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{-223} \lor \neg \left(a \leq 5.8 \cdot 10^{-233}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -2.50000000000000012e-223 or 5.79999999999999964e-233 < a Initial program 79.0%
Taylor expanded in a around inf 69.8%
+-commutative69.8%
Simplified69.8%
if -2.50000000000000012e-223 < a < 5.79999999999999964e-233Initial program 52.8%
sub-neg52.8%
+-commutative52.8%
distribute-frac-neg52.8%
distribute-rgt-neg-out52.8%
associate-/l*63.6%
fma-define63.5%
distribute-frac-neg63.5%
distribute-neg-frac263.5%
sub-neg63.5%
distribute-neg-in63.5%
remove-double-neg63.5%
+-commutative63.5%
sub-neg63.5%
Simplified63.5%
Taylor expanded in z around inf 59.4%
Taylor expanded in t around inf 59.3%
associate-/l*54.1%
Simplified54.1%
Final simplification67.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.6e-79) (not (<= a 3e-18))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.6e-79) || !(a <= 3e-18)) {
tmp = x + 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 <= (-3.6d-79)) .or. (.not. (a <= 3d-18))) then
tmp = x + 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 <= -3.6e-79) || !(a <= 3e-18)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.6e-79) or not (a <= 3e-18): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.6e-79) || !(a <= 3e-18)) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.6e-79) || ~((a <= 3e-18))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.6e-79], N[Not[LessEqual[a, 3e-18]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.6 \cdot 10^{-79} \lor \neg \left(a \leq 3 \cdot 10^{-18}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.6000000000000002e-79 or 2.99999999999999983e-18 < a Initial program 81.4%
Taylor expanded in a around inf 78.0%
+-commutative78.0%
Simplified78.0%
if -3.6000000000000002e-79 < a < 2.99999999999999983e-18Initial program 64.3%
Taylor expanded in x around inf 48.3%
Final simplification67.2%
(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 75.2%
Taylor expanded in x around inf 48.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (< t_2 -1.3664970889390727e-7)
t_1
(if (< t_2 1.4754293444577233e-239)
(/ (- (* y (- a z)) (* x t)) (- a t))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y + x) - (((z - t) * (1.0d0 / (a - t))) * y)
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 < (-1.3664970889390727d-7)) then
tmp = t_1
else if (t_2 < 1.4754293444577233d-239) then
tmp = ((y * (a - z)) - (x * t)) / (a - t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y) t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 < -1.3664970889390727e-7: tmp = t_1 elif t_2 < 1.4754293444577233e-239: tmp = ((y * (a - z)) - (x * t)) / (a - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y + x) - Float64(Float64(Float64(z - t) * Float64(1.0 / Float64(a - t))) * y)) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = Float64(Float64(Float64(y * Float64(a - z)) - Float64(x * t)) / Float64(a - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y); t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = ((y * (a - z)) - (x * t)) / (a - t); 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[(N[(N[(z - t), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -1.3664970889390727e-7], t$95$1, If[Less[t$95$2, 1.4754293444577233e-239], N[(N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 < -1.3664970889390727 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 < 1.4754293444577233 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024086
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:alt
(if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-7) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))