
(FPCore (c_p c_n t s) :precision binary64 (/ (* (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))))
double code(double c_p, double c_n, double t, double s) {
return (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));
}
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 / (1.0d0 + exp(-s))) ** c_p) * ((1.0d0 - (1.0d0 / (1.0d0 + exp(-s)))) ** c_n)) / (((1.0d0 / (1.0d0 + exp(-t))) ** c_p) * ((1.0d0 - (1.0d0 / (1.0d0 + exp(-t)))) ** c_n))
end function
public static double code(double c_p, double c_n, double t, double s) {
return (Math.pow((1.0 / (1.0 + Math.exp(-s))), c_p) * Math.pow((1.0 - (1.0 / (1.0 + Math.exp(-s)))), c_n)) / (Math.pow((1.0 / (1.0 + Math.exp(-t))), c_p) * Math.pow((1.0 - (1.0 / (1.0 + Math.exp(-t)))), c_n));
}
def code(c_p, c_n, t, s): return (math.pow((1.0 / (1.0 + math.exp(-s))), c_p) * math.pow((1.0 - (1.0 / (1.0 + math.exp(-s)))), c_n)) / (math.pow((1.0 / (1.0 + math.exp(-t))), c_p) * math.pow((1.0 - (1.0 / (1.0 + math.exp(-t)))), c_n))
function code(c_p, c_n, t, s) return Float64(Float64((Float64(1.0 / Float64(1.0 + exp(Float64(-s)))) ^ c_p) * (Float64(1.0 - Float64(1.0 / Float64(1.0 + exp(Float64(-s))))) ^ c_n)) / Float64((Float64(1.0 / Float64(1.0 + exp(Float64(-t)))) ^ c_p) * (Float64(1.0 - Float64(1.0 / Float64(1.0 + exp(Float64(-t))))) ^ c_n))) end
function tmp = code(c_p, c_n, t, s) tmp = (((1.0 / (1.0 + exp(-s))) ^ c_p) * ((1.0 - (1.0 / (1.0 + exp(-s)))) ^ c_n)) / (((1.0 / (1.0 + exp(-t))) ^ c_p) * ((1.0 - (1.0 / (1.0 + exp(-t)))) ^ c_n)); end
code[c$95$p_, c$95$n_, t_, s_] := N[(N[(N[Power[N[(1.0 / N[(1.0 + N[Exp[(-s)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], c$95$p], $MachinePrecision] * N[Power[N[(1.0 - N[(1.0 / N[(1.0 + N[Exp[(-s)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], c$95$n], $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[(1.0 / N[(1.0 + N[Exp[(-t)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], c$95$p], $MachinePrecision] * N[Power[N[(1.0 - N[(1.0 / N[(1.0 + N[Exp[(-t)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], c$95$n], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{{\left(\frac{1}{1 + e^{-s}}\right)}^{c_p} \cdot {\left(1 - \frac{1}{1 + e^{-s}}\right)}^{c_n}}{{\left(\frac{1}{1 + e^{-t}}\right)}^{c_p} \cdot {\left(1 - \frac{1}{1 + e^{-t}}\right)}^{c_n}}
Please include this information when filing a bug report:
herbie shell --seed 2023243
(FPCore (c_p c_n t s)
:name "Harley's example"
:precision binary64
:pre (and (< 0.0 c_p) (< 0.0 c_n))
:herbie-target
(* (pow (/ (+ 1.0 (exp (- t))) (+ 1.0 (exp (- s)))) c_p) (pow (/ (+ 1.0 (exp t)) (+ 1.0 (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))))
| arb-<: arity mismatch; the expected number of arguments does not match the given number expected: 0 given: 2 | L | C | |
|---|---|---|---|
| f | /home/nightlies/herbie/arb-support/src/programs.rkt | 187 | 2 |
| (unnamed) | /home/nightlies/herbie/arb-support/src/ground-truth.rkt | 23 | 2 |
| search-step | /home/nightlies/herbie/arb-support/src/searchreals.rkt | 37 | 0 |
| find-intervals | /home/nightlies/herbie/arb-support/src/searchreals.rkt | 87 | 0 |
| make-sampler | /home/nightlies/herbie/arb-support/src/sampling.rkt | 94 | 0 |
| sample-points | /home/nightlies/herbie/arb-support/src/ground-truth.rkt | 64 | 0 |
| setup-context! | /home/nightlies/herbie/arb-support/src/mainloop.rkt | 293 | 0 |
| get-alternatives/report | /home/nightlies/herbie/arb-support/src/sandbox.rkt | 148 | 0 |
| (unnamed) | /home/nightlies/herbie/arb-support/src/sandbox.rkt | 247 | 6 |
| (unnamed) | /usr/share/racket/pkgs/profile-lib/main.rkt | 40 | 10 |
| profile-thunk | /usr/share/racket/pkgs/profile-lib/main.rkt | 9 | 0 |
| (unnamed) | /usr/share/racket/collects/racket/engine.rkt | 42 | 24 |