
(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 14 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 (* (- z t) y)))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+208)))
(+ x (/ y (/ a (- z t))))
(+ x (/ t_1 a)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) * y;
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+208)) {
tmp = x + (y / (a / (z - t)));
} 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 = (z - t) * y;
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+208)) {
tmp = x + (y / (a / (z - t)));
} else {
tmp = x + (t_1 / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) * y tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 2e+208): tmp = x + (y / (a / (z - t))) else: tmp = x + (t_1 / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) * y) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+208)) tmp = Float64(x + Float64(y / Float64(a / Float64(z - t)))); else tmp = Float64(x + Float64(t_1 / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) * y; tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 2e+208))) tmp = x + (y / (a / (z - t))); else tmp = x + (t_1 / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+208]], $MachinePrecision]], N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z - t\right) \cdot y\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 2 \cdot 10^{+208}\right):\\
\;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t_1}{a}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -inf.0 or 2e208 < (*.f64 y (-.f64 z t)) Initial program 71.0%
associate-/l*99.8%
Simplified99.8%
if -inf.0 < (*.f64 y (-.f64 z t)) < 2e208Initial program 99.6%
Final simplification99.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- t) a))))
(if (<= t -8.6e+136)
t_1
(if (<= t 1.8e-245)
x
(if (<= t 1.7e-172)
(/ y (/ a z))
(if (<= t 5.2e-128) x (if (<= t 2.55e-12) (* z (/ y a)) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (-t / a);
double tmp;
if (t <= -8.6e+136) {
tmp = t_1;
} else if (t <= 1.8e-245) {
tmp = x;
} else if (t <= 1.7e-172) {
tmp = y / (a / z);
} else if (t <= 5.2e-128) {
tmp = x;
} else if (t <= 2.55e-12) {
tmp = z * (y / a);
} 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 <= (-8.6d+136)) then
tmp = t_1
else if (t <= 1.8d-245) then
tmp = x
else if (t <= 1.7d-172) then
tmp = y / (a / z)
else if (t <= 5.2d-128) then
tmp = x
else if (t <= 2.55d-12) then
tmp = z * (y / a)
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 <= -8.6e+136) {
tmp = t_1;
} else if (t <= 1.8e-245) {
tmp = x;
} else if (t <= 1.7e-172) {
tmp = y / (a / z);
} else if (t <= 5.2e-128) {
tmp = x;
} else if (t <= 2.55e-12) {
tmp = z * (y / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (-t / a) tmp = 0 if t <= -8.6e+136: tmp = t_1 elif t <= 1.8e-245: tmp = x elif t <= 1.7e-172: tmp = y / (a / z) elif t <= 5.2e-128: tmp = x elif t <= 2.55e-12: tmp = z * (y / a) 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 <= -8.6e+136) tmp = t_1; elseif (t <= 1.8e-245) tmp = x; elseif (t <= 1.7e-172) tmp = Float64(y / Float64(a / z)); elseif (t <= 5.2e-128) tmp = x; elseif (t <= 2.55e-12) tmp = Float64(z * Float64(y / a)); 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 <= -8.6e+136) tmp = t_1; elseif (t <= 1.8e-245) tmp = x; elseif (t <= 1.7e-172) tmp = y / (a / z); elseif (t <= 5.2e-128) tmp = x; elseif (t <= 2.55e-12) tmp = z * (y / a); 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, -8.6e+136], t$95$1, If[LessEqual[t, 1.8e-245], x, If[LessEqual[t, 1.7e-172], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e-128], x, If[LessEqual[t, 2.55e-12], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{-t}{a}\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{+136}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-245}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-172}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-128}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 2.55 \cdot 10^{-12}:\\
\;\;\;\;z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -8.5999999999999997e136 or 2.54999999999999984e-12 < t Initial program 86.9%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in z around 0 81.7%
associate-*r/88.8%
neg-mul-188.8%
unsub-neg88.8%
associate-*r/81.7%
associate-/l*87.9%
associate-/r/86.6%
Simplified86.6%
associate-*l/81.7%
associate-/l*87.9%
Applied egg-rr87.9%
Taylor expanded in x around 0 56.9%
mul-1-neg56.9%
associate-*l/61.8%
*-commutative61.8%
distribute-lft-neg-in61.8%
Simplified61.8%
if -8.5999999999999997e136 < t < 1.8e-245 or 1.6999999999999999e-172 < t < 5.19999999999999961e-128Initial program 97.3%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in x around inf 52.3%
if 1.8e-245 < t < 1.6999999999999999e-172Initial program 85.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 85.4%
+-commutative85.4%
associate-*l/92.6%
*-commutative92.6%
fma-def92.6%
Simplified92.6%
Taylor expanded in z around inf 55.7%
associate-*l/62.8%
Simplified62.8%
associate-*l/55.7%
associate-/l*70.1%
Applied egg-rr70.1%
if 5.19999999999999961e-128 < t < 2.54999999999999984e-12Initial program 89.7%
associate-/l*88.5%
Simplified88.5%
Taylor expanded in t around 0 71.6%
+-commutative71.6%
associate-*l/83.0%
*-commutative83.0%
fma-def83.0%
Simplified83.0%
Taylor expanded in z around inf 50.5%
associate-*l/62.0%
Simplified62.0%
Final simplification58.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.7e+139)
(* y (/ (- t) a))
(if (<= t 1.9e-245)
x
(if (<= t 8e-176)
(/ y (/ a z))
(if (<= t 5.8e-124)
x
(if (<= t 1.8e-12) (* z (/ y a)) (* t (/ y (- a)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.7e+139) {
tmp = y * (-t / a);
} else if (t <= 1.9e-245) {
tmp = x;
} else if (t <= 8e-176) {
tmp = y / (a / z);
} else if (t <= 5.8e-124) {
tmp = x;
} else if (t <= 1.8e-12) {
tmp = z * (y / a);
} else {
tmp = t * (y / -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 <= (-2.7d+139)) then
tmp = y * (-t / a)
else if (t <= 1.9d-245) then
tmp = x
else if (t <= 8d-176) then
tmp = y / (a / z)
else if (t <= 5.8d-124) then
tmp = x
else if (t <= 1.8d-12) then
tmp = z * (y / a)
else
tmp = t * (y / -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 <= -2.7e+139) {
tmp = y * (-t / a);
} else if (t <= 1.9e-245) {
tmp = x;
} else if (t <= 8e-176) {
tmp = y / (a / z);
} else if (t <= 5.8e-124) {
tmp = x;
} else if (t <= 1.8e-12) {
tmp = z * (y / a);
} else {
tmp = t * (y / -a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.7e+139: tmp = y * (-t / a) elif t <= 1.9e-245: tmp = x elif t <= 8e-176: tmp = y / (a / z) elif t <= 5.8e-124: tmp = x elif t <= 1.8e-12: tmp = z * (y / a) else: tmp = t * (y / -a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.7e+139) tmp = Float64(y * Float64(Float64(-t) / a)); elseif (t <= 1.9e-245) tmp = x; elseif (t <= 8e-176) tmp = Float64(y / Float64(a / z)); elseif (t <= 5.8e-124) tmp = x; elseif (t <= 1.8e-12) tmp = Float64(z * Float64(y / a)); else tmp = Float64(t * Float64(y / Float64(-a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.7e+139) tmp = y * (-t / a); elseif (t <= 1.9e-245) tmp = x; elseif (t <= 8e-176) tmp = y / (a / z); elseif (t <= 5.8e-124) tmp = x; elseif (t <= 1.8e-12) tmp = z * (y / a); else tmp = t * (y / -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.7e+139], N[(y * N[((-t) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-245], x, If[LessEqual[t, 8e-176], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e-124], x, If[LessEqual[t, 1.8e-12], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{+139}:\\
\;\;\;\;y \cdot \frac{-t}{a}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-245}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-176}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{-124}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-12}:\\
\;\;\;\;z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{-a}\\
\end{array}
\end{array}
if t < -2.6999999999999998e139Initial program 84.3%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in z around 0 84.3%
associate-*r/96.3%
neg-mul-196.3%
unsub-neg96.3%
associate-*r/84.3%
associate-/l*96.2%
associate-/r/95.6%
Simplified95.6%
associate-*l/84.3%
associate-/l*96.2%
Applied egg-rr96.2%
Taylor expanded in x around 0 63.2%
mul-1-neg63.2%
associate-*l/74.9%
*-commutative74.9%
distribute-lft-neg-in74.9%
Simplified74.9%
if -2.6999999999999998e139 < t < 1.9e-245 or 8e-176 < t < 5.8000000000000004e-124Initial program 97.3%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in x around inf 52.3%
if 1.9e-245 < t < 8e-176Initial program 85.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 85.4%
+-commutative85.4%
associate-*l/92.6%
*-commutative92.6%
fma-def92.6%
Simplified92.6%
Taylor expanded in z around inf 55.7%
associate-*l/62.8%
Simplified62.8%
associate-*l/55.7%
associate-/l*70.1%
Applied egg-rr70.1%
if 5.8000000000000004e-124 < t < 1.8e-12Initial program 89.7%
associate-/l*88.5%
Simplified88.5%
Taylor expanded in t around 0 71.6%
+-commutative71.6%
associate-*l/83.0%
*-commutative83.0%
fma-def83.0%
Simplified83.0%
Taylor expanded in z around inf 50.5%
associate-*l/62.0%
Simplified62.0%
if 1.8e-12 < t Initial program 87.8%
associate-/l*92.0%
Simplified92.0%
Taylor expanded in z around 0 80.8%
associate-*r/86.3%
neg-mul-186.3%
unsub-neg86.3%
associate-*r/80.8%
associate-/l*85.1%
associate-/r/83.6%
Simplified83.6%
associate-*l/80.8%
associate-/l*85.1%
Applied egg-rr85.1%
Taylor expanded in x around 0 54.8%
mul-1-neg54.8%
associate-*l/57.4%
*-commutative57.4%
distribute-lft-neg-in57.4%
Simplified57.4%
associate-*r/54.8%
frac-2neg54.8%
add-sqr-sqrt24.0%
sqrt-unprod26.3%
sqr-neg26.3%
sqrt-unprod2.2%
add-sqr-sqrt3.3%
distribute-lft-neg-out3.3%
add-sqr-sqrt1.2%
sqrt-unprod25.2%
sqr-neg25.2%
sqrt-unprod30.6%
add-sqr-sqrt54.8%
Applied egg-rr54.8%
associate-/l*57.4%
associate-/r/59.9%
Simplified59.9%
Final simplification58.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6.5e+136)
(/ y (/ (- a) t))
(if (<= t 6.8e-248)
x
(if (<= t 2.5e-175)
(/ y (/ a z))
(if (<= t 1.45e-124)
x
(if (<= t 3.15e-12) (* z (/ y a)) (* t (/ y (- a)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.5e+136) {
tmp = y / (-a / t);
} else if (t <= 6.8e-248) {
tmp = x;
} else if (t <= 2.5e-175) {
tmp = y / (a / z);
} else if (t <= 1.45e-124) {
tmp = x;
} else if (t <= 3.15e-12) {
tmp = z * (y / a);
} else {
tmp = t * (y / -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.5d+136)) then
tmp = y / (-a / t)
else if (t <= 6.8d-248) then
tmp = x
else if (t <= 2.5d-175) then
tmp = y / (a / z)
else if (t <= 1.45d-124) then
tmp = x
else if (t <= 3.15d-12) then
tmp = z * (y / a)
else
tmp = t * (y / -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.5e+136) {
tmp = y / (-a / t);
} else if (t <= 6.8e-248) {
tmp = x;
} else if (t <= 2.5e-175) {
tmp = y / (a / z);
} else if (t <= 1.45e-124) {
tmp = x;
} else if (t <= 3.15e-12) {
tmp = z * (y / a);
} else {
tmp = t * (y / -a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.5e+136: tmp = y / (-a / t) elif t <= 6.8e-248: tmp = x elif t <= 2.5e-175: tmp = y / (a / z) elif t <= 1.45e-124: tmp = x elif t <= 3.15e-12: tmp = z * (y / a) else: tmp = t * (y / -a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.5e+136) tmp = Float64(y / Float64(Float64(-a) / t)); elseif (t <= 6.8e-248) tmp = x; elseif (t <= 2.5e-175) tmp = Float64(y / Float64(a / z)); elseif (t <= 1.45e-124) tmp = x; elseif (t <= 3.15e-12) tmp = Float64(z * Float64(y / a)); else tmp = Float64(t * Float64(y / Float64(-a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.5e+136) tmp = y / (-a / t); elseif (t <= 6.8e-248) tmp = x; elseif (t <= 2.5e-175) tmp = y / (a / z); elseif (t <= 1.45e-124) tmp = x; elseif (t <= 3.15e-12) tmp = z * (y / a); else tmp = t * (y / -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.5e+136], N[(y / N[((-a) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e-248], x, If[LessEqual[t, 2.5e-175], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e-124], x, If[LessEqual[t, 3.15e-12], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+136}:\\
\;\;\;\;\frac{y}{\frac{-a}{t}}\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-248}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-175}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-124}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 3.15 \cdot 10^{-12}:\\
\;\;\;\;z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{-a}\\
\end{array}
\end{array}
if t < -6.4999999999999998e136Initial program 84.3%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in z around 0 84.3%
associate-*r/96.3%
neg-mul-196.3%
unsub-neg96.3%
associate-*r/84.3%
associate-/l*96.2%
associate-/r/95.6%
Simplified95.6%
associate-*l/84.3%
associate-/l*96.2%
Applied egg-rr96.2%
Taylor expanded in x around 0 63.2%
mul-1-neg63.2%
associate-*l/74.9%
*-commutative74.9%
distribute-lft-neg-in74.9%
Simplified74.9%
associate-*r/63.2%
frac-2neg63.2%
add-sqr-sqrt21.5%
sqrt-unprod22.5%
sqr-neg22.5%
sqrt-unprod0.8%
add-sqr-sqrt1.3%
distribute-lft-neg-out1.3%
add-sqr-sqrt0.4%
sqrt-unprod40.5%
sqr-neg40.5%
sqrt-unprod41.5%
add-sqr-sqrt63.2%
Applied egg-rr63.2%
associate-/l*74.9%
Simplified74.9%
if -6.4999999999999998e136 < t < 6.7999999999999996e-248 or 2.5e-175 < t < 1.4500000000000001e-124Initial program 97.3%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in x around inf 52.3%
if 6.7999999999999996e-248 < t < 2.5e-175Initial program 85.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 85.4%
+-commutative85.4%
associate-*l/92.6%
*-commutative92.6%
fma-def92.6%
Simplified92.6%
Taylor expanded in z around inf 55.7%
associate-*l/62.8%
Simplified62.8%
associate-*l/55.7%
associate-/l*70.1%
Applied egg-rr70.1%
if 1.4500000000000001e-124 < t < 3.1500000000000001e-12Initial program 89.7%
associate-/l*88.5%
Simplified88.5%
Taylor expanded in t around 0 71.6%
+-commutative71.6%
associate-*l/83.0%
*-commutative83.0%
fma-def83.0%
Simplified83.0%
Taylor expanded in z around inf 50.5%
associate-*l/62.0%
Simplified62.0%
if 3.1500000000000001e-12 < t Initial program 87.8%
associate-/l*92.0%
Simplified92.0%
Taylor expanded in z around 0 80.8%
associate-*r/86.3%
neg-mul-186.3%
unsub-neg86.3%
associate-*r/80.8%
associate-/l*85.1%
associate-/r/83.6%
Simplified83.6%
associate-*l/80.8%
associate-/l*85.1%
Applied egg-rr85.1%
Taylor expanded in x around 0 54.8%
mul-1-neg54.8%
associate-*l/57.4%
*-commutative57.4%
distribute-lft-neg-in57.4%
Simplified57.4%
associate-*r/54.8%
frac-2neg54.8%
add-sqr-sqrt24.0%
sqrt-unprod26.3%
sqr-neg26.3%
sqrt-unprod2.2%
add-sqr-sqrt3.3%
distribute-lft-neg-out3.3%
add-sqr-sqrt1.2%
sqrt-unprod25.2%
sqr-neg25.2%
sqrt-unprod30.6%
add-sqr-sqrt54.8%
Applied egg-rr54.8%
associate-/l*57.4%
associate-/r/59.9%
Simplified59.9%
Final simplification58.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -9.8e+151)
(/ y (/ (- a) t))
(if (or (<= t 44000000000.0) (and (not (<= t 7.2e+75)) (<= t 1.45e+112)))
(+ x (/ (* z y) a))
(* t (/ y (- a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.8e+151) {
tmp = y / (-a / t);
} else if ((t <= 44000000000.0) || (!(t <= 7.2e+75) && (t <= 1.45e+112))) {
tmp = x + ((z * y) / a);
} else {
tmp = t * (y / -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 <= (-9.8d+151)) then
tmp = y / (-a / t)
else if ((t <= 44000000000.0d0) .or. (.not. (t <= 7.2d+75)) .and. (t <= 1.45d+112)) then
tmp = x + ((z * y) / a)
else
tmp = t * (y / -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 <= -9.8e+151) {
tmp = y / (-a / t);
} else if ((t <= 44000000000.0) || (!(t <= 7.2e+75) && (t <= 1.45e+112))) {
tmp = x + ((z * y) / a);
} else {
tmp = t * (y / -a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -9.8e+151: tmp = y / (-a / t) elif (t <= 44000000000.0) or (not (t <= 7.2e+75) and (t <= 1.45e+112)): tmp = x + ((z * y) / a) else: tmp = t * (y / -a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9.8e+151) tmp = Float64(y / Float64(Float64(-a) / t)); elseif ((t <= 44000000000.0) || (!(t <= 7.2e+75) && (t <= 1.45e+112))) tmp = Float64(x + Float64(Float64(z * y) / a)); else tmp = Float64(t * Float64(y / Float64(-a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -9.8e+151) tmp = y / (-a / t); elseif ((t <= 44000000000.0) || (~((t <= 7.2e+75)) && (t <= 1.45e+112))) tmp = x + ((z * y) / a); else tmp = t * (y / -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.8e+151], N[(y / N[((-a) / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 44000000000.0], And[N[Not[LessEqual[t, 7.2e+75]], $MachinePrecision], LessEqual[t, 1.45e+112]]], N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.8 \cdot 10^{+151}:\\
\;\;\;\;\frac{y}{\frac{-a}{t}}\\
\mathbf{elif}\;t \leq 44000000000 \lor \neg \left(t \leq 7.2 \cdot 10^{+75}\right) \land t \leq 1.45 \cdot 10^{+112}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{-a}\\
\end{array}
\end{array}
if t < -9.7999999999999998e151Initial program 83.6%
associate-/l*95.5%
Simplified95.5%
Taylor expanded in z around 0 83.6%
associate-*r/96.1%
neg-mul-196.1%
unsub-neg96.1%
associate-*r/83.6%
associate-/l*96.0%
associate-/r/95.4%
Simplified95.4%
associate-*l/83.6%
associate-/l*96.0%
Applied egg-rr96.0%
Taylor expanded in x around 0 61.6%
mul-1-neg61.6%
associate-*l/73.8%
*-commutative73.8%
distribute-lft-neg-in73.8%
Simplified73.8%
associate-*r/61.6%
frac-2neg61.6%
add-sqr-sqrt22.4%
sqrt-unprod23.5%
sqr-neg23.5%
sqrt-unprod0.9%
add-sqr-sqrt1.3%
distribute-lft-neg-out1.3%
add-sqr-sqrt0.4%
sqrt-unprod37.9%
sqr-neg37.9%
sqrt-unprod39.0%
add-sqr-sqrt61.6%
Applied egg-rr61.6%
associate-/l*73.8%
Simplified73.8%
if -9.7999999999999998e151 < t < 4.4e10 or 7.2e75 < t < 1.4500000000000001e112Initial program 95.2%
associate-/l*92.3%
Simplified92.3%
Taylor expanded in z around inf 85.2%
if 4.4e10 < t < 7.2e75 or 1.4500000000000001e112 < t Initial program 85.3%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in z around 0 86.9%
associate-*r/93.5%
neg-mul-193.5%
unsub-neg93.5%
associate-*r/86.9%
associate-/l*92.0%
associate-/r/90.2%
Simplified90.2%
associate-*l/86.9%
associate-/l*92.0%
Applied egg-rr92.0%
Taylor expanded in x around 0 60.3%
mul-1-neg60.3%
associate-*l/63.5%
*-commutative63.5%
distribute-lft-neg-in63.5%
Simplified63.5%
associate-*r/60.3%
frac-2neg60.3%
add-sqr-sqrt27.1%
sqrt-unprod27.8%
sqr-neg27.8%
sqrt-unprod0.6%
add-sqr-sqrt1.6%
distribute-lft-neg-out1.6%
add-sqr-sqrt1.1%
sqrt-unprod26.3%
sqr-neg26.3%
sqrt-unprod33.0%
add-sqr-sqrt60.3%
Applied egg-rr60.3%
associate-/l*63.5%
associate-/r/66.5%
Simplified66.5%
Final simplification79.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ y a)))) (t_2 (/ y (/ (- a) t))))
(if (<= t -2.55e+151)
t_2
(if (<= t 46000000000.0)
t_1
(if (<= t 1.7e+47) t_2 (if (<= t 1.56e+112) t_1 (* t (/ y (- a)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / a));
double t_2 = y / (-a / t);
double tmp;
if (t <= -2.55e+151) {
tmp = t_2;
} else if (t <= 46000000000.0) {
tmp = t_1;
} else if (t <= 1.7e+47) {
tmp = t_2;
} else if (t <= 1.56e+112) {
tmp = t_1;
} else {
tmp = t * (y / -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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (z * (y / a))
t_2 = y / (-a / t)
if (t <= (-2.55d+151)) then
tmp = t_2
else if (t <= 46000000000.0d0) then
tmp = t_1
else if (t <= 1.7d+47) then
tmp = t_2
else if (t <= 1.56d+112) then
tmp = t_1
else
tmp = t * (y / -a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / a));
double t_2 = y / (-a / t);
double tmp;
if (t <= -2.55e+151) {
tmp = t_2;
} else if (t <= 46000000000.0) {
tmp = t_1;
} else if (t <= 1.7e+47) {
tmp = t_2;
} else if (t <= 1.56e+112) {
tmp = t_1;
} else {
tmp = t * (y / -a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / a)) t_2 = y / (-a / t) tmp = 0 if t <= -2.55e+151: tmp = t_2 elif t <= 46000000000.0: tmp = t_1 elif t <= 1.7e+47: tmp = t_2 elif t <= 1.56e+112: tmp = t_1 else: tmp = t * (y / -a) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(y / a))) t_2 = Float64(y / Float64(Float64(-a) / t)) tmp = 0.0 if (t <= -2.55e+151) tmp = t_2; elseif (t <= 46000000000.0) tmp = t_1; elseif (t <= 1.7e+47) tmp = t_2; elseif (t <= 1.56e+112) tmp = t_1; else tmp = Float64(t * Float64(y / Float64(-a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * (y / a)); t_2 = y / (-a / t); tmp = 0.0; if (t <= -2.55e+151) tmp = t_2; elseif (t <= 46000000000.0) tmp = t_1; elseif (t <= 1.7e+47) tmp = t_2; elseif (t <= 1.56e+112) tmp = t_1; else tmp = t * (y / -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y / N[((-a) / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.55e+151], t$95$2, If[LessEqual[t, 46000000000.0], t$95$1, If[LessEqual[t, 1.7e+47], t$95$2, If[LessEqual[t, 1.56e+112], t$95$1, N[(t * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a}\\
t_2 := \frac{y}{\frac{-a}{t}}\\
\mathbf{if}\;t \leq -2.55 \cdot 10^{+151}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 46000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{+47}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.56 \cdot 10^{+112}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{-a}\\
\end{array}
\end{array}
if t < -2.54999999999999998e151 or 4.6e10 < t < 1.6999999999999999e47Initial program 79.9%
associate-/l*96.8%
Simplified96.8%
Taylor expanded in z around 0 79.9%
associate-*r/97.2%
neg-mul-197.2%
unsub-neg97.2%
associate-*r/79.9%
associate-/l*97.2%
associate-/r/96.7%
Simplified96.7%
associate-*l/79.9%
associate-/l*97.2%
Applied egg-rr97.2%
Taylor expanded in x around 0 58.9%
mul-1-neg58.9%
associate-*l/73.1%
*-commutative73.1%
distribute-lft-neg-in73.1%
Simplified73.1%
associate-*r/58.9%
frac-2neg58.9%
add-sqr-sqrt22.5%
sqrt-unprod23.1%
sqr-neg23.1%
sqrt-unprod0.7%
add-sqr-sqrt1.2%
distribute-lft-neg-out1.2%
add-sqr-sqrt0.5%
sqrt-unprod32.9%
sqr-neg32.9%
sqrt-unprod36.3%
add-sqr-sqrt58.9%
Applied egg-rr58.9%
associate-/l*73.2%
Simplified73.2%
if -2.54999999999999998e151 < t < 4.6e10 or 1.6999999999999999e47 < t < 1.55999999999999992e112Initial program 94.8%
associate-/l*92.6%
Simplified92.6%
Taylor expanded in t around 0 83.6%
+-commutative83.6%
associate-*l/87.5%
*-commutative87.5%
Simplified87.5%
if 1.55999999999999992e112 < t Initial program 88.7%
associate-/l*91.3%
Simplified91.3%
Taylor expanded in z around 0 90.9%
associate-*r/93.4%
neg-mul-193.4%
unsub-neg93.4%
associate-*r/90.9%
associate-/l*91.3%
associate-/r/88.9%
Simplified88.9%
associate-*l/90.9%
associate-/l*91.3%
Applied egg-rr91.3%
Taylor expanded in x around 0 63.4%
mul-1-neg63.4%
associate-*l/63.4%
*-commutative63.4%
distribute-lft-neg-in63.4%
Simplified63.4%
associate-*r/63.4%
frac-2neg63.4%
add-sqr-sqrt27.2%
sqrt-unprod28.1%
sqr-neg28.1%
sqrt-unprod0.7%
add-sqr-sqrt1.7%
distribute-lft-neg-out1.7%
add-sqr-sqrt1.0%
sqrt-unprod28.5%
sqr-neg28.5%
sqrt-unprod36.0%
add-sqr-sqrt63.4%
Applied egg-rr63.4%
associate-/l*63.4%
associate-/r/67.5%
Simplified67.5%
Final simplification82.3%
(FPCore (x y z t a)
:precision binary64
(if (<= a -9.5e+112)
x
(if (<= a -5e+45)
(* y (/ z a))
(if (<= a -1.56e-21) x (if (<= a 1.4e-67) (* z (/ y a)) 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 <= -5e+45) {
tmp = y * (z / a);
} else if (a <= -1.56e-21) {
tmp = x;
} else if (a <= 1.4e-67) {
tmp = z * (y / 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 (a <= (-9.5d+112)) then
tmp = x
else if (a <= (-5d+45)) then
tmp = y * (z / a)
else if (a <= (-1.56d-21)) then
tmp = x
else if (a <= 1.4d-67) then
tmp = z * (y / 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 (a <= -9.5e+112) {
tmp = x;
} else if (a <= -5e+45) {
tmp = y * (z / a);
} else if (a <= -1.56e-21) {
tmp = x;
} else if (a <= 1.4e-67) {
tmp = z * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9.5e+112: tmp = x elif a <= -5e+45: tmp = y * (z / a) elif a <= -1.56e-21: tmp = x elif a <= 1.4e-67: tmp = z * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.5e+112) tmp = x; elseif (a <= -5e+45) tmp = Float64(y * Float64(z / a)); elseif (a <= -1.56e-21) tmp = x; elseif (a <= 1.4e-67) tmp = Float64(z * Float64(y / a)); 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 <= -5e+45) tmp = y * (z / a); elseif (a <= -1.56e-21) tmp = x; elseif (a <= 1.4e-67) tmp = z * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.5e+112], x, If[LessEqual[a, -5e+45], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.56e-21], x, If[LessEqual[a, 1.4e-67], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.5 \cdot 10^{+112}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -5 \cdot 10^{+45}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;a \leq -1.56 \cdot 10^{-21}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{-67}:\\
\;\;\;\;z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -9.5000000000000008e112 or -5e45 < a < -1.55999999999999999e-21 or 1.40000000000000005e-67 < a Initial program 87.1%
associate-/l*98.5%
Simplified98.5%
Taylor expanded in x around inf 56.9%
if -9.5000000000000008e112 < a < -5e45Initial program 84.2%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in t around 0 51.2%
+-commutative51.2%
associate-*l/58.8%
*-commutative58.8%
fma-def58.8%
Simplified58.8%
Taylor expanded in z around inf 43.0%
associate-*r/50.8%
Simplified50.8%
if -1.55999999999999999e-21 < a < 1.40000000000000005e-67Initial program 99.3%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in t around 0 66.4%
+-commutative66.4%
associate-*l/68.3%
*-commutative68.3%
fma-def68.3%
Simplified68.3%
Taylor expanded in z around inf 50.4%
associate-*l/52.4%
Simplified52.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 (* z (/ y a)))))
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 + (z * (y / 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.2d+118)) .or. (.not. (t <= 4.1d-13))) then
tmp = x - (y * (t / a))
else
tmp = x + (z * (y / 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.2e+118) || !(t <= 4.1e-13)) {
tmp = x - (y * (t / a));
} else {
tmp = x + (z * (y / a));
}
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 + (z * (y / a)) 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(z * Float64(y / a))); 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 + (z * (y / a)); 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[(z * N[(y / a), $MachinePrecision]), $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 + z \cdot \frac{y}{a}\\
\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%
neg-mul-189.4%
unsub-neg89.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 (/ t (/ a y))) (+ x (* z (/ y a)))))
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 - (t / (a / y));
} else {
tmp = x + (z * (y / 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.05d+118)) .or. (.not. (t <= 4.6d-12))) then
tmp = x - (t / (a / y))
else
tmp = x + (z * (y / 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.05e+118) || !(t <= 4.6e-12)) {
tmp = x - (t / (a / y));
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.05e+118) or not (t <= 4.6e-12): tmp = x - (t / (a / y)) else: tmp = x + (z * (y / a)) 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(t / Float64(a / y))); else tmp = Float64(x + Float64(z * Float64(y / a))); 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 - (t / (a / y)); else tmp = x + (z * (y / a)); 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[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $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{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\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%
neg-mul-189.4%
unsub-neg89.4%
associate-*r/81.7%
associate-/l*88.5%
associate-/r/87.2%
Simplified87.2%
associate-*l/81.7%
associate-/l*88.5%
Applied egg-rr88.5%
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 simplification89.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.1e+118) (not (<= t 2.35e-12))) (- x (* t (/ y a))) (+ x (* z (/ y a)))))
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 - (t * (y / a));
} else {
tmp = x + (z * (y / 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.1d+118)) .or. (.not. (t <= 2.35d-12))) then
tmp = x - (t * (y / a))
else
tmp = x + (z * (y / 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.1e+118) || !(t <= 2.35e-12)) {
tmp = x - (t * (y / a));
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.1e+118) or not (t <= 2.35e-12): tmp = x - (t * (y / a)) else: tmp = x + (z * (y / a)) 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(t * Float64(y / a))); else tmp = Float64(x + Float64(z * Float64(y / a))); 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 - (t * (y / a)); else tmp = x + (z * (y / a)); 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[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $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 - t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\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%
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 (or (<= y -1.25e+72) (not (<= y 3.7e+96))) (* y (/ z a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.25e+72) || !(y <= 3.7e+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.25d+72)) .or. (.not. (y <= 3.7d+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.25e+72) || !(y <= 3.7e+96)) {
tmp = y * (z / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.25e+72) or not (y <= 3.7e+96): tmp = y * (z / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.25e+72) || !(y <= 3.7e+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.25e+72) || ~((y <= 3.7e+96))) tmp = y * (z / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.25e+72], N[Not[LessEqual[y, 3.7e+96]], $MachinePrecision]], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+72} \lor \neg \left(y \leq 3.7 \cdot 10^{+96}\right):\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.24999999999999998e72 or 3.69999999999999991e96 < y Initial program 82.4%
associate-/l*97.8%
Simplified97.8%
Taylor expanded in t around 0 55.3%
+-commutative55.3%
associate-*l/65.1%
*-commutative65.1%
fma-def65.1%
Simplified65.1%
Taylor expanded in z around inf 44.7%
associate-*r/49.5%
Simplified49.5%
if -1.24999999999999998e72 < y < 3.69999999999999991e96Initial 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 (/ a (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / (a / (z - 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 / (a / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / (a / (z - t)));
}
def code(x, y, z, t, a): return x + (y / (a / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(a / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / (a / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a}{z - t}}
\end{array}
Initial program 91.9%
associate-/l*92.9%
Simplified92.9%
Final simplification92.9%
(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)))