
(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 (<= t_1 -2e+303)
(+ x (* y (/ (- z t) a)))
(if (<= t_1 2e+266) (+ x (/ t_1 a)) (+ x (/ y (/ a (- z t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) * y;
double tmp;
if (t_1 <= -2e+303) {
tmp = x + (y * ((z - t) / a));
} else if (t_1 <= 2e+266) {
tmp = x + (t_1 / a);
} else {
tmp = x + (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) :: t_1
real(8) :: tmp
t_1 = (z - t) * y
if (t_1 <= (-2d+303)) then
tmp = x + (y * ((z - t) / a))
else if (t_1 <= 2d+266) then
tmp = x + (t_1 / a)
else
tmp = x + (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 t_1 = (z - t) * y;
double tmp;
if (t_1 <= -2e+303) {
tmp = x + (y * ((z - t) / a));
} else if (t_1 <= 2e+266) {
tmp = x + (t_1 / a);
} else {
tmp = x + (y / (a / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) * y tmp = 0 if t_1 <= -2e+303: tmp = x + (y * ((z - t) / a)) elif t_1 <= 2e+266: tmp = x + (t_1 / a) else: tmp = x + (y / (a / (z - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) * y) tmp = 0.0 if (t_1 <= -2e+303) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); elseif (t_1 <= 2e+266) tmp = Float64(x + Float64(t_1 / a)); else tmp = Float64(x + Float64(y / Float64(a / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) * y; tmp = 0.0; if (t_1 <= -2e+303) tmp = x + (y * ((z - t) / a)); elseif (t_1 <= 2e+266) tmp = x + (t_1 / a); else tmp = x + (y / (a / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+303], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+266], N[(x + N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z - t\right) \cdot y\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+303}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+266}:\\
\;\;\;\;x + \frac{t_1}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -2e303Initial program 62.5%
*-commutative62.5%
associate-/l*99.9%
Simplified99.9%
associate-/r/99.8%
Applied egg-rr99.8%
if -2e303 < (*.f64 y (-.f64 z t)) < 2.0000000000000001e266Initial program 99.0%
if 2.0000000000000001e266 < (*.f64 y (-.f64 z t)) Initial program 64.7%
associate-/l*99.8%
Simplified99.8%
Final simplification99.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y) a))))
(if (<= t -5.2e+119)
t_1
(if (<= t 3.95e+191)
(+ x (* z (/ y a)))
(if (or (<= t 2.75e+219) (not (<= t 7.5e+263)))
t_1
(+ x (/ (* z y) a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (-y / a);
double tmp;
if (t <= -5.2e+119) {
tmp = t_1;
} else if (t <= 3.95e+191) {
tmp = x + (z * (y / a));
} else if ((t <= 2.75e+219) || !(t <= 7.5e+263)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t * (-y / a)
if (t <= (-5.2d+119)) then
tmp = t_1
else if (t <= 3.95d+191) then
tmp = x + (z * (y / a))
else if ((t <= 2.75d+219) .or. (.not. (t <= 7.5d+263))) then
tmp = t_1
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 t_1 = t * (-y / a);
double tmp;
if (t <= -5.2e+119) {
tmp = t_1;
} else if (t <= 3.95e+191) {
tmp = x + (z * (y / a));
} else if ((t <= 2.75e+219) || !(t <= 7.5e+263)) {
tmp = t_1;
} else {
tmp = x + ((z * y) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (-y / a) tmp = 0 if t <= -5.2e+119: tmp = t_1 elif t <= 3.95e+191: tmp = x + (z * (y / a)) elif (t <= 2.75e+219) or not (t <= 7.5e+263): tmp = t_1 else: tmp = x + ((z * y) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(-y) / a)) tmp = 0.0 if (t <= -5.2e+119) tmp = t_1; elseif (t <= 3.95e+191) tmp = Float64(x + Float64(z * Float64(y / a))); elseif ((t <= 2.75e+219) || !(t <= 7.5e+263)) tmp = t_1; else tmp = Float64(x + Float64(Float64(z * y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (-y / a); tmp = 0.0; if (t <= -5.2e+119) tmp = t_1; elseif (t <= 3.95e+191) tmp = x + (z * (y / a)); elseif ((t <= 2.75e+219) || ~((t <= 7.5e+263))) tmp = t_1; else tmp = x + ((z * y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[((-y) / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e+119], t$95$1, If[LessEqual[t, 3.95e+191], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 2.75e+219], N[Not[LessEqual[t, 7.5e+263]], $MachinePrecision]], t$95$1, N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{-y}{a}\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+119}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.95 \cdot 10^{+191}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 2.75 \cdot 10^{+219} \lor \neg \left(t \leq 7.5 \cdot 10^{+263}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\
\end{array}
\end{array}
if t < -5.2e119 or 3.94999999999999985e191 < t < 2.74999999999999986e219 or 7.5000000000000001e263 < t Initial program 86.2%
+-commutative86.2%
associate-*r/88.2%
fma-udef88.2%
Simplified88.2%
fma-udef88.2%
associate-*r/86.2%
div-inv86.2%
div-inv86.2%
*-commutative86.2%
associate-*r/97.7%
Applied egg-rr97.7%
Taylor expanded in z around 0 76.1%
mul-1-neg76.1%
associate-*l/80.0%
*-commutative80.0%
distribute-lft-neg-out80.0%
cancel-sign-sub-inv80.0%
*-commutative80.0%
associate-*l/76.1%
associate-*r/87.6%
Simplified87.6%
Taylor expanded in x around 0 59.9%
mul-1-neg59.9%
associate-*l/65.6%
distribute-lft-neg-in65.6%
*-lft-identity65.6%
metadata-eval65.6%
times-frac65.6%
neg-mul-165.6%
neg-mul-165.6%
distribute-frac-neg65.6%
remove-double-neg65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in y around 0 59.9%
mul-1-neg59.9%
associate-*r/71.4%
*-commutative71.4%
distribute-rgt-neg-in71.4%
Simplified71.4%
if -5.2e119 < t < 3.94999999999999985e191Initial program 92.5%
+-commutative92.5%
associate-*r/91.9%
fma-udef91.9%
Simplified91.9%
fma-udef91.9%
associate-*r/92.5%
div-inv92.5%
div-inv92.5%
*-commutative92.5%
associate-*r/96.3%
Applied egg-rr96.3%
Taylor expanded in z around inf 76.9%
associate-*l/82.4%
*-commutative82.4%
Simplified82.4%
if 2.74999999999999986e219 < t < 7.5000000000000001e263Initial program 86.8%
*-commutative86.8%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 100.0%
Final simplification80.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y) a))))
(if (<= t -9.2e+119)
t_1
(if (<= t 2.6e+191)
(+ x (/ z (/ a y)))
(if (or (<= t 1.22e+219) (not (<= t 7.5e+263)))
t_1
(+ x (/ (* z y) a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (-y / a);
double tmp;
if (t <= -9.2e+119) {
tmp = t_1;
} else if (t <= 2.6e+191) {
tmp = x + (z / (a / y));
} else if ((t <= 1.22e+219) || !(t <= 7.5e+263)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t * (-y / a)
if (t <= (-9.2d+119)) then
tmp = t_1
else if (t <= 2.6d+191) then
tmp = x + (z / (a / y))
else if ((t <= 1.22d+219) .or. (.not. (t <= 7.5d+263))) then
tmp = t_1
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 t_1 = t * (-y / a);
double tmp;
if (t <= -9.2e+119) {
tmp = t_1;
} else if (t <= 2.6e+191) {
tmp = x + (z / (a / y));
} else if ((t <= 1.22e+219) || !(t <= 7.5e+263)) {
tmp = t_1;
} else {
tmp = x + ((z * y) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (-y / a) tmp = 0 if t <= -9.2e+119: tmp = t_1 elif t <= 2.6e+191: tmp = x + (z / (a / y)) elif (t <= 1.22e+219) or not (t <= 7.5e+263): tmp = t_1 else: tmp = x + ((z * y) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(-y) / a)) tmp = 0.0 if (t <= -9.2e+119) tmp = t_1; elseif (t <= 2.6e+191) tmp = Float64(x + Float64(z / Float64(a / y))); elseif ((t <= 1.22e+219) || !(t <= 7.5e+263)) tmp = t_1; else tmp = Float64(x + Float64(Float64(z * y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (-y / a); tmp = 0.0; if (t <= -9.2e+119) tmp = t_1; elseif (t <= 2.6e+191) tmp = x + (z / (a / y)); elseif ((t <= 1.22e+219) || ~((t <= 7.5e+263))) tmp = t_1; else tmp = x + ((z * y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[((-y) / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.2e+119], t$95$1, If[LessEqual[t, 2.6e+191], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 1.22e+219], N[Not[LessEqual[t, 7.5e+263]], $MachinePrecision]], t$95$1, N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{-y}{a}\\
\mathbf{if}\;t \leq -9.2 \cdot 10^{+119}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+191}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\mathbf{elif}\;t \leq 1.22 \cdot 10^{+219} \lor \neg \left(t \leq 7.5 \cdot 10^{+263}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\
\end{array}
\end{array}
if t < -9.2000000000000003e119 or 2.6e191 < t < 1.22000000000000004e219 or 7.5000000000000001e263 < t Initial program 86.2%
+-commutative86.2%
associate-*r/88.2%
fma-udef88.2%
Simplified88.2%
fma-udef88.2%
associate-*r/86.2%
div-inv86.2%
div-inv86.2%
*-commutative86.2%
associate-*r/97.7%
Applied egg-rr97.7%
Taylor expanded in z around 0 76.1%
mul-1-neg76.1%
associate-*l/80.0%
*-commutative80.0%
distribute-lft-neg-out80.0%
cancel-sign-sub-inv80.0%
*-commutative80.0%
associate-*l/76.1%
associate-*r/87.6%
Simplified87.6%
Taylor expanded in x around 0 59.9%
mul-1-neg59.9%
associate-*l/65.6%
distribute-lft-neg-in65.6%
*-lft-identity65.6%
metadata-eval65.6%
times-frac65.6%
neg-mul-165.6%
neg-mul-165.6%
distribute-frac-neg65.6%
remove-double-neg65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in y around 0 59.9%
mul-1-neg59.9%
associate-*r/71.4%
*-commutative71.4%
distribute-rgt-neg-in71.4%
Simplified71.4%
if -9.2000000000000003e119 < t < 2.6e191Initial program 92.5%
+-commutative92.5%
associate-*r/91.9%
fma-udef91.9%
Simplified91.9%
fma-udef91.9%
associate-*r/92.5%
div-inv92.5%
div-inv92.5%
*-commutative92.5%
associate-*r/96.3%
Applied egg-rr96.3%
Taylor expanded in z around inf 76.9%
associate-*l/82.4%
*-commutative82.4%
Simplified82.4%
clear-num82.4%
un-div-inv82.9%
Applied egg-rr82.9%
if 1.22000000000000004e219 < t < 7.5000000000000001e263Initial program 86.8%
*-commutative86.8%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 100.0%
Final simplification81.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2e-242) (not (<= y 6.8e-129))) (+ x (* y (/ (- z t) a))) (+ x (/ z (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2e-242) || !(y <= 6.8e-129)) {
tmp = x + (y * ((z - t) / a));
} else {
tmp = x + (z / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-2d-242)) .or. (.not. (y <= 6.8d-129))) then
tmp = x + (y * ((z - t) / a))
else
tmp = x + (z / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2e-242) || !(y <= 6.8e-129)) {
tmp = x + (y * ((z - t) / a));
} else {
tmp = x + (z / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2e-242) or not (y <= 6.8e-129): tmp = x + (y * ((z - t) / a)) else: tmp = x + (z / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2e-242) || !(y <= 6.8e-129)) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); else tmp = Float64(x + Float64(z / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2e-242) || ~((y <= 6.8e-129))) tmp = x + (y * ((z - t) / a)); else tmp = x + (z / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2e-242], N[Not[LessEqual[y, 6.8e-129]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-242} \lor \neg \left(y \leq 6.8 \cdot 10^{-129}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if y < -2e-242 or 6.80000000000000026e-129 < y Initial program 88.9%
*-commutative88.9%
associate-/l*95.8%
Simplified95.8%
associate-/r/96.8%
Applied egg-rr96.8%
if -2e-242 < y < 6.80000000000000026e-129Initial program 97.5%
+-commutative97.5%
associate-*r/76.0%
fma-udef76.1%
Simplified76.1%
fma-udef76.0%
associate-*r/97.5%
div-inv97.4%
div-inv97.5%
*-commutative97.5%
associate-*r/99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 88.9%
associate-*l/90.2%
*-commutative90.2%
Simplified90.2%
clear-num90.1%
un-div-inv90.2%
Applied egg-rr90.2%
Final simplification95.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -9.4e-304) (not (<= y 6.8e-129))) (+ x (/ y (/ a (- z t)))) (+ x (/ z (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9.4e-304) || !(y <= 6.8e-129)) {
tmp = x + (y / (a / (z - t)));
} else {
tmp = x + (z / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-9.4d-304)) .or. (.not. (y <= 6.8d-129))) then
tmp = x + (y / (a / (z - t)))
else
tmp = x + (z / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9.4e-304) || !(y <= 6.8e-129)) {
tmp = x + (y / (a / (z - t)));
} else {
tmp = x + (z / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -9.4e-304) or not (y <= 6.8e-129): tmp = x + (y / (a / (z - t))) else: tmp = x + (z / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -9.4e-304) || !(y <= 6.8e-129)) tmp = Float64(x + Float64(y / Float64(a / Float64(z - t)))); else tmp = Float64(x + Float64(z / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -9.4e-304) || ~((y <= 6.8e-129))) tmp = x + (y / (a / (z - t))); else tmp = x + (z / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -9.4e-304], N[Not[LessEqual[y, 6.8e-129]], $MachinePrecision]], N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.4 \cdot 10^{-304} \lor \neg \left(y \leq 6.8 \cdot 10^{-129}\right):\\
\;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if y < -9.4000000000000001e-304 or 6.80000000000000026e-129 < y Initial program 89.7%
associate-/l*95.9%
Simplified95.9%
if -9.4000000000000001e-304 < y < 6.80000000000000026e-129Initial program 97.8%
+-commutative97.8%
associate-*r/74.0%
fma-udef74.1%
Simplified74.1%
fma-udef74.0%
associate-*r/97.8%
div-inv97.7%
div-inv97.8%
*-commutative97.8%
associate-*r/99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 91.4%
associate-*l/93.3%
*-commutative93.3%
Simplified93.3%
clear-num93.3%
un-div-inv93.4%
Applied egg-rr93.4%
Final simplification95.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -34.0) (not (<= z 0.0062))) (+ x (* z (/ y a))) (- x (/ (* t y) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -34.0) || !(z <= 0.0062)) {
tmp = x + (z * (y / a));
} else {
tmp = x - ((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 ((z <= (-34.0d0)) .or. (.not. (z <= 0.0062d0))) then
tmp = x + (z * (y / a))
else
tmp = x - ((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 ((z <= -34.0) || !(z <= 0.0062)) {
tmp = x + (z * (y / a));
} else {
tmp = x - ((t * y) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -34.0) or not (z <= 0.0062): tmp = x + (z * (y / a)) else: tmp = x - ((t * y) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -34.0) || !(z <= 0.0062)) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = Float64(x - Float64(Float64(t * y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -34.0) || ~((z <= 0.0062))) tmp = x + (z * (y / a)); else tmp = x - ((t * y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -34.0], N[Not[LessEqual[z, 0.0062]], $MachinePrecision]], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -34 \lor \neg \left(z \leq 0.0062\right):\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t \cdot y}{a}\\
\end{array}
\end{array}
if z < -34 or 0.00619999999999999978 < z Initial program 85.9%
+-commutative85.9%
associate-*r/87.2%
fma-udef87.3%
Simplified87.3%
fma-udef87.2%
associate-*r/85.9%
div-inv85.8%
div-inv85.9%
*-commutative85.9%
associate-*r/99.0%
Applied egg-rr99.0%
Taylor expanded in z around inf 79.1%
associate-*l/87.1%
*-commutative87.1%
Simplified87.1%
if -34 < z < 0.00619999999999999978Initial program 96.4%
*-commutative96.4%
associate-/l*94.7%
Simplified94.7%
Taylor expanded in z around 0 90.3%
mul-1-neg90.3%
associate-*r/88.9%
unsub-neg88.9%
associate-*r/90.3%
associate-/l*89.3%
associate-/r/89.3%
Simplified89.3%
Taylor expanded in t around 0 90.3%
Final simplification88.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -9e+54) (+ x (/ z (/ a y))) (if (<= z 0.0006) (- x (* t (/ y a))) (+ x (* z (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9e+54) {
tmp = x + (z / (a / y));
} else if (z <= 0.0006) {
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 (z <= (-9d+54)) then
tmp = x + (z / (a / y))
else if (z <= 0.0006d0) 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 (z <= -9e+54) {
tmp = x + (z / (a / y));
} else if (z <= 0.0006) {
tmp = x - (t * (y / a));
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9e+54: tmp = x + (z / (a / y)) elif z <= 0.0006: tmp = x - (t * (y / a)) else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9e+54) tmp = Float64(x + Float64(z / Float64(a / y))); elseif (z <= 0.0006) 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 (z <= -9e+54) tmp = x + (z / (a / y)); elseif (z <= 0.0006) tmp = x - (t * (y / a)); else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9e+54], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.0006], 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}\;z \leq -9 \cdot 10^{+54}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 0.0006:\\
\;\;\;\;x - t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -8.99999999999999968e54Initial program 82.5%
+-commutative82.5%
associate-*r/85.0%
fma-udef85.0%
Simplified85.0%
fma-udef85.0%
associate-*r/82.5%
div-inv82.5%
div-inv82.5%
*-commutative82.5%
associate-*r/99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 75.0%
associate-*l/85.1%
*-commutative85.1%
Simplified85.1%
clear-num85.1%
un-div-inv85.1%
Applied egg-rr85.1%
if -8.99999999999999968e54 < z < 5.99999999999999947e-4Initial program 95.9%
+-commutative95.9%
associate-*r/95.8%
fma-udef95.8%
Simplified95.8%
fma-udef95.8%
associate-*r/95.9%
div-inv95.9%
div-inv95.9%
*-commutative95.9%
associate-*r/94.7%
Applied egg-rr94.7%
Taylor expanded in z around 0 88.8%
mul-1-neg88.8%
associate-*l/88.6%
*-commutative88.6%
distribute-lft-neg-out88.6%
cancel-sign-sub-inv88.6%
*-commutative88.6%
associate-*l/88.8%
associate-*r/88.2%
Simplified88.2%
if 5.99999999999999947e-4 < z Initial program 89.4%
+-commutative89.4%
associate-*r/87.7%
fma-udef87.8%
Simplified87.8%
fma-udef87.7%
associate-*r/89.4%
div-inv89.2%
div-inv89.4%
*-commutative89.4%
associate-*r/98.0%
Applied egg-rr98.0%
Taylor expanded in z around inf 84.0%
associate-*l/90.9%
*-commutative90.9%
Simplified90.9%
Final simplification88.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.4e+54) (+ x (/ z (/ a y))) (if (<= z 0.000165) (- x (* y (/ t a))) (+ x (* z (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.4e+54) {
tmp = x + (z / (a / y));
} else if (z <= 0.000165) {
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 (z <= (-9.4d+54)) then
tmp = x + (z / (a / y))
else if (z <= 0.000165d0) 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 (z <= -9.4e+54) {
tmp = x + (z / (a / y));
} else if (z <= 0.000165) {
tmp = x - (y * (t / a));
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.4e+54: tmp = x + (z / (a / y)) elif z <= 0.000165: tmp = x - (y * (t / a)) else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.4e+54) tmp = Float64(x + Float64(z / Float64(a / y))); elseif (z <= 0.000165) 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 (z <= -9.4e+54) tmp = x + (z / (a / y)); elseif (z <= 0.000165) tmp = x - (y * (t / a)); else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.4e+54], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.000165], 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}\;z \leq -9.4 \cdot 10^{+54}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 0.000165:\\
\;\;\;\;x - y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -9.39999999999999985e54Initial program 82.5%
+-commutative82.5%
associate-*r/85.0%
fma-udef85.0%
Simplified85.0%
fma-udef85.0%
associate-*r/82.5%
div-inv82.5%
div-inv82.5%
*-commutative82.5%
associate-*r/99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 75.0%
associate-*l/85.1%
*-commutative85.1%
Simplified85.1%
clear-num85.1%
un-div-inv85.1%
Applied egg-rr85.1%
if -9.39999999999999985e54 < z < 1.65e-4Initial program 95.9%
*-commutative95.9%
associate-/l*95.1%
Simplified95.1%
Taylor expanded in z around 0 88.8%
mul-1-neg88.8%
associate-*r/88.2%
unsub-neg88.2%
associate-*r/88.8%
associate-/l*88.6%
associate-/r/88.6%
Simplified88.6%
if 1.65e-4 < z Initial program 89.4%
+-commutative89.4%
associate-*r/87.7%
fma-udef87.8%
Simplified87.8%
fma-udef87.7%
associate-*r/89.4%
div-inv89.2%
div-inv89.4%
*-commutative89.4%
associate-*r/98.0%
Applied egg-rr98.0%
Taylor expanded in z around inf 84.0%
associate-*l/90.9%
*-commutative90.9%
Simplified90.9%
Final simplification88.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.15e+68) (not (<= y 2.6e+175))) (* y (/ t (- a))) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.15e+68) || !(y <= 2.6e+175)) {
tmp = y * (t / -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.15d+68)) .or. (.not. (y <= 2.6d+175))) then
tmp = y * (t / -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.15e+68) || !(y <= 2.6e+175)) {
tmp = y * (t / -a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.15e+68) or not (y <= 2.6e+175): tmp = y * (t / -a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.15e+68) || !(y <= 2.6e+175)) tmp = Float64(y * Float64(t / Float64(-a))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.15e+68) || ~((y <= 2.6e+175))) tmp = y * (t / -a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.15e+68], N[Not[LessEqual[y, 2.6e+175]], $MachinePrecision]], N[(y * N[(t / (-a)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+68} \lor \neg \left(y \leq 2.6 \cdot 10^{+175}\right):\\
\;\;\;\;y \cdot \frac{t}{-a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.15e68 or 2.6e175 < y Initial program 81.5%
+-commutative81.5%
associate-*r/96.3%
fma-udef96.3%
Simplified96.3%
fma-udef96.3%
associate-*r/81.5%
div-inv81.5%
div-inv81.5%
*-commutative81.5%
associate-*r/96.4%
Applied egg-rr96.4%
Taylor expanded in z around 0 64.2%
mul-1-neg64.2%
associate-*l/68.7%
*-commutative68.7%
distribute-lft-neg-out68.7%
cancel-sign-sub-inv68.7%
*-commutative68.7%
associate-*l/64.2%
associate-*r/69.9%
Simplified69.9%
Taylor expanded in x around 0 49.4%
mul-1-neg49.4%
associate-*l/52.7%
distribute-lft-neg-in52.7%
*-lft-identity52.7%
metadata-eval52.7%
times-frac52.7%
neg-mul-152.7%
neg-mul-152.7%
distribute-frac-neg52.7%
remove-double-neg52.7%
*-commutative52.7%
Simplified52.7%
if -1.15e68 < y < 2.6e175Initial program 95.7%
*-commutative95.7%
associate-/l*96.5%
Simplified96.5%
Taylor expanded in x around inf 56.3%
Final simplification55.2%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.85e+69) (* t (/ (- y) a)) (if (<= y 2.2e+175) x (* y (/ t (- a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.85e+69) {
tmp = t * (-y / a);
} else if (y <= 2.2e+175) {
tmp = x;
} 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 (y <= (-1.85d+69)) then
tmp = t * (-y / a)
else if (y <= 2.2d+175) then
tmp = x
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 (y <= -1.85e+69) {
tmp = t * (-y / a);
} else if (y <= 2.2e+175) {
tmp = x;
} else {
tmp = y * (t / -a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.85e+69: tmp = t * (-y / a) elif y <= 2.2e+175: tmp = x else: tmp = y * (t / -a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.85e+69) tmp = Float64(t * Float64(Float64(-y) / a)); elseif (y <= 2.2e+175) tmp = x; else tmp = Float64(y * Float64(t / Float64(-a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.85e+69) tmp = t * (-y / a); elseif (y <= 2.2e+175) tmp = x; else tmp = y * (t / -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.85e+69], N[(t * N[((-y) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+175], x, N[(y * N[(t / (-a)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+69}:\\
\;\;\;\;t \cdot \frac{-y}{a}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+175}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t}{-a}\\
\end{array}
\end{array}
if y < -1.8499999999999999e69Initial program 81.2%
+-commutative81.2%
associate-*r/97.9%
fma-udef98.0%
Simplified98.0%
fma-udef97.9%
associate-*r/81.2%
div-inv81.3%
div-inv81.2%
*-commutative81.2%
associate-*r/97.9%
Applied egg-rr97.9%
Taylor expanded in z around 0 69.0%
mul-1-neg69.0%
associate-*l/76.5%
*-commutative76.5%
distribute-lft-neg-out76.5%
cancel-sign-sub-inv76.5%
*-commutative76.5%
associate-*l/69.0%
associate-*r/80.1%
Simplified80.1%
Taylor expanded in x around 0 50.8%
mul-1-neg50.8%
associate-*l/56.4%
distribute-lft-neg-in56.4%
*-lft-identity56.4%
metadata-eval56.4%
times-frac56.4%
neg-mul-156.4%
neg-mul-156.4%
distribute-frac-neg56.4%
remove-double-neg56.4%
*-commutative56.4%
Simplified56.4%
Taylor expanded in y around 0 50.8%
mul-1-neg50.8%
associate-*r/61.9%
*-commutative61.9%
distribute-rgt-neg-in61.9%
Simplified61.9%
if -1.8499999999999999e69 < y < 2.1999999999999999e175Initial program 95.7%
*-commutative95.7%
associate-/l*96.5%
Simplified96.5%
Taylor expanded in x around inf 56.3%
if 2.1999999999999999e175 < y Initial program 81.9%
+-commutative81.9%
associate-*r/93.6%
fma-udef93.6%
Simplified93.6%
fma-udef93.6%
associate-*r/81.9%
div-inv81.9%
div-inv81.9%
*-commutative81.9%
associate-*r/93.8%
Applied egg-rr93.8%
Taylor expanded in z around 0 56.2%
mul-1-neg56.2%
associate-*l/55.9%
*-commutative55.9%
distribute-lft-neg-out55.9%
cancel-sign-sub-inv55.9%
*-commutative55.9%
associate-*l/56.2%
associate-*r/53.1%
Simplified53.1%
Taylor expanded in x around 0 46.9%
mul-1-neg46.9%
associate-*l/46.6%
distribute-lft-neg-in46.6%
*-lft-identity46.6%
metadata-eval46.6%
times-frac46.6%
neg-mul-146.6%
neg-mul-146.6%
distribute-frac-neg46.6%
remove-double-neg46.6%
*-commutative46.6%
Simplified46.6%
Final simplification56.2%
(FPCore (x y z t a) :precision binary64 (if (<= y -5.8e+67) (* t (/ (- y) a)) (if (<= y 6.1e+177) x (/ (* t (- y)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.8e+67) {
tmp = t * (-y / a);
} else if (y <= 6.1e+177) {
tmp = x;
} 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 (y <= (-5.8d+67)) then
tmp = t * (-y / a)
else if (y <= 6.1d+177) then
tmp = x
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 (y <= -5.8e+67) {
tmp = t * (-y / a);
} else if (y <= 6.1e+177) {
tmp = x;
} else {
tmp = (t * -y) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5.8e+67: tmp = t * (-y / a) elif y <= 6.1e+177: tmp = x else: tmp = (t * -y) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5.8e+67) tmp = Float64(t * Float64(Float64(-y) / a)); elseif (y <= 6.1e+177) tmp = x; else tmp = Float64(Float64(t * Float64(-y)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -5.8e+67) tmp = t * (-y / a); elseif (y <= 6.1e+177) tmp = x; else tmp = (t * -y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.8e+67], N[(t * N[((-y) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.1e+177], x, N[(N[(t * (-y)), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+67}:\\
\;\;\;\;t \cdot \frac{-y}{a}\\
\mathbf{elif}\;y \leq 6.1 \cdot 10^{+177}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \left(-y\right)}{a}\\
\end{array}
\end{array}
if y < -5.80000000000000047e67Initial program 81.2%
+-commutative81.2%
associate-*r/97.9%
fma-udef98.0%
Simplified98.0%
fma-udef97.9%
associate-*r/81.2%
div-inv81.3%
div-inv81.2%
*-commutative81.2%
associate-*r/97.9%
Applied egg-rr97.9%
Taylor expanded in z around 0 69.0%
mul-1-neg69.0%
associate-*l/76.5%
*-commutative76.5%
distribute-lft-neg-out76.5%
cancel-sign-sub-inv76.5%
*-commutative76.5%
associate-*l/69.0%
associate-*r/80.1%
Simplified80.1%
Taylor expanded in x around 0 50.8%
mul-1-neg50.8%
associate-*l/56.4%
distribute-lft-neg-in56.4%
*-lft-identity56.4%
metadata-eval56.4%
times-frac56.4%
neg-mul-156.4%
neg-mul-156.4%
distribute-frac-neg56.4%
remove-double-neg56.4%
*-commutative56.4%
Simplified56.4%
Taylor expanded in y around 0 50.8%
mul-1-neg50.8%
associate-*r/61.9%
*-commutative61.9%
distribute-rgt-neg-in61.9%
Simplified61.9%
if -5.80000000000000047e67 < y < 6.0999999999999997e177Initial program 95.7%
*-commutative95.7%
associate-/l*96.5%
Simplified96.5%
Taylor expanded in x around inf 56.3%
if 6.0999999999999997e177 < y Initial program 81.9%
+-commutative81.9%
associate-*r/93.6%
fma-udef93.6%
Simplified93.6%
fma-udef93.6%
associate-*r/81.9%
div-inv81.9%
div-inv81.9%
*-commutative81.9%
associate-*r/93.8%
Applied egg-rr93.8%
Taylor expanded in z around 0 56.2%
mul-1-neg56.2%
associate-*l/55.9%
*-commutative55.9%
distribute-lft-neg-out55.9%
cancel-sign-sub-inv55.9%
*-commutative55.9%
associate-*l/56.2%
associate-*r/53.1%
Simplified53.1%
Taylor expanded in x around 0 46.9%
associate-*r/46.9%
*-commutative46.9%
neg-mul-146.9%
distribute-rgt-neg-out46.9%
Simplified46.9%
Final simplification56.3%
(FPCore (x y z t a) :precision binary64 (if (<= y -2.9e+69) (* t (/ (- y) a)) (+ x (/ (* z y) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.9e+69) {
tmp = 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 (y <= (-2.9d+69)) then
tmp = 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 (y <= -2.9e+69) {
tmp = t * (-y / a);
} else {
tmp = x + ((z * y) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.9e+69: tmp = t * (-y / a) else: tmp = x + ((z * y) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.9e+69) tmp = Float64(t * Float64(Float64(-y) / a)); else tmp = Float64(x + Float64(Float64(z * y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.9e+69) tmp = t * (-y / a); else tmp = x + ((z * y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.9e+69], N[(t * N[((-y) / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+69}:\\
\;\;\;\;t \cdot \frac{-y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\
\end{array}
\end{array}
if y < -2.8999999999999998e69Initial program 81.2%
+-commutative81.2%
associate-*r/97.9%
fma-udef98.0%
Simplified98.0%
fma-udef97.9%
associate-*r/81.2%
div-inv81.3%
div-inv81.2%
*-commutative81.2%
associate-*r/97.9%
Applied egg-rr97.9%
Taylor expanded in z around 0 69.0%
mul-1-neg69.0%
associate-*l/76.5%
*-commutative76.5%
distribute-lft-neg-out76.5%
cancel-sign-sub-inv76.5%
*-commutative76.5%
associate-*l/69.0%
associate-*r/80.1%
Simplified80.1%
Taylor expanded in x around 0 50.8%
mul-1-neg50.8%
associate-*l/56.4%
distribute-lft-neg-in56.4%
*-lft-identity56.4%
metadata-eval56.4%
times-frac56.4%
neg-mul-156.4%
neg-mul-156.4%
distribute-frac-neg56.4%
remove-double-neg56.4%
*-commutative56.4%
Simplified56.4%
Taylor expanded in y around 0 50.8%
mul-1-neg50.8%
associate-*r/61.9%
*-commutative61.9%
distribute-rgt-neg-in61.9%
Simplified61.9%
if -2.8999999999999998e69 < y Initial program 93.6%
*-commutative93.6%
associate-/l*96.1%
Simplified96.1%
Taylor expanded in z around inf 76.7%
Final simplification73.7%
(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.2%
*-commutative91.2%
associate-/l*96.9%
Simplified96.9%
Final simplification96.9%
(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.2%
*-commutative91.2%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in x around inf 44.1%
Final simplification44.1%
(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 2024018
(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)))