
(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 17 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 -1.05e+118) (not (<= t 7e+37))) (+ x (/ y (/ t (- z a)))) (+ (+ x y) (/ -1.0 (/ (- a t) (* y (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.05e+118) || !(t <= 7e+37)) {
tmp = x + (y / (t / (z - a)));
} else {
tmp = (x + y) + (-1.0 / ((a - t) / (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 ((t <= (-1.05d+118)) .or. (.not. (t <= 7d+37))) then
tmp = x + (y / (t / (z - a)))
else
tmp = (x + y) + ((-1.0d0) / ((a - t) / (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 ((t <= -1.05e+118) || !(t <= 7e+37)) {
tmp = x + (y / (t / (z - a)));
} else {
tmp = (x + y) + (-1.0 / ((a - t) / (y * (z - t))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.05e+118) or not (t <= 7e+37): tmp = x + (y / (t / (z - a))) else: tmp = (x + y) + (-1.0 / ((a - t) / (y * (z - t)))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.05e+118) || !(t <= 7e+37)) tmp = Float64(x + Float64(y / Float64(t / Float64(z - a)))); else tmp = Float64(Float64(x + y) + Float64(-1.0 / Float64(Float64(a - t) / Float64(y * Float64(z - t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.05e+118) || ~((t <= 7e+37))) tmp = x + (y / (t / (z - a))); else tmp = (x + y) + (-1.0 / ((a - t) / (y * (z - t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.05e+118], N[Not[LessEqual[t, 7e+37]], $MachinePrecision]], N[(x + N[(y / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(-1.0 / N[(N[(a - t), $MachinePrecision] / N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+118} \lor \neg \left(t \leq 7 \cdot 10^{+37}\right):\\
\;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \frac{-1}{\frac{a - t}{y \cdot \left(z - t\right)}}\\
\end{array}
\end{array}
if t < -1.05e118 or 7e37 < t Initial program 46.4%
sub-neg46.4%
distribute-frac-neg46.4%
distribute-rgt-neg-out46.4%
+-commutative46.4%
associate-*l/59.6%
distribute-rgt-neg-in59.6%
distribute-lft-neg-in59.6%
distribute-frac-neg59.6%
fma-def59.6%
sub-neg59.6%
distribute-neg-in59.6%
remove-double-neg59.6%
+-commutative59.6%
sub-neg59.6%
Simplified59.6%
Taylor expanded in t around inf 61.7%
associate-+r+81.3%
distribute-rgt1-in81.3%
metadata-eval81.3%
mul0-lft81.3%
associate-/l*92.2%
Simplified92.2%
if -1.05e118 < t < 7e37Initial program 93.2%
associate-*l/92.6%
Simplified92.6%
associate-*l/93.2%
clear-num93.4%
*-commutative93.4%
Applied egg-rr93.4%
Final simplification93.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (- (/ y (- a t))))))
(if (<= a -9.5e+112)
(+ x y)
(if (<= a -1.9e+77)
(* y (- 1.0 (/ z a)))
(if (<= a -1.7e-22)
(+ x y)
(if (<= a -1.5e-210)
t_1
(if (<= a -1e-235)
(- x (/ y (/ t a)))
(if (<= a 2e-299)
t_1
(if (<= a 2.3e-12) (- x (/ (* y a) t)) (+ x y))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * -(y / (a - t));
double tmp;
if (a <= -9.5e+112) {
tmp = x + y;
} else if (a <= -1.9e+77) {
tmp = y * (1.0 - (z / a));
} else if (a <= -1.7e-22) {
tmp = x + y;
} else if (a <= -1.5e-210) {
tmp = t_1;
} else if (a <= -1e-235) {
tmp = x - (y / (t / a));
} else if (a <= 2e-299) {
tmp = t_1;
} else if (a <= 2.3e-12) {
tmp = x - ((y * 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) :: t_1
real(8) :: tmp
t_1 = z * -(y / (a - t))
if (a <= (-9.5d+112)) then
tmp = x + y
else if (a <= (-1.9d+77)) then
tmp = y * (1.0d0 - (z / a))
else if (a <= (-1.7d-22)) then
tmp = x + y
else if (a <= (-1.5d-210)) then
tmp = t_1
else if (a <= (-1d-235)) then
tmp = x - (y / (t / a))
else if (a <= 2d-299) then
tmp = t_1
else if (a <= 2.3d-12) then
tmp = x - ((y * 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 t_1 = z * -(y / (a - t));
double tmp;
if (a <= -9.5e+112) {
tmp = x + y;
} else if (a <= -1.9e+77) {
tmp = y * (1.0 - (z / a));
} else if (a <= -1.7e-22) {
tmp = x + y;
} else if (a <= -1.5e-210) {
tmp = t_1;
} else if (a <= -1e-235) {
tmp = x - (y / (t / a));
} else if (a <= 2e-299) {
tmp = t_1;
} else if (a <= 2.3e-12) {
tmp = x - ((y * a) / t);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * -(y / (a - t)) tmp = 0 if a <= -9.5e+112: tmp = x + y elif a <= -1.9e+77: tmp = y * (1.0 - (z / a)) elif a <= -1.7e-22: tmp = x + y elif a <= -1.5e-210: tmp = t_1 elif a <= -1e-235: tmp = x - (y / (t / a)) elif a <= 2e-299: tmp = t_1 elif a <= 2.3e-12: tmp = x - ((y * a) / t) else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(-Float64(y / Float64(a - t)))) tmp = 0.0 if (a <= -9.5e+112) tmp = Float64(x + y); elseif (a <= -1.9e+77) tmp = Float64(y * Float64(1.0 - Float64(z / a))); elseif (a <= -1.7e-22) tmp = Float64(x + y); elseif (a <= -1.5e-210) tmp = t_1; elseif (a <= -1e-235) tmp = Float64(x - Float64(y / Float64(t / a))); elseif (a <= 2e-299) tmp = t_1; elseif (a <= 2.3e-12) tmp = Float64(x - Float64(Float64(y * a) / t)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * -(y / (a - t)); tmp = 0.0; if (a <= -9.5e+112) tmp = x + y; elseif (a <= -1.9e+77) tmp = y * (1.0 - (z / a)); elseif (a <= -1.7e-22) tmp = x + y; elseif (a <= -1.5e-210) tmp = t_1; elseif (a <= -1e-235) tmp = x - (y / (t / a)); elseif (a <= 2e-299) tmp = t_1; elseif (a <= 2.3e-12) tmp = x - ((y * a) / t); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * (-N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[a, -9.5e+112], N[(x + y), $MachinePrecision], If[LessEqual[a, -1.9e+77], N[(y * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.7e-22], N[(x + y), $MachinePrecision], If[LessEqual[a, -1.5e-210], t$95$1, If[LessEqual[a, -1e-235], N[(x - N[(y / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2e-299], t$95$1, If[LessEqual[a, 2.3e-12], N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-\frac{y}{a - t}\right)\\
\mathbf{if}\;a \leq -9.5 \cdot 10^{+112}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -1.9 \cdot 10^{+77}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{elif}\;a \leq -1.7 \cdot 10^{-22}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -1.5 \cdot 10^{-210}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1 \cdot 10^{-235}:\\
\;\;\;\;x - \frac{y}{\frac{t}{a}}\\
\mathbf{elif}\;a \leq 2 \cdot 10^{-299}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{-12}:\\
\;\;\;\;x - \frac{y \cdot a}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -9.5000000000000008e112 or -1.9000000000000001e77 < a < -1.6999999999999999e-22 or 2.29999999999999989e-12 < a Initial program 83.1%
associate-*l/90.7%
Simplified90.7%
Taylor expanded in a around inf 84.3%
+-commutative84.3%
Simplified84.3%
if -9.5000000000000008e112 < a < -1.9000000000000001e77Initial program 99.8%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 99.8%
sub-neg99.8%
associate-*r/100.0%
*-rgt-identity100.0%
distribute-rgt-neg-in100.0%
distribute-frac-neg100.0%
distribute-lft-in100.0%
distribute-frac-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in t around 0 85.7%
if -1.6999999999999999e-22 < a < -1.5000000000000001e-210 or -9.9999999999999996e-236 < a < 1.99999999999999998e-299Initial program 70.6%
associate-*l/73.8%
Simplified73.8%
Taylor expanded in z around inf 70.1%
associate-/l*71.6%
Simplified71.6%
div-sub71.5%
Applied egg-rr71.5%
Taylor expanded in z around inf 60.3%
mul-1-neg60.3%
associate-/l*63.6%
distribute-frac-neg63.6%
Simplified63.6%
add-sqr-sqrt30.4%
sqrt-unprod30.1%
sqr-neg30.1%
sqrt-unprod1.0%
sub-div1.2%
add-sqr-sqrt1.9%
frac-2neg1.9%
distribute-frac-neg1.9%
remove-double-neg1.9%
frac-2neg1.9%
sub-div1.8%
associate-/r/1.8%
*-commutative1.8%
add-sqr-sqrt0.7%
sqrt-unprod29.1%
sqr-neg29.1%
sqrt-unprod34.8%
add-sqr-sqrt67.1%
Applied egg-rr67.1%
if -1.5000000000000001e-210 < a < -9.9999999999999996e-236Initial program 65.4%
associate-*l/65.7%
Simplified65.7%
Taylor expanded in t around -inf 77.0%
mul-1-neg77.0%
unsub-neg77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in a around inf 67.1%
*-commutative67.1%
associate-/l*67.1%
Simplified67.1%
if 1.99999999999999998e-299 < a < 2.29999999999999989e-12Initial program 69.5%
associate-*l/68.0%
Simplified68.0%
Taylor expanded in t around -inf 86.3%
mul-1-neg86.3%
unsub-neg86.3%
*-commutative86.3%
Simplified86.3%
Taylor expanded in a around inf 63.2%
*-commutative63.2%
Simplified63.2%
Final simplification75.2%
(FPCore (x y z t a)
:precision binary64
(if (<= a -9.5e+112)
(+ x y)
(if (<= a -1.9e+77)
(* y (- 1.0 (/ z a)))
(if (or (<= a -3.5e-22) (not (<= a 2.45e-11)))
(+ x y)
(+ x (/ (* y z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.5e+112) {
tmp = x + y;
} else if (a <= -1.9e+77) {
tmp = y * (1.0 - (z / a));
} else if ((a <= -3.5e-22) || !(a <= 2.45e-11)) {
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 <= (-9.5d+112)) then
tmp = x + y
else if (a <= (-1.9d+77)) then
tmp = y * (1.0d0 - (z / a))
else if ((a <= (-3.5d-22)) .or. (.not. (a <= 2.45d-11))) 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 <= -9.5e+112) {
tmp = x + y;
} else if (a <= -1.9e+77) {
tmp = y * (1.0 - (z / a));
} else if ((a <= -3.5e-22) || !(a <= 2.45e-11)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9.5e+112: tmp = x + y elif a <= -1.9e+77: tmp = y * (1.0 - (z / a)) elif (a <= -3.5e-22) or not (a <= 2.45e-11): tmp = x + y else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.5e+112) tmp = Float64(x + y); elseif (a <= -1.9e+77) tmp = Float64(y * Float64(1.0 - Float64(z / a))); elseif ((a <= -3.5e-22) || !(a <= 2.45e-11)) 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 <= -9.5e+112) tmp = x + y; elseif (a <= -1.9e+77) tmp = y * (1.0 - (z / a)); elseif ((a <= -3.5e-22) || ~((a <= 2.45e-11))) tmp = x + y; else tmp = x + ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.5e+112], N[(x + y), $MachinePrecision], If[LessEqual[a, -1.9e+77], N[(y * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -3.5e-22], N[Not[LessEqual[a, 2.45e-11]], $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 -9.5 \cdot 10^{+112}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -1.9 \cdot 10^{+77}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{elif}\;a \leq -3.5 \cdot 10^{-22} \lor \neg \left(a \leq 2.45 \cdot 10^{-11}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -9.5000000000000008e112 or -1.9000000000000001e77 < a < -3.50000000000000005e-22 or 2.4499999999999999e-11 < a Initial program 83.1%
associate-*l/90.7%
Simplified90.7%
Taylor expanded in a around inf 84.3%
+-commutative84.3%
Simplified84.3%
if -9.5000000000000008e112 < a < -1.9000000000000001e77Initial program 99.8%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 99.8%
sub-neg99.8%
associate-*r/100.0%
*-rgt-identity100.0%
distribute-rgt-neg-in100.0%
distribute-frac-neg100.0%
distribute-lft-in100.0%
distribute-frac-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in t around 0 85.7%
if -3.50000000000000005e-22 < a < 2.4499999999999999e-11Initial program 69.8%
associate-*l/70.6%
Simplified70.6%
Taylor expanded in t around -inf 79.2%
mul-1-neg79.2%
unsub-neg79.2%
*-commutative79.2%
Simplified79.2%
Taylor expanded in a around 0 76.9%
mul-1-neg76.9%
distribute-rgt-neg-in76.9%
Simplified76.9%
Final simplification80.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -9.5e+112)
(+ x y)
(if (<= a -1.9e+77)
(- y (* z (/ y (- a t))))
(if (or (<= a -3.7e-22) (not (<= a 4.6e-11)))
(+ x y)
(+ x (/ (* y z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.5e+112) {
tmp = x + y;
} else if (a <= -1.9e+77) {
tmp = y - (z * (y / (a - t)));
} else if ((a <= -3.7e-22) || !(a <= 4.6e-11)) {
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 <= (-9.5d+112)) then
tmp = x + y
else if (a <= (-1.9d+77)) then
tmp = y - (z * (y / (a - t)))
else if ((a <= (-3.7d-22)) .or. (.not. (a <= 4.6d-11))) 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 <= -9.5e+112) {
tmp = x + y;
} else if (a <= -1.9e+77) {
tmp = y - (z * (y / (a - t)));
} else if ((a <= -3.7e-22) || !(a <= 4.6e-11)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9.5e+112: tmp = x + y elif a <= -1.9e+77: tmp = y - (z * (y / (a - t))) elif (a <= -3.7e-22) or not (a <= 4.6e-11): tmp = x + y else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.5e+112) tmp = Float64(x + y); elseif (a <= -1.9e+77) tmp = Float64(y - Float64(z * Float64(y / Float64(a - t)))); elseif ((a <= -3.7e-22) || !(a <= 4.6e-11)) 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 <= -9.5e+112) tmp = x + y; elseif (a <= -1.9e+77) tmp = y - (z * (y / (a - t))); elseif ((a <= -3.7e-22) || ~((a <= 4.6e-11))) tmp = x + y; else tmp = x + ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.5e+112], N[(x + y), $MachinePrecision], If[LessEqual[a, -1.9e+77], N[(y - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -3.7e-22], N[Not[LessEqual[a, 4.6e-11]], $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 -9.5 \cdot 10^{+112}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -1.9 \cdot 10^{+77}:\\
\;\;\;\;y - z \cdot \frac{y}{a - t}\\
\mathbf{elif}\;a \leq -3.7 \cdot 10^{-22} \lor \neg \left(a \leq 4.6 \cdot 10^{-11}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -9.5000000000000008e112 or -1.9000000000000001e77 < a < -3.7e-22 or 4.60000000000000027e-11 < a Initial program 83.1%
associate-*l/90.7%
Simplified90.7%
Taylor expanded in a around inf 84.3%
+-commutative84.3%
Simplified84.3%
if -9.5000000000000008e112 < a < -1.9000000000000001e77Initial program 99.8%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around inf 99.8%
associate-/l*99.8%
Simplified99.8%
div-sub99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 99.8%
div-sub99.8%
associate-/l*99.8%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
if -3.7e-22 < a < 4.60000000000000027e-11Initial program 69.8%
associate-*l/70.6%
Simplified70.6%
Taylor expanded in t around -inf 79.2%
mul-1-neg79.2%
unsub-neg79.2%
*-commutative79.2%
Simplified79.2%
Taylor expanded in a around 0 76.9%
mul-1-neg76.9%
distribute-rgt-neg-in76.9%
Simplified76.9%
Final simplification81.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ y (/ t a)))))
(if (<= t -1.3e+152)
t_1
(if (<= t 1e-108)
(+ x y)
(if (<= t 3.4e-99) (/ z (/ t y)) (if (<= t 1.15e+42) (+ x y) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y / (t / a));
double tmp;
if (t <= -1.3e+152) {
tmp = t_1;
} else if (t <= 1e-108) {
tmp = x + y;
} else if (t <= 3.4e-99) {
tmp = z / (t / y);
} else if (t <= 1.15e+42) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (y / (t / a))
if (t <= (-1.3d+152)) then
tmp = t_1
else if (t <= 1d-108) then
tmp = x + y
else if (t <= 3.4d-99) then
tmp = z / (t / y)
else if (t <= 1.15d+42) then
tmp = x + y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y / (t / a));
double tmp;
if (t <= -1.3e+152) {
tmp = t_1;
} else if (t <= 1e-108) {
tmp = x + y;
} else if (t <= 3.4e-99) {
tmp = z / (t / y);
} else if (t <= 1.15e+42) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y / (t / a)) tmp = 0 if t <= -1.3e+152: tmp = t_1 elif t <= 1e-108: tmp = x + y elif t <= 3.4e-99: tmp = z / (t / y) elif t <= 1.15e+42: tmp = x + y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y / Float64(t / a))) tmp = 0.0 if (t <= -1.3e+152) tmp = t_1; elseif (t <= 1e-108) tmp = Float64(x + y); elseif (t <= 3.4e-99) tmp = Float64(z / Float64(t / y)); elseif (t <= 1.15e+42) tmp = Float64(x + y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y / (t / a)); tmp = 0.0; if (t <= -1.3e+152) tmp = t_1; elseif (t <= 1e-108) tmp = x + y; elseif (t <= 3.4e-99) tmp = z / (t / y); elseif (t <= 1.15e+42) tmp = x + y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.3e+152], t$95$1, If[LessEqual[t, 1e-108], N[(x + y), $MachinePrecision], If[LessEqual[t, 3.4e-99], N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+42], N[(x + y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{\frac{t}{a}}\\
\mathbf{if}\;t \leq -1.3 \cdot 10^{+152}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 10^{-108}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-99}:\\
\;\;\;\;\frac{z}{\frac{t}{y}}\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+42}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.3e152 or 1.15e42 < t Initial program 46.6%
associate-*l/59.7%
Simplified59.7%
Taylor expanded in t around -inf 81.0%
mul-1-neg81.0%
unsub-neg81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in a around inf 71.5%
*-commutative71.5%
associate-/l*75.1%
Simplified75.1%
if -1.3e152 < t < 1.00000000000000004e-108 or 3.40000000000000007e-99 < t < 1.15e42Initial program 91.5%
associate-*l/91.5%
Simplified91.5%
Taylor expanded in a around inf 65.0%
+-commutative65.0%
Simplified65.0%
if 1.00000000000000004e-108 < t < 3.40000000000000007e-99Initial program 86.1%
associate-*l/85.8%
Simplified85.8%
Taylor expanded in x around 0 72.1%
sub-neg72.1%
associate-*r/71.9%
*-rgt-identity71.9%
distribute-rgt-neg-in71.9%
distribute-frac-neg71.9%
distribute-lft-in71.9%
distribute-frac-neg71.9%
sub-neg71.9%
Simplified71.9%
Taylor expanded in a around 0 72.6%
div-inv72.6%
add-sqr-sqrt28.9%
sqrt-unprod29.4%
sqr-neg29.4%
sqrt-unprod0.3%
add-sqr-sqrt1.6%
associate-*l*1.6%
div-inv1.6%
*-commutative1.6%
associate-/l*1.6%
add-sqr-sqrt0.3%
sqrt-unprod29.4%
sqr-neg29.4%
sqrt-unprod28.9%
add-sqr-sqrt72.6%
Applied egg-rr72.6%
Final simplification68.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.15e+118) (not (<= t 6.6e+37))) (+ x (/ y (/ t (- z a)))) (+ (+ x y) (* y (/ (- t z) (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.15e+118) || !(t <= 6.6e+37)) {
tmp = x + (y / (t / (z - a)));
} else {
tmp = (x + y) + (y * ((t - 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 ((t <= (-1.15d+118)) .or. (.not. (t <= 6.6d+37))) then
tmp = x + (y / (t / (z - a)))
else
tmp = (x + y) + (y * ((t - 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 ((t <= -1.15e+118) || !(t <= 6.6e+37)) {
tmp = x + (y / (t / (z - a)));
} else {
tmp = (x + y) + (y * ((t - z) / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.15e+118) or not (t <= 6.6e+37): tmp = x + (y / (t / (z - a))) else: tmp = (x + y) + (y * ((t - z) / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.15e+118) || !(t <= 6.6e+37)) tmp = Float64(x + Float64(y / Float64(t / Float64(z - a)))); else tmp = Float64(Float64(x + y) + Float64(y * Float64(Float64(t - z) / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.15e+118) || ~((t <= 6.6e+37))) tmp = x + (y / (t / (z - a))); else tmp = (x + y) + (y * ((t - z) / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.15e+118], N[Not[LessEqual[t, 6.6e+37]], $MachinePrecision]], N[(x + N[(y / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(y * N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{+118} \lor \neg \left(t \leq 6.6 \cdot 10^{+37}\right):\\
\;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + y \cdot \frac{t - z}{a - t}\\
\end{array}
\end{array}
if t < -1.15000000000000008e118 or 6.6000000000000002e37 < t Initial program 46.4%
sub-neg46.4%
distribute-frac-neg46.4%
distribute-rgt-neg-out46.4%
+-commutative46.4%
associate-*l/59.6%
distribute-rgt-neg-in59.6%
distribute-lft-neg-in59.6%
distribute-frac-neg59.6%
fma-def59.6%
sub-neg59.6%
distribute-neg-in59.6%
remove-double-neg59.6%
+-commutative59.6%
sub-neg59.6%
Simplified59.6%
Taylor expanded in t around inf 61.7%
associate-+r+81.3%
distribute-rgt1-in81.3%
metadata-eval81.3%
mul0-lft81.3%
associate-/l*92.2%
Simplified92.2%
if -1.15000000000000008e118 < t < 6.6000000000000002e37Initial program 93.2%
associate-*l/92.6%
Simplified92.6%
Final simplification92.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.15e+118) (not (<= t 2.35e+32))) (+ x (/ y (/ t (- z a)))) (+ (+ x y) (/ (* y (- t z)) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.15e+118) || !(t <= 2.35e+32)) {
tmp = x + (y / (t / (z - a)));
} else {
tmp = (x + y) + ((y * (t - 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 ((t <= (-1.15d+118)) .or. (.not. (t <= 2.35d+32))) then
tmp = x + (y / (t / (z - a)))
else
tmp = (x + y) + ((y * (t - 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 ((t <= -1.15e+118) || !(t <= 2.35e+32)) {
tmp = x + (y / (t / (z - a)));
} else {
tmp = (x + y) + ((y * (t - z)) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.15e+118) or not (t <= 2.35e+32): tmp = x + (y / (t / (z - a))) else: tmp = (x + y) + ((y * (t - z)) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.15e+118) || !(t <= 2.35e+32)) tmp = Float64(x + Float64(y / Float64(t / Float64(z - a)))); else tmp = Float64(Float64(x + y) + Float64(Float64(y * Float64(t - z)) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.15e+118) || ~((t <= 2.35e+32))) tmp = x + (y / (t / (z - a))); else tmp = (x + y) + ((y * (t - z)) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.15e+118], N[Not[LessEqual[t, 2.35e+32]], $MachinePrecision]], N[(x + N[(y / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{+118} \lor \neg \left(t \leq 2.35 \cdot 10^{+32}\right):\\
\;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\
\end{array}
\end{array}
if t < -1.15000000000000008e118 or 2.35000000000000012e32 < t Initial program 46.4%
sub-neg46.4%
distribute-frac-neg46.4%
distribute-rgt-neg-out46.4%
+-commutative46.4%
associate-*l/59.6%
distribute-rgt-neg-in59.6%
distribute-lft-neg-in59.6%
distribute-frac-neg59.6%
fma-def59.6%
sub-neg59.6%
distribute-neg-in59.6%
remove-double-neg59.6%
+-commutative59.6%
sub-neg59.6%
Simplified59.6%
Taylor expanded in t around inf 61.7%
associate-+r+81.3%
distribute-rgt1-in81.3%
metadata-eval81.3%
mul0-lft81.3%
associate-/l*92.2%
Simplified92.2%
if -1.15000000000000008e118 < t < 2.35000000000000012e32Initial program 93.2%
Final simplification92.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.15e+118) (not (<= t 4.4e+32))) (+ x (/ y (/ t (- z a)))) (- (+ x y) (/ y (/ (- a t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.15e+118) || !(t <= 4.4e+32)) {
tmp = x + (y / (t / (z - a)));
} else {
tmp = (x + y) - (y / ((a - 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 <= (-1.15d+118)) .or. (.not. (t <= 4.4d+32))) then
tmp = x + (y / (t / (z - a)))
else
tmp = (x + y) - (y / ((a - 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 <= -1.15e+118) || !(t <= 4.4e+32)) {
tmp = x + (y / (t / (z - a)));
} else {
tmp = (x + y) - (y / ((a - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.15e+118) or not (t <= 4.4e+32): tmp = x + (y / (t / (z - a))) else: tmp = (x + y) - (y / ((a - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.15e+118) || !(t <= 4.4e+32)) tmp = Float64(x + Float64(y / Float64(t / Float64(z - a)))); else tmp = Float64(Float64(x + y) - Float64(y / Float64(Float64(a - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.15e+118) || ~((t <= 4.4e+32))) tmp = x + (y / (t / (z - a))); else tmp = (x + y) - (y / ((a - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.15e+118], N[Not[LessEqual[t, 4.4e+32]], $MachinePrecision]], N[(x + N[(y / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{+118} \lor \neg \left(t \leq 4.4 \cdot 10^{+32}\right):\\
\;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - \frac{y}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if t < -1.15000000000000008e118 or 4.40000000000000002e32 < t Initial program 46.4%
sub-neg46.4%
distribute-frac-neg46.4%
distribute-rgt-neg-out46.4%
+-commutative46.4%
associate-*l/59.6%
distribute-rgt-neg-in59.6%
distribute-lft-neg-in59.6%
distribute-frac-neg59.6%
fma-def59.6%
sub-neg59.6%
distribute-neg-in59.6%
remove-double-neg59.6%
+-commutative59.6%
sub-neg59.6%
Simplified59.6%
Taylor expanded in t around inf 61.7%
associate-+r+81.3%
distribute-rgt1-in81.3%
metadata-eval81.3%
mul0-lft81.3%
associate-/l*92.2%
Simplified92.2%
if -1.15000000000000008e118 < t < 4.40000000000000002e32Initial program 93.2%
associate-*l/92.6%
Simplified92.6%
Taylor expanded in z around inf 92.1%
associate-/l*91.6%
Simplified91.6%
Final simplification91.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.2e-114) (not (<= a 2.15e-80))) (- (+ 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 <= -5.2e-114) || !(a <= 2.15e-80)) {
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 <= (-5.2d-114)) .or. (.not. (a <= 2.15d-80))) 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 <= -5.2e-114) || !(a <= 2.15e-80)) {
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 <= -5.2e-114) or not (a <= 2.15e-80): 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 <= -5.2e-114) || !(a <= 2.15e-80)) tmp = Float64(Float64(x + 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 <= -5.2e-114) || ~((a <= 2.15e-80))) 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, -5.2e-114], N[Not[LessEqual[a, 2.15e-80]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.2 \cdot 10^{-114} \lor \neg \left(a \leq 2.15 \cdot 10^{-80}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -5.20000000000000026e-114 or 2.1500000000000001e-80 < a Initial program 84.7%
associate-*l/89.9%
Simplified89.9%
Taylor expanded in t around 0 85.7%
if -5.20000000000000026e-114 < a < 2.1500000000000001e-80Initial program 63.5%
associate-*l/65.6%
Simplified65.6%
Taylor expanded in t around -inf 85.7%
mul-1-neg85.7%
unsub-neg85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in a around 0 83.4%
mul-1-neg83.4%
distribute-rgt-neg-in83.4%
Simplified83.4%
Final simplification84.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.56e-111) (not (<= a 1.75e-82))) (- (+ x y) (* y (/ z a))) (+ x (/ y (/ t (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.56e-111) || !(a <= 1.75e-82)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x + (y / (t / (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 <= (-1.56d-111)) .or. (.not. (a <= 1.75d-82))) then
tmp = (x + y) - (y * (z / a))
else
tmp = x + (y / (t / (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 <= -1.56e-111) || !(a <= 1.75e-82)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x + (y / (t / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.56e-111) or not (a <= 1.75e-82): tmp = (x + y) - (y * (z / a)) else: tmp = x + (y / (t / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.56e-111) || !(a <= 1.75e-82)) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = Float64(x + Float64(y / Float64(t / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.56e-111) || ~((a <= 1.75e-82))) tmp = (x + y) - (y * (z / a)); else tmp = x + (y / (t / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.56e-111], N[Not[LessEqual[a, 1.75e-82]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.56 \cdot 10^{-111} \lor \neg \left(a \leq 1.75 \cdot 10^{-82}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\
\end{array}
\end{array}
if a < -1.56e-111 or 1.7499999999999999e-82 < a Initial program 84.7%
associate-*l/89.9%
Simplified89.9%
Taylor expanded in t around 0 85.7%
if -1.56e-111 < a < 1.7499999999999999e-82Initial program 63.5%
sub-neg63.5%
distribute-frac-neg63.5%
distribute-rgt-neg-out63.5%
+-commutative63.5%
associate-*l/65.6%
distribute-rgt-neg-in65.6%
distribute-lft-neg-in65.6%
distribute-frac-neg65.6%
fma-def65.6%
sub-neg65.6%
distribute-neg-in65.6%
remove-double-neg65.6%
+-commutative65.6%
sub-neg65.6%
Simplified65.6%
Taylor expanded in t around inf 70.0%
associate-+r+85.7%
distribute-rgt1-in85.7%
metadata-eval85.7%
mul0-lft85.7%
associate-/l*90.8%
Simplified90.8%
Final simplification87.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.65e-83) (+ x y) (if (<= a 1.75e-216) (* y (/ z t)) (if (<= a 2.6e-13) x (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.65e-83) {
tmp = x + y;
} else if (a <= 1.75e-216) {
tmp = y * (z / t);
} else if (a <= 2.6e-13) {
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 <= (-1.65d-83)) then
tmp = x + y
else if (a <= 1.75d-216) then
tmp = y * (z / t)
else if (a <= 2.6d-13) 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 <= -1.65e-83) {
tmp = x + y;
} else if (a <= 1.75e-216) {
tmp = y * (z / t);
} else if (a <= 2.6e-13) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.65e-83: tmp = x + y elif a <= 1.75e-216: tmp = y * (z / t) elif a <= 2.6e-13: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.65e-83) tmp = Float64(x + y); elseif (a <= 1.75e-216) tmp = Float64(y * Float64(z / t)); elseif (a <= 2.6e-13) 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 <= -1.65e-83) tmp = x + y; elseif (a <= 1.75e-216) tmp = y * (z / t); elseif (a <= 2.6e-13) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.65e-83], N[(x + y), $MachinePrecision], If[LessEqual[a, 1.75e-216], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.6e-13], x, N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.65 \cdot 10^{-83}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{-216}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{-13}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.65e-83 or 2.6e-13 < a Initial program 84.9%
associate-*l/91.4%
Simplified91.4%
Taylor expanded in a around inf 76.8%
+-commutative76.8%
Simplified76.8%
if -1.65e-83 < a < 1.74999999999999991e-216Initial program 64.4%
associate-*l/67.1%
Simplified67.1%
Taylor expanded in x around 0 43.3%
sub-neg43.3%
associate-*r/44.6%
*-rgt-identity44.6%
distribute-rgt-neg-in44.6%
distribute-frac-neg44.6%
distribute-lft-in44.6%
distribute-frac-neg44.6%
sub-neg44.6%
Simplified44.6%
Taylor expanded in a around 0 53.0%
if 1.74999999999999991e-216 < a < 2.6e-13Initial program 69.9%
associate-*l/67.9%
Simplified67.9%
Taylor expanded in x around inf 60.8%
Final simplification68.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.9e-83) (+ x y) (if (<= a 5.5e-217) (/ y (/ t z)) (if (<= a 4.4e-10) x (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.9e-83) {
tmp = x + y;
} else if (a <= 5.5e-217) {
tmp = y / (t / z);
} else if (a <= 4.4e-10) {
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.9d-83)) then
tmp = x + y
else if (a <= 5.5d-217) then
tmp = y / (t / z)
else if (a <= 4.4d-10) 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.9e-83) {
tmp = x + y;
} else if (a <= 5.5e-217) {
tmp = y / (t / z);
} else if (a <= 4.4e-10) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.9e-83: tmp = x + y elif a <= 5.5e-217: tmp = y / (t / z) elif a <= 4.4e-10: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.9e-83) tmp = Float64(x + y); elseif (a <= 5.5e-217) tmp = Float64(y / Float64(t / z)); elseif (a <= 4.4e-10) 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.9e-83) tmp = x + y; elseif (a <= 5.5e-217) tmp = y / (t / z); elseif (a <= 4.4e-10) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.9e-83], N[(x + y), $MachinePrecision], If[LessEqual[a, 5.5e-217], N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.4e-10], x, N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{-83}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-217}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;a \leq 4.4 \cdot 10^{-10}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -2.8999999999999999e-83 or 4.3999999999999998e-10 < a Initial program 84.9%
associate-*l/91.4%
Simplified91.4%
Taylor expanded in a around inf 76.8%
+-commutative76.8%
Simplified76.8%
if -2.8999999999999999e-83 < a < 5.49999999999999975e-217Initial program 64.4%
associate-*l/67.1%
Simplified67.1%
Taylor expanded in z around inf 53.9%
associate-*r/53.9%
associate-*r*53.9%
neg-mul-153.9%
Simplified53.9%
Taylor expanded in a around 0 47.5%
associate-/l*53.1%
Simplified53.1%
if 5.49999999999999975e-217 < a < 4.3999999999999998e-10Initial program 69.9%
associate-*l/67.9%
Simplified67.9%
Taylor expanded in x around inf 60.8%
Final simplification68.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.65e-83) (+ x y) (if (<= a 1.85e-218) (/ z (/ t y)) (if (<= a 0.00043) x (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.65e-83) {
tmp = x + y;
} else if (a <= 1.85e-218) {
tmp = z / (t / y);
} else if (a <= 0.00043) {
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.65d-83)) then
tmp = x + y
else if (a <= 1.85d-218) then
tmp = z / (t / y)
else if (a <= 0.00043d0) 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.65e-83) {
tmp = x + y;
} else if (a <= 1.85e-218) {
tmp = z / (t / y);
} else if (a <= 0.00043) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.65e-83: tmp = x + y elif a <= 1.85e-218: tmp = z / (t / y) elif a <= 0.00043: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.65e-83) tmp = Float64(x + y); elseif (a <= 1.85e-218) tmp = Float64(z / Float64(t / y)); elseif (a <= 0.00043) 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.65e-83) tmp = x + y; elseif (a <= 1.85e-218) tmp = z / (t / y); elseif (a <= 0.00043) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.65e-83], N[(x + y), $MachinePrecision], If[LessEqual[a, 1.85e-218], N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.00043], x, N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.65 \cdot 10^{-83}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{-218}:\\
\;\;\;\;\frac{z}{\frac{t}{y}}\\
\mathbf{elif}\;a \leq 0.00043:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -2.65e-83 or 4.29999999999999989e-4 < a Initial program 84.9%
associate-*l/91.4%
Simplified91.4%
Taylor expanded in a around inf 76.8%
+-commutative76.8%
Simplified76.8%
if -2.65e-83 < a < 1.8500000000000001e-218Initial program 64.4%
associate-*l/67.1%
Simplified67.1%
Taylor expanded in x around 0 43.3%
sub-neg43.3%
associate-*r/44.6%
*-rgt-identity44.6%
distribute-rgt-neg-in44.6%
distribute-frac-neg44.6%
distribute-lft-in44.6%
distribute-frac-neg44.6%
sub-neg44.6%
Simplified44.6%
Taylor expanded in a around 0 53.0%
div-inv53.0%
add-sqr-sqrt20.8%
sqrt-unprod12.3%
sqr-neg12.3%
sqrt-unprod1.1%
add-sqr-sqrt2.4%
associate-*l*2.5%
div-inv2.5%
*-commutative2.5%
associate-/l*2.4%
add-sqr-sqrt1.2%
sqrt-unprod12.0%
sqr-neg12.0%
sqrt-unprod19.7%
add-sqr-sqrt53.3%
Applied egg-rr53.3%
if 1.8500000000000001e-218 < a < 4.29999999999999989e-4Initial program 69.9%
associate-*l/67.9%
Simplified67.9%
Taylor expanded in x around inf 60.8%
Final simplification68.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.75e+37) (not (<= y 2.15e+218))) (* y (- 1.0 (/ z a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.75e+37) || !(y <= 2.15e+218)) {
tmp = y * (1.0 - (z / a));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.75d+37)) .or. (.not. (y <= 2.15d+218))) then
tmp = y * (1.0d0 - (z / a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.75e+37) || !(y <= 2.15e+218)) {
tmp = y * (1.0 - (z / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.75e+37) or not (y <= 2.15e+218): tmp = y * (1.0 - (z / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.75e+37) || !(y <= 2.15e+218)) tmp = Float64(y * Float64(1.0 - Float64(z / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.75e+37) || ~((y <= 2.15e+218))) tmp = y * (1.0 - (z / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.75e+37], N[Not[LessEqual[y, 2.15e+218]], $MachinePrecision]], N[(y * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{+37} \lor \neg \left(y \leq 2.15 \cdot 10^{+218}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if y < -1.75e37 or 2.14999999999999993e218 < y Initial program 58.7%
associate-*l/72.0%
Simplified72.0%
Taylor expanded in x around 0 54.8%
sub-neg54.8%
associate-*r/66.0%
*-rgt-identity66.0%
distribute-rgt-neg-in66.0%
distribute-frac-neg66.0%
distribute-lft-in66.0%
distribute-frac-neg66.0%
sub-neg66.0%
Simplified66.0%
Taylor expanded in t around 0 56.8%
if -1.75e37 < y < 2.14999999999999993e218Initial program 84.5%
associate-*l/85.0%
Simplified85.0%
Taylor expanded in a around inf 67.8%
+-commutative67.8%
Simplified67.8%
Final simplification64.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.1e-80) (not (<= a 1.35e-7))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.1e-80) || !(a <= 1.35e-7)) {
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.1d-80)) .or. (.not. (a <= 1.35d-7))) 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.1e-80) || !(a <= 1.35e-7)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.1e-80) or not (a <= 1.35e-7): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.1e-80) || !(a <= 1.35e-7)) 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.1e-80) || ~((a <= 1.35e-7))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.1e-80], N[Not[LessEqual[a, 1.35e-7]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.1 \cdot 10^{-80} \lor \neg \left(a \leq 1.35 \cdot 10^{-7}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.10000000000000016e-80 or 1.35000000000000004e-7 < a Initial program 84.8%
associate-*l/91.3%
Simplified91.3%
Taylor expanded in a around inf 76.7%
+-commutative76.7%
Simplified76.7%
if -3.10000000000000016e-80 < a < 1.35000000000000004e-7Initial program 66.8%
associate-*l/67.7%
Simplified67.7%
Taylor expanded in x around inf 47.0%
Final simplification64.0%
(FPCore (x y z t a) :precision binary64 (if (<= y -4.6e+69) y (if (<= y 2.1e+107) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -4.6e+69) {
tmp = y;
} else if (y <= 2.1e+107) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-4.6d+69)) then
tmp = y
else if (y <= 2.1d+107) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -4.6e+69) {
tmp = y;
} else if (y <= 2.1e+107) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -4.6e+69: tmp = y elif y <= 2.1e+107: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -4.6e+69) tmp = y; elseif (y <= 2.1e+107) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -4.6e+69) tmp = y; elseif (y <= 2.1e+107) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -4.6e+69], y, If[LessEqual[y, 2.1e+107], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{+69}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+107}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -4.60000000000000033e69 or 2.1e107 < y Initial program 58.1%
associate-*l/71.2%
Simplified71.2%
Taylor expanded in x around 0 52.1%
sub-neg52.1%
associate-*r/62.7%
*-rgt-identity62.7%
distribute-rgt-neg-in62.7%
distribute-frac-neg62.7%
distribute-lft-in62.7%
distribute-frac-neg62.7%
sub-neg62.7%
Simplified62.7%
Taylor expanded in a around inf 32.7%
if -4.60000000000000033e69 < y < 2.1e107Initial program 88.4%
associate-*l/87.2%
Simplified87.2%
Taylor expanded in x around inf 67.3%
Final simplification54.4%
(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.1%
associate-*l/81.3%
Simplified81.3%
Taylor expanded in x around inf 48.0%
Final simplification48.0%
(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 2024019
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(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))))