?

Average Error: 20.2 → 0.1
Time: 13.4s
Precision: binary64
Cost: 26696

?

\[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
\[\begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+41}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \mathbf{elif}\;z \leq 22.5:\\ \;\;\;\;\mathsf{fma}\left(\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{101.23733352003822}{z \cdot z} + \left(14.431876219268936 + \frac{-15.646356830292042}{z}\right)}\\ \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  x
  (/
   (*
    y
    (+
     (* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
     0.279195317918525))
   (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
(FPCore (x y z)
 :precision binary64
 (if (<= z -6.6e+41)
   (+ x (/ y 14.431876219268936))
   (if (<= z 22.5)
     (fma
      (/
       (fma z (fma z 0.0692910599291889 0.4917317610505968) 0.279195317918525)
       (fma z (+ z 6.012459259764103) 3.350343815022304))
      y
      x)
     (+
      x
      (/
       y
       (+
        (/ 101.23733352003822 (* z z))
        (+ 14.431876219268936 (/ -15.646356830292042 z))))))))
double code(double x, double y, double z) {
	return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
double code(double x, double y, double z) {
	double tmp;
	if (z <= -6.6e+41) {
		tmp = x + (y / 14.431876219268936);
	} else if (z <= 22.5) {
		tmp = fma((fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 0.279195317918525) / fma(z, (z + 6.012459259764103), 3.350343815022304)), y, x);
	} else {
		tmp = x + (y / ((101.23733352003822 / (z * z)) + (14.431876219268936 + (-15.646356830292042 / z))));
	}
	return tmp;
}
function code(x, y, z)
	return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304)))
end
function code(x, y, z)
	tmp = 0.0
	if (z <= -6.6e+41)
		tmp = Float64(x + Float64(y / 14.431876219268936));
	elseif (z <= 22.5)
		tmp = fma(Float64(fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 0.279195317918525) / fma(z, Float64(z + 6.012459259764103), 3.350343815022304)), y, x);
	else
		tmp = Float64(x + Float64(y / Float64(Float64(101.23733352003822 / Float64(z * z)) + Float64(14.431876219268936 + Float64(-15.646356830292042 / z)))));
	end
	return tmp
