
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / a);
}
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)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / a);
}
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)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- z t))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+243)))
(+ x (* y (/ (- z t) a)))
(+ x (/ t_1 a)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+243)) {
tmp = x + (y * ((z - t) / a));
} else {
tmp = x + (t_1 / a);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e+243)) {
tmp = x + (y * ((z - t) / a));
} else {
tmp = x + (t_1 / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z - t) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 5e+243): tmp = x + (y * ((z - t) / a)) else: tmp = x + (t_1 / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z - t)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+243)) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); else tmp = Float64(x + Float64(t_1 / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z - t); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 5e+243))) tmp = x + (y * ((z - t) / a)); else tmp = x + (t_1 / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+243]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 5 \cdot 10^{+243}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t_1}{a}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -inf.0 or 5.00000000000000037e243 < (*.f64 y (-.f64 z t)) Initial program 67.8%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
associate-/r/99.9%
clear-num99.9%
Applied egg-rr99.9%
if -inf.0 < (*.f64 y (-.f64 z t)) < 5.00000000000000037e243Initial program 99.6%
Final simplification99.6%
(FPCore (x y z t a) :precision binary64 (fma (/ y a) (- z t) x))
double code(double x, double y, double z, double t, double a) {
return fma((y / a), (z - t), x);
}
function code(x, y, z, t, a) return fma(Float64(y / a), Float64(z - t), x) end
code[x_, y_, z_, t_, a_] := N[(N[(y / a), $MachinePrecision] * N[(z - t), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{y}{a}, z - t, x\right)
\end{array}
Initial program 91.9%
+-commutative91.9%
associate-*l/96.9%
fma-def97.0%
Simplified97.0%
Final simplification97.0%
(FPCore (x y z t a)
:precision binary64
(if (or (<= y -2.9e-48)
(not
(or (<= y 1.7e-261)
(and (not (<= y 2.9e-161))
(or (<= y 1.05e-152)
(and (not (<= y 2.1e-38)) (<= y 1.8)))))))
(* (/ y a) (- z t))
x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.9e-48) || !((y <= 1.7e-261) || (!(y <= 2.9e-161) && ((y <= 1.05e-152) || (!(y <= 2.1e-38) && (y <= 1.8)))))) {
tmp = (y / a) * (z - t);
} 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 ((y <= (-2.9d-48)) .or. (.not. (y <= 1.7d-261) .or. (.not. (y <= 2.9d-161)) .and. (y <= 1.05d-152) .or. (.not. (y <= 2.1d-38)) .and. (y <= 1.8d0))) then
tmp = (y / a) * (z - t)
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 ((y <= -2.9e-48) || !((y <= 1.7e-261) || (!(y <= 2.9e-161) && ((y <= 1.05e-152) || (!(y <= 2.1e-38) && (y <= 1.8)))))) {
tmp = (y / a) * (z - t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.9e-48) or not ((y <= 1.7e-261) or (not (y <= 2.9e-161) and ((y <= 1.05e-152) or (not (y <= 2.1e-38) and (y <= 1.8))))): tmp = (y / a) * (z - t) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.9e-48) || !((y <= 1.7e-261) || (!(y <= 2.9e-161) && ((y <= 1.05e-152) || (!(y <= 2.1e-38) && (y <= 1.8)))))) tmp = Float64(Float64(y / a) * Float64(z - t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.9e-48) || ~(((y <= 1.7e-261) || (~((y <= 2.9e-161)) && ((y <= 1.05e-152) || (~((y <= 2.1e-38)) && (y <= 1.8))))))) tmp = (y / a) * (z - t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.9e-48], N[Not[Or[LessEqual[y, 1.7e-261], And[N[Not[LessEqual[y, 2.9e-161]], $MachinePrecision], Or[LessEqual[y, 1.05e-152], And[N[Not[LessEqual[y, 2.1e-38]], $MachinePrecision], LessEqual[y, 1.8]]]]]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{-48} \lor \neg \left(y \leq 1.7 \cdot 10^{-261} \lor \neg \left(y \leq 2.9 \cdot 10^{-161}\right) \land \left(y \leq 1.05 \cdot 10^{-152} \lor \neg \left(y \leq 2.1 \cdot 10^{-38}\right) \land y \leq 1.8\right)\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(z - t\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.9000000000000003e-48 or 1.7e-261 < y < 2.9e-161 or 1.04999999999999999e-152 < y < 2.10000000000000013e-38 or 1.80000000000000004 < y Initial program 88.7%
associate-/l*94.7%
Simplified94.7%
associate-/l*88.7%
+-commutative88.7%
div-inv88.6%
div-inv88.7%
*-commutative88.7%
associate-*l/95.2%
fma-def95.2%
Applied egg-rr95.2%
Taylor expanded in a around 0 67.7%
*-commutative67.7%
associate-*r/73.3%
Simplified73.3%
if -2.9000000000000003e-48 < y < 1.7e-261 or 2.9e-161 < y < 1.04999999999999999e-152 or 2.10000000000000013e-38 < y < 1.80000000000000004Initial program 99.9%
associate-/l*88.3%
Simplified88.3%
Taylor expanded in x around inf 77.4%
Final simplification74.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- (/ t a)))))
(if (<= t -6.6e+136)
t_1
(if (<= t 1.55e-249)
x
(if (<= t 6.5e-172)
(* y (/ z a))
(if (<= t 3.1e-125) x (if (<= t 6.8e-13) (* (/ y a) z) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * -(t / a);
double tmp;
if (t <= -6.6e+136) {
tmp = t_1;
} else if (t <= 1.55e-249) {
tmp = x;
} else if (t <= 6.5e-172) {
tmp = y * (z / a);
} else if (t <= 3.1e-125) {
tmp = x;
} else if (t <= 6.8e-13) {
tmp = (y / a) * z;
} 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 = y * -(t / a)
if (t <= (-6.6d+136)) then
tmp = t_1
else if (t <= 1.55d-249) then
tmp = x
else if (t <= 6.5d-172) then
tmp = y * (z / a)
else if (t <= 3.1d-125) then
tmp = x
else if (t <= 6.8d-13) then
tmp = (y / a) * z
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 * -(t / a);
double tmp;
if (t <= -6.6e+136) {
tmp = t_1;
} else if (t <= 1.55e-249) {
tmp = x;
} else if (t <= 6.5e-172) {
tmp = y * (z / a);
} else if (t <= 3.1e-125) {
tmp = x;
} else if (t <= 6.8e-13) {
tmp = (y / a) * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * -(t / a) tmp = 0 if t <= -6.6e+136: tmp = t_1 elif t <= 1.55e-249: tmp = x elif t <= 6.5e-172: tmp = y * (z / a) elif t <= 3.1e-125: tmp = x elif t <= 6.8e-13: tmp = (y / a) * z else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(-Float64(t / a))) tmp = 0.0 if (t <= -6.6e+136) tmp = t_1; elseif (t <= 1.55e-249) tmp = x; elseif (t <= 6.5e-172) tmp = Float64(y * Float64(z / a)); elseif (t <= 3.1e-125) tmp = x; elseif (t <= 6.8e-13) tmp = Float64(Float64(y / a) * z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * -(t / a); tmp = 0.0; if (t <= -6.6e+136) tmp = t_1; elseif (t <= 1.55e-249) tmp = x; elseif (t <= 6.5e-172) tmp = y * (z / a); elseif (t <= 3.1e-125) tmp = x; elseif (t <= 6.8e-13) tmp = (y / a) * z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * (-N[(t / a), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[t, -6.6e+136], t$95$1, If[LessEqual[t, 1.55e-249], x, If[LessEqual[t, 6.5e-172], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e-125], x, If[LessEqual[t, 6.8e-13], N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-\frac{t}{a}\right)\\
\mathbf{if}\;t \leq -6.6 \cdot 10^{+136}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-249}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-172}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{-125}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-13}:\\
\;\;\;\;\frac{y}{a} \cdot z\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -6.59999999999999984e136 or 6.80000000000000031e-13 < t Initial program 86.9%
associate-/l*92.9%
Simplified92.9%
associate-/l*86.9%
+-commutative86.9%
div-inv86.8%
div-inv86.9%
*-commutative86.9%
associate-*l/92.9%
fma-def92.9%
Applied egg-rr92.9%
Taylor expanded in t around inf 56.9%
mul-1-neg56.9%
associate-*l/61.8%
Simplified61.8%
if -6.59999999999999984e136 < t < 1.54999999999999993e-249 or 6.50000000000000012e-172 < t < 3.10000000000000013e-125Initial program 97.3%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in x around inf 52.3%
if 1.54999999999999993e-249 < t < 6.50000000000000012e-172Initial program 85.4%
associate-/l*99.9%
Simplified99.9%
associate-/l*85.4%
+-commutative85.4%
div-inv85.4%
div-inv85.4%
*-commutative85.4%
associate-*l/99.8%
fma-def99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 55.7%
associate-*r/70.0%
Simplified70.0%
if 3.10000000000000013e-125 < t < 6.80000000000000031e-13Initial program 89.7%
associate-/l*88.5%
Simplified88.5%
associate-/l*89.7%
+-commutative89.7%
div-inv89.5%
div-inv89.7%
*-commutative89.7%
associate-*l/88.4%
fma-def88.4%
Applied egg-rr88.4%
Taylor expanded in z around inf 50.5%
associate-/l*53.7%
associate-/r/62.0%
Applied egg-rr62.0%
Final simplification58.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.16e+138)
(/ (- y) (/ a t))
(if (<= t 2.2e-245)
x
(if (<= t 1.4e-173)
(* y (/ z a))
(if (<= t 1.35e-130)
x
(if (<= t 6e-13) (* (/ y a) z) (* y (- (/ t a)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.16e+138) {
tmp = -y / (a / t);
} else if (t <= 2.2e-245) {
tmp = x;
} else if (t <= 1.4e-173) {
tmp = y * (z / a);
} else if (t <= 1.35e-130) {
tmp = x;
} else if (t <= 6e-13) {
tmp = (y / a) * z;
} else {
tmp = y * -(t / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.16d+138)) then
tmp = -y / (a / t)
else if (t <= 2.2d-245) then
tmp = x
else if (t <= 1.4d-173) then
tmp = y * (z / a)
else if (t <= 1.35d-130) then
tmp = x
else if (t <= 6d-13) then
tmp = (y / a) * z
else
tmp = y * -(t / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.16e+138) {
tmp = -y / (a / t);
} else if (t <= 2.2e-245) {
tmp = x;
} else if (t <= 1.4e-173) {
tmp = y * (z / a);
} else if (t <= 1.35e-130) {
tmp = x;
} else if (t <= 6e-13) {
tmp = (y / a) * z;
} else {
tmp = y * -(t / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.16e+138: tmp = -y / (a / t) elif t <= 2.2e-245: tmp = x elif t <= 1.4e-173: tmp = y * (z / a) elif t <= 1.35e-130: tmp = x elif t <= 6e-13: tmp = (y / a) * z else: tmp = y * -(t / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.16e+138) tmp = Float64(Float64(-y) / Float64(a / t)); elseif (t <= 2.2e-245) tmp = x; elseif (t <= 1.4e-173) tmp = Float64(y * Float64(z / a)); elseif (t <= 1.35e-130) tmp = x; elseif (t <= 6e-13) tmp = Float64(Float64(y / a) * z); else tmp = Float64(y * Float64(-Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.16e+138) tmp = -y / (a / t); elseif (t <= 2.2e-245) tmp = x; elseif (t <= 1.4e-173) tmp = y * (z / a); elseif (t <= 1.35e-130) tmp = x; elseif (t <= 6e-13) tmp = (y / a) * z; else tmp = y * -(t / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.16e+138], N[((-y) / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e-245], x, If[LessEqual[t, 1.4e-173], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-130], x, If[LessEqual[t, 6e-13], N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision], N[(y * (-N[(t / a), $MachinePrecision])), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.16 \cdot 10^{+138}:\\
\;\;\;\;\frac{-y}{\frac{a}{t}}\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-245}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-173}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-130}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-13}:\\
\;\;\;\;\frac{y}{a} \cdot z\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-\frac{t}{a}\right)\\
\end{array}
\end{array}
if t < -1.15999999999999994e138Initial program 84.3%
associate-/l*95.7%
Simplified95.7%
associate-/l*84.3%
+-commutative84.3%
div-inv84.2%
div-inv84.3%
*-commutative84.3%
associate-*l/95.6%
fma-def95.6%
Applied egg-rr95.6%
Taylor expanded in t around inf 63.2%
mul-1-neg63.2%
associate-*l/74.9%
Simplified74.9%
*-commutative74.9%
clear-num74.8%
un-div-inv74.9%
Applied egg-rr74.9%
if -1.15999999999999994e138 < t < 2.19999999999999993e-245 or 1.39999999999999995e-173 < t < 1.34999999999999996e-130Initial program 97.3%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in x around inf 52.3%
if 2.19999999999999993e-245 < t < 1.39999999999999995e-173Initial program 85.4%
associate-/l*99.9%
Simplified99.9%
associate-/l*85.4%
+-commutative85.4%
div-inv85.4%
div-inv85.4%
*-commutative85.4%
associate-*l/99.8%
fma-def99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 55.7%
associate-*r/70.0%
Simplified70.0%
if 1.34999999999999996e-130 < t < 5.99999999999999968e-13Initial program 89.7%
associate-/l*88.5%
Simplified88.5%
associate-/l*89.7%
+-commutative89.7%
div-inv89.5%
div-inv89.7%
*-commutative89.7%
associate-*l/88.4%
fma-def88.4%
Applied egg-rr88.4%
Taylor expanded in z around inf 50.5%
associate-/l*53.7%
associate-/r/62.0%
Applied egg-rr62.0%
if 5.99999999999999968e-13 < t Initial program 87.8%
associate-/l*92.0%
Simplified92.0%
associate-/l*87.8%
+-commutative87.8%
div-inv87.6%
div-inv87.8%
*-commutative87.8%
associate-*l/92.0%
fma-def92.0%
Applied egg-rr92.0%
Taylor expanded in t around inf 54.8%
mul-1-neg54.8%
associate-*l/57.4%
Simplified57.4%
Final simplification58.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -5.5e+136)
(/ (- y) (/ a t))
(if (<= t 1.3e-246)
x
(if (<= t 2.6e-173)
(* y (/ z a))
(if (<= t 6.8e-131)
x
(if (<= t 3.9e-12) (* (/ y a) z) (* (/ y a) (- t))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.5e+136) {
tmp = -y / (a / t);
} else if (t <= 1.3e-246) {
tmp = x;
} else if (t <= 2.6e-173) {
tmp = y * (z / a);
} else if (t <= 6.8e-131) {
tmp = x;
} else if (t <= 3.9e-12) {
tmp = (y / a) * z;
} else {
tmp = (y / a) * -t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-5.5d+136)) then
tmp = -y / (a / t)
else if (t <= 1.3d-246) then
tmp = x
else if (t <= 2.6d-173) then
tmp = y * (z / a)
else if (t <= 6.8d-131) then
tmp = x
else if (t <= 3.9d-12) then
tmp = (y / a) * z
else
tmp = (y / a) * -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.5e+136) {
tmp = -y / (a / t);
} else if (t <= 1.3e-246) {
tmp = x;
} else if (t <= 2.6e-173) {
tmp = y * (z / a);
} else if (t <= 6.8e-131) {
tmp = x;
} else if (t <= 3.9e-12) {
tmp = (y / a) * z;
} else {
tmp = (y / a) * -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.5e+136: tmp = -y / (a / t) elif t <= 1.3e-246: tmp = x elif t <= 2.6e-173: tmp = y * (z / a) elif t <= 6.8e-131: tmp = x elif t <= 3.9e-12: tmp = (y / a) * z else: tmp = (y / a) * -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.5e+136) tmp = Float64(Float64(-y) / Float64(a / t)); elseif (t <= 1.3e-246) tmp = x; elseif (t <= 2.6e-173) tmp = Float64(y * Float64(z / a)); elseif (t <= 6.8e-131) tmp = x; elseif (t <= 3.9e-12) tmp = Float64(Float64(y / a) * z); else tmp = Float64(Float64(y / a) * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.5e+136) tmp = -y / (a / t); elseif (t <= 1.3e-246) tmp = x; elseif (t <= 2.6e-173) tmp = y * (z / a); elseif (t <= 6.8e-131) tmp = x; elseif (t <= 3.9e-12) tmp = (y / a) * z; else tmp = (y / a) * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.5e+136], N[((-y) / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e-246], x, If[LessEqual[t, 2.6e-173], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e-131], x, If[LessEqual[t, 3.9e-12], N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * (-t)), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{+136}:\\
\;\;\;\;\frac{-y}{\frac{a}{t}}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-246}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-173}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-131}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-12}:\\
\;\;\;\;\frac{y}{a} \cdot z\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot \left(-t\right)\\
\end{array}
\end{array}
if t < -5.50000000000000039e136Initial program 84.3%
associate-/l*95.7%
Simplified95.7%
associate-/l*84.3%
+-commutative84.3%
div-inv84.2%
div-inv84.3%
*-commutative84.3%
associate-*l/95.6%
fma-def95.6%
Applied egg-rr95.6%
Taylor expanded in t around inf 63.2%
mul-1-neg63.2%
associate-*l/74.9%
Simplified74.9%
*-commutative74.9%
clear-num74.8%
un-div-inv74.9%
Applied egg-rr74.9%
if -5.50000000000000039e136 < t < 1.2999999999999999e-246 or 2.60000000000000003e-173 < t < 6.7999999999999999e-131Initial program 97.3%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in x around inf 52.3%
if 1.2999999999999999e-246 < t < 2.60000000000000003e-173Initial program 85.4%
associate-/l*99.9%
Simplified99.9%
associate-/l*85.4%
+-commutative85.4%
div-inv85.4%
div-inv85.4%
*-commutative85.4%
associate-*l/99.8%
fma-def99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 55.7%
associate-*r/70.0%
Simplified70.0%
if 6.7999999999999999e-131 < t < 3.89999999999999994e-12Initial program 89.7%
associate-/l*88.5%
Simplified88.5%
associate-/l*89.7%
+-commutative89.7%
div-inv89.5%
div-inv89.7%
*-commutative89.7%
associate-*l/88.4%
fma-def88.4%
Applied egg-rr88.4%
Taylor expanded in z around inf 50.5%
associate-/l*53.7%
associate-/r/62.0%
Applied egg-rr62.0%
if 3.89999999999999994e-12 < t Initial program 87.8%
associate-/l*92.0%
Simplified92.0%
associate-/l*87.8%
+-commutative87.8%
div-inv87.6%
div-inv87.8%
*-commutative87.8%
associate-*l/92.0%
fma-def92.0%
Applied egg-rr92.0%
Taylor expanded in t around inf 54.8%
associate-*r/59.9%
neg-mul-159.9%
distribute-rgt-neg-in59.9%
Simplified59.9%
Final simplification58.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -9.5e+112)
x
(if (<= a -1.45e+47)
(* y (/ z a))
(if (<= a -2.55e-23) x (if (<= a 2.6e-66) (* (/ y a) z) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.5e+112) {
tmp = x;
} else if (a <= -1.45e+47) {
tmp = y * (z / a);
} else if (a <= -2.55e-23) {
tmp = x;
} else if (a <= 2.6e-66) {
tmp = (y / a) * z;
} 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 <= (-9.5d+112)) then
tmp = x
else if (a <= (-1.45d+47)) then
tmp = y * (z / a)
else if (a <= (-2.55d-23)) then
tmp = x
else if (a <= 2.6d-66) then
tmp = (y / a) * z
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 <= -9.5e+112) {
tmp = x;
} else if (a <= -1.45e+47) {
tmp = y * (z / a);
} else if (a <= -2.55e-23) {
tmp = x;
} else if (a <= 2.6e-66) {
tmp = (y / a) * z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9.5e+112: tmp = x elif a <= -1.45e+47: tmp = y * (z / a) elif a <= -2.55e-23: tmp = x elif a <= 2.6e-66: tmp = (y / a) * z else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.5e+112) tmp = x; elseif (a <= -1.45e+47) tmp = Float64(y * Float64(z / a)); elseif (a <= -2.55e-23) tmp = x; elseif (a <= 2.6e-66) tmp = Float64(Float64(y / a) * z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -9.5e+112) tmp = x; elseif (a <= -1.45e+47) tmp = y * (z / a); elseif (a <= -2.55e-23) tmp = x; elseif (a <= 2.6e-66) tmp = (y / a) * z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.5e+112], x, If[LessEqual[a, -1.45e+47], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.55e-23], x, If[LessEqual[a, 2.6e-66], N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.5 \cdot 10^{+112}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.45 \cdot 10^{+47}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;a \leq -2.55 \cdot 10^{-23}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{-66}:\\
\;\;\;\;\frac{y}{a} \cdot z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -9.5000000000000008e112 or -1.4499999999999999e47 < a < -2.55000000000000005e-23 or 2.5999999999999999e-66 < a Initial program 87.1%
associate-/l*98.5%
Simplified98.5%
Taylor expanded in x around inf 56.9%
if -9.5000000000000008e112 < a < -1.4499999999999999e47Initial program 84.2%
associate-/l*99.5%
Simplified99.5%
associate-/l*84.2%
+-commutative84.2%
div-inv84.0%
div-inv84.2%
*-commutative84.2%
associate-*l/99.9%
fma-def99.9%
Applied egg-rr99.9%
Taylor expanded in z around inf 43.0%
associate-*r/50.8%
Simplified50.8%
if -2.55000000000000005e-23 < a < 2.5999999999999999e-66Initial program 99.3%
associate-/l*84.5%
Simplified84.5%
associate-/l*99.3%
+-commutative99.3%
div-inv99.2%
div-inv99.3%
*-commutative99.3%
associate-*l/84.4%
fma-def84.4%
Applied egg-rr84.4%
Taylor expanded in z around inf 50.4%
associate-/l*43.0%
associate-/r/52.4%
Applied egg-rr52.4%
Final simplification54.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.2e+118) (not (<= t 4.1e-13))) (- x (* y (/ t a))) (+ x (* (/ y a) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.2e+118) || !(t <= 4.1e-13)) {
tmp = x - (y * (t / a));
} else {
tmp = x + ((y / a) * 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.2d+118)) .or. (.not. (t <= 4.1d-13))) then
tmp = x - (y * (t / a))
else
tmp = x + ((y / a) * 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.2e+118) || !(t <= 4.1e-13)) {
tmp = x - (y * (t / a));
} else {
tmp = x + ((y / a) * z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.2e+118) or not (t <= 4.1e-13): tmp = x - (y * (t / a)) else: tmp = x + ((y / a) * z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.2e+118) || !(t <= 4.1e-13)) tmp = Float64(x - Float64(y * Float64(t / a))); else tmp = Float64(x + Float64(Float64(y / a) * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.2e+118) || ~((t <= 4.1e-13))) tmp = x - (y * (t / a)); else tmp = x + ((y / a) * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.2e+118], N[Not[LessEqual[t, 4.1e-13]], $MachinePrecision]], N[(x - N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+118} \lor \neg \left(t \leq 4.1 \cdot 10^{-13}\right):\\
\;\;\;\;x - y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{a} \cdot z\\
\end{array}
\end{array}
if t < -1.2e118 or 4.1000000000000002e-13 < t Initial program 86.6%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in z around 0 81.7%
associate-*r/89.4%
associate-*r*89.4%
neg-mul-189.4%
cancel-sign-sub-inv89.4%
associate-*r/81.7%
associate-/l*88.5%
associate-/r/87.2%
Simplified87.2%
if -1.2e118 < t < 4.1000000000000002e-13Initial program 95.3%
associate-/l*92.6%
Simplified92.6%
Taylor expanded in t around 0 86.0%
+-commutative86.0%
associate-*l/89.7%
*-commutative89.7%
Simplified89.7%
Final simplification88.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.05e+118) (not (<= t 4.6e-12))) (- x (/ y (/ a t))) (+ x (* (/ y a) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.05e+118) || !(t <= 4.6e-12)) {
tmp = x - (y / (a / t));
} else {
tmp = x + ((y / a) * 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.05d+118)) .or. (.not. (t <= 4.6d-12))) then
tmp = x - (y / (a / t))
else
tmp = x + ((y / a) * 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.05e+118) || !(t <= 4.6e-12)) {
tmp = x - (y / (a / t));
} else {
tmp = x + ((y / a) * z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.05e+118) or not (t <= 4.6e-12): tmp = x - (y / (a / t)) else: tmp = x + ((y / a) * z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.05e+118) || !(t <= 4.6e-12)) tmp = Float64(x - Float64(y / Float64(a / t))); else tmp = Float64(x + Float64(Float64(y / a) * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.05e+118) || ~((t <= 4.6e-12))) tmp = x - (y / (a / t)); else tmp = x + ((y / a) * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.05e+118], N[Not[LessEqual[t, 4.6e-12]], $MachinePrecision]], N[(x - N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+118} \lor \neg \left(t \leq 4.6 \cdot 10^{-12}\right):\\
\;\;\;\;x - \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{a} \cdot z\\
\end{array}
\end{array}
if t < -1.05e118 or 4.59999999999999979e-12 < t Initial program 86.6%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in z around 0 81.7%
associate-*r/89.4%
associate-*r*89.4%
neg-mul-189.4%
cancel-sign-sub-inv89.4%
associate-*r/81.7%
associate-/l*88.5%
associate-/r/87.2%
Simplified87.2%
*-commutative60.8%
clear-num60.7%
un-div-inv60.8%
Applied egg-rr87.3%
if -1.05e118 < t < 4.59999999999999979e-12Initial program 95.3%
associate-/l*92.6%
Simplified92.6%
Taylor expanded in t around 0 86.0%
+-commutative86.0%
associate-*l/89.7%
*-commutative89.7%
Simplified89.7%
Final simplification88.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.1e+118) (not (<= t 2.35e-12))) (- x (* (/ y a) t)) (+ x (* (/ y a) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.1e+118) || !(t <= 2.35e-12)) {
tmp = x - ((y / a) * t);
} else {
tmp = x + ((y / a) * 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.1d+118)) .or. (.not. (t <= 2.35d-12))) then
tmp = x - ((y / a) * t)
else
tmp = x + ((y / a) * 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.1e+118) || !(t <= 2.35e-12)) {
tmp = x - ((y / a) * t);
} else {
tmp = x + ((y / a) * z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.1e+118) or not (t <= 2.35e-12): tmp = x - ((y / a) * t) else: tmp = x + ((y / a) * z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.1e+118) || !(t <= 2.35e-12)) tmp = Float64(x - Float64(Float64(y / a) * t)); else tmp = Float64(x + Float64(Float64(y / a) * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.1e+118) || ~((t <= 2.35e-12))) tmp = x - ((y / a) * t); else tmp = x + ((y / a) * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.1e+118], N[Not[LessEqual[t, 2.35e-12]], $MachinePrecision]], N[(x - N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{+118} \lor \neg \left(t \leq 2.35 \cdot 10^{-12}\right):\\
\;\;\;\;x - \frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{a} \cdot z\\
\end{array}
\end{array}
if t < -1.09999999999999993e118 or 2.34999999999999988e-12 < t Initial program 86.6%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in z around 0 81.7%
associate-*r/89.4%
neg-mul-189.4%
distribute-rgt-neg-in89.4%
distribute-neg-frac89.4%
Simplified89.4%
if -1.09999999999999993e118 < t < 2.34999999999999988e-12Initial program 95.3%
associate-/l*92.6%
Simplified92.6%
Taylor expanded in t around 0 86.0%
+-commutative86.0%
associate-*l/89.7%
*-commutative89.7%
Simplified89.7%
Final simplification89.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.7e+151) (/ (- y) (/ a t)) (if (<= t 3.45e-102) (+ x (/ (* y z) a)) (* (/ y a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.7e+151) {
tmp = -y / (a / t);
} else if (t <= 3.45e-102) {
tmp = x + ((y * z) / a);
} else {
tmp = (y / a) * (z - t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-4.7d+151)) then
tmp = -y / (a / t)
else if (t <= 3.45d-102) then
tmp = x + ((y * z) / a)
else
tmp = (y / a) * (z - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.7e+151) {
tmp = -y / (a / t);
} else if (t <= 3.45e-102) {
tmp = x + ((y * z) / a);
} else {
tmp = (y / a) * (z - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.7e+151: tmp = -y / (a / t) elif t <= 3.45e-102: tmp = x + ((y * z) / a) else: tmp = (y / a) * (z - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.7e+151) tmp = Float64(Float64(-y) / Float64(a / t)); elseif (t <= 3.45e-102) tmp = Float64(x + Float64(Float64(y * z) / a)); else tmp = Float64(Float64(y / a) * Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.7e+151) tmp = -y / (a / t); elseif (t <= 3.45e-102) tmp = x + ((y * z) / a); else tmp = (y / a) * (z - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.7e+151], N[((-y) / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.45e-102], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.7 \cdot 10^{+151}:\\
\;\;\;\;\frac{-y}{\frac{a}{t}}\\
\mathbf{elif}\;t \leq 3.45 \cdot 10^{-102}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot \left(z - t\right)\\
\end{array}
\end{array}
if t < -4.69999999999999989e151Initial program 83.6%
associate-/l*95.5%
Simplified95.5%
associate-/l*83.6%
+-commutative83.6%
div-inv83.6%
div-inv83.6%
*-commutative83.6%
associate-*l/95.4%
fma-def95.4%
Applied egg-rr95.4%
Taylor expanded in t around inf 61.6%
mul-1-neg61.6%
associate-*l/73.8%
Simplified73.8%
*-commutative73.8%
clear-num73.7%
un-div-inv73.8%
Applied egg-rr73.8%
if -4.69999999999999989e151 < t < 3.45e-102Initial program 96.4%
associate-/l*93.1%
Simplified93.1%
Taylor expanded in z around inf 89.1%
if 3.45e-102 < t Initial program 87.0%
associate-/l*91.9%
Simplified91.9%
associate-/l*87.0%
+-commutative87.0%
div-inv86.9%
div-inv87.0%
*-commutative87.0%
associate-*l/91.8%
fma-def91.8%
Applied egg-rr91.8%
Taylor expanded in a around 0 62.3%
*-commutative62.3%
associate-*r/70.1%
Simplified70.1%
Final simplification80.8%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.55e+151) (/ (- y) (/ a t)) (if (<= t 2.1e-16) (+ x (* (/ y a) z)) (* (/ y a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.55e+151) {
tmp = -y / (a / t);
} else if (t <= 2.1e-16) {
tmp = x + ((y / a) * z);
} else {
tmp = (y / a) * (z - t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-2.55d+151)) then
tmp = -y / (a / t)
else if (t <= 2.1d-16) then
tmp = x + ((y / a) * z)
else
tmp = (y / a) * (z - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.55e+151) {
tmp = -y / (a / t);
} else if (t <= 2.1e-16) {
tmp = x + ((y / a) * z);
} else {
tmp = (y / a) * (z - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.55e+151: tmp = -y / (a / t) elif t <= 2.1e-16: tmp = x + ((y / a) * z) else: tmp = (y / a) * (z - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.55e+151) tmp = Float64(Float64(-y) / Float64(a / t)); elseif (t <= 2.1e-16) tmp = Float64(x + Float64(Float64(y / a) * z)); else tmp = Float64(Float64(y / a) * Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.55e+151) tmp = -y / (a / t); elseif (t <= 2.1e-16) tmp = x + ((y / a) * z); else tmp = (y / a) * (z - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.55e+151], N[((-y) / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e-16], N[(x + N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.55 \cdot 10^{+151}:\\
\;\;\;\;\frac{-y}{\frac{a}{t}}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-16}:\\
\;\;\;\;x + \frac{y}{a} \cdot z\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot \left(z - t\right)\\
\end{array}
\end{array}
if t < -2.54999999999999998e151Initial program 83.6%
associate-/l*95.5%
Simplified95.5%
associate-/l*83.6%
+-commutative83.6%
div-inv83.6%
div-inv83.6%
*-commutative83.6%
associate-*l/95.4%
fma-def95.4%
Applied egg-rr95.4%
Taylor expanded in t around inf 61.6%
mul-1-neg61.6%
associate-*l/73.8%
Simplified73.8%
*-commutative73.8%
clear-num73.7%
un-div-inv73.8%
Applied egg-rr73.8%
if -2.54999999999999998e151 < t < 2.1000000000000001e-16Initial program 94.7%
associate-/l*92.8%
Simplified92.8%
Taylor expanded in t around 0 85.7%
+-commutative85.7%
associate-*l/88.7%
*-commutative88.7%
Simplified88.7%
if 2.1000000000000001e-16 < t Initial program 88.3%
associate-/l*92.3%
Simplified92.3%
associate-/l*88.3%
+-commutative88.3%
div-inv88.1%
div-inv88.3%
*-commutative88.3%
associate-*l/92.3%
fma-def92.3%
Applied egg-rr92.3%
Taylor expanded in a around 0 63.6%
*-commutative63.6%
associate-*r/68.8%
Simplified68.8%
Final simplification81.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.36e+70) (not (<= y 1e+96))) (* y (/ z a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.36e+70) || !(y <= 1e+96)) {
tmp = y * (z / a);
} 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 ((y <= (-1.36d+70)) .or. (.not. (y <= 1d+96))) then
tmp = y * (z / a)
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 ((y <= -1.36e+70) || !(y <= 1e+96)) {
tmp = y * (z / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.36e+70) or not (y <= 1e+96): tmp = y * (z / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.36e+70) || !(y <= 1e+96)) tmp = Float64(y * Float64(z / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.36e+70) || ~((y <= 1e+96))) tmp = y * (z / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.36e+70], N[Not[LessEqual[y, 1e+96]], $MachinePrecision]], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.36 \cdot 10^{+70} \lor \neg \left(y \leq 10^{+96}\right):\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.35999999999999995e70 or 1.00000000000000005e96 < y Initial program 82.4%
associate-/l*97.8%
Simplified97.8%
associate-/l*82.4%
+-commutative82.4%
div-inv82.3%
div-inv82.4%
*-commutative82.4%
associate-*l/98.8%
fma-def98.8%
Applied egg-rr98.8%
Taylor expanded in z around inf 44.7%
associate-*r/49.5%
Simplified49.5%
if -1.35999999999999995e70 < y < 1.00000000000000005e96Initial program 97.8%
associate-/l*89.9%
Simplified89.9%
Taylor expanded in x around inf 53.2%
Final simplification51.8%
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) a))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / a));
}
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) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / a));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / a))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / a))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a}
\end{array}
Initial program 91.9%
associate-/l*92.9%
Simplified92.9%
clear-num92.9%
associate-/r/92.9%
clear-num93.2%
Applied egg-rr93.2%
Final simplification93.2%
(FPCore (x y z t a) :precision binary64 (+ x (/ (- z t) (/ a y))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) / (a / y));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((z - t) / (a / y))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) / (a / y));
}
def code(x, y, z, t, a): return x + ((z - t) / (a / y))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) / Float64(a / y))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) / (a / y)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{z - t}{\frac{a}{y}}
\end{array}
Initial program 91.9%
*-commutative91.9%
associate-/l*96.6%
Simplified96.6%
Final simplification96.6%
(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 91.9%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in x around inf 38.5%
Final simplification38.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ a (- z t))))
(if (< y -1.0761266216389975e-10)
(+ x (/ 1.0 (/ t_1 y)))
(if (< y 2.894426862792089e-49)
(+ x (/ (* y (- z t)) a))
(+ x (/ y t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x + (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) / a);
} else {
tmp = x + (y / 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 = a / (z - t)
if (y < (-1.0761266216389975d-10)) then
tmp = x + (1.0d0 / (t_1 / y))
else if (y < 2.894426862792089d-49) then
tmp = x + ((y * (z - t)) / a)
else
tmp = x + (y / 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 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x + (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) / a);
} else {
tmp = x + (y / t_1);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a / (z - t) tmp = 0 if y < -1.0761266216389975e-10: tmp = x + (1.0 / (t_1 / y)) elif y < 2.894426862792089e-49: tmp = x + ((y * (z - t)) / a) else: tmp = x + (y / t_1) return tmp
function code(x, y, z, t, a) t_1 = Float64(a / Float64(z - t)) tmp = 0.0 if (y < -1.0761266216389975e-10) tmp = Float64(x + Float64(1.0 / Float64(t_1 / y))); elseif (y < 2.894426862792089e-49) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / a)); else tmp = Float64(x + Float64(y / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a / (z - t); tmp = 0.0; if (y < -1.0761266216389975e-10) tmp = x + (1.0 / (t_1 / y)); elseif (y < 2.894426862792089e-49) tmp = x + ((y * (z - t)) / a); else tmp = x + (y / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -1.0761266216389975e-10], N[(x + N[(1.0 / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[y, 2.894426862792089e-49], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{z - t}\\
\mathbf{if}\;y < -1.0761266216389975 \cdot 10^{-10}:\\
\;\;\;\;x + \frac{1}{\frac{t_1}{y}}\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{t_1}\\
\end{array}
\end{array}
herbie shell --seed 2024019
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
:precision binary64
:herbie-target
(if (< y -1.0761266216389975e-10) (+ x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (+ x (/ (* y (- z t)) a)) (+ x (/ y (/ a (- z t))))))
(+ x (/ (* y (- z t)) a)))