
(FPCore (a b) :precision binary64 (exp (+ (log a) (log b))))
double code(double a, double b) {
return exp((log(a) + log(b)));
}
real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
code = exp((log(a) + log(b)))
end function
public static double code(double a, double b) {
return Math.exp((Math.log(a) + Math.log(b)));
}
def code(a, b): return math.exp((math.log(a) + math.log(b)))
function code(a, b) return exp(Float64(log(a) + log(b))) end
function tmp = code(a, b) tmp = exp((log(a) + log(b))); end
code[a_, b_] := N[Exp[N[(N[Log[a], $MachinePrecision] + N[Log[b], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\log a + \log b}
\end{array}
herbie shell --seed 2023271
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))
Please file a bug report with this information.
| length: contract violation expected: list? given: 8000 | L | C | |
|---|---|---|---|
| (unnamed) | /home/nightlies/herbie/arb-support/egg-herbie/main.rkt | 111 | 2 |
| egraph-run | /home/nightlies/herbie/main/src/core/egg-herbie.rkt | 502 | 0 |
| egraph-run-rules | /home/nightlies/herbie/main/src/core/egg-herbie.rkt | 559 | 0 |
| run-egg | /home/nightlies/herbie/main/src/core/egg-herbie.rkt | 288 | 0 |
| simplify-batch | /home/nightlies/herbie/main/src/core/simplify.rkt | 15 | 0 |
| (unnamed) | /usr/share/racket/collects/racket/contract/private/arrow-higher-order.rkt | 379 | 33 |
| find-preprocessing | /home/nightlies/herbie/main/src/preprocess.rkt | 11 | 0 |
| run-improve! | /home/nightlies/herbie/main/src/mainloop.rkt | 325 | 0 |
| get-alternatives/report | /home/nightlies/herbie/main/src/sandbox.rkt | 149 | 0 |
| (unnamed) | /home/nightlies/herbie/main/src/sandbox.rkt | 245 | 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 |