(FPCore (f)
:precision binary64
(-
(*
(/ 1.0 (/ PI 4.0))
(log
(/
(+ (exp (* (/ PI 4.0) f)) (exp (- (* (/ PI 4.0) f))))
(- (exp (* (/ PI 4.0) f)) (exp (- (* (/ PI 4.0) f)))))))))double code(double f) {
return -((1.0 / (((double) M_PI) / 4.0)) * log(((exp(((((double) M_PI) / 4.0) * f)) + exp(-((((double) M_PI) / 4.0) * f))) / (exp(((((double) M_PI) / 4.0) * f)) - exp(-((((double) M_PI) / 4.0) * f))))));
}
public static double code(double f) {
return -((1.0 / (Math.PI / 4.0)) * Math.log(((Math.exp(((Math.PI / 4.0) * f)) + Math.exp(-((Math.PI / 4.0) * f))) / (Math.exp(((Math.PI / 4.0) * f)) - Math.exp(-((Math.PI / 4.0) * f))))));
}
def code(f): return -((1.0 / (math.pi / 4.0)) * math.log(((math.exp(((math.pi / 4.0) * f)) + math.exp(-((math.pi / 4.0) * f))) / (math.exp(((math.pi / 4.0) * f)) - math.exp(-((math.pi / 4.0) * f))))))
function code(f) return Float64(-Float64(Float64(1.0 / Float64(pi / 4.0)) * log(Float64(Float64(exp(Float64(Float64(pi / 4.0) * f)) + exp(Float64(-Float64(Float64(pi / 4.0) * f)))) / Float64(exp(Float64(Float64(pi / 4.0) * f)) - exp(Float64(-Float64(Float64(pi / 4.0) * f)))))))) end
function tmp = code(f) tmp = -((1.0 / (pi / 4.0)) * log(((exp(((pi / 4.0) * f)) + exp(-((pi / 4.0) * f))) / (exp(((pi / 4.0) * f)) - exp(-((pi / 4.0) * f)))))); end
code[f_] := (-N[(N[(1.0 / N[(Pi / 4.0), $MachinePrecision]), $MachinePrecision] * N[Log[N[(N[(N[Exp[N[(N[(Pi / 4.0), $MachinePrecision] * f), $MachinePrecision]], $MachinePrecision] + N[Exp[(-N[(N[(Pi / 4.0), $MachinePrecision] * f), $MachinePrecision])], $MachinePrecision]), $MachinePrecision] / N[(N[Exp[N[(N[(Pi / 4.0), $MachinePrecision] * f), $MachinePrecision]], $MachinePrecision] - N[Exp[(-N[(N[(Pi / 4.0), $MachinePrecision] * f), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision])
-\frac{1}{\frac{\pi}{4}} \cdot \log \left(\frac{e^{\frac{\pi}{4} \cdot f} + e^{-\frac{\pi}{4} \cdot f}}{e^{\frac{\pi}{4} \cdot f} - e^{-\frac{\pi}{4} \cdot f}}\right)
Please include this information when filing a bug report:
herbie shell --seed 2022150
(FPCore (f)
:name "VandenBroeck and Keller, Equation (20)"
:precision binary64
(- (* (/ 1.0 (/ PI 4.0)) (log (/ (+ (exp (* (/ PI 4.0) f)) (exp (- (* (/ PI 4.0) f)))) (- (exp (* (/ PI 4.0) f)) (exp (- (* (/ PI 4.0) f)))))))))
| application: required keyword argument not supplied procedure: batch-egg-rewrite required keyword: #:rules arguments...: '(#<rule erfc-erf_binary64> #<rule erf-erfc_binary64> #<rule erf-odd_binary64> #<rule prod-diff_binary64> #<rule hypot-udef_binary64> #<rule expm1-log1p-u_binary64> #<rule log1p-expm1-u_binary64> #<rule log1p-udef_binary64> #<rule expm1-udef_binary64> #... #:depths '(1 1 1 1) #:roots '((2) (2) (2) (2)) | L | C | |
|---|---|---|---|
| (unnamed) | /opt/racket-8.1/collects/racket/private/kw.rkt | 1558 | 14 |
| rewrite-expressions | /data/pavpan/nightlies/herbie/timeline/src/core/matcher.rkt | 171 | 0 |
| gen-rewrites! | /data/pavpan/nightlies/herbie/timeline/src/patch.rkt | 144 | 0 |
| patch-table-run | /data/pavpan/nightlies/herbie/timeline/src/patch.rkt | 291 | 0 |
| (unnamed) | /opt/racket-8.1/collects/racket/contract/private/arrow-val-first.rkt | 486 | 18 |
| run-iter! | /data/pavpan/nightlies/herbie/timeline/src/mainloop.rkt | 246 | 0 |
| mutate! | /data/pavpan/nightlies/herbie/timeline/src/mainloop.rkt | 379 | 0 |
| run-improve! | /data/pavpan/nightlies/herbie/timeline/src/mainloop.rkt | 326 | 0 |
| (unnamed) | /data/pavpan/nightlies/herbie/timeline/src/sandbox.rkt | 66 | 6 |
| (unnamed) | /opt/racket-8.1/share/pkgs/profile-lib/main.rkt | 40 | 10 |
| profile-thunk | /opt/racket-8.1/share/pkgs/profile-lib/main.rkt | 9 | 0 |
| (unnamed) | /opt/racket-8.1/collects/racket/engine.rkt | 42 | 24 |