\Im(\left(\frac{e^{x} + e^{-x}}{2} \cdot \cos y + \frac{e^{x} - e^{-x}}{2} \cdot \sin y i\right))double f(double x, double y) {
double r8175 = x;
double r8176 = exp(r8175);
double r8177 = -r8175;
double r8178 = exp(r8177);
double r8179 = r8176 + r8178;
double r8180 = 2.0;
double r8181 = r8179 / r8180;
double r8182 = y;
double r8183 = cos(r8182);
double r8184 = r8181 * r8183;
double r8185 = r8176 - r8178;
double r8186 = r8185 / r8180;
double r8187 = sin(r8182);
double r8188 = r8186 * r8187;
double r8189 = /* ERROR: no complex support in C */;
double r8190 = /* ERROR: no complex support in C */;
return r8190;
}
Please include this information when filing a bug report:
herbie shell --seed 2019191 +o rules:numerics
(FPCore (x y)
:name "Euler formula imaginary part (p55)"
(im (complex (* (/ (+ (exp x) (exp (- x))) 2.0) (cos y)) (* (/ (- (exp x) (exp (- x))) 2.0) (sin y)))))
| get-representation: Unknown representation #f | L | C | |
|---|---|---|---|
| filter-p&e | /data/pavpan/nightlies/herbie/interface2/src/points.rkt | 256 | 0 |
| loop | /data/pavpan/nightlies/herbie/interface2/src/points.rkt | 284 | 2 |
| setup-prog!34 | /data/pavpan/nightlies/herbie/interface2/src/mainloop.rkt | 67 | 0 |
| run-improve43 | /data/pavpan/nightlies/herbie/interface2/src/mainloop.rkt | 339 | 0 |
| (unnamed) | /opt/racket-7.0/collects/racket/private/more-scheme.rkt | 261 | 28 |
| run | /opt/racket-7.0/share/pkgs/profile-lib/main.rkt | 39 | 2 |
| profile-thunk16 | /opt/racket-7.0/share/pkgs/profile-lib/main.rkt | 9 | 0 |
| (unnamed) | /opt/racket-7.0/collects/racket/private/more-scheme.rkt | 261 | 28 |