
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x + y) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x + y) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.2e+122) (not (<= t 1.85e+130))) (+ x (* y (/ (- z a) t))) (+ x (+ y (* (- z t) (/ y (- t a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.2e+122) || !(t <= 1.85e+130)) {
tmp = x + (y * ((z - a) / t));
} else {
tmp = x + (y + ((z - t) * (y / (t - a))));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-6.2d+122)) .or. (.not. (t <= 1.85d+130))) then
tmp = x + (y * ((z - a) / t))
else
tmp = x + (y + ((z - t) * (y / (t - a))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.2e+122) || !(t <= 1.85e+130)) {
tmp = x + (y * ((z - a) / t));
} else {
tmp = x + (y + ((z - t) * (y / (t - a))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -6.2e+122) or not (t <= 1.85e+130): tmp = x + (y * ((z - a) / t)) else: tmp = x + (y + ((z - t) * (y / (t - a)))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -6.2e+122) || !(t <= 1.85e+130)) tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); else tmp = Float64(x + Float64(y + Float64(Float64(z - t) * Float64(y / Float64(t - a))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -6.2e+122) || ~((t <= 1.85e+130))) tmp = x + (y * ((z - a) / t)); else tmp = x + (y + ((z - t) * (y / (t - a)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.2e+122], N[Not[LessEqual[t, 1.85e+130]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+122} \lor \neg \left(t \leq 1.85 \cdot 10^{+130}\right):\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + \left(z - t\right) \cdot \frac{y}{t - a}\right)\\
\end{array}
\end{array}
if t < -6.19999999999999998e122 or 1.8500000000000001e130 < t Initial program 56.6%
sub-neg56.6%
+-commutative56.6%
distribute-frac-neg56.6%
distribute-rgt-neg-out56.6%
associate-/l*66.7%
fma-define66.9%
distribute-frac-neg66.9%
distribute-neg-frac266.9%
sub-neg66.9%
distribute-neg-in66.9%
remove-double-neg66.9%
+-commutative66.9%
sub-neg66.9%
Simplified66.9%
Taylor expanded in y around inf 59.1%
Taylor expanded in t around -inf 78.1%
mul-1-neg78.1%
unsub-neg78.1%
associate-/l*93.1%
neg-mul-193.1%
unsub-neg93.1%
Simplified93.1%
if -6.19999999999999998e122 < t < 1.8500000000000001e130Initial program 85.1%
associate--l+86.3%
+-commutative86.3%
associate-/l*95.8%
Applied egg-rr95.8%
Final simplification94.9%
(FPCore (x y z t a) :precision binary64 (if (<= t 3.3e+135) (+ x (* y (+ (+ (/ z (- t a)) 1.0) (/ t (- a t))))) (+ x (* y (/ (- z a) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 3.3e+135) {
tmp = x + (y * (((z / (t - a)) + 1.0) + (t / (a - t))));
} 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 (t <= 3.3d+135) then
tmp = x + (y * (((z / (t - a)) + 1.0d0) + (t / (a - t))))
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 (t <= 3.3e+135) {
tmp = x + (y * (((z / (t - a)) + 1.0) + (t / (a - t))));
} else {
tmp = x + (y * ((z - a) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 3.3e+135: tmp = x + (y * (((z / (t - a)) + 1.0) + (t / (a - t)))) else: tmp = x + (y * ((z - a) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 3.3e+135) tmp = Float64(x + Float64(y * Float64(Float64(Float64(z / Float64(t - a)) + 1.0) + Float64(t / Float64(a - t))))); else tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 3.3e+135) tmp = x + (y * (((z / (t - a)) + 1.0) + (t / (a - t)))); else tmp = x + (y * ((z - a) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 3.3e+135], N[(x + N[(y * N[(N[(N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] + N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.3 \cdot 10^{+135}:\\
\;\;\;\;x + y \cdot \left(\left(\frac{z}{t - a} + 1\right) + \frac{t}{a - t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\end{array}
\end{array}
if t < 3.2999999999999999e135Initial program 79.7%
sub-neg79.7%
+-commutative79.7%
distribute-frac-neg79.7%
distribute-rgt-neg-out79.7%
associate-/l*89.4%
fma-define89.4%
distribute-frac-neg89.4%
distribute-neg-frac289.4%
sub-neg89.4%
distribute-neg-in89.4%
remove-double-neg89.4%
+-commutative89.4%
sub-neg89.4%
Simplified89.4%
Taylor expanded in y around 0 94.7%
if 3.2999999999999999e135 < t Initial program 55.0%
sub-neg55.0%
+-commutative55.0%
distribute-frac-neg55.0%
distribute-rgt-neg-out55.0%
associate-/l*62.4%
fma-define62.8%
distribute-frac-neg62.8%
distribute-neg-frac262.8%
sub-neg62.8%
distribute-neg-in62.8%
remove-double-neg62.8%
+-commutative62.8%
sub-neg62.8%
Simplified62.8%
Taylor expanded in y around inf 60.0%
Taylor expanded in t around -inf 77.5%
mul-1-neg77.5%
unsub-neg77.5%
associate-/l*94.0%
neg-mul-194.0%
unsub-neg94.0%
Simplified94.0%
Final simplification94.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.22e+157) (not (<= t 1.06e+104))) (+ x (* y (/ (- z a) t))) (+ (+ x y) (* y (/ z (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.22e+157) || !(t <= 1.06e+104)) {
tmp = x + (y * ((z - a) / t));
} else {
tmp = (x + y) + (y * (z / (t - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.22d+157)) .or. (.not. (t <= 1.06d+104))) then
tmp = x + (y * ((z - a) / t))
else
tmp = (x + y) + (y * (z / (t - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.22e+157) || !(t <= 1.06e+104)) {
tmp = x + (y * ((z - a) / t));
} else {
tmp = (x + y) + (y * (z / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.22e+157) or not (t <= 1.06e+104): tmp = x + (y * ((z - a) / t)) else: tmp = (x + y) + (y * (z / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.22e+157) || !(t <= 1.06e+104)) tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); else tmp = Float64(Float64(x + y) + Float64(y * Float64(z / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.22e+157) || ~((t <= 1.06e+104))) tmp = x + (y * ((z - a) / t)); else tmp = (x + y) + (y * (z / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.22e+157], N[Not[LessEqual[t, 1.06e+104]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.22 \cdot 10^{+157} \lor \neg \left(t \leq 1.06 \cdot 10^{+104}\right):\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + y \cdot \frac{z}{t - a}\\
\end{array}
\end{array}
if t < -1.22e157 or 1.05999999999999994e104 < t Initial program 56.0%
sub-neg56.0%
+-commutative56.0%
distribute-frac-neg56.0%
distribute-rgt-neg-out56.0%
associate-/l*66.0%
fma-define66.2%
distribute-frac-neg66.2%
distribute-neg-frac266.2%
sub-neg66.2%
distribute-neg-in66.2%
remove-double-neg66.2%
+-commutative66.2%
sub-neg66.2%
Simplified66.2%
Taylor expanded in y around inf 58.5%
Taylor expanded in t around -inf 77.2%
mul-1-neg77.2%
unsub-neg77.2%
associate-/l*92.1%
neg-mul-192.1%
unsub-neg92.1%
Simplified92.1%
if -1.22e157 < t < 1.05999999999999994e104Initial program 85.6%
Taylor expanded in z around inf 87.3%
associate-/l*94.0%
Simplified94.0%
Final simplification93.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7e-65) (not (<= a 3.35e-28))) (- (+ 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 <= -7e-65) || !(a <= 3.35e-28)) {
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 <= (-7d-65)) .or. (.not. (a <= 3.35d-28))) 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 <= -7e-65) || !(a <= 3.35e-28)) {
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 <= -7e-65) or not (a <= 3.35e-28): 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 <= -7e-65) || !(a <= 3.35e-28)) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7e-65) || ~((a <= 3.35e-28))) 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, -7e-65], N[Not[LessEqual[a, 3.35e-28]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{-65} \lor \neg \left(a \leq 3.35 \cdot 10^{-28}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\end{array}
\end{array}
if a < -7.00000000000000009e-65 or 3.35000000000000011e-28 < a Initial program 75.8%
Taylor expanded in t around 0 77.2%
associate-/l*85.5%
Simplified85.5%
if -7.00000000000000009e-65 < a < 3.35000000000000011e-28Initial program 75.6%
sub-neg75.6%
+-commutative75.6%
distribute-frac-neg75.6%
distribute-rgt-neg-out75.6%
associate-/l*76.2%
fma-define76.3%
distribute-frac-neg76.3%
distribute-neg-frac276.3%
sub-neg76.3%
distribute-neg-in76.3%
remove-double-neg76.3%
+-commutative76.3%
sub-neg76.3%
Simplified76.3%
Taylor expanded in y around inf 65.8%
Taylor expanded in t around -inf 83.9%
mul-1-neg83.9%
unsub-neg83.9%
associate-/l*87.0%
neg-mul-187.0%
unsub-neg87.0%
Simplified87.0%
Final simplification86.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.25e-44) (not (<= a 3.4e-28))) (+ x y) (+ x (* y (/ (- z a) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.25e-44) || !(a <= 3.4e-28)) {
tmp = x + y;
} else {
tmp = x + (y * ((z - a) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.25d-44)) .or. (.not. (a <= 3.4d-28))) then
tmp = x + y
else
tmp = x + (y * ((z - a) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.25e-44) || !(a <= 3.4e-28)) {
tmp = x + y;
} else {
tmp = x + (y * ((z - a) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.25e-44) or not (a <= 3.4e-28): tmp = x + y else: tmp = x + (y * ((z - a) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.25e-44) || !(a <= 3.4e-28)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.25e-44) || ~((a <= 3.4e-28))) tmp = x + y; else tmp = x + (y * ((z - a) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.25e-44], N[Not[LessEqual[a, 3.4e-28]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.25 \cdot 10^{-44} \lor \neg \left(a \leq 3.4 \cdot 10^{-28}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\end{array}
\end{array}
if a < -2.2499999999999999e-44 or 3.4000000000000001e-28 < a Initial program 75.0%
Taylor expanded in a around inf 73.1%
+-commutative73.1%
Simplified73.1%
if -2.2499999999999999e-44 < a < 3.4000000000000001e-28Initial program 76.9%
sub-neg76.9%
+-commutative76.9%
distribute-frac-neg76.9%
distribute-rgt-neg-out76.9%
associate-/l*77.4%
fma-define77.5%
distribute-frac-neg77.5%
distribute-neg-frac277.5%
sub-neg77.5%
distribute-neg-in77.5%
remove-double-neg77.5%
+-commutative77.5%
sub-neg77.5%
Simplified77.5%
Taylor expanded in y around inf 67.5%
Taylor expanded in t around -inf 82.7%
mul-1-neg82.7%
unsub-neg82.7%
associate-/l*85.7%
neg-mul-185.7%
unsub-neg85.7%
Simplified85.7%
Final simplification77.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -4.5e-66) (- (+ x y) (/ y (/ a z))) (if (<= a 2.05e-28) (+ x (* y (/ (- z a) t))) (- (+ x y) (* y (/ z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.5e-66) {
tmp = (x + y) - (y / (a / z));
} else if (a <= 2.05e-28) {
tmp = x + (y * ((z - a) / t));
} else {
tmp = (x + y) - (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-4.5d-66)) then
tmp = (x + y) - (y / (a / z))
else if (a <= 2.05d-28) then
tmp = x + (y * ((z - a) / t))
else
tmp = (x + y) - (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.5e-66) {
tmp = (x + y) - (y / (a / z));
} else if (a <= 2.05e-28) {
tmp = x + (y * ((z - a) / t));
} else {
tmp = (x + y) - (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.5e-66: tmp = (x + y) - (y / (a / z)) elif a <= 2.05e-28: tmp = x + (y * ((z - a) / t)) else: tmp = (x + y) - (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.5e-66) tmp = Float64(Float64(x + y) - Float64(y / Float64(a / z))); elseif (a <= 2.05e-28) tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); else tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.5e-66) tmp = (x + y) - (y / (a / z)); elseif (a <= 2.05e-28) tmp = x + (y * ((z - a) / t)); else tmp = (x + y) - (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.5e-66], N[(N[(x + y), $MachinePrecision] - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.05e-28], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{-66}:\\
\;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;a \leq 2.05 \cdot 10^{-28}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if a < -4.4999999999999998e-66Initial program 80.8%
Taylor expanded in t around 0 84.7%
associate-/l*88.1%
Simplified88.1%
clear-num88.2%
inv-pow88.1%
Applied egg-rr88.1%
unpow-188.2%
Simplified88.2%
un-div-inv88.6%
Applied egg-rr88.6%
if -4.4999999999999998e-66 < a < 2.0500000000000001e-28Initial program 75.4%
sub-neg75.4%
+-commutative75.4%
distribute-frac-neg75.4%
distribute-rgt-neg-out75.4%
associate-/l*76.0%
fma-define76.0%
distribute-frac-neg76.0%
distribute-neg-frac276.0%
sub-neg76.0%
distribute-neg-in76.0%
remove-double-neg76.0%
+-commutative76.0%
sub-neg76.0%
Simplified76.0%
Taylor expanded in y around inf 66.4%
Taylor expanded in t around -inf 84.7%
mul-1-neg84.7%
unsub-neg84.7%
associate-/l*87.9%
neg-mul-187.9%
unsub-neg87.9%
Simplified87.9%
if 2.0500000000000001e-28 < a Initial program 71.1%
Taylor expanded in t around 0 69.9%
associate-/l*81.9%
Simplified81.9%
Final simplification86.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.35e-39) (not (<= a 3.7e-28))) (+ x y) (+ x (* y (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.35e-39) || !(a <= 3.7e-28)) {
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 <= (-2.35d-39)) .or. (.not. (a <= 3.7d-28))) 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 <= -2.35e-39) || !(a <= 3.7e-28)) {
tmp = x + y;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.35e-39) or not (a <= 3.7e-28): tmp = x + y else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.35e-39) || !(a <= 3.7e-28)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.35e-39) || ~((a <= 3.7e-28))) tmp = x + y; else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.35e-39], N[Not[LessEqual[a, 3.7e-28]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.35 \cdot 10^{-39} \lor \neg \left(a \leq 3.7 \cdot 10^{-28}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -2.3500000000000001e-39 or 3.7000000000000002e-28 < a Initial program 74.9%
Taylor expanded in a around inf 72.9%
+-commutative72.9%
Simplified72.9%
if -2.3500000000000001e-39 < a < 3.7000000000000002e-28Initial program 77.1%
sub-neg77.1%
+-commutative77.1%
distribute-frac-neg77.1%
distribute-rgt-neg-out77.1%
associate-/l*77.7%
fma-define77.7%
distribute-frac-neg77.7%
distribute-neg-frac277.7%
sub-neg77.7%
distribute-neg-in77.7%
remove-double-neg77.7%
+-commutative77.7%
sub-neg77.7%
Simplified77.7%
Taylor expanded in y around 0 90.7%
Taylor expanded in a around 0 85.6%
Final simplification77.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.5e+218) (not (<= z 6.4e+169))) (* z (/ y (- t a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.5e+218) || !(z <= 6.4e+169)) {
tmp = z * (y / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-6.5d+218)) .or. (.not. (z <= 6.4d+169))) then
tmp = z * (y / (t - a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.5e+218) || !(z <= 6.4e+169)) {
tmp = z * (y / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6.5e+218) or not (z <= 6.4e+169): tmp = z * (y / (t - a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6.5e+218) || !(z <= 6.4e+169)) tmp = Float64(z * Float64(y / Float64(t - a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -6.5e+218) || ~((z <= 6.4e+169))) tmp = z * (y / (t - a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.5e+218], N[Not[LessEqual[z, 6.4e+169]], $MachinePrecision]], N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+218} \lor \neg \left(z \leq 6.4 \cdot 10^{+169}\right):\\
\;\;\;\;z \cdot \frac{y}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -6.4999999999999999e218 or 6.3999999999999996e169 < z Initial program 82.8%
Taylor expanded in z around inf 62.3%
mul-1-neg62.3%
distribute-neg-frac262.3%
sub-neg62.3%
distribute-neg-in62.3%
remove-double-neg62.3%
+-commutative62.3%
sub-neg62.3%
Simplified62.3%
associate-/l*70.9%
Applied egg-rr70.9%
associate-*r/62.3%
*-commutative62.3%
associate-*r/69.4%
Simplified69.4%
if -6.4999999999999999e218 < z < 6.3999999999999996e169Initial program 73.6%
Taylor expanded in a around inf 72.2%
+-commutative72.2%
Simplified72.2%
Final simplification71.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -7.6e+128) (not (<= y 2.45e+153))) (* y (- 1.0 (/ z a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -7.6e+128) || !(y <= 2.45e+153)) {
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 <= (-7.6d+128)) .or. (.not. (y <= 2.45d+153))) 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 <= -7.6e+128) || !(y <= 2.45e+153)) {
tmp = y * (1.0 - (z / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -7.6e+128) or not (y <= 2.45e+153): tmp = y * (1.0 - (z / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -7.6e+128) || !(y <= 2.45e+153)) 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 <= -7.6e+128) || ~((y <= 2.45e+153))) 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, -7.6e+128], N[Not[LessEqual[y, 2.45e+153]], $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 -7.6 \cdot 10^{+128} \lor \neg \left(y \leq 2.45 \cdot 10^{+153}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if y < -7.5999999999999998e128 or 2.45000000000000001e153 < y Initial program 53.7%
Taylor expanded in t around 0 59.1%
associate-/l*72.1%
Simplified72.1%
Taylor expanded in y around inf 61.4%
if -7.5999999999999998e128 < y < 2.45000000000000001e153Initial program 84.9%
Taylor expanded in a around inf 71.8%
+-commutative71.8%
Simplified71.8%
Final simplification68.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.4e+219) (* z (/ y (- t a))) (if (<= z 3.5e+171) (+ x y) (* y (/ z (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.4e+219) {
tmp = z * (y / (t - a));
} else if (z <= 3.5e+171) {
tmp = x + y;
} else {
tmp = y * (z / (t - a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.4d+219)) then
tmp = z * (y / (t - a))
else if (z <= 3.5d+171) then
tmp = x + y
else
tmp = y * (z / (t - a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.4e+219) {
tmp = z * (y / (t - a));
} else if (z <= 3.5e+171) {
tmp = x + y;
} else {
tmp = y * (z / (t - a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.4e+219: tmp = z * (y / (t - a)) elif z <= 3.5e+171: tmp = x + y else: tmp = y * (z / (t - a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.4e+219) tmp = Float64(z * Float64(y / Float64(t - a))); elseif (z <= 3.5e+171) tmp = Float64(x + y); else tmp = Float64(y * Float64(z / Float64(t - a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.4e+219) tmp = z * (y / (t - a)); elseif (z <= 3.5e+171) tmp = x + y; else tmp = y * (z / (t - a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.4e+219], N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+171], N[(x + y), $MachinePrecision], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+219}:\\
\;\;\;\;z \cdot \frac{y}{t - a}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+171}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\end{array}
\end{array}
if z < -1.40000000000000008e219Initial program 78.7%
Taylor expanded in z around inf 52.0%
mul-1-neg52.0%
distribute-neg-frac252.0%
sub-neg52.0%
distribute-neg-in52.0%
remove-double-neg52.0%
+-commutative52.0%
sub-neg52.0%
Simplified52.0%
associate-/l*61.5%
Applied egg-rr61.5%
associate-*r/52.0%
*-commutative52.0%
associate-*r/61.7%
Simplified61.7%
if -1.40000000000000008e219 < z < 3.4999999999999999e171Initial program 73.6%
Taylor expanded in a around inf 72.2%
+-commutative72.2%
Simplified72.2%
if 3.4999999999999999e171 < z Initial program 85.7%
sub-neg85.7%
+-commutative85.7%
distribute-frac-neg85.7%
distribute-rgt-neg-out85.7%
associate-/l*91.9%
fma-define92.0%
distribute-frac-neg92.0%
distribute-neg-frac292.0%
sub-neg92.0%
distribute-neg-in92.0%
remove-double-neg92.0%
+-commutative92.0%
sub-neg92.0%
Simplified92.0%
Taylor expanded in y around inf 90.9%
Taylor expanded in z around inf 69.4%
sub-neg69.4%
+-commutative69.4%
remove-double-neg69.4%
distribute-neg-out69.4%
sub-neg69.4%
distribute-frac-neg269.4%
associate-*r/77.3%
*-commutative77.3%
distribute-lft-neg-in77.3%
distribute-neg-frac277.3%
sub-neg77.3%
distribute-neg-out77.3%
remove-double-neg77.3%
+-commutative77.3%
sub-neg77.3%
Simplified77.3%
Final simplification71.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -6e+188) (* (/ z a) (- y)) (if (<= z 8.8e+213) (+ x y) (* y (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6e+188) {
tmp = (z / a) * -y;
} else if (z <= 8.8e+213) {
tmp = x + y;
} else {
tmp = y * (z / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6d+188)) then
tmp = (z / a) * -y
else if (z <= 8.8d+213) then
tmp = x + y
else
tmp = y * (z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6e+188) {
tmp = (z / a) * -y;
} else if (z <= 8.8e+213) {
tmp = x + y;
} else {
tmp = y * (z / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6e+188: tmp = (z / a) * -y elif z <= 8.8e+213: tmp = x + y else: tmp = y * (z / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6e+188) tmp = Float64(Float64(z / a) * Float64(-y)); elseif (z <= 8.8e+213) tmp = Float64(x + y); else tmp = Float64(y * Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6e+188) tmp = (z / a) * -y; elseif (z <= 8.8e+213) tmp = x + y; else tmp = y * (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6e+188], N[(N[(z / a), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[z, 8.8e+213], N[(x + y), $MachinePrecision], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+188}:\\
\;\;\;\;\frac{z}{a} \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{+213}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if z < -6.0000000000000001e188Initial program 78.4%
Taylor expanded in z around inf 75.9%
associate-/l*82.6%
Simplified82.6%
Taylor expanded in z around inf 48.5%
associate-*r/59.9%
neg-mul-159.9%
distribute-rgt-neg-in59.9%
distribute-neg-frac259.9%
Simplified59.9%
Taylor expanded in a around inf 45.1%
mul-1-neg45.1%
associate-/l*51.5%
distribute-lft-neg-in51.5%
Simplified51.5%
if -6.0000000000000001e188 < z < 8.7999999999999995e213Initial program 73.5%
Taylor expanded in a around inf 70.3%
+-commutative70.3%
Simplified70.3%
if 8.7999999999999995e213 < z Initial program 92.1%
Taylor expanded in z around inf 92.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 79.7%
associate-*r/87.5%
neg-mul-187.5%
distribute-rgt-neg-in87.5%
distribute-neg-frac287.5%
Simplified87.5%
Taylor expanded in a around 0 60.6%
Final simplification67.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7.5e-65) (not (<= a 2.35e-29))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.5e-65) || !(a <= 2.35e-29)) {
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 <= (-7.5d-65)) .or. (.not. (a <= 2.35d-29))) 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 <= -7.5e-65) || !(a <= 2.35e-29)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7.5e-65) or not (a <= 2.35e-29): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7.5e-65) || !(a <= 2.35e-29)) 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 <= -7.5e-65) || ~((a <= 2.35e-29))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.5e-65], N[Not[LessEqual[a, 2.35e-29]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{-65} \lor \neg \left(a \leq 2.35 \cdot 10^{-29}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -7.5000000000000002e-65 or 2.3499999999999999e-29 < a Initial program 75.8%
Taylor expanded in a around inf 72.3%
+-commutative72.3%
Simplified72.3%
if -7.5000000000000002e-65 < a < 2.3499999999999999e-29Initial program 75.6%
Taylor expanded in x around inf 54.6%
Final simplification65.8%
(FPCore (x y z t a) :precision binary64 (if (<= z 1.85e+214) (+ x y) (* y (/ z t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 1.85e+214) {
tmp = x + y;
} else {
tmp = y * (z / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= 1.85d+214) then
tmp = x + y
else
tmp = y * (z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 1.85e+214) {
tmp = x + y;
} else {
tmp = y * (z / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= 1.85e+214: tmp = x + y else: tmp = y * (z / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= 1.85e+214) tmp = Float64(x + y); else tmp = Float64(y * Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= 1.85e+214) tmp = x + y; else tmp = y * (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 1.85e+214], N[(x + y), $MachinePrecision], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.85 \cdot 10^{+214}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if z < 1.8499999999999999e214Initial program 74.1%
Taylor expanded in a around inf 65.9%
+-commutative65.9%
Simplified65.9%
if 1.8499999999999999e214 < z Initial program 92.1%
Taylor expanded in z around inf 92.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 79.7%
associate-*r/87.5%
neg-mul-187.5%
distribute-rgt-neg-in87.5%
distribute-neg-frac287.5%
Simplified87.5%
Taylor expanded in a around 0 60.6%
Final simplification65.4%
(FPCore (x y z t a) :precision binary64 (if (<= y 6e+70) x y))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 6e+70) {
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 <= 6d+70) 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 <= 6e+70) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 6e+70: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 6e+70) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 6e+70) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 6e+70], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6 \cdot 10^{+70}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 5.99999999999999952e70Initial program 78.5%
Taylor expanded in x around inf 61.7%
if 5.99999999999999952e70 < y Initial program 63.8%
Taylor expanded in a around inf 49.4%
+-commutative49.4%
Simplified49.4%
Taylor expanded in y around inf 36.2%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 75.7%
Taylor expanded in x around inf 53.5%
(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 2024116
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:alt
(! :herbie-platform default (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -13664970889390727/100000000000000000000000) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 14754293444577233/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)))))
(- (+ x y) (/ (* (- z t) y) (- a t))))