Bouland and Aaronson, Equation (24)

Specification

?
\[\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} \]
(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}

Reproduce

?
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.

Backtrace

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 (*...LC
canonicalize-proof/home/nightlies/herbie/simplify-patch/src/soundiness.rkt300
hash-ref!/usr/local/racket/collects/racket/private/more-scheme.rkt3772
add-soundiness-to/home/nightlies/herbie/simplify-patch/src/soundiness.rkt550
loop.../private/map.rkt4019
alt-map/home/nightlies/herbie/simplify-patch/src/alternative.rkt380
loop.../private/map.rkt4019
loop.../private/map.rkt4019
alt-map/home/nightlies/herbie/simplify-patch/src/alternative.rkt380
loop.../private/map.rkt4019
alt-map/home/nightlies/herbie/simplify-patch/src/alternative.rkt380
add-soundiness/home/nightlies/herbie/simplify-patch/src/soundiness.rkt870
extract!/home/nightlies/herbie/simplify-patch/src/mainloop.rkt830
run-improve!/home/nightlies/herbie/simplify-patch/src/mainloop.rkt510
get-alternatives/report/home/nightlies/herbie/simplify-patch/src/sandbox.rkt1710
(unnamed)/home/nightlies/herbie/simplify-patch/src/sandbox.rkt2666
(unnamed)/usr/local/racket/share/pkgs/profile-lib/main.rkt4010
profile-thunk/usr/local/racket/share/pkgs/profile-lib/main.rkt90
(unnamed)/usr/local/racket/collects/racket/engine.rkt4224