(FPCore (cosTheta c)
:precision binary64
(/
1.0
(+
(+ 1.0 c)
(*
(* (/ 1.0 (sqrt PI)) (/ (sqrt (- (- 1.0 cosTheta) cosTheta)) cosTheta))
(exp (* (- cosTheta) cosTheta))))))double code(double cosTheta, double c) {
return 1.0 / ((1.0 + c) + (((1.0 / sqrt(((double) M_PI))) * (sqrt(((1.0 - cosTheta) - cosTheta)) / cosTheta)) * exp((-cosTheta * cosTheta))));
}
public static double code(double cosTheta, double c) {
return 1.0 / ((1.0 + c) + (((1.0 / Math.sqrt(Math.PI)) * (Math.sqrt(((1.0 - cosTheta) - cosTheta)) / cosTheta)) * Math.exp((-cosTheta * cosTheta))));
}
def code(cosTheta, c): return 1.0 / ((1.0 + c) + (((1.0 / math.sqrt(math.pi)) * (math.sqrt(((1.0 - cosTheta) - cosTheta)) / cosTheta)) * math.exp((-cosTheta * cosTheta))))
function code(cosTheta, c) return Float64(1.0 / Float64(Float64(1.0 + c) + Float64(Float64(Float64(1.0 / sqrt(pi)) * Float64(sqrt(Float64(Float64(1.0 - cosTheta) - cosTheta)) / cosTheta)) * exp(Float64(Float64(-cosTheta) * cosTheta))))) end
function tmp = code(cosTheta, c) tmp = 1.0 / ((1.0 + c) + (((1.0 / sqrt(pi)) * (sqrt(((1.0 - cosTheta) - cosTheta)) / cosTheta)) * exp((-cosTheta * cosTheta)))); end
code[cosTheta_, c_] := N[(1.0 / N[(N[(1.0 + c), $MachinePrecision] + N[(N[(N[(1.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(N[(1.0 - cosTheta), $MachinePrecision] - cosTheta), $MachinePrecision]], $MachinePrecision] / cosTheta), $MachinePrecision]), $MachinePrecision] * N[Exp[N[((-cosTheta) * cosTheta), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{1}{\left(1 + c\right) + \left(\frac{1}{\sqrt{\pi}} \cdot \frac{\sqrt{\left(1 - cosTheta\right) - cosTheta}}{cosTheta}\right) \cdot e^{\left(-cosTheta\right) \cdot cosTheta}}
Please include this information when filing a bug report:
herbie shell --seed 2022349
(FPCore (cosTheta c)
:name "Beckmann Sample, normalization factor"
:precision binary64
:pre (and (and (< 0.0 cosTheta) (< cosTheta 0.9999)) (and (< -1.0 c) (< c 1.0)))
(/ 1.0 (+ (+ 1.0 c) (* (* (/ 1.0 (sqrt PI)) (/ (sqrt (- (- 1.0 cosTheta) cosTheta)) cosTheta)) (exp (* (- cosTheta) cosTheta))))))
| error writing to stream port system error: Broken pipe; errno=32 | L | C | |
|---|---|---|---|
| writeln | /usr/share/racket/collects/racket/private/misc.rkt | 156 | 4 |
| run-egglog | /home/nightlies/nightlies/herbie/oflatt-egglog-ctx/src/egglog/run-egglog.rkt | 1301 | 0 |
| run-simplify-input | /home/nightlies/nightlies/herbie/oflatt-egglog-ctx/src/core/simplify.rkt | 74 | 0 |
| simplify-batch | /home/nightlies/nightlies/herbie/oflatt-egglog-ctx/src/core/simplify.rkt | 51 | 0 |
| (unnamed) | /usr/share/racket/collects/racket/contract/private/arrow-higher-order.rkt | 379 | 33 |
| get-swaps | /home/nightlies/nightlies/herbie/oflatt-egglog-ctx/src/symmetry.rkt | 6 | 0 |
| connected-components | /home/nightlies/nightlies/herbie/oflatt-egglog-ctx/src/symmetry.rkt | 20 | 0 |
| run-improve! | /home/nightlies/nightlies/herbie/oflatt-egglog-ctx/src/mainloop.rkt | 320 | 0 |
| (unnamed) | /home/nightlies/nightlies/herbie/oflatt-egglog-ctx/src/sandbox.rkt | 55 | 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 |