(FPCore (x) :precision binary64 (pow x (/ 8.0 9.0)))
double code(double x) { return pow(x, (8.0 / 9.0)); }
real(8) function code(x) real(8), intent (in) :: x code = x ** (8.0d0 / 9.0d0) end function
public static double code(double x) { return Math.pow(x, (8.0 / 9.0)); }
def code(x): return math.pow(x, (8.0 / 9.0))
function code(x) return x ^ Float64(8.0 / 9.0) end
function tmp = code(x) tmp = x ^ (8.0 / 9.0); end
code[x_] := N[Power[x, N[(8.0 / 9.0), $MachinePrecision]], $MachinePrecision]
\begin{array}{l} \\ {x}^{\left(\frac{8}{9}\right)} \end{array}
herbie shell --seed 1
(FPCore (x)
:name "x^(8/9)"
:precision binary64
:pre (and (<= 0.25 x) (<= x 0.5))
(pow x (/ 8.0 9.0)))
Please file a bug report with this information.
cost-opportunity: Initial expression (pow.f64 x (/.f64 #s(literal 8 binary64) #s(literal 9 binary64))) is better than final expression (pow.f64 x #s(literal 8/9 binary64)) | L | C | |
---|---|---|---|
batch-localize-costs | /home/pavpan/herbie/src/core/localize.rkt | 72 | 0 |
localize! | /home/pavpan/herbie/src/core/mainloop.rkt | 170 | 0 |
run-iter! | /home/pavpan/herbie/src/core/mainloop.rkt | 68 | 0 |
run-improve! | /home/pavpan/herbie/src/core/mainloop.rkt | 45 | 0 |
get-alternatives/report | /home/pavpan/herbie/src/api/sandbox.rkt | 186 | 0 |
(unnamed) | /home/pavpan/herbie/src/api/sandbox.rkt | 282 | 6 |
(unnamed) | /usr/share/racket/collects/racket/engine.rkt | 42 | 24 |