
(FPCore (c_p c_n t s)
:precision binary64
(let* ((t_1 (/ 1.0 (+ 1.0 (exp (- t))))) (t_2 (/ 1.0 (+ 1.0 (exp (- s))))))
(/
(* (pow t_2 c_p) (pow (- 1.0 t_2) c_n))
(* (pow t_1 c_p) (pow (- 1.0 t_1) c_n)))))
double code(double c_p, double c_n, double t, double s) {
double t_1 = 1.0 / (1.0 + exp(-t));
double t_2 = 1.0 / (1.0 + exp(-s));
return (pow(t_2, c_p) * pow((1.0 - t_2), c_n)) / (pow(t_1, c_p) * pow((1.0 - t_1), c_n));
}
real(8) function code(c_p, c_n, t, s)
real(8), intent (in) :: c_p
real(8), intent (in) :: c_n
real(8), intent (in) :: t
real(8), intent (in) :: s
real(8) :: t_1
real(8) :: t_2
t_1 = 1.0d0 / (1.0d0 + exp(-t))
t_2 = 1.0d0 / (1.0d0 + exp(-s))
code = ((t_2 ** c_p) * ((1.0d0 - t_2) ** c_n)) / ((t_1 ** c_p) * ((1.0d0 - t_1) ** c_n))
end function
public static double code(double c_p, double c_n, double t, double s) {
double t_1 = 1.0 / (1.0 + Math.exp(-t));
double t_2 = 1.0 / (1.0 + Math.exp(-s));
return (Math.pow(t_2, c_p) * Math.pow((1.0 - t_2), c_n)) / (Math.pow(t_1, c_p) * Math.pow((1.0 - t_1), c_n));
}
def code(c_p, c_n, t, s): t_1 = 1.0 / (1.0 + math.exp(-t)) t_2 = 1.0 / (1.0 + math.exp(-s)) return (math.pow(t_2, c_p) * math.pow((1.0 - t_2), c_n)) / (math.pow(t_1, c_p) * math.pow((1.0 - t_1), c_n))
function code(c_p, c_n, t, s) t_1 = Float64(1.0 / Float64(1.0 + exp(Float64(-t)))) t_2 = Float64(1.0 / Float64(1.0 + exp(Float64(-s)))) return Float64(Float64((t_2 ^ c_p) * (Float64(1.0 - t_2) ^ c_n)) / Float64((t_1 ^ c_p) * (Float64(1.0 - t_1) ^ c_n))) end
function tmp = code(c_p, c_n, t, s) t_1 = 1.0 / (1.0 + exp(-t)); t_2 = 1.0 / (1.0 + exp(-s)); tmp = ((t_2 ^ c_p) * ((1.0 - t_2) ^ c_n)) / ((t_1 ^ c_p) * ((1.0 - t_1) ^ c_n)); end
code[c$95$p_, c$95$n_, t_, s_] := Block[{t$95$1 = N[(1.0 / N[(1.0 + N[Exp[(-t)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[(1.0 + N[Exp[(-s)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[Power[t$95$2, c$95$p], $MachinePrecision] * N[Power[N[(1.0 - t$95$2), $MachinePrecision], c$95$n], $MachinePrecision]), $MachinePrecision] / N[(N[Power[t$95$1, c$95$p], $MachinePrecision] * N[Power[N[(1.0 - t$95$1), $MachinePrecision], c$95$n], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1}{1 + e^{-t}}\\
t_2 := \frac{1}{1 + e^{-s}}\\
\frac{{t\_2}^{c\_p} \cdot {\left(1 - t\_2\right)}^{c\_n}}{{t\_1}^{c\_p} \cdot {\left(1 - t\_1\right)}^{c\_n}}
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 5 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (c_p c_n t s)
:precision binary64
(let* ((t_1 (/ 1.0 (+ 1.0 (exp (- t))))) (t_2 (/ 1.0 (+ 1.0 (exp (- s))))))
(/
(* (pow t_2 c_p) (pow (- 1.0 t_2) c_n))
(* (pow t_1 c_p) (pow (- 1.0 t_1) c_n)))))
double code(double c_p, double c_n, double t, double s) {
double t_1 = 1.0 / (1.0 + exp(-t));
double t_2 = 1.0 / (1.0 + exp(-s));
return (pow(t_2, c_p) * pow((1.0 - t_2), c_n)) / (pow(t_1, c_p) * pow((1.0 - t_1), c_n));
}
real(8) function code(c_p, c_n, t, s)
real(8), intent (in) :: c_p
real(8), intent (in) :: c_n
real(8), intent (in) :: t
real(8), intent (in) :: s
real(8) :: t_1
real(8) :: t_2
t_1 = 1.0d0 / (1.0d0 + exp(-t))
t_2 = 1.0d0 / (1.0d0 + exp(-s))
code = ((t_2 ** c_p) * ((1.0d0 - t_2) ** c_n)) / ((t_1 ** c_p) * ((1.0d0 - t_1) ** c_n))
end function
public static double code(double c_p, double c_n, double t, double s) {
double t_1 = 1.0 / (1.0 + Math.exp(-t));
double t_2 = 1.0 / (1.0 + Math.exp(-s));
return (Math.pow(t_2, c_p) * Math.pow((1.0 - t_2), c_n)) / (Math.pow(t_1, c_p) * Math.pow((1.0 - t_1), c_n));
}
def code(c_p, c_n, t, s): t_1 = 1.0 / (1.0 + math.exp(-t)) t_2 = 1.0 / (1.0 + math.exp(-s)) return (math.pow(t_2, c_p) * math.pow((1.0 - t_2), c_n)) / (math.pow(t_1, c_p) * math.pow((1.0 - t_1), c_n))
function code(c_p, c_n, t, s) t_1 = Float64(1.0 / Float64(1.0 + exp(Float64(-t)))) t_2 = Float64(1.0 / Float64(1.0 + exp(Float64(-s)))) return Float64(Float64((t_2 ^ c_p) * (Float64(1.0 - t_2) ^ c_n)) / Float64((t_1 ^ c_p) * (Float64(1.0 - t_1) ^ c_n))) end
function tmp = code(c_p, c_n, t, s) t_1 = 1.0 / (1.0 + exp(-t)); t_2 = 1.0 / (1.0 + exp(-s)); tmp = ((t_2 ^ c_p) * ((1.0 - t_2) ^ c_n)) / ((t_1 ^ c_p) * ((1.0 - t_1) ^ c_n)); end
code[c$95$p_, c$95$n_, t_, s_] := Block[{t$95$1 = N[(1.0 / N[(1.0 + N[Exp[(-t)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[(1.0 + N[Exp[(-s)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[Power[t$95$2, c$95$p], $MachinePrecision] * N[Power[N[(1.0 - t$95$2), $MachinePrecision], c$95$n], $MachinePrecision]), $MachinePrecision] / N[(N[Power[t$95$1, c$95$p], $MachinePrecision] * N[Power[N[(1.0 - t$95$1), $MachinePrecision], c$95$n], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1}{1 + e^{-t}}\\
t_2 := \frac{1}{1 + e^{-s}}\\
\frac{{t\_2}^{c\_p} \cdot {\left(1 - t\_2\right)}^{c\_n}}{{t\_1}^{c\_p} \cdot {\left(1 - t\_1\right)}^{c\_n}}
\end{array}
\end{array}
(FPCore (c_p c_n t s)
:precision binary64
(let* ((t_1 (/ 1.0 (+ 1.0 (exp (- t)))))
(t_2 (exp (- s)))
(t_3 (/ 1.0 (+ 1.0 t_2)))
(t_4
(/
(* (pow t_3 c_p) (pow (- 1.0 t_3) c_n))
(* (pow t_1 c_p) (pow (- 1.0 t_1) c_n)))))
(if (<= t_4 2.0) t_4 t_2)))
double code(double c_p, double c_n, double t, double s) {
double t_1 = 1.0 / (1.0 + exp(-t));
double t_2 = exp(-s);
double t_3 = 1.0 / (1.0 + t_2);
double t_4 = (pow(t_3, c_p) * pow((1.0 - t_3), c_n)) / (pow(t_1, c_p) * pow((1.0 - t_1), c_n));
double tmp;
if (t_4 <= 2.0) {
tmp = t_4;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(c_p, c_n, t, s)
real(8), intent (in) :: c_p
real(8), intent (in) :: c_n
real(8), intent (in) :: t
real(8), intent (in) :: s
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = 1.0d0 / (1.0d0 + exp(-t))
t_2 = exp(-s)
t_3 = 1.0d0 / (1.0d0 + t_2)
t_4 = ((t_3 ** c_p) * ((1.0d0 - t_3) ** c_n)) / ((t_1 ** c_p) * ((1.0d0 - t_1) ** c_n))
if (t_4 <= 2.0d0) then
tmp = t_4
else
tmp = t_2
end if
code = tmp
end function
public static double code(double c_p, double c_n, double t, double s) {
double t_1 = 1.0 / (1.0 + Math.exp(-t));
double t_2 = Math.exp(-s);
double t_3 = 1.0 / (1.0 + t_2);
double t_4 = (Math.pow(t_3, c_p) * Math.pow((1.0 - t_3), c_n)) / (Math.pow(t_1, c_p) * Math.pow((1.0 - t_1), c_n));
double tmp;
if (t_4 <= 2.0) {
tmp = t_4;
} else {
tmp = t_2;
}
return tmp;
}
def code(c_p, c_n, t, s): t_1 = 1.0 / (1.0 + math.exp(-t)) t_2 = math.exp(-s) t_3 = 1.0 / (1.0 + t_2) t_4 = (math.pow(t_3, c_p) * math.pow((1.0 - t_3), c_n)) / (math.pow(t_1, c_p) * math.pow((1.0 - t_1), c_n)) tmp = 0 if t_4 <= 2.0: tmp = t_4 else: tmp = t_2 return tmp
function code(c_p, c_n, t, s) t_1 = Float64(1.0 / Float64(1.0 + exp(Float64(-t)))) t_2 = exp(Float64(-s)) t_3 = Float64(1.0 / Float64(1.0 + t_2)) t_4 = Float64(Float64((t_3 ^ c_p) * (Float64(1.0 - t_3) ^ c_n)) / Float64((t_1 ^ c_p) * (Float64(1.0 - t_1) ^ c_n))) tmp = 0.0 if (t_4 <= 2.0) tmp = t_4; else tmp = t_2; end return tmp end
function tmp_2 = code(c_p, c_n, t, s) t_1 = 1.0 / (1.0 + exp(-t)); t_2 = exp(-s); t_3 = 1.0 / (1.0 + t_2); t_4 = ((t_3 ^ c_p) * ((1.0 - t_3) ^ c_n)) / ((t_1 ^ c_p) * ((1.0 - t_1) ^ c_n)); tmp = 0.0; if (t_4 <= 2.0) tmp = t_4; else tmp = t_2; end tmp_2 = tmp; end
code[c$95$p_, c$95$n_, t_, s_] := Block[{t$95$1 = N[(1.0 / N[(1.0 + N[Exp[(-t)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[(-s)], $MachinePrecision]}, Block[{t$95$3 = N[(1.0 / N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[Power[t$95$3, c$95$p], $MachinePrecision] * N[Power[N[(1.0 - t$95$3), $MachinePrecision], c$95$n], $MachinePrecision]), $MachinePrecision] / N[(N[Power[t$95$1, c$95$p], $MachinePrecision] * N[Power[N[(1.0 - t$95$1), $MachinePrecision], c$95$n], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 2.0], t$95$4, t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1}{1 + e^{-t}}\\
t_2 := e^{-s}\\
t_3 := \frac{1}{1 + t\_2}\\
t_4 := \frac{{t\_3}^{c\_p} \cdot {\left(1 - t\_3\right)}^{c\_n}}{{t\_1}^{c\_p} \cdot {\left(1 - t\_1\right)}^{c\_n}}\\
\mathbf{if}\;t\_4 \leq 2:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (*.f64 (pow.f64 (/.f64 #s(literal 1 binary64) (+.f64 #s(literal 1 binary64) (exp.f64 (neg.f64 s)))) c_p) (pow.f64 (-.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (+.f64 #s(literal 1 binary64) (exp.f64 (neg.f64 s))))) c_n)) (*.f64 (pow.f64 (/.f64 #s(literal 1 binary64) (+.f64 #s(literal 1 binary64) (exp.f64 (neg.f64 t)))) c_p) (pow.f64 (-.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (+.f64 #s(literal 1 binary64) (exp.f64 (neg.f64 t))))) c_n))) < 2Initial program 98.4%
if 2 < (/.f64 (*.f64 (pow.f64 (/.f64 #s(literal 1 binary64) (+.f64 #s(literal 1 binary64) (exp.f64 (neg.f64 s)))) c_p) (pow.f64 (-.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (+.f64 #s(literal 1 binary64) (exp.f64 (neg.f64 s))))) c_n)) (*.f64 (pow.f64 (/.f64 #s(literal 1 binary64) (+.f64 #s(literal 1 binary64) (exp.f64 (neg.f64 t)))) c_p) (pow.f64 (-.f64 #s(literal 1 binary64) (/.f64 #s(literal 1 binary64) (+.f64 #s(literal 1 binary64) (exp.f64 (neg.f64 t))))) c_n))) Initial program 0.2%
Taylor expanded in c_p around 0
Applied rewrites56.9%
Taylor expanded in c_p around 0
Applied rewrites80.3%
(FPCore (c_p c_n t s) :precision binary64 (let* ((t_1 (exp (- s)))) (if (<= (- s) 2e-53) t_1 (pow (/ 1.0 (+ 1.0 t_1)) c_p))))
double code(double c_p, double c_n, double t, double s) {
double t_1 = exp(-s);
double tmp;
if (-s <= 2e-53) {
tmp = t_1;
} else {
tmp = pow((1.0 / (1.0 + t_1)), c_p);
}
return tmp;
}
real(8) function code(c_p, c_n, t, s)
real(8), intent (in) :: c_p
real(8), intent (in) :: c_n
real(8), intent (in) :: t
real(8), intent (in) :: s
real(8) :: t_1
real(8) :: tmp
t_1 = exp(-s)
if (-s <= 2d-53) then
tmp = t_1
else
tmp = (1.0d0 / (1.0d0 + t_1)) ** c_p
end if
code = tmp
end function
public static double code(double c_p, double c_n, double t, double s) {
double t_1 = Math.exp(-s);
double tmp;
if (-s <= 2e-53) {
tmp = t_1;
} else {
tmp = Math.pow((1.0 / (1.0 + t_1)), c_p);
}
return tmp;
}
def code(c_p, c_n, t, s): t_1 = math.exp(-s) tmp = 0 if -s <= 2e-53: tmp = t_1 else: tmp = math.pow((1.0 / (1.0 + t_1)), c_p) return tmp
function code(c_p, c_n, t, s) t_1 = exp(Float64(-s)) tmp = 0.0 if (Float64(-s) <= 2e-53) tmp = t_1; else tmp = Float64(1.0 / Float64(1.0 + t_1)) ^ c_p; end return tmp end
function tmp_2 = code(c_p, c_n, t, s) t_1 = exp(-s); tmp = 0.0; if (-s <= 2e-53) tmp = t_1; else tmp = (1.0 / (1.0 + t_1)) ^ c_p; end tmp_2 = tmp; end
code[c$95$p_, c$95$n_, t_, s_] := Block[{t$95$1 = N[Exp[(-s)], $MachinePrecision]}, If[LessEqual[(-s), 2e-53], t$95$1, N[Power[N[(1.0 / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision], c$95$p], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := e^{-s}\\
\mathbf{if}\;-s \leq 2 \cdot 10^{-53}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{1}{1 + t\_1}\right)}^{c\_p}\\
\end{array}
\end{array}
if (neg.f64 s) < 2.00000000000000006e-53Initial program 93.7%
Taylor expanded in c_p around 0
Applied rewrites93.0%
Taylor expanded in c_p around 0
Applied rewrites96.7%
if 2.00000000000000006e-53 < (neg.f64 s) Initial program 80.3%
Taylor expanded in c_p around 0
Applied rewrites90.3%
(FPCore (c_p c_n t s) :precision binary64 (if (<= (- t) 4e-37) (exp (- t)) (exp (- s))))
double code(double c_p, double c_n, double t, double s) {
double tmp;
if (-t <= 4e-37) {
tmp = exp(-t);
} else {
tmp = exp(-s);
}
return tmp;
}
real(8) function code(c_p, c_n, t, s)
real(8), intent (in) :: c_p
real(8), intent (in) :: c_n
real(8), intent (in) :: t
real(8), intent (in) :: s
real(8) :: tmp
if (-t <= 4d-37) then
tmp = exp(-t)
else
tmp = exp(-s)
end if
code = tmp
end function
public static double code(double c_p, double c_n, double t, double s) {
double tmp;
if (-t <= 4e-37) {
tmp = Math.exp(-t);
} else {
tmp = Math.exp(-s);
}
return tmp;
}
def code(c_p, c_n, t, s): tmp = 0 if -t <= 4e-37: tmp = math.exp(-t) else: tmp = math.exp(-s) return tmp
function code(c_p, c_n, t, s) tmp = 0.0 if (Float64(-t) <= 4e-37) tmp = exp(Float64(-t)); else tmp = exp(Float64(-s)); end return tmp end
function tmp_2 = code(c_p, c_n, t, s) tmp = 0.0; if (-t <= 4e-37) tmp = exp(-t); else tmp = exp(-s); end tmp_2 = tmp; end
code[c$95$p_, c$95$n_, t_, s_] := If[LessEqual[(-t), 4e-37], N[Exp[(-t)], $MachinePrecision], N[Exp[(-s)], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;-t \leq 4 \cdot 10^{-37}:\\
\;\;\;\;e^{-t}\\
\mathbf{else}:\\
\;\;\;\;e^{-s}\\
\end{array}
\end{array}
if (neg.f64 t) < 4.00000000000000027e-37Initial program 92.8%
Taylor expanded in c_p around 0
Applied rewrites93.6%
Taylor expanded in c_p around 0
Applied rewrites93.0%
Taylor expanded in c_p around 0
Applied rewrites3.6%
Taylor expanded in c_n around 0
Applied rewrites95.8%
if 4.00000000000000027e-37 < (neg.f64 t) Initial program 91.4%
Taylor expanded in c_p around 0
Applied rewrites84.4%
Taylor expanded in c_p around 0
Applied rewrites95.1%
(FPCore (c_p c_n t s) :precision binary64 (exp (- s)))
double code(double c_p, double c_n, double t, double s) {
return exp(-s);
}
real(8) function code(c_p, c_n, t, s)
real(8), intent (in) :: c_p
real(8), intent (in) :: c_n
real(8), intent (in) :: t
real(8), intent (in) :: s
code = exp(-s)
end function
public static double code(double c_p, double c_n, double t, double s) {
return Math.exp(-s);
}
def code(c_p, c_n, t, s): return math.exp(-s)
function code(c_p, c_n, t, s) return exp(Float64(-s)) end
function tmp = code(c_p, c_n, t, s) tmp = exp(-s); end
code[c$95$p_, c$95$n_, t_, s_] := N[Exp[(-s)], $MachinePrecision]
\begin{array}{l}
\\
e^{-s}
\end{array}
Initial program 92.6%
Taylor expanded in c_p around 0
Applied rewrites92.8%
Taylor expanded in c_p around 0
Applied rewrites93.2%
(FPCore (c_p c_n t s) :precision binary64 (- s))
double code(double c_p, double c_n, double t, double s) {
return -s;
}
real(8) function code(c_p, c_n, t, s)
real(8), intent (in) :: c_p
real(8), intent (in) :: c_n
real(8), intent (in) :: t
real(8), intent (in) :: s
code = -s
end function
public static double code(double c_p, double c_n, double t, double s) {
return -s;
}
def code(c_p, c_n, t, s): return -s
function code(c_p, c_n, t, s) return Float64(-s) end
function tmp = code(c_p, c_n, t, s) tmp = -s; end
code[c$95$p_, c$95$n_, t_, s_] := (-s)
\begin{array}{l}
\\
-s
\end{array}
Initial program 92.6%
Taylor expanded in c_p around 0
Applied rewrites92.8%
Taylor expanded in c_p around 0
Applied rewrites93.2%
Taylor expanded in c_p around 0
Applied rewrites3.6%
(FPCore (c_p c_n t s) :precision binary64 (* (pow (/ (+ 1.0 (exp (- t))) (+ 1.0 (exp (- s)))) c_p) (pow (/ (+ 1.0 (exp t)) (+ 1.0 (exp s))) c_n)))
double code(double c_p, double c_n, double t, double s) {
return pow(((1.0 + exp(-t)) / (1.0 + exp(-s))), c_p) * pow(((1.0 + exp(t)) / (1.0 + exp(s))), c_n);
}
real(8) function code(c_p, c_n, t, s)
real(8), intent (in) :: c_p
real(8), intent (in) :: c_n
real(8), intent (in) :: t
real(8), intent (in) :: s
code = (((1.0d0 + exp(-t)) / (1.0d0 + exp(-s))) ** c_p) * (((1.0d0 + exp(t)) / (1.0d0 + exp(s))) ** c_n)
end function
public static double code(double c_p, double c_n, double t, double s) {
return Math.pow(((1.0 + Math.exp(-t)) / (1.0 + Math.exp(-s))), c_p) * Math.pow(((1.0 + Math.exp(t)) / (1.0 + Math.exp(s))), c_n);
}
def code(c_p, c_n, t, s): return math.pow(((1.0 + math.exp(-t)) / (1.0 + math.exp(-s))), c_p) * math.pow(((1.0 + math.exp(t)) / (1.0 + math.exp(s))), c_n)
function code(c_p, c_n, t, s) return Float64((Float64(Float64(1.0 + exp(Float64(-t))) / Float64(1.0 + exp(Float64(-s)))) ^ c_p) * (Float64(Float64(1.0 + exp(t)) / Float64(1.0 + exp(s))) ^ c_n)) end
function tmp = code(c_p, c_n, t, s) tmp = (((1.0 + exp(-t)) / (1.0 + exp(-s))) ^ c_p) * (((1.0 + exp(t)) / (1.0 + exp(s))) ^ c_n); end
code[c$95$p_, c$95$n_, t_, s_] := N[(N[Power[N[(N[(1.0 + N[Exp[(-t)], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[Exp[(-s)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], c$95$p], $MachinePrecision] * N[Power[N[(N[(1.0 + N[Exp[t], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[Exp[s], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], c$95$n], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(\frac{1 + e^{-t}}{1 + e^{-s}}\right)}^{c\_p} \cdot {\left(\frac{1 + e^{t}}{1 + e^{s}}\right)}^{c\_n}
\end{array}
herbie shell --seed 2024313
(FPCore (c_p c_n t s)
:name "Harley's example"
:precision binary64
:pre (and (< 0.0 c_p) (< 0.0 c_n))
:alt
(! :herbie-platform default (* (pow (/ (+ 1 (exp (- t))) (+ 1 (exp (- s)))) c_p) (pow (/ (+ 1 (exp t)) (+ 1 (exp s))) c_n)))
(/ (* (pow (/ 1.0 (+ 1.0 (exp (- s)))) c_p) (pow (- 1.0 (/ 1.0 (+ 1.0 (exp (- s))))) c_n)) (* (pow (/ 1.0 (+ 1.0 (exp (- t)))) c_p) (pow (- 1.0 (/ 1.0 (+ 1.0 (exp (- t))))) c_n))))