end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := If[LessEqual[z, -6.6e+41], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 22.5], N[(N[(N[(z * N[(z * 0.0692910599291889 + 0.4917317610505968), $MachinePrecision] + 0.279195317918525), $MachinePrecision] / N[(z * N[(z + 6.012459259764103), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], N[(x + N[(y / N[(N[(101.23733352003822 / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(14.431876219268936 + N[(-15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{+41}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\

\mathbf{elif}\;z \leq 22.5:\\
\;\;\;\;\mathsf{fma}\left(\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}, y, x\right)\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{101.23733352003822}{z \cdot z} + \left(14.431876219268936 + \frac{-15.646356830292042}{z}\right)}\\


\end{array}

Error?

Target

Original20.2
Target0.4
Herbie0.1
\[\begin{array}{l} \mathbf{if}\;z < -8120153.652456675:\\ \;\;\;\;\left(\frac{0.07512208616047561}{z} + 0.0692910599291889\right) \cdot y - \left(\frac{0.40462203869992125 \cdot y}{z \cdot z} - x\right)\\ \mathbf{elif}\;z < 6.576118972787377 \cdot 10^{+20}:\\ \;\;\;\;x + \left(y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)\right) \cdot \frac{1}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{0.07512208616047561}{z} + 0.0692910599291889\right) \cdot y - \left(\frac{0.40462203869992125 \cdot y}{z \cdot z} - x\right)\\ \end{array} \]

Derivation?

  1. Split input into 3 regimes
  2. if z < -6.6000000000000001e41

    1. Initial program 46.8

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Simplified38.5

      \[\leadsto \color{blue}{x + \frac{y}{\frac{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}}} \]
      Proof

      [Start]46.8

      \[ x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]

      associate-/l* [=>]38.5

      \[ x + \color{blue}{\frac{y}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}}} \]

      fma-def [=>]38.5

      \[ x + \frac{y}{\frac{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}}{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}} \]

      fma-def [=>]38.5

      \[ x + \frac{y}{\frac{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}} \]

      fma-def [=>]38.5

      \[ x + \frac{y}{\frac{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}} \]
    3. Taylor expanded in z around inf 0.0

      \[\leadsto x + \frac{y}{\color{blue}{14.431876219268936}} \]

    if -6.6000000000000001e41 < z < 22.5

    1. Initial program 0.5

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Simplified0.1

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}, y, x\right)} \]
      Proof

      [Start]0.5

      \[ x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]

      +-commutative [=>]0.5

      \[ \color{blue}{\frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} + x} \]

      associate-*r/ [<=]0.1

      \[ \color{blue}{y \cdot \frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}} + x \]

      *-commutative [<=]0.1

      \[ \color{blue}{\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \cdot y} + x \]

      fma-def [=>]0.1

      \[ \color{blue}{\mathsf{fma}\left(\frac{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}, y, x\right)} \]

      *-commutative [=>]0.1

      \[ \mathsf{fma}\left(\frac{\color{blue}{z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right)} + 0.279195317918525}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}, y, x\right) \]

      fma-def [=>]0.1

      \[ \mathsf{fma}\left(\frac{\color{blue}{\mathsf{fma}\left(z, z \cdot 0.0692910599291889 + 0.4917317610505968, 0.279195317918525\right)}}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}, y, x\right) \]

      fma-def [=>]0.1

      \[ \mathsf{fma}\left(\frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}, y, x\right) \]

      *-commutative [=>]0.1

      \[ \mathsf{fma}\left(\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)}{\color{blue}{z \cdot \left(z + 6.012459259764103\right)} + 3.350343815022304}, y, x\right) \]

      fma-def [=>]0.1

      \[ \mathsf{fma}\left(\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)}{\color{blue}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}}, y, x\right) \]

    if 22.5 < z

    1. Initial program 40.4

      \[x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]
    2. Simplified32.6

      \[\leadsto \color{blue}{x + \frac{y}{\frac{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}}} \]
      Proof

      [Start]40.4

      \[ x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304} \]

      associate-/l* [=>]32.6

      \[ x + \color{blue}{\frac{y}{\frac{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}}} \]

      fma-def [=>]32.6

      \[ x + \frac{y}{\frac{\color{blue}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}}{\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525}} \]

      fma-def [=>]32.6

      \[ x + \frac{y}{\frac{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}{\color{blue}{\mathsf{fma}\left(z \cdot 0.0692910599291889 + 0.4917317610505968, z, 0.279195317918525\right)}}} \]

      fma-def [=>]32.6

      \[ x + \frac{y}{\frac{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}{\mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right)}, z, 0.279195317918525\right)}} \]
    3. Taylor expanded in z around inf 0.2

      \[\leadsto x + \frac{y}{\color{blue}{\left(14.431876219268936 + 101.23733352003822 \cdot \frac{1}{{z}^{2}}\right) - 15.646356830292042 \cdot \frac{1}{z}}} \]
    4. Simplified0.2

      \[\leadsto x + \frac{y}{\color{blue}{\frac{101.23733352003822}{z \cdot z} + \left(14.431876219268936 + \frac{-15.646356830292042}{z}\right)}} \]
      Proof

      [Start]0.2

      \[ x + \frac{y}{\left(14.431876219268936 + 101.23733352003822 \cdot \frac{1}{{z}^{2}}\right) - 15.646356830292042 \cdot \frac{1}{z}} \]

      cancel-sign-sub-inv [=>]0.2

      \[ x + \frac{y}{\color{blue}{\left(14.431876219268936 + 101.23733352003822 \cdot \frac{1}{{z}^{2}}\right) + \left(-15.646356830292042\right) \cdot \frac{1}{z}}} \]

      +-commutative [=>]0.2

      \[ x + \frac{y}{\color{blue}{\left(101.23733352003822 \cdot \frac{1}{{z}^{2}} + 14.431876219268936\right)} + \left(-15.646356830292042\right) \cdot \frac{1}{z}} \]

      associate-+l+ [=>]0.2

      \[ x + \frac{y}{\color{blue}{101.23733352003822 \cdot \frac{1}{{z}^{2}} + \left(14.431876219268936 + \left(-15.646356830292042\right) \cdot \frac{1}{z}\right)}} \]

      associate-*r/ [=>]0.2

      \[ x + \frac{y}{\color{blue}{\frac{101.23733352003822 \cdot 1}{{z}^{2}}} + \left(14.431876219268936 + \left(-15.646356830292042\right) \cdot \frac{1}{z}\right)} \]

      metadata-eval [=>]0.2

      \[ x + \frac{y}{\frac{\color{blue}{101.23733352003822}}{{z}^{2}} + \left(14.431876219268936 + \left(-15.646356830292042\right) \cdot \frac{1}{z}\right)} \]

      unpow2 [=>]0.2

      \[ x + \frac{y}{\frac{101.23733352003822}{\color{blue}{z \cdot z}} + \left(14.431876219268936 + \left(-15.646356830292042\right) \cdot \frac{1}{z}\right)} \]

      associate-*r/ [=>]0.2

      \[ x + \frac{y}{\frac{101.23733352003822}{z \cdot z} + \left(14.431876219268936 + \color{blue}{\frac{\left(-15.646356830292042\right) \cdot 1}{z}}\right)} \]

      metadata-eval [=>]0.2

      \[ x + \frac{y}{\frac{101.23733352003822}{z \cdot z} + \left(14.431876219268936 + \frac{\color{blue}{-15.646356830292042} \cdot 1}{z}\right)} \]

      metadata-eval [=>]0.2

      \[ x + \frac{y}{\frac{101.23733352003822}{z \cdot z} + \left(14.431876219268936 + \frac{\color{blue}{-15.646356830292042}}{z}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification0.1

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+41}:\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \mathbf{elif}\;z \leq 22.5:\\ \;\;\;\;\mathsf{fma}\left(\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{101.23733352003822}{z \cdot z} + \left(14.431876219268936 + \frac{-15.646356830292042}{z}\right)}\\ \end{array} \]

Alternatives

Alternative 1
Error0.2
Cost20424
\[\begin{array}{l} t_0 := 14.431876219268936 + \frac{-15.646356830292042}{z}\\ \mathbf{if}\;z \leq -340000000:\\ \;\;\;\;x + \frac{y}{t_0}\\ \mathbf{elif}\;z \leq 22.5:\\ \;\;\;\;x + \mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right) \cdot \frac{y}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{101.23733352003822}{z \cdot z} + t_0}\\ \end{array} \]
Alternative 2
Error0.2
Cost14280
\[\begin{array}{l} t_0 := 14.431876219268936 + \frac{-15.646356830292042}{z}\\ \mathbf{if}\;z \leq -350000000:\\ \;\;\;\;x + \frac{y}{t_0}\\ \mathbf{elif}\;z \leq 22.5:\\ \;\;\;\;x + \frac{y}{3.350343815022304 + z \cdot \left(z + 6.012459259764103\right)} \cdot \mathsf{fma}\left(z, z \cdot 0.0692910599291889, \mathsf{fma}\left(0.4917317610505968, z, 0.279195317918525\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{101.23733352003822}{z \cdot z} + t_0}\\ \end{array} \]
Alternative 3
Error0.2
Cost1608
\[\begin{array}{l} t_0 := 14.431876219268936 + \frac{-15.646356830292042}{z}\\ \mathbf{if}\;z \leq -80000000:\\ \;\;\;\;x + \frac{y}{t_0}\\ \mathbf{elif}\;z \leq 22.5:\\ \;\;\;\;x + \frac{y \cdot \left(0.279195317918525 + z \cdot \left(0.4917317610505968 + z \cdot 0.0692910599291889\right)\right)}{3.350343815022304 + z \cdot \left(z + 6.012459259764103\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{101.23733352003822}{z \cdot z} + t_0}\\ \end{array} \]
Alternative 4
Error0.3
Cost1225
\[\begin{array}{l} \mathbf{if}\;z \leq -22 \lor \neg \left(z \leq 6.2\right):\\ \;\;\;\;x + \frac{y}{\frac{101.23733352003822}{z \cdot z} + \left(14.431876219268936 + \frac{-15.646356830292042}{z}\right)}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{z \cdot 0.39999999996247915 + 12.000000000000014}\\ \end{array} \]
Alternative 5
Error14.0
Cost850
\[\begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{+249} \lor \neg \left(z \leq -1.05 \cdot 10^{+72}\right) \land \left(z \leq 3.6 \cdot 10^{+110} \lor \neg \left(z \leq 3 \cdot 10^{+182}\right)\right):\\ \;\;\;\;x + \frac{y}{12.000000000000014}\\ \mathbf{else}:\\ \;\;\;\;y \cdot 0.0692910599291889\\ \end{array} \]
Alternative 6
Error0.5
Cost841
\[\begin{array}{l} \mathbf{if}\;z \leq -22 \lor \neg \left(z \leq 6.1\right):\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{z \cdot 0.39999999996247915 + 12.000000000000014}\\ \end{array} \]
Alternative 7
Error0.3
Cost841
\[\begin{array}{l} \mathbf{if}\;z \leq -22 \lor \neg \left(z \leq 6.5\right):\\ \;\;\;\;x + \frac{y}{14.431876219268936 + \frac{-15.646356830292042}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{z \cdot 0.39999999996247915 + 12.000000000000014}\\ \end{array} \]
Alternative 8
Error0.6
Cost585
\[\begin{array}{l} \mathbf{if}\;z \leq -22 \lor \neg \left(z \leq 5.8\right):\\ \;\;\;\;x + \frac{y}{14.431876219268936}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{12.000000000000014}\\ \end{array} \]
Alternative 9
Error25.3
Cost456
\[\begin{array}{l} \mathbf{if}\;x \leq -1.2 \cdot 10^{-99}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.15 \cdot 10^{-11}:\\ \;\;\;\;y \cdot 0.08333333333333323\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 10
Error25.3
Cost456
\[\begin{array}{l} \mathbf{if}\;x \leq -5.5 \cdot 10^{-100}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-12}:\\ \;\;\;\;\frac{y}{12.000000000000014}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 11
Error32.1
Cost64
\[x \]

Error

Reproduce?

herbie shell --seed 2023039 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, B"
  :precision binary64

  :herbie-target
  (if (< z -8120153.652456675) (- (* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y) (- (/ (* 0.40462203869992125 y) (* z z)) x)) (if (< z 6.576118972787377e+20) (+ x (* (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (/ 1.0 (+ (* (+ z 6.012459259764103) z) 3.350343815022304)))) (- (* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y) (- (/ (* 0.40462203869992125 y) (* z z)) x))))

  (+ x (/ (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))