
(FPCore (x) :precision binary64 (/ (- (exp x) 1.0) x))
double code(double x) {
return (exp(x) - 1.0) / x;
}
real(8) function code(x)
real(8), intent (in) :: x
code = (exp(x) - 1.0d0) / x
end function
public static double code(double x) {
return (Math.exp(x) - 1.0) / x;
}
def code(x): return (math.exp(x) - 1.0) / x
function code(x) return Float64(Float64(exp(x) - 1.0) / x) end
function tmp = code(x) tmp = (exp(x) - 1.0) / x; end
code[x_] := N[(N[(N[Exp[x], $MachinePrecision] - 1.0), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{e^{x} - 1}{x}
\end{array}
herbie shell --seed 2024146
(FPCore (x)
:name "Kahan's exp quotient"
:precision binary64
:alt
(! :herbie-platform default (if (and (< x 1) (> x -1)) (/ (- (exp x) 1) (log (exp x))) (/ (- (exp x) 1) x)))
(/ (- (exp x) 1.0) x))
Please file a bug report with this information.
| application: not a procedure; expected a procedure that can be applied to arguments given: #f | L | C | |
|---|---|---|---|
| backward-pass | /home/nightlies/herbie/jackson-mergable-platform-changes/src/correct-round.rkt | 146 | 0 |
| compiled-spec | /home/nightlies/herbie/jackson-mergable-platform-changes/src/correct-round.rkt | 27 | 2 |
| compiled-spec | /home/nightlies/herbie/jackson-mergable-platform-changes/src/correct-round.rkt | 143 | 2 |
| compiled-spec | /home/nightlies/herbie/jackson-mergable-platform-changes/src/correct-round.rkt | 27 | 2 |
| compiled-spec | /home/nightlies/herbie/jackson-mergable-platform-changes/src/ground-truth.rkt | 31 | 2 |
| ival-eval | /home/nightlies/herbie/jackson-mergable-platform-changes/src/ground-truth.rkt | 55 | 0 |
| <eval-prog-real> | /home/nightlies/herbie/jackson-mergable-platform-changes/src/ground-truth.rkt | 86 | 2 |
| compute-local-errors | /home/nightlies/herbie/jackson-mergable-platform-changes/src/core/localize.rkt | 75 | 0 |
| batch-localize-errors | /home/nightlies/herbie/jackson-mergable-platform-changes/src/core/localize.rkt | 61 | 0 |
| localize! | /home/nightlies/herbie/jackson-mergable-platform-changes/src/mainloop.rkt | 201 | 0 |
| run-iter! | /home/nightlies/herbie/jackson-mergable-platform-changes/src/mainloop.rkt | 73 | 0 |
| mutate! | /home/nightlies/herbie/jackson-mergable-platform-changes/src/mainloop.rkt | 65 | 0 |
| run-improve! | /home/nightlies/herbie/jackson-mergable-platform-changes/src/mainloop.rkt | 51 | 0 |
| get-alternatives/report | /home/nightlies/herbie/jackson-mergable-platform-changes/src/sandbox.rkt | 169 | 0 |
| (unnamed) | /home/nightlies/herbie/jackson-mergable-platform-changes/src/sandbox.rkt | 263 | 6 |
| (unnamed) | /usr/local/racket/share/pkgs/profile-lib/main.rkt | 40 | 10 |
| profile-thunk | /usr/local/racket/share/pkgs/profile-lib/main.rkt | 9 | 0 |
| (unnamed) | /usr/local/racket/collects/racket/engine.rkt | 42 | 24 |