?

\[0.5 \cdot \sqrt{2 \cdot \left(\sqrt{re \cdot re + im \cdot im} + re\right)} \]
(FPCore (re im)
 :precision binary64
 (* 0.5 (sqrt (* 2.0 (+ (sqrt (+ (* re re) (* im im))) re)))))
double code(double re, double im) {
	return 0.5 * sqrt((2.0 * (sqrt(((re * re) + (im * im))) + re)));
}
real(8) function code(re, im)
    real(8), intent (in) :: re
    real(8), intent (in) :: im
    code = 0.5d0 * sqrt((2.0d0 * (sqrt(((re * re) + (im * im))) + re)))
end function
public static double code(double re, double im) {
	return 0.5 * Math.sqrt((2.0 * (Math.sqrt(((re * re) + (im * im))) + re)));
}
def code(re, im):
	return 0.5 * math.sqrt((2.0 * (math.sqrt(((re * re) + (im * im))) + re)))
function code(re, im)
	return Float64(0.5 * sqrt(Float64(2.0 * Float64(sqrt(Float64(Float64(re * re) + Float64(im * im))) + re))))
end
function tmp = code(re, im)
	tmp = 0.5 * sqrt((2.0 * (sqrt(((re * re) + (im * im))) + re)));
end
code[re_, im_] := N[(0.5 * N[Sqrt[N[(2.0 * N[(N[Sqrt[N[(N[(re * re), $MachinePrecision] + N[(im * im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
0.5 \cdot \sqrt{2 \cdot \left(\sqrt{re \cdot re + im \cdot im} + re\right)}

Reproduce?

Please include this information when filing a bug report:

herbie shell --seed 2023098 
(FPCore (re im)
  :name "math.sqrt on complex, real part"
  :precision binary64

  :herbie-target
  (if (< re 0.0) (* 0.5 (* (sqrt 2.0) (sqrt (/ (* im im) (- (sqrt (+ (* re re) (* im im))) re))))) (* 0.5 (sqrt (* 2.0 (+ (sqrt (+ (* re re) (* im im))) re)))))

  (* 0.5 (sqrt (* 2.0 (+ (sqrt (+ (* re re) (* im im))) re)))))

Backtrace

hash-ref: no value found for key key: 'falseLC
(unnamed)/home/nightlies/herbie/using-ruler-nightlies/src/syntax/syntax.rkt2302
f336.../match/compiler.rkt54840
expand-parametric/home/nightlies/herbie/using-ruler-nightlies/src/syntax/sugar.rkt620
(unnamed)/home/nightlies/herbie/using-ruler-nightlies/src/core/egg-herbie.rkt2559
rule->egg-rules/home/nightlies/herbie/using-ruler-nightlies/src/core/egg-herbie.rkt2240
expand-rules/home/nightlies/herbie/using-ruler-nightlies/src/core/egg-herbie.rkt4880
egraph-run-rules/home/nightlies/herbie/using-ruler-nightlies/src/core/egg-herbie.rkt5090
(unnamed)/home/nightlies/herbie/using-ruler-nightlies/src/core/simplify.rkt583
with-egraph/home/nightlies/herbie/using-ruler-nightlies/src/core/egg-herbie.rkt3330
simplify-batch/home/nightlies/herbie/using-ruler-nightlies/src/core/simplify.rkt230
(unnamed)/usr/share/racket/collects/racket/contract/private/arrow-higher-order.rkt37933
get-swaps/home/nightlies/herbie/using-ruler-nightlies/src/symmetry.rkt60
connected-components/home/nightlies/herbie/using-ruler-nightlies/src/symmetry.rkt180
run-improve!/home/nightlies/herbie/using-ruler-nightlies/src/mainloop.rkt3200
run-herbie/home/nightlies/herbie/using-ruler-nightlies/src/sandbox.rkt570
(unnamed)/home/nightlies/herbie/using-ruler-nightlies/src/sandbox.rkt1336
(unnamed)/usr/share/racket/pkgs/profile-lib/main.rkt4010
profile-thunk/usr/share/racket/pkgs/profile-lib/main.rkt90
(unnamed)/usr/share/racket/collects/racket/engine.rkt4224