
(FPCore (a b) :precision binary64 (- (+ (pow (+ (* a a) (* b b)) 2.0) (* 4.0 (+ (* (* a a) (- 1.0 a)) (* (* b b) (+ 3.0 a))))) 1.0))
double code(double a, double b) {
return (pow(((a * a) + (b * b)), 2.0) + (4.0 * (((a * a) * (1.0 - a)) + ((b * b) * (3.0 + a))))) - 1.0;
}
real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((((a * a) + (b * b)) ** 2.0d0) + (4.0d0 * (((a * a) * (1.0d0 - a)) + ((b * b) * (3.0d0 + a))))) - 1.0d0
end function
public static double code(double a, double b) {
return (Math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (((a * a) * (1.0 - a)) + ((b * b) * (3.0 + a))))) - 1.0;
}
def code(a, b): return (math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (((a * a) * (1.0 - a)) + ((b * b) * (3.0 + a))))) - 1.0
function code(a, b) return Float64(Float64((Float64(Float64(a * a) + Float64(b * b)) ^ 2.0) + Float64(4.0 * Float64(Float64(Float64(a * a) * Float64(1.0 - a)) + Float64(Float64(b * b) * Float64(3.0 + a))))) - 1.0) end
function tmp = code(a, b) tmp = ((((a * a) + (b * b)) ^ 2.0) + (4.0 * (((a * a) * (1.0 - a)) + ((b * b) * (3.0 + a))))) - 1.0; end
code[a_, b_] := N[(N[(N[Power[N[(N[(a * a), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(4.0 * N[(N[(N[(a * a), $MachinePrecision] * N[(1.0 - a), $MachinePrecision]), $MachinePrecision] + N[(N[(b * b), $MachinePrecision] * N[(3.0 + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]
\begin{array}{l}
\\
\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 - a\right) + \left(b \cdot b\right) \cdot \left(3 + a\right)\right)\right) - 1
\end{array}
herbie shell --seed 2024089
(FPCore (a b)
:name "Bouland and Aaronson, Equation (24)"
:precision binary64
(- (+ (pow (+ (* a a) (* b b)) 2.0) (* 4.0 (+ (* (* a a) (- 1.0 a)) (* (* b b) (+ 3.0 a))))) 1.0))
Please file a bug report with this information.
| dict-ref: no value for key: '((*.f64 #s(literal -1 binary64) (pow.f64 a #s(literal 3 binary64))) neg.f64 (pow.f64 a #s(literal 3 binary64))) in: '((((+.f64 (*.f64 (pow.f64 (hypot.f64 a b) #s(literal 2 binary64)) (pow.f64 b #s(literal 2 binary64))) (*.f64 (pow.f64 (hypot.f64 a b) #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) pow.f64 (hypot.f64 b a) #s(literal 4 binary64)) (+.f64 (*... | L | C | |
|---|---|---|---|
| canonicalize-proof | /home/nightlies/herbie/simplify-patch/src/soundiness.rkt | 30 | 0 |
| hash-ref! | /usr/local/racket/collects/racket/private/more-scheme.rkt | 377 | 2 |
| add-soundiness-to | /home/nightlies/herbie/simplify-patch/src/soundiness.rkt | 55 | 0 |
| loop | .../private/map.rkt | 40 | 19 |
| alt-map | /home/nightlies/herbie/simplify-patch/src/alternative.rkt | 38 | 0 |
| loop | .../private/map.rkt | 40 | 19 |
| loop | .../private/map.rkt | 40 | 19 |
| alt-map | /home/nightlies/herbie/simplify-patch/src/alternative.rkt | 38 | 0 |
| loop | .../private/map.rkt | 40 | 19 |
| alt-map | /home/nightlies/herbie/simplify-patch/src/alternative.rkt | 38 | 0 |
| add-soundiness | /home/nightlies/herbie/simplify-patch/src/soundiness.rkt | 87 | 0 |
| extract! | /home/nightlies/herbie/simplify-patch/src/mainloop.rkt | 83 | 0 |
| run-improve! | /home/nightlies/herbie/simplify-patch/src/mainloop.rkt | 51 | 0 |
| get-alternatives/report | /home/nightlies/herbie/simplify-patch/src/sandbox.rkt | 171 | 0 |
| (unnamed) | /home/nightlies/herbie/simplify-patch/src/sandbox.rkt | 266 | 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 |