
(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 14 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 (<= t -6e+182)
(+ x (* y (/ (- z a) t)))
(if (<= t 1.95e+136)
(fma (- z t) (/ y (- t a)) (+ x y))
(+ x (- (* y (/ z t)) (* a (/ y t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6e+182) {
tmp = x + (y * ((z - a) / t));
} else if (t <= 1.95e+136) {
tmp = fma((z - t), (y / (t - a)), (x + y));
} else {
tmp = x + ((y * (z / t)) - (a * (y / t)));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6e+182) tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); elseif (t <= 1.95e+136) tmp = fma(Float64(z - t), Float64(y / Float64(t - a)), Float64(x + y)); else tmp = Float64(x + Float64(Float64(y * Float64(z / t)) - Float64(a * Float64(y / t)))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6e+182], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e+136], N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision] - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{+182}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+136}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot \frac{z}{t} - a \cdot \frac{y}{t}\right)\\
\end{array}
\end{array}
if t < -6.0000000000000004e182Initial program 46.7%
associate-/l*61.3%
*-commutative61.3%
Applied egg-rr61.3%
Taylor expanded in t around -inf 85.7%
mul-1-neg85.7%
sub-neg85.7%
distribute-rgt-neg-out85.7%
*-commutative85.7%
distribute-lft-out85.7%
sub-neg85.7%
unsub-neg85.7%
associate-/l*93.1%
Simplified93.1%
if -6.0000000000000004e182 < t < 1.9500000000000001e136Initial program 85.2%
sub-neg85.2%
+-commutative85.2%
distribute-frac-neg85.2%
distribute-rgt-neg-out85.2%
associate-/l*91.0%
fma-define91.0%
distribute-frac-neg91.0%
distribute-neg-frac291.0%
sub-neg91.0%
distribute-neg-in91.0%
remove-double-neg91.0%
+-commutative91.0%
sub-neg91.0%
Simplified91.0%
if 1.9500000000000001e136 < t Initial program 40.9%
sub-neg40.9%
+-commutative40.9%
distribute-frac-neg40.9%
distribute-rgt-neg-out40.9%
associate-/l*49.4%
fma-define49.5%
distribute-frac-neg49.5%
distribute-neg-frac249.5%
sub-neg49.5%
distribute-neg-in49.5%
remove-double-neg49.5%
+-commutative49.5%
sub-neg49.5%
Simplified49.5%
Taylor expanded in t around inf 55.1%
associate--l+55.1%
associate-+r+72.1%
distribute-rgt1-in72.1%
metadata-eval72.1%
mul0-lft72.1%
associate-/l*81.4%
associate-/l*95.2%
Simplified95.2%
Final simplification91.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.5e+180) (not (<= t 6.8e+137))) (+ x (* y (/ (- z a) t))) (- (+ x y) (* (- z t) (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.5e+180) || !(t <= 6.8e+137)) {
tmp = x + (y * ((z - a) / t));
} else {
tmp = (x + y) - ((z - t) * (y / (a - 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 ((t <= (-1.5d+180)) .or. (.not. (t <= 6.8d+137))) then
tmp = x + (y * ((z - a) / t))
else
tmp = (x + y) - ((z - t) * (y / (a - t)))
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.5e+180) || !(t <= 6.8e+137)) {
tmp = x + (y * ((z - a) / t));
} else {
tmp = (x + y) - ((z - t) * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.5e+180) or not (t <= 6.8e+137): tmp = x + (y * ((z - a) / t)) else: tmp = (x + y) - ((z - t) * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.5e+180) || !(t <= 6.8e+137)) tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); else tmp = Float64(Float64(x + y) - Float64(Float64(z - t) * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.5e+180) || ~((t <= 6.8e+137))) tmp = x + (y * ((z - a) / t)); else tmp = (x + y) - ((z - t) * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.5e+180], N[Not[LessEqual[t, 6.8e+137]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+180} \lor \neg \left(t \leq 6.8 \cdot 10^{+137}\right):\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - \left(z - t\right) \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if t < -1.50000000000000001e180 or 6.79999999999999973e137 < t Initial program 43.2%
associate-/l*54.1%
*-commutative54.1%
Applied egg-rr54.1%
Taylor expanded in t around -inf 77.4%
mul-1-neg77.4%
sub-neg77.4%
distribute-rgt-neg-out77.4%
*-commutative77.4%
distribute-lft-out79.1%
sub-neg79.1%
unsub-neg79.1%
associate-/l*93.8%
Simplified93.8%
if -1.50000000000000001e180 < t < 6.79999999999999973e137Initial program 85.2%
associate-/l*91.0%
*-commutative91.0%
Applied egg-rr91.0%
Final simplification91.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6e+181)
(+ x (* y (/ (- z a) t)))
(if (<= t 5.5e+135)
(- (+ x y) (* (- z t) (/ y (- a t))))
(+ x (- (* y (/ z t)) (* a (/ y t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6e+181) {
tmp = x + (y * ((z - a) / t));
} else if (t <= 5.5e+135) {
tmp = (x + y) - ((z - t) * (y / (a - t)));
} else {
tmp = x + ((y * (z / t)) - (a * (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 (t <= (-6d+181)) then
tmp = x + (y * ((z - a) / t))
else if (t <= 5.5d+135) then
tmp = (x + y) - ((z - t) * (y / (a - t)))
else
tmp = x + ((y * (z / t)) - (a * (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 (t <= -6e+181) {
tmp = x + (y * ((z - a) / t));
} else if (t <= 5.5e+135) {
tmp = (x + y) - ((z - t) * (y / (a - t)));
} else {
tmp = x + ((y * (z / t)) - (a * (y / t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6e+181: tmp = x + (y * ((z - a) / t)) elif t <= 5.5e+135: tmp = (x + y) - ((z - t) * (y / (a - t))) else: tmp = x + ((y * (z / t)) - (a * (y / t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6e+181) tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); elseif (t <= 5.5e+135) tmp = Float64(Float64(x + y) - Float64(Float64(z - t) * Float64(y / Float64(a - t)))); else tmp = Float64(x + Float64(Float64(y * Float64(z / t)) - Float64(a * Float64(y / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6e+181) tmp = x + (y * ((z - a) / t)); elseif (t <= 5.5e+135) tmp = (x + y) - ((z - t) * (y / (a - t))); else tmp = x + ((y * (z / t)) - (a * (y / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6e+181], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e+135], N[(N[(x + y), $MachinePrecision] - N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision] - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{+181}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+135}:\\
\;\;\;\;\left(x + y\right) - \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot \frac{z}{t} - a \cdot \frac{y}{t}\right)\\
\end{array}
\end{array}
if t < -6.00000000000000024e181Initial program 46.7%
associate-/l*61.3%
*-commutative61.3%
Applied egg-rr61.3%
Taylor expanded in t around -inf 85.7%
mul-1-neg85.7%
sub-neg85.7%
distribute-rgt-neg-out85.7%
*-commutative85.7%
distribute-lft-out85.7%
sub-neg85.7%
unsub-neg85.7%
associate-/l*93.1%
Simplified93.1%
if -6.00000000000000024e181 < t < 5.4999999999999999e135Initial program 85.2%
associate-/l*91.0%
*-commutative91.0%
Applied egg-rr91.0%
if 5.4999999999999999e135 < t Initial program 40.9%
sub-neg40.9%
+-commutative40.9%
distribute-frac-neg40.9%
distribute-rgt-neg-out40.9%
associate-/l*49.4%
fma-define49.5%
distribute-frac-neg49.5%
distribute-neg-frac249.5%
sub-neg49.5%
distribute-neg-in49.5%
remove-double-neg49.5%
+-commutative49.5%
sub-neg49.5%
Simplified49.5%
Taylor expanded in t around inf 55.1%
associate--l+55.1%
associate-+r+72.1%
distribute-rgt1-in72.1%
metadata-eval72.1%
mul0-lft72.1%
associate-/l*81.4%
associate-/l*95.2%
Simplified95.2%
Final simplification91.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.05e+255) (and (not (<= y -5.2e+124)) (<= y 8.2e+122))) (+ x y) (* y (/ z t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.05e+255) || (!(y <= -5.2e+124) && (y <= 8.2e+122))) {
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 ((y <= (-1.05d+255)) .or. (.not. (y <= (-5.2d+124))) .and. (y <= 8.2d+122)) 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 ((y <= -1.05e+255) || (!(y <= -5.2e+124) && (y <= 8.2e+122))) {
tmp = x + y;
} else {
tmp = y * (z / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.05e+255) or (not (y <= -5.2e+124) and (y <= 8.2e+122)): tmp = x + y else: tmp = y * (z / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.05e+255) || (!(y <= -5.2e+124) && (y <= 8.2e+122))) 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 ((y <= -1.05e+255) || (~((y <= -5.2e+124)) && (y <= 8.2e+122))) tmp = x + y; else tmp = y * (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.05e+255], And[N[Not[LessEqual[y, -5.2e+124]], $MachinePrecision], LessEqual[y, 8.2e+122]]], N[(x + y), $MachinePrecision], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+255} \lor \neg \left(y \leq -5.2 \cdot 10^{+124}\right) \land y \leq 8.2 \cdot 10^{+122}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if y < -1.05e255 or -5.2000000000000001e124 < y < 8.2000000000000004e122Initial program 82.5%
Taylor expanded in a around inf 68.5%
+-commutative68.5%
Simplified68.5%
if -1.05e255 < y < -5.2000000000000001e124 or 8.2000000000000004e122 < y Initial program 44.4%
sub-neg44.4%
+-commutative44.4%
distribute-frac-neg44.4%
distribute-rgt-neg-out44.4%
associate-/l*61.3%
fma-define61.4%
distribute-frac-neg61.4%
distribute-neg-frac261.4%
sub-neg61.4%
distribute-neg-in61.4%
remove-double-neg61.4%
+-commutative61.4%
sub-neg61.4%
Simplified61.4%
Taylor expanded in z around inf 46.1%
Taylor expanded in t around inf 41.0%
associate-/l*52.2%
Simplified52.2%
Final simplification64.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7.2e+109) (not (<= a 1.9e+24))) (+ x y) (+ x (* y (/ (- z a) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.2e+109) || !(a <= 1.9e+24)) {
tmp = x + y;
} else {
tmp = x + (y * ((z - a) / 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 <= (-7.2d+109)) .or. (.not. (a <= 1.9d+24))) then
tmp = x + y
else
tmp = x + (y * ((z - a) / 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 <= -7.2e+109) || !(a <= 1.9e+24)) {
tmp = x + y;
} else {
tmp = x + (y * ((z - a) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7.2e+109) or not (a <= 1.9e+24): tmp = x + y else: tmp = x + (y * ((z - a) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7.2e+109) || !(a <= 1.9e+24)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7.2e+109) || ~((a <= 1.9e+24))) tmp = x + y; else tmp = x + (y * ((z - a) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.2e+109], N[Not[LessEqual[a, 1.9e+24]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{+109} \lor \neg \left(a \leq 1.9 \cdot 10^{+24}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\end{array}
\end{array}
if a < -7.2e109 or 1.90000000000000008e24 < a Initial program 77.9%
Taylor expanded in a around inf 79.1%
+-commutative79.1%
Simplified79.1%
if -7.2e109 < a < 1.90000000000000008e24Initial program 71.1%
associate-/l*73.7%
*-commutative73.7%
Applied egg-rr73.7%
Taylor expanded in t around -inf 78.0%
mul-1-neg78.0%
sub-neg78.0%
distribute-rgt-neg-out78.0%
*-commutative78.0%
distribute-lft-out78.7%
sub-neg78.7%
unsub-neg78.7%
associate-/l*81.5%
Simplified81.5%
Final simplification80.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.4e+70) (not (<= a 8500000.0))) (- (+ x y) (* y (/ z a))) (+ x (* y (/ (- z a) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.4e+70) || !(a <= 8500000.0)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x + (y * ((z - a) / 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.4d+70)) .or. (.not. (a <= 8500000.0d0))) then
tmp = (x + y) - (y * (z / a))
else
tmp = x + (y * ((z - a) / 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.4e+70) || !(a <= 8500000.0)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x + (y * ((z - a) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.4e+70) or not (a <= 8500000.0): tmp = (x + y) - (y * (z / a)) else: tmp = x + (y * ((z - a) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.4e+70) || !(a <= 8500000.0)) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.4e+70) || ~((a <= 8500000.0))) tmp = (x + y) - (y * (z / a)); else tmp = x + (y * ((z - a) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.4e+70], N[Not[LessEqual[a, 8500000.0]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{+70} \lor \neg \left(a \leq 8500000\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\end{array}
\end{array}
if a < -1.39999999999999995e70 or 8.5e6 < a Initial program 77.3%
Taylor expanded in t around 0 80.2%
+-commutative80.2%
associate-/l*87.6%
Simplified87.6%
if -1.39999999999999995e70 < a < 8.5e6Initial program 71.1%
associate-/l*72.5%
*-commutative72.5%
Applied egg-rr72.5%
Taylor expanded in t around -inf 82.0%
mul-1-neg82.0%
sub-neg82.0%
distribute-rgt-neg-out82.0%
*-commutative82.0%
distribute-lft-out82.0%
sub-neg82.0%
unsub-neg82.0%
associate-/l*83.7%
Simplified83.7%
Final simplification85.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.35e+77) (not (<= z 5e+212))) (* y (/ z (- t a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.35e+77) || !(z <= 5e+212)) {
tmp = y * (z / (t - 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 ((z <= (-1.35d+77)) .or. (.not. (z <= 5d+212))) then
tmp = y * (z / (t - 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 ((z <= -1.35e+77) || !(z <= 5e+212)) {
tmp = y * (z / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.35e+77) or not (z <= 5e+212): tmp = y * (z / (t - a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.35e+77) || !(z <= 5e+212)) tmp = Float64(y * Float64(z / Float64(t - a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.35e+77) || ~((z <= 5e+212))) tmp = y * (z / (t - a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.35e+77], N[Not[LessEqual[z, 5e+212]], $MachinePrecision]], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+77} \lor \neg \left(z \leq 5 \cdot 10^{+212}\right):\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.3499999999999999e77 or 4.99999999999999992e212 < z Initial program 69.6%
sub-neg69.6%
+-commutative69.6%
distribute-frac-neg69.6%
distribute-rgt-neg-out69.6%
associate-/l*86.7%
fma-define86.7%
distribute-frac-neg86.7%
distribute-neg-frac286.7%
sub-neg86.7%
distribute-neg-in86.7%
remove-double-neg86.7%
+-commutative86.7%
sub-neg86.7%
Simplified86.7%
Taylor expanded in z around inf 55.0%
associate-/l*67.3%
Simplified67.3%
if -1.3499999999999999e77 < z < 4.99999999999999992e212Initial program 75.4%
Taylor expanded in a around inf 68.9%
+-commutative68.9%
Simplified68.9%
Final simplification68.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9.5e+74) (not (<= z 3.9e+207))) (* z (/ y (- t a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.5e+74) || !(z <= 3.9e+207)) {
tmp = z * (y / (t - 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 ((z <= (-9.5d+74)) .or. (.not. (z <= 3.9d+207))) then
tmp = z * (y / (t - 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 ((z <= -9.5e+74) || !(z <= 3.9e+207)) {
tmp = z * (y / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9.5e+74) or not (z <= 3.9e+207): tmp = z * (y / (t - a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9.5e+74) || !(z <= 3.9e+207)) tmp = Float64(z * Float64(y / Float64(t - a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9.5e+74) || ~((z <= 3.9e+207))) tmp = z * (y / (t - a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9.5e+74], N[Not[LessEqual[z, 3.9e+207]], $MachinePrecision]], N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+74} \lor \neg \left(z \leq 3.9 \cdot 10^{+207}\right):\\
\;\;\;\;z \cdot \frac{y}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -9.5000000000000006e74 or 3.89999999999999972e207 < z Initial program 70.9%
sub-neg70.9%
+-commutative70.9%
distribute-frac-neg70.9%
distribute-rgt-neg-out70.9%
associate-/l*87.3%
fma-define87.3%
distribute-frac-neg87.3%
distribute-neg-frac287.3%
sub-neg87.3%
distribute-neg-in87.3%
remove-double-neg87.3%
+-commutative87.3%
sub-neg87.3%
Simplified87.3%
Taylor expanded in z around inf 55.5%
clear-num55.5%
inv-pow55.5%
Applied egg-rr55.5%
unpow-155.5%
Simplified55.5%
clear-num55.5%
*-commutative55.5%
associate-/l*69.0%
Applied egg-rr69.0%
if -9.5000000000000006e74 < z < 3.89999999999999972e207Initial program 75.0%
Taylor expanded in a around inf 69.4%
+-commutative69.4%
Simplified69.4%
Final simplification69.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.1e+102) (not (<= a 460000000000.0))) (+ x y) (+ x (/ (* y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.1e+102) || !(a <= 460000000000.0)) {
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 <= (-1.1d+102)) .or. (.not. (a <= 460000000000.0d0))) 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 <= -1.1e+102) || !(a <= 460000000000.0)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.1e+102) or not (a <= 460000000000.0): tmp = x + y else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.1e+102) || !(a <= 460000000000.0)) 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 <= -1.1e+102) || ~((a <= 460000000000.0))) tmp = x + y; else tmp = x + ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.1e+102], N[Not[LessEqual[a, 460000000000.0]], $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 -1.1 \cdot 10^{+102} \lor \neg \left(a \leq 460000000000\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -1.10000000000000004e102 or 4.6e11 < a Initial program 77.8%
Taylor expanded in a around inf 78.1%
+-commutative78.1%
Simplified78.1%
if -1.10000000000000004e102 < a < 4.6e11Initial program 71.0%
associate-/l*73.0%
*-commutative73.0%
Applied egg-rr73.0%
Taylor expanded in t around -inf 79.4%
mul-1-neg79.4%
sub-neg79.4%
distribute-rgt-neg-out79.4%
*-commutative79.4%
distribute-lft-out80.1%
sub-neg80.1%
unsub-neg80.1%
associate-/l*82.3%
Simplified82.3%
Taylor expanded in a around 0 78.1%
mul-1-neg78.1%
associate-/l*80.7%
distribute-lft-neg-in80.7%
Simplified80.7%
Taylor expanded in y around 0 78.1%
Final simplification78.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.8e+112) (not (<= a 1.5e+14))) (+ x y) (+ x (* y (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.8e+112) || !(a <= 1.5e+14)) {
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 <= (-1.8d+112)) .or. (.not. (a <= 1.5d+14))) 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 <= -1.8e+112) || !(a <= 1.5e+14)) {
tmp = x + y;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.8e+112) or not (a <= 1.5e+14): tmp = x + y else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.8e+112) || !(a <= 1.5e+14)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.8e+112) || ~((a <= 1.5e+14))) tmp = x + y; else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.8e+112], N[Not[LessEqual[a, 1.5e+14]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{+112} \lor \neg \left(a \leq 1.5 \cdot 10^{+14}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -1.8e112 or 1.5e14 < a Initial program 77.9%
Taylor expanded in a around inf 79.1%
+-commutative79.1%
Simplified79.1%
if -1.8e112 < a < 1.5e14Initial program 71.1%
associate-/l*73.7%
*-commutative73.7%
Applied egg-rr73.7%
Taylor expanded in t around -inf 78.0%
mul-1-neg78.0%
sub-neg78.0%
distribute-rgt-neg-out78.0%
*-commutative78.0%
distribute-lft-out78.7%
sub-neg78.7%
unsub-neg78.7%
associate-/l*81.5%
Simplified81.5%
Taylor expanded in a around 0 76.8%
mul-1-neg76.8%
associate-/l*79.9%
distribute-lft-neg-in79.9%
Simplified79.9%
cancel-sign-sub79.9%
+-commutative79.9%
Applied egg-rr79.9%
Final simplification79.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.9e+110) (not (<= a 2.5e+18))) (+ x y) (+ x (/ y (/ t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.9e+110) || !(a <= 2.5e+18)) {
tmp = x + y;
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.9d+110)) .or. (.not. (a <= 2.5d+18))) then
tmp = x + y
else
tmp = x + (y / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.9e+110) || !(a <= 2.5e+18)) {
tmp = x + y;
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.9e+110) or not (a <= 2.5e+18): tmp = x + y else: tmp = x + (y / (t / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.9e+110) || !(a <= 2.5e+18)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.9e+110) || ~((a <= 2.5e+18))) tmp = x + y; else tmp = x + (y / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.9e+110], N[Not[LessEqual[a, 2.5e+18]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{+110} \lor \neg \left(a \leq 2.5 \cdot 10^{+18}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if a < -1.89999999999999994e110 or 2.5e18 < a Initial program 77.9%
Taylor expanded in a around inf 79.1%
+-commutative79.1%
Simplified79.1%
if -1.89999999999999994e110 < a < 2.5e18Initial program 71.1%
associate-/l*73.7%
*-commutative73.7%
Applied egg-rr73.7%
Taylor expanded in t around -inf 78.0%
mul-1-neg78.0%
sub-neg78.0%
distribute-rgt-neg-out78.0%
*-commutative78.0%
distribute-lft-out78.7%
sub-neg78.7%
unsub-neg78.7%
associate-/l*81.5%
Simplified81.5%
Taylor expanded in a around 0 76.8%
mul-1-neg76.8%
associate-/l*79.9%
distribute-lft-neg-in79.9%
Simplified79.9%
Taylor expanded in y around 0 76.8%
mul-1-neg76.8%
associate-*l/77.3%
associate-/r/80.3%
Simplified80.3%
Final simplification79.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9e+76) (not (<= z 2e+202))) (/ y (/ t z)) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9e+76) || !(z <= 2e+202)) {
tmp = y / (t / z);
} 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 ((z <= (-9d+76)) .or. (.not. (z <= 2d+202))) then
tmp = y / (t / z)
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 ((z <= -9e+76) || !(z <= 2e+202)) {
tmp = y / (t / z);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9e+76) or not (z <= 2e+202): tmp = y / (t / z) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9e+76) || !(z <= 2e+202)) tmp = Float64(y / Float64(t / z)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9e+76) || ~((z <= 2e+202))) tmp = y / (t / z); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9e+76], N[Not[LessEqual[z, 2e+202]], $MachinePrecision]], N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+76} \lor \neg \left(z \leq 2 \cdot 10^{+202}\right):\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -8.9999999999999995e76 or 1.9999999999999998e202 < z Initial program 70.9%
associate-/l*87.3%
*-commutative87.3%
Applied egg-rr87.3%
Taylor expanded in t around -inf 48.5%
mul-1-neg48.5%
sub-neg48.5%
distribute-rgt-neg-out48.5%
*-commutative48.5%
distribute-lft-out51.9%
sub-neg51.9%
unsub-neg51.9%
associate-/l*61.6%
Simplified61.6%
Taylor expanded in a around 0 53.2%
mul-1-neg53.2%
associate-/l*60.2%
distribute-lft-neg-in60.2%
Simplified60.2%
Taylor expanded in x around 0 40.0%
associate-*l/47.7%
associate-/r/46.7%
Simplified46.7%
if -8.9999999999999995e76 < z < 1.9999999999999998e202Initial program 75.0%
Taylor expanded in a around inf 69.4%
+-commutative69.4%
Simplified69.4%
Final simplification63.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -8.5e-34) (not (<= a 2e-51))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8.5e-34) || !(a <= 2e-51)) {
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 <= (-8.5d-34)) .or. (.not. (a <= 2d-51))) 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 <= -8.5e-34) || !(a <= 2e-51)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -8.5e-34) or not (a <= 2e-51): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -8.5e-34) || !(a <= 2e-51)) 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 <= -8.5e-34) || ~((a <= 2e-51))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8.5e-34], N[Not[LessEqual[a, 2e-51]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.5 \cdot 10^{-34} \lor \neg \left(a \leq 2 \cdot 10^{-51}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -8.5000000000000001e-34 or 2e-51 < a Initial program 75.7%
Taylor expanded in a around inf 70.9%
+-commutative70.9%
Simplified70.9%
if -8.5000000000000001e-34 < a < 2e-51Initial program 71.6%
Taylor expanded in x around inf 49.2%
Final simplification61.3%
(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 73.9%
Taylor expanded in x around inf 45.8%
Final simplification45.8%
(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 2024079
(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))))