
(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 13 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 (or (<= t -2.5e+165) (not (<= t 3.8e+36))) (+ x (- (* y (/ z t)) (* a (/ y t)))) (+ x (+ y (* (/ y (- a t)) (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.5e+165) || !(t <= 3.8e+36)) {
tmp = x + ((y * (z / t)) - (a * (y / t)));
} else {
tmp = x + (y + ((y / (a - t)) * (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 ((t <= (-2.5d+165)) .or. (.not. (t <= 3.8d+36))) then
tmp = x + ((y * (z / t)) - (a * (y / t)))
else
tmp = x + (y + ((y / (a - t)) * (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 ((t <= -2.5e+165) || !(t <= 3.8e+36)) {
tmp = x + ((y * (z / t)) - (a * (y / t)));
} else {
tmp = x + (y + ((y / (a - t)) * (t - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.5e+165) or not (t <= 3.8e+36): tmp = x + ((y * (z / t)) - (a * (y / t))) else: tmp = x + (y + ((y / (a - t)) * (t - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.5e+165) || !(t <= 3.8e+36)) tmp = Float64(x + Float64(Float64(y * Float64(z / t)) - Float64(a * Float64(y / t)))); else tmp = Float64(x + Float64(y + Float64(Float64(y / Float64(a - t)) * Float64(t - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.5e+165) || ~((t <= 3.8e+36))) tmp = x + ((y * (z / t)) - (a * (y / t))); else tmp = x + (y + ((y / (a - t)) * (t - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.5e+165], N[Not[LessEqual[t, 3.8e+36]], $MachinePrecision]], N[(x + N[(N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision] - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+165} \lor \neg \left(t \leq 3.8 \cdot 10^{+36}\right):\\
\;\;\;\;x + \left(y \cdot \frac{z}{t} - a \cdot \frac{y}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + \frac{y}{a - t} \cdot \left(t - z\right)\right)\\
\end{array}
\end{array}
if t < -2.49999999999999985e165 or 3.80000000000000025e36 < t Initial program 52.5%
sub-neg52.5%
+-commutative52.5%
distribute-frac-neg52.5%
distribute-rgt-neg-out52.5%
associate-/l*66.4%
fma-define66.7%
distribute-frac-neg66.7%
distribute-neg-frac266.7%
sub-neg66.7%
distribute-neg-in66.7%
remove-double-neg66.7%
+-commutative66.7%
sub-neg66.7%
Simplified66.7%
Taylor expanded in t around inf 73.4%
associate--l+73.4%
neg-mul-173.4%
associate-+r+80.9%
neg-mul-180.9%
distribute-rgt1-in80.9%
metadata-eval80.9%
mul0-lft80.9%
associate-/l*84.2%
associate-/l*93.7%
Simplified93.7%
if -2.49999999999999985e165 < t < 3.80000000000000025e36Initial program 90.1%
associate--l+91.4%
associate-/l*92.0%
Simplified92.0%
Final simplification92.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (+ x y) (/ (* y (- t z)) (- a t)))))
(if (or (<= t_1 -2e-225) (not (<= t_1 0.0)))
(+ x (+ y (* (/ y (- a t)) (- t z))))
(+ x (/ (- (* y z) (* y a)) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) + ((y * (t - z)) / (a - t));
double tmp;
if ((t_1 <= -2e-225) || !(t_1 <= 0.0)) {
tmp = x + (y + ((y / (a - t)) * (t - z)));
} else {
tmp = x + (((y * z) - (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) :: t_1
real(8) :: tmp
t_1 = (x + y) + ((y * (t - z)) / (a - t))
if ((t_1 <= (-2d-225)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + (y + ((y / (a - t)) * (t - z)))
else
tmp = x + (((y * z) - (y * a)) / t)
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) + ((y * (t - z)) / (a - t));
double tmp;
if ((t_1 <= -2e-225) || !(t_1 <= 0.0)) {
tmp = x + (y + ((y / (a - t)) * (t - z)));
} else {
tmp = x + (((y * z) - (y * a)) / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) + ((y * (t - z)) / (a - t)) tmp = 0 if (t_1 <= -2e-225) or not (t_1 <= 0.0): tmp = x + (y + ((y / (a - t)) * (t - z))) else: tmp = x + (((y * z) - (y * a)) / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) + Float64(Float64(y * Float64(t - z)) / Float64(a - t))) tmp = 0.0 if ((t_1 <= -2e-225) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(y + Float64(Float64(y / Float64(a - t)) * Float64(t - z)))); else tmp = Float64(x + Float64(Float64(Float64(y * z) - Float64(y * a)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) + ((y * (t - z)) / (a - t)); tmp = 0.0; if ((t_1 <= -2e-225) || ~((t_1 <= 0.0))) tmp = x + (y + ((y / (a - t)) * (t - z))); else tmp = x + (((y * z) - (y * a)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-225], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(y + N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(y * z), $MachinePrecision] - N[(y * a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-225} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \left(y + \frac{y}{a - t} \cdot \left(t - z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z - y \cdot a}{t}\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -1.9999999999999999e-225 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 84.4%
associate--l+85.1%
associate-/l*91.3%
Simplified91.3%
if -1.9999999999999999e-225 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0Initial program 3.9%
associate-*r/4.0%
add-cube-cbrt4.4%
associate-*l*4.3%
pow24.3%
Applied egg-rr4.3%
Taylor expanded in t around inf 99.6%
associate--l+99.6%
associate-*r/99.6%
associate-*r/99.6%
div-sub99.6%
distribute-lft-out--99.6%
associate-*r/99.6%
mul-1-neg99.6%
*-commutative99.6%
Simplified99.6%
Final simplification92.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.15e+54)
(+ x y)
(if (<= a -4.2e-12)
(- x (* y (/ z a)))
(if (or (<= a -3.35e-49) (not (<= a 3.5e+20)))
(+ x y)
(+ x (/ (* y z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.15e+54) {
tmp = x + y;
} else if (a <= -4.2e-12) {
tmp = x - (y * (z / a));
} else if ((a <= -3.35e-49) || !(a <= 3.5e+20)) {
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.15d+54)) then
tmp = x + y
else if (a <= (-4.2d-12)) then
tmp = x - (y * (z / a))
else if ((a <= (-3.35d-49)) .or. (.not. (a <= 3.5d+20))) 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.15e+54) {
tmp = x + y;
} else if (a <= -4.2e-12) {
tmp = x - (y * (z / a));
} else if ((a <= -3.35e-49) || !(a <= 3.5e+20)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.15e+54: tmp = x + y elif a <= -4.2e-12: tmp = x - (y * (z / a)) elif (a <= -3.35e-49) or not (a <= 3.5e+20): tmp = x + y else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.15e+54) tmp = Float64(x + y); elseif (a <= -4.2e-12) tmp = Float64(x - Float64(y * Float64(z / a))); elseif ((a <= -3.35e-49) || !(a <= 3.5e+20)) 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.15e+54) tmp = x + y; elseif (a <= -4.2e-12) tmp = x - (y * (z / a)); elseif ((a <= -3.35e-49) || ~((a <= 3.5e+20))) tmp = x + y; else tmp = x + ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.15e+54], N[(x + y), $MachinePrecision], If[LessEqual[a, -4.2e-12], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -3.35e-49], N[Not[LessEqual[a, 3.5e+20]], $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.15 \cdot 10^{+54}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -4.2 \cdot 10^{-12}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{elif}\;a \leq -3.35 \cdot 10^{-49} \lor \neg \left(a \leq 3.5 \cdot 10^{+20}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -1.14999999999999997e54 or -4.19999999999999988e-12 < a < -3.35e-49 or 3.5e20 < a Initial program 78.6%
Taylor expanded in a around inf 78.6%
+-commutative78.6%
Simplified78.6%
if -1.14999999999999997e54 < a < -4.19999999999999988e-12Initial program 69.8%
associate--l+76.3%
associate-/l*76.1%
Simplified76.1%
Taylor expanded in z around inf 76.5%
associate-*r/76.5%
associate-*r*76.5%
neg-mul-176.5%
Simplified76.5%
Taylor expanded in a around inf 64.1%
associate-*r/64.1%
neg-mul-164.1%
unsub-neg64.1%
Simplified64.1%
if -3.35e-49 < a < 3.5e20Initial program 77.4%
associate--l+82.5%
associate-/l*83.1%
Simplified83.1%
Taylor expanded in z around inf 90.6%
associate-*r/90.6%
associate-*r*90.6%
neg-mul-190.6%
Simplified90.6%
Taylor expanded in a around 0 83.5%
Final simplification80.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z (- t a)))))
(if (<= y -1.95e+183)
t_1
(if (<= y -6.5e+77)
(+ x y)
(if (<= y -0.061)
t_1
(if (<= y 2.9e+202) (+ x y) (* y (/ (- z a) t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / (t - a));
double tmp;
if (y <= -1.95e+183) {
tmp = t_1;
} else if (y <= -6.5e+77) {
tmp = x + y;
} else if (y <= -0.061) {
tmp = t_1;
} else if (y <= 2.9e+202) {
tmp = x + y;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = y * (z / (t - a))
if (y <= (-1.95d+183)) then
tmp = t_1
else if (y <= (-6.5d+77)) then
tmp = x + y
else if (y <= (-0.061d0)) then
tmp = t_1
else if (y <= 2.9d+202) then
tmp = x + y
else
tmp = 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 t_1 = y * (z / (t - a));
double tmp;
if (y <= -1.95e+183) {
tmp = t_1;
} else if (y <= -6.5e+77) {
tmp = x + y;
} else if (y <= -0.061) {
tmp = t_1;
} else if (y <= 2.9e+202) {
tmp = x + y;
} else {
tmp = y * ((z - a) / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / (t - a)) tmp = 0 if y <= -1.95e+183: tmp = t_1 elif y <= -6.5e+77: tmp = x + y elif y <= -0.061: tmp = t_1 elif y <= 2.9e+202: tmp = x + y else: tmp = y * ((z - a) / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / Float64(t - a))) tmp = 0.0 if (y <= -1.95e+183) tmp = t_1; elseif (y <= -6.5e+77) tmp = Float64(x + y); elseif (y <= -0.061) tmp = t_1; elseif (y <= 2.9e+202) tmp = Float64(x + y); else tmp = Float64(y * Float64(Float64(z - a) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / (t - a)); tmp = 0.0; if (y <= -1.95e+183) tmp = t_1; elseif (y <= -6.5e+77) tmp = x + y; elseif (y <= -0.061) tmp = t_1; elseif (y <= 2.9e+202) tmp = x + y; else tmp = y * ((z - a) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.95e+183], t$95$1, If[LessEqual[y, -6.5e+77], N[(x + y), $MachinePrecision], If[LessEqual[y, -0.061], t$95$1, If[LessEqual[y, 2.9e+202], N[(x + y), $MachinePrecision], N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{t - a}\\
\mathbf{if}\;y \leq -1.95 \cdot 10^{+183}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{+77}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq -0.061:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+202}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - a}{t}\\
\end{array}
\end{array}
if y < -1.9499999999999999e183 or -6.5e77 < y < -0.060999999999999999Initial program 61.4%
sub-neg61.4%
+-commutative61.4%
distribute-frac-neg61.4%
distribute-rgt-neg-out61.4%
associate-/l*72.2%
fma-define72.4%
distribute-frac-neg72.4%
distribute-neg-frac272.4%
sub-neg72.4%
distribute-neg-in72.4%
remove-double-neg72.4%
+-commutative72.4%
sub-neg72.4%
Simplified72.4%
Taylor expanded in z around inf 51.2%
associate-/l*57.7%
Simplified57.7%
if -1.9499999999999999e183 < y < -6.5e77 or -0.060999999999999999 < y < 2.8999999999999999e202Initial program 83.7%
Taylor expanded in a around inf 71.9%
+-commutative71.9%
Simplified71.9%
if 2.8999999999999999e202 < y Initial program 53.9%
sub-neg53.9%
+-commutative53.9%
distribute-frac-neg53.9%
distribute-rgt-neg-out53.9%
associate-/l*54.0%
fma-define54.6%
distribute-frac-neg54.6%
distribute-neg-frac254.6%
sub-neg54.6%
distribute-neg-in54.6%
remove-double-neg54.6%
+-commutative54.6%
sub-neg54.6%
Simplified54.6%
Taylor expanded in y around inf 58.0%
associate--l+58.0%
div-sub58.0%
Simplified58.0%
Taylor expanded in t around inf 67.9%
mul-1-neg67.9%
sub-neg67.9%
Simplified67.9%
Final simplification69.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.8e-49) (not (<= a 4.15e-38))) (+ x (- y (* y (/ z a)))) (+ x (/ (* y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.8e-49) || !(a <= 4.15e-38)) {
tmp = x + (y - (y * (z / a)));
} 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.8d-49)) .or. (.not. (a <= 4.15d-38))) then
tmp = x + (y - (y * (z / a)))
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.8e-49) || !(a <= 4.15e-38)) {
tmp = x + (y - (y * (z / a)));
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.8e-49) or not (a <= 4.15e-38): tmp = x + (y - (y * (z / a))) else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.8e-49) || !(a <= 4.15e-38)) tmp = Float64(x + Float64(y - Float64(y * Float64(z / a)))); 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.8e-49) || ~((a <= 4.15e-38))) tmp = x + (y - (y * (z / a))); else tmp = x + ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.8e-49], N[Not[LessEqual[a, 4.15e-38]], $MachinePrecision]], N[(x + N[(y - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{-49} \lor \neg \left(a \leq 4.15 \cdot 10^{-38}\right):\\
\;\;\;\;x + \left(y - y \cdot \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -3.7999999999999997e-49 or 4.1499999999999998e-38 < a Initial program 77.7%
Taylor expanded in t around 0 76.6%
sub-neg76.6%
associate-+r+76.6%
mul-1-neg76.6%
+-commutative76.6%
mul-1-neg76.6%
sub-neg76.6%
associate-/l*80.6%
Simplified80.6%
if -3.7999999999999997e-49 < a < 4.1499999999999998e-38Initial program 77.1%
associate--l+81.6%
associate-/l*82.2%
Simplified82.2%
Taylor expanded in z around inf 93.6%
associate-*r/93.6%
associate-*r*93.6%
neg-mul-193.6%
Simplified93.6%
Taylor expanded in a around 0 87.3%
Final simplification83.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -620000000.0) (not (<= a 13600000000.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 <= -620000000.0) || !(a <= 13600000000.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 <= (-620000000.0d0)) .or. (.not. (a <= 13600000000.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 <= -620000000.0) || !(a <= 13600000000.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 <= -620000000.0) or not (a <= 13600000000.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 <= -620000000.0) || !(a <= 13600000000.0)) tmp = Float64(x + Float64(y - Float64(y * Float64(z / a)))); else tmp = Float64(x - Float64(Float64(y * z) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -620000000.0) || ~((a <= 13600000000.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, -620000000.0], N[Not[LessEqual[a, 13600000000.0]], $MachinePrecision]], N[(x + N[(y - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -620000000 \lor \neg \left(a \leq 13600000000\right):\\
\;\;\;\;x + \left(y - y \cdot \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot z}{a - t}\\
\end{array}
\end{array}
if a < -6.2e8 or 1.36e10 < a Initial program 78.9%
Taylor expanded in t around 0 80.8%
sub-neg80.8%
associate-+r+80.8%
mul-1-neg80.8%
+-commutative80.8%
mul-1-neg80.8%
sub-neg80.8%
associate-/l*85.7%
Simplified85.7%
if -6.2e8 < a < 1.36e10Initial program 76.2%
associate--l+82.1%
associate-/l*81.9%
Simplified81.9%
Taylor expanded in z around inf 87.4%
associate-*r/87.4%
associate-*r*87.4%
neg-mul-187.4%
Simplified87.4%
Final simplification86.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -7.5e-78) (+ x y) (if (<= a -4.1e-196) (* y (/ z t)) (if (<= a 6e-202) x (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.5e-78) {
tmp = x + y;
} else if (a <= -4.1e-196) {
tmp = y * (z / t);
} else if (a <= 6e-202) {
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 (a <= (-7.5d-78)) then
tmp = x + y
else if (a <= (-4.1d-196)) then
tmp = y * (z / t)
else if (a <= 6d-202) 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 (a <= -7.5e-78) {
tmp = x + y;
} else if (a <= -4.1e-196) {
tmp = y * (z / t);
} else if (a <= 6e-202) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7.5e-78: tmp = x + y elif a <= -4.1e-196: tmp = y * (z / t) elif a <= 6e-202: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.5e-78) tmp = Float64(x + y); elseif (a <= -4.1e-196) tmp = Float64(y * Float64(z / t)); elseif (a <= 6e-202) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -7.5e-78) tmp = x + y; elseif (a <= -4.1e-196) tmp = y * (z / t); elseif (a <= 6e-202) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.5e-78], N[(x + y), $MachinePrecision], If[LessEqual[a, -4.1e-196], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6e-202], x, N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{-78}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -4.1 \cdot 10^{-196}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;a \leq 6 \cdot 10^{-202}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -7.50000000000000041e-78 or 6.00000000000000022e-202 < a Initial program 78.1%
Taylor expanded in a around inf 68.6%
+-commutative68.6%
Simplified68.6%
if -7.50000000000000041e-78 < a < -4.10000000000000021e-196Initial program 79.0%
sub-neg79.0%
+-commutative79.0%
distribute-frac-neg79.0%
distribute-rgt-neg-out79.0%
associate-/l*76.4%
fma-define76.2%
distribute-frac-neg76.2%
distribute-neg-frac276.2%
sub-neg76.2%
distribute-neg-in76.2%
remove-double-neg76.2%
+-commutative76.2%
sub-neg76.2%
Simplified76.2%
Taylor expanded in z around inf 68.7%
Taylor expanded in t around inf 62.5%
associate-/l*62.3%
Simplified62.3%
if -4.10000000000000021e-196 < a < 6.00000000000000022e-202Initial program 73.7%
Taylor expanded in x around inf 58.3%
Final simplification66.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -7e-78) (+ x y) (if (<= a -1.2e-195) (/ (* y z) t) (if (<= a 7e-202) x (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7e-78) {
tmp = x + y;
} else if (a <= -1.2e-195) {
tmp = (y * z) / t;
} else if (a <= 7e-202) {
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 (a <= (-7d-78)) then
tmp = x + y
else if (a <= (-1.2d-195)) then
tmp = (y * z) / t
else if (a <= 7d-202) 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 (a <= -7e-78) {
tmp = x + y;
} else if (a <= -1.2e-195) {
tmp = (y * z) / t;
} else if (a <= 7e-202) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7e-78: tmp = x + y elif a <= -1.2e-195: tmp = (y * z) / t elif a <= 7e-202: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7e-78) tmp = Float64(x + y); elseif (a <= -1.2e-195) tmp = Float64(Float64(y * z) / t); elseif (a <= 7e-202) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -7e-78) tmp = x + y; elseif (a <= -1.2e-195) tmp = (y * z) / t; elseif (a <= 7e-202) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7e-78], N[(x + y), $MachinePrecision], If[LessEqual[a, -1.2e-195], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[a, 7e-202], x, N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{-78}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -1.2 \cdot 10^{-195}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq 7 \cdot 10^{-202}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -6.9999999999999999e-78 or 6.9999999999999998e-202 < a Initial program 78.1%
Taylor expanded in a around inf 68.6%
+-commutative68.6%
Simplified68.6%
if -6.9999999999999999e-78 < a < -1.2e-195Initial program 79.0%
sub-neg79.0%
+-commutative79.0%
distribute-frac-neg79.0%
distribute-rgt-neg-out79.0%
associate-/l*76.4%
fma-define76.2%
distribute-frac-neg76.2%
distribute-neg-frac276.2%
sub-neg76.2%
distribute-neg-in76.2%
remove-double-neg76.2%
+-commutative76.2%
sub-neg76.2%
Simplified76.2%
Taylor expanded in z around inf 68.7%
Taylor expanded in t around inf 62.5%
if -1.2e-195 < a < 6.9999999999999998e-202Initial program 73.7%
Taylor expanded in x around inf 58.3%
Final simplification66.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.95e-74) (+ x y) (if (<= a -8e-196) (* y (/ z (- t a))) (if (<= a 6.8e-202) x (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.95e-74) {
tmp = x + y;
} else if (a <= -8e-196) {
tmp = y * (z / (t - a));
} else if (a <= 6.8e-202) {
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 (a <= (-2.95d-74)) then
tmp = x + y
else if (a <= (-8d-196)) then
tmp = y * (z / (t - a))
else if (a <= 6.8d-202) 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 (a <= -2.95e-74) {
tmp = x + y;
} else if (a <= -8e-196) {
tmp = y * (z / (t - a));
} else if (a <= 6.8e-202) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.95e-74: tmp = x + y elif a <= -8e-196: tmp = y * (z / (t - a)) elif a <= 6.8e-202: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.95e-74) tmp = Float64(x + y); elseif (a <= -8e-196) tmp = Float64(y * Float64(z / Float64(t - a))); elseif (a <= 6.8e-202) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.95e-74) tmp = x + y; elseif (a <= -8e-196) tmp = y * (z / (t - a)); elseif (a <= 6.8e-202) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.95e-74], N[(x + y), $MachinePrecision], If[LessEqual[a, -8e-196], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.8e-202], x, N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.95 \cdot 10^{-74}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -8 \cdot 10^{-196}:\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{elif}\;a \leq 6.8 \cdot 10^{-202}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -2.94999999999999983e-74 or 6.80000000000000025e-202 < a Initial program 78.1%
Taylor expanded in a around inf 68.6%
+-commutative68.6%
Simplified68.6%
if -2.94999999999999983e-74 < a < -8.0000000000000004e-196Initial program 79.0%
sub-neg79.0%
+-commutative79.0%
distribute-frac-neg79.0%
distribute-rgt-neg-out79.0%
associate-/l*76.4%
fma-define76.2%
distribute-frac-neg76.2%
distribute-neg-frac276.2%
sub-neg76.2%
distribute-neg-in76.2%
remove-double-neg76.2%
+-commutative76.2%
sub-neg76.2%
Simplified76.2%
Taylor expanded in z around inf 68.7%
associate-/l*65.4%
Simplified65.4%
if -8.0000000000000004e-196 < a < 6.80000000000000025e-202Initial program 73.7%
Taylor expanded in x around inf 58.3%
Final simplification66.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -10000.0) (not (<= a 3.5e+21))) (+ x y) (+ x (/ (* y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -10000.0) || !(a <= 3.5e+21)) {
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 <= (-10000.0d0)) .or. (.not. (a <= 3.5d+21))) 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 <= -10000.0) || !(a <= 3.5e+21)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -10000.0) or not (a <= 3.5e+21): tmp = x + y else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -10000.0) || !(a <= 3.5e+21)) 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 <= -10000.0) || ~((a <= 3.5e+21))) tmp = x + y; else tmp = x + ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -10000.0], N[Not[LessEqual[a, 3.5e+21]], $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 -10000 \lor \neg \left(a \leq 3.5 \cdot 10^{+21}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -1e4 or 3.5e21 < a Initial program 78.9%
Taylor expanded in a around inf 76.7%
+-commutative76.7%
Simplified76.7%
if -1e4 < a < 3.5e21Initial program 76.2%
associate--l+82.1%
associate-/l*81.9%
Simplified81.9%
Taylor expanded in z around inf 87.4%
associate-*r/87.4%
associate-*r*87.4%
neg-mul-187.4%
Simplified87.4%
Taylor expanded in a around 0 80.0%
Final simplification78.4%
(FPCore (x y z t a) :precision binary64 (if (<= x -5.5e-210) x (if (<= x 2.6e-132) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5.5e-210) {
tmp = x;
} else if (x <= 2.6e-132) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-5.5d-210)) then
tmp = x
else if (x <= 2.6d-132) then
tmp = y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5.5e-210) {
tmp = x;
} else if (x <= 2.6e-132) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -5.5e-210: tmp = x elif x <= 2.6e-132: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -5.5e-210) tmp = x; elseif (x <= 2.6e-132) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -5.5e-210) tmp = x; elseif (x <= 2.6e-132) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -5.5e-210], x, If[LessEqual[x, 2.6e-132], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{-210}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{-132}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -5.50000000000000024e-210 or 2.6000000000000001e-132 < x Initial program 79.2%
Taylor expanded in x around inf 60.8%
if -5.50000000000000024e-210 < x < 2.6000000000000001e-132Initial program 71.6%
Taylor expanded in x around 0 64.3%
Taylor expanded in t around 0 46.5%
associate-/l*49.6%
Simplified49.6%
Taylor expanded in z around 0 37.4%
Final simplification55.6%
(FPCore (x y z t a) :precision binary64 (+ x y))
double code(double x, double y, double z, double t, double a) {
return x + y;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x + y;
}
def code(x, y, z, t, a): return x + y
function code(x, y, z, t, a) return Float64(x + y) end
function tmp = code(x, y, z, t, a) tmp = x + y; end
code[x_, y_, z_, t_, a_] := N[(x + y), $MachinePrecision]
\begin{array}{l}
\\
x + y
\end{array}
Initial program 77.5%
Taylor expanded in a around inf 60.2%
+-commutative60.2%
Simplified60.2%
Final simplification60.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 77.5%
Taylor expanded in x around inf 50.8%
Final simplification50.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 2024046
(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))))