
(FPCore (a b) :precision binary64 (/ (exp a) (+ (exp a) (exp b))))
double code(double a, double b) {
return exp(a) / (exp(a) + exp(b));
}
real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
code = exp(a) / (exp(a) + exp(b))
end function
public static double code(double a, double b) {
return Math.exp(a) / (Math.exp(a) + Math.exp(b));
}
def code(a, b): return math.exp(a) / (math.exp(a) + math.exp(b))
function code(a, b) return Float64(exp(a) / Float64(exp(a) + exp(b))) end
function tmp = code(a, b) tmp = exp(a) / (exp(a) + exp(b)); end
code[a_, b_] := N[(N[Exp[a], $MachinePrecision] / N[(N[Exp[a], $MachinePrecision] + N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{e^{a}}{e^{a} + e^{b}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b) :precision binary64 (/ (exp a) (+ (exp a) (exp b))))
double code(double a, double b) {
return exp(a) / (exp(a) + exp(b));
}
real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
code = exp(a) / (exp(a) + exp(b))
end function
public static double code(double a, double b) {
return Math.exp(a) / (Math.exp(a) + Math.exp(b));
}
def code(a, b): return math.exp(a) / (math.exp(a) + math.exp(b))
function code(a, b) return Float64(exp(a) / Float64(exp(a) + exp(b))) end
function tmp = code(a, b) tmp = exp(a) / (exp(a) + exp(b)); end
code[a_, b_] := N[(N[Exp[a], $MachinePrecision] / N[(N[Exp[a], $MachinePrecision] + N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{e^{a}}{e^{a} + e^{b}}
\end{array}
(FPCore (a b) :precision binary64 (if (<= a -5.1e-11) (/ (exp a) (+ a 2.0)) (/ 1.0 (+ (exp b) 1.0))))
double code(double a, double b) {
double tmp;
if (a <= -5.1e-11) {
tmp = exp(a) / (a + 2.0);
} else {
tmp = 1.0 / (exp(b) + 1.0);
}
return tmp;
}
real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-5.1d-11)) then
tmp = exp(a) / (a + 2.0d0)
else
tmp = 1.0d0 / (exp(b) + 1.0d0)
end if
code = tmp
end function
public static double code(double a, double b) {
double tmp;
if (a <= -5.1e-11) {
tmp = Math.exp(a) / (a + 2.0);
} else {
tmp = 1.0 / (Math.exp(b) + 1.0);
}
return tmp;
}
def code(a, b): tmp = 0 if a <= -5.1e-11: tmp = math.exp(a) / (a + 2.0) else: tmp = 1.0 / (math.exp(b) + 1.0) return tmp
function code(a, b) tmp = 0.0 if (a <= -5.1e-11) tmp = Float64(exp(a) / Float64(a + 2.0)); else tmp = Float64(1.0 / Float64(exp(b) + 1.0)); end return tmp end
function tmp_2 = code(a, b) tmp = 0.0; if (a <= -5.1e-11) tmp = exp(a) / (a + 2.0); else tmp = 1.0 / (exp(b) + 1.0); end tmp_2 = tmp; end
code[a_, b_] := If[LessEqual[a, -5.1e-11], N[(N[Exp[a], $MachinePrecision] / N[(a + 2.0), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Exp[b], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.1 \cdot 10^{-11}:\\
\;\;\;\;\frac{e^{a}}{a + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{e^{b} + 1}\\
\end{array}
\end{array}
if a < -5.09999999999999984e-11Initial program 98.7%
Taylor expanded in b around 0 98.8%
Taylor expanded in a around 0 98.8%
if -5.09999999999999984e-11 < a Initial program 99.4%
Taylor expanded in a around 0 99.6%
Final simplification99.3%
(FPCore (a b) :precision binary64 (if (<= (exp a) 1.0) (/ (exp a) (+ (exp a) 1.0)) (/ 1.0 (+ (exp b) 1.0))))
double code(double a, double b) {
double tmp;
if (exp(a) <= 1.0) {
tmp = exp(a) / (exp(a) + 1.0);
} else {
tmp = 1.0 / (exp(b) + 1.0);
}
return tmp;
}
real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (exp(a) <= 1.0d0) then
tmp = exp(a) / (exp(a) + 1.0d0)
else
tmp = 1.0d0 / (exp(b) + 1.0d0)
end if
code = tmp
end function
public static double code(double a, double b) {
double tmp;
if (Math.exp(a) <= 1.0) {
tmp = Math.exp(a) / (Math.exp(a) + 1.0);
} else {
tmp = 1.0 / (Math.exp(b) + 1.0);
}
return tmp;
}
def code(a, b): tmp = 0 if math.exp(a) <= 1.0: tmp = math.exp(a) / (math.exp(a) + 1.0) else: tmp = 1.0 / (math.exp(b) + 1.0) return tmp
function code(a, b) tmp = 0.0 if (exp(a) <= 1.0) tmp = Float64(exp(a) / Float64(exp(a) + 1.0)); else tmp = Float64(1.0 / Float64(exp(b) + 1.0)); end return tmp end
function tmp_2 = code(a, b) tmp = 0.0; if (exp(a) <= 1.0) tmp = exp(a) / (exp(a) + 1.0); else tmp = 1.0 / (exp(b) + 1.0); end tmp_2 = tmp; end
code[a_, b_] := If[LessEqual[N[Exp[a], $MachinePrecision], 1.0], N[(N[Exp[a], $MachinePrecision] / N[(N[Exp[a], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Exp[b], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{a} \leq 1:\\
\;\;\;\;\frac{e^{a}}{e^{a} + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{e^{b} + 1}\\
\end{array}
\end{array}
if (exp.f64 a) < 1Initial program 99.6%
Taylor expanded in b around 0 67.6%
if 1 < (exp.f64 a) Initial program 91.7%
Taylor expanded in a around 0 94.2%
Final simplification68.8%
(FPCore (a b) :precision binary64 (/ (exp a) (+ (exp a) (exp b))))
double code(double a, double b) {
return exp(a) / (exp(a) + exp(b));
}
real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
code = exp(a) / (exp(a) + exp(b))
end function
public static double code(double a, double b) {
return Math.exp(a) / (Math.exp(a) + Math.exp(b));
}
def code(a, b): return math.exp(a) / (math.exp(a) + math.exp(b))
function code(a, b) return Float64(exp(a) / Float64(exp(a) + exp(b))) end
function tmp = code(a, b) tmp = exp(a) / (exp(a) + exp(b)); end
code[a_, b_] := N[(N[Exp[a], $MachinePrecision] / N[(N[Exp[a], $MachinePrecision] + N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{e^{a}}{e^{a} + e^{b}}
\end{array}
Initial program 99.2%
Final simplification99.2%
(FPCore (a b) :precision binary64 (if (<= a -54000000000000.0) (/ (exp a) a) (/ 1.0 (+ (exp b) 1.0))))
double code(double a, double b) {
double tmp;
if (a <= -54000000000000.0) {
tmp = exp(a) / a;
} else {
tmp = 1.0 / (exp(b) + 1.0);
}
return tmp;
}
real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-54000000000000.0d0)) then
tmp = exp(a) / a
else
tmp = 1.0d0 / (exp(b) + 1.0d0)
end if
code = tmp
end function
public static double code(double a, double b) {
double tmp;
if (a <= -54000000000000.0) {
tmp = Math.exp(a) / a;
} else {
tmp = 1.0 / (Math.exp(b) + 1.0);
}
return tmp;
}
def code(a, b): tmp = 0 if a <= -54000000000000.0: tmp = math.exp(a) / a else: tmp = 1.0 / (math.exp(b) + 1.0) return tmp
function code(a, b) tmp = 0.0 if (a <= -54000000000000.0) tmp = Float64(exp(a) / a); else tmp = Float64(1.0 / Float64(exp(b) + 1.0)); end return tmp end
function tmp_2 = code(a, b) tmp = 0.0; if (a <= -54000000000000.0) tmp = exp(a) / a; else tmp = 1.0 / (exp(b) + 1.0); end tmp_2 = tmp; end
code[a_, b_] := If[LessEqual[a, -54000000000000.0], N[(N[Exp[a], $MachinePrecision] / a), $MachinePrecision], N[(1.0 / N[(N[Exp[b], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -54000000000000:\\
\;\;\;\;\frac{e^{a}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{e^{b} + 1}\\
\end{array}
\end{array}
if a < -5.4e13Initial program 100.0%
Taylor expanded in b around 0 100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in a around inf 100.0%
if -5.4e13 < a Initial program 98.9%
Taylor expanded in a around 0 98.9%
Final simplification99.2%
(FPCore (a b) :precision binary64 (if (<= a -680.0) (/ (exp a) a) (/ 1.0 (+ (+ b 2.0) (* 0.5 (* b b))))))
double code(double a, double b) {
double tmp;
if (a <= -680.0) {
tmp = exp(a) / a;
} else {
tmp = 1.0 / ((b + 2.0) + (0.5 * (b * b)));
}
return tmp;
}
real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-680.0d0)) then
tmp = exp(a) / a
else
tmp = 1.0d0 / ((b + 2.0d0) + (0.5d0 * (b * b)))
end if
code = tmp
end function
public static double code(double a, double b) {
double tmp;
if (a <= -680.0) {
tmp = Math.exp(a) / a;
} else {
tmp = 1.0 / ((b + 2.0) + (0.5 * (b * b)));
}
return tmp;
}
def code(a, b): tmp = 0 if a <= -680.0: tmp = math.exp(a) / a else: tmp = 1.0 / ((b + 2.0) + (0.5 * (b * b))) return tmp
function code(a, b) tmp = 0.0 if (a <= -680.0) tmp = Float64(exp(a) / a); else tmp = Float64(1.0 / Float64(Float64(b + 2.0) + Float64(0.5 * Float64(b * b)))); end return tmp end
function tmp_2 = code(a, b) tmp = 0.0; if (a <= -680.0) tmp = exp(a) / a; else tmp = 1.0 / ((b + 2.0) + (0.5 * (b * b))); end tmp_2 = tmp; end
code[a_, b_] := If[LessEqual[a, -680.0], N[(N[Exp[a], $MachinePrecision] / a), $MachinePrecision], N[(1.0 / N[(N[(b + 2.0), $MachinePrecision] + N[(0.5 * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -680:\\
\;\;\;\;\frac{e^{a}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\left(b + 2\right) + 0.5 \cdot \left(b \cdot b\right)}\\
\end{array}
\end{array}
if a < -680Initial program 98.7%
Taylor expanded in b around 0 98.8%
Taylor expanded in a around 0 98.8%
Taylor expanded in a around inf 98.8%
if -680 < a Initial program 99.4%
Taylor expanded in a around 0 99.4%
Taylor expanded in b around 0 64.4%
associate-+r+64.5%
unpow264.5%
Simplified64.5%
Final simplification74.9%
(FPCore (a b) :precision binary64 (if (<= b -2.0) 0.5 (/ 1.0 (+ (+ b 2.0) (* 0.5 (* b b))))))
double code(double a, double b) {
double tmp;
if (b <= -2.0) {
tmp = 0.5;
} else {
tmp = 1.0 / ((b + 2.0) + (0.5 * (b * b)));
}
return tmp;
}
real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2.0d0)) then
tmp = 0.5d0
else
tmp = 1.0d0 / ((b + 2.0d0) + (0.5d0 * (b * b)))
end if
code = tmp
end function
public static double code(double a, double b) {
double tmp;
if (b <= -2.0) {
tmp = 0.5;
} else {
tmp = 1.0 / ((b + 2.0) + (0.5 * (b * b)));
}
return tmp;
}
def code(a, b): tmp = 0 if b <= -2.0: tmp = 0.5 else: tmp = 1.0 / ((b + 2.0) + (0.5 * (b * b))) return tmp
function code(a, b) tmp = 0.0 if (b <= -2.0) tmp = 0.5; else tmp = Float64(1.0 / Float64(Float64(b + 2.0) + Float64(0.5 * Float64(b * b)))); end return tmp end
function tmp_2 = code(a, b) tmp = 0.0; if (b <= -2.0) tmp = 0.5; else tmp = 1.0 / ((b + 2.0) + (0.5 * (b * b))); end tmp_2 = tmp; end
code[a_, b_] := If[LessEqual[b, -2.0], 0.5, N[(1.0 / N[(N[(b + 2.0), $MachinePrecision] + N[(0.5 * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2:\\
\;\;\;\;0.5\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\left(b + 2\right) + 0.5 \cdot \left(b \cdot b\right)}\\
\end{array}
\end{array}
if b < -2Initial program 95.7%
Taylor expanded in a around 0 100.0%
Taylor expanded in b around 0 18.8%
if -2 < b Initial program 100.0%
Taylor expanded in a around 0 74.2%
Taylor expanded in b around 0 61.5%
associate-+r+61.5%
unpow261.5%
Simplified61.5%
Final simplification53.8%
(FPCore (a b) :precision binary64 (if (<= b 1.22) 0.5 (/ 1.0 (* b (+ 1.0 (* b 0.5))))))
double code(double a, double b) {
double tmp;
if (b <= 1.22) {
tmp = 0.5;
} else {
tmp = 1.0 / (b * (1.0 + (b * 0.5)));
}
return tmp;
}
real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 1.22d0) then
tmp = 0.5d0
else
tmp = 1.0d0 / (b * (1.0d0 + (b * 0.5d0)))
end if
code = tmp
end function
public static double code(double a, double b) {
double tmp;
if (b <= 1.22) {
tmp = 0.5;
} else {
tmp = 1.0 / (b * (1.0 + (b * 0.5)));
}
return tmp;
}
def code(a, b): tmp = 0 if b <= 1.22: tmp = 0.5 else: tmp = 1.0 / (b * (1.0 + (b * 0.5))) return tmp
function code(a, b) tmp = 0.0 if (b <= 1.22) tmp = 0.5; else tmp = Float64(1.0 / Float64(b * Float64(1.0 + Float64(b * 0.5)))); end return tmp end
function tmp_2 = code(a, b) tmp = 0.0; if (b <= 1.22) tmp = 0.5; else tmp = 1.0 / (b * (1.0 + (b * 0.5))); end tmp_2 = tmp; end
code[a_, b_] := If[LessEqual[b, 1.22], 0.5, N[(1.0 / N[(b * N[(1.0 + N[(b * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.22:\\
\;\;\;\;0.5\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{b \cdot \left(1 + b \cdot 0.5\right)}\\
\end{array}
\end{array}
if b < 1.21999999999999997Initial program 98.9%
Taylor expanded in a around 0 70.9%
Taylor expanded in b around 0 49.6%
if 1.21999999999999997 < b Initial program 100.0%
Taylor expanded in a around 0 98.7%
Taylor expanded in b around 0 62.4%
associate-+r+62.4%
unpow262.4%
Simplified62.4%
Taylor expanded in b around inf 62.4%
unpow262.4%
Simplified62.4%
associate-*r*62.4%
distribute-rgt1-in62.4%
*-commutative62.4%
Applied egg-rr62.4%
Final simplification53.2%
(FPCore (a b) :precision binary64 (if (<= b 1.08e-277) (+ 0.5 (* a 0.25)) (/ 1.0 (+ 2.0 (* 0.5 (* b b))))))
double code(double a, double b) {
double tmp;
if (b <= 1.08e-277) {
tmp = 0.5 + (a * 0.25);
} else {
tmp = 1.0 / (2.0 + (0.5 * (b * b)));
}
return tmp;
}
real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 1.08d-277) then
tmp = 0.5d0 + (a * 0.25d0)
else
tmp = 1.0d0 / (2.0d0 + (0.5d0 * (b * b)))
end if
code = tmp
end function
public static double code(double a, double b) {
double tmp;
if (b <= 1.08e-277) {
tmp = 0.5 + (a * 0.25);
} else {
tmp = 1.0 / (2.0 + (0.5 * (b * b)));
}
return tmp;
}
def code(a, b): tmp = 0 if b <= 1.08e-277: tmp = 0.5 + (a * 0.25) else: tmp = 1.0 / (2.0 + (0.5 * (b * b))) return tmp
function code(a, b) tmp = 0.0 if (b <= 1.08e-277) tmp = Float64(0.5 + Float64(a * 0.25)); else tmp = Float64(1.0 / Float64(2.0 + Float64(0.5 * Float64(b * b)))); end return tmp end
function tmp_2 = code(a, b) tmp = 0.0; if (b <= 1.08e-277) tmp = 0.5 + (a * 0.25); else tmp = 1.0 / (2.0 + (0.5 * (b * b))); end tmp_2 = tmp; end
code[a_, b_] := If[LessEqual[b, 1.08e-277], N[(0.5 + N[(a * 0.25), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(2.0 + N[(0.5 * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.08 \cdot 10^{-277}:\\
\;\;\;\;0.5 + a \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{2 + 0.5 \cdot \left(b \cdot b\right)}\\
\end{array}
\end{array}
if b < 1.0800000000000001e-277Initial program 98.4%
Taylor expanded in b around 0 69.6%
Taylor expanded in a around 0 45.4%
if 1.0800000000000001e-277 < b Initial program 100.0%
Taylor expanded in a around 0 82.1%
Taylor expanded in b around 0 61.7%
associate-+r+61.7%
unpow261.7%
Simplified61.7%
flip-+61.7%
div-inv61.7%
fma-def61.7%
metadata-eval61.7%
*-commutative61.7%
associate-*l*61.7%
Applied egg-rr61.7%
fma-udef61.7%
+-commutative61.7%
associate-*r*61.7%
*-commutative61.7%
associate-*r/61.7%
*-rgt-identity61.7%
Simplified61.7%
Taylor expanded in b around 0 60.9%
Final simplification53.3%
(FPCore (a b) :precision binary64 (if (<= b 2.0) 0.5 (/ 2.0 (* b b))))
double code(double a, double b) {
double tmp;
if (b <= 2.0) {
tmp = 0.5;
} else {
tmp = 2.0 / (b * b);
}
return tmp;
}
real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= 2.0d0) then
tmp = 0.5d0
else
tmp = 2.0d0 / (b * b)
end if
code = tmp
end function
public static double code(double a, double b) {
double tmp;
if (b <= 2.0) {
tmp = 0.5;
} else {
tmp = 2.0 / (b * b);
}
return tmp;
}
def code(a, b): tmp = 0 if b <= 2.0: tmp = 0.5 else: tmp = 2.0 / (b * b) return tmp
function code(a, b) tmp = 0.0 if (b <= 2.0) tmp = 0.5; else tmp = Float64(2.0 / Float64(b * b)); end return tmp end
function tmp_2 = code(a, b) tmp = 0.0; if (b <= 2.0) tmp = 0.5; else tmp = 2.0 / (b * b); end tmp_2 = tmp; end
code[a_, b_] := If[LessEqual[b, 2.0], 0.5, N[(2.0 / N[(b * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2:\\
\;\;\;\;0.5\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{b \cdot b}\\
\end{array}
\end{array}
if b < 2Initial program 98.9%
Taylor expanded in a around 0 70.9%
Taylor expanded in b around 0 49.6%
if 2 < b Initial program 100.0%
Taylor expanded in a around 0 98.7%
Taylor expanded in b around 0 62.4%
associate-+r+62.4%
unpow262.4%
Simplified62.4%
Taylor expanded in b around inf 62.4%
unpow262.4%
Simplified62.4%
Final simplification53.2%
(FPCore (a b) :precision binary64 0.5)
double code(double a, double b) {
return 0.5;
}
real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
code = 0.5d0
end function
public static double code(double a, double b) {
return 0.5;
}
def code(a, b): return 0.5
function code(a, b) return 0.5 end
function tmp = code(a, b) tmp = 0.5; end
code[a_, b_] := 0.5
\begin{array}{l}
\\
0.5
\end{array}
Initial program 99.2%
Taylor expanded in a around 0 78.8%
Taylor expanded in b around 0 36.3%
Final simplification36.3%
(FPCore (a b) :precision binary64 (/ 1.0 (+ 1.0 (exp (- b a)))))
double code(double a, double b) {
return 1.0 / (1.0 + exp((b - a)));
}
real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
code = 1.0d0 / (1.0d0 + exp((b - a)))
end function
public static double code(double a, double b) {
return 1.0 / (1.0 + Math.exp((b - a)));
}
def code(a, b): return 1.0 / (1.0 + math.exp((b - a)))
function code(a, b) return Float64(1.0 / Float64(1.0 + exp(Float64(b - a)))) end
function tmp = code(a, b) tmp = 1.0 / (1.0 + exp((b - a))); end
code[a_, b_] := N[(1.0 / N[(1.0 + N[Exp[N[(b - a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{1 + e^{b - a}}
\end{array}
herbie shell --seed 2023200
(FPCore (a b)
:name "Quotient of sum of exps"
:precision binary64
:herbie-target
(/ 1.0 (+ 1.0 (exp (- b a))))
(/ (exp a) (+ (exp a) (exp b))))