Average Error: 19.8 → 0.2
Time: 16.9s
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 -44451179406400.914:\\ \;\;\;\;\left(0.07512208616047561 \cdot \frac{y}{z} + x\right) + 0.0692910599291889 \cdot y\\ \mathbf{elif}\;z \leq 33790.659544843395:\\ \;\;\;\;\mathsf{fma}\left(y, \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)}, x\right)\\ \mathbf{else}:\\ \;\;\;\;x + 0.0692910599291889 \cdot y\\ \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 -44451179406400.914)
   (+ (+ (* 0.07512208616047561 (/ y z)) x) (* 0.0692910599291889 y))
   (if (<= z 33790.659544843395)
     (fma
      y
      (/
       (fma z (fma z 0.0692910599291889 0.4917317610505968) 0.279195317918525)
       (fma z (+ z 6.012459259764103) 3.350343815022304))
      x)
     (+ x (* 0.0692910599291889 y)))))
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 <= -44451179406400.914) {
		tmp = ((0.07512208616047561 * (y / z)) + x) + (0.0692910599291889 * y);
	} else if (z <= 33790.659544843395) {
		tmp = fma(y, (fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 0.279195317918525) / fma(z, (z + 6.012459259764103), 3.350343815022304)), x);
	} else {
		tmp = x + (0.0692910599291889 * y);
	}
	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 <= -44451179406400.914)
		tmp = Float64(Float64(Float64(0.07512208616047561 * Float64(y / z)) + x) + Float64(0.0692910599291889 * y));
	elseif (z <= 33790.659544843395)
		tmp = fma(y, Float64(fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 0.279195317918525) / fma(z, Float64(z + 6.012459259764103), 3.350343815022304)), x);
	else
		tmp = Float64(x + Float64(0.0692910599291889 * y));
	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, -44451179406400.914], N[(N[(N[(0.07512208616047561 * N[(y / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] + N[(0.0692910599291889 * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 33790.659544843395], N[(y * N[(N[(z * N[(z * 0.0692910599291889 + 0.4917317610505968), $MachinePrecision] + 0.279195317918525), $MachinePrecision] / N[(z * N[(z + 6.012459259764103), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(0.0692910599291889 * y), $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 -44451179406400.914:\\
\;\;\;\;\left(0.07512208616047561 \cdot \frac{y}{z} + x\right) + 0.0692910599291889 \cdot y\\

\mathbf{elif}\;z \leq 33790.659544843395:\\
\;\;\;\;\mathsf{fma}\left(y, \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)}, x\right)\\

\mathbf{else}:\\
\;\;\;\;x + 0.0692910599291889 \cdot y\\


\end{array}

Error

Target

Original19.8
Target0.4
Herbie0.2
\[\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 < -44451179406400.9141

    1. Initial program 41.2

      \[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. Simplified33.1

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \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)}, x\right)} \]
      Proof
      (fma.f64 y (/.f64 (fma.f64 z (fma.f64 z 692910599291889/10000000000000000 307332350656623/625000000000000) 11167812716741/40000000000000) (fma.f64 z (+.f64 z 6012459259764103/1000000000000000) 104698244219447/31250000000000)) x): 0 points increase in error, 0 points decrease in error
      (fma.f64 y (/.f64 (fma.f64 z (Rewrite<= fma-def_binary64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000)) 11167812716741/40000000000000) (fma.f64 z (+.f64 z 6012459259764103/1000000000000000) 104698244219447/31250000000000)) x): 1 points increase in error, 0 points decrease in error
      (fma.f64 y (/.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 z (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000)) 11167812716741/40000000000000)) (fma.f64 z (+.f64 z 6012459259764103/1000000000000000) 104698244219447/31250000000000)) x): 1 points increase in error, 0 points decrease in error
      (fma.f64 y (/.f64 (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z)) 11167812716741/40000000000000) (fma.f64 z (+.f64 z 6012459259764103/1000000000000000) 104698244219447/31250000000000)) x): 0 points increase in error, 0 points decrease in error
      (fma.f64 y (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 z (+.f64 z 6012459259764103/1000000000000000)) 104698244219447/31250000000000))) x): 0 points increase in error, 1 points decrease in error
      (fma.f64 y (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000) (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z)) 104698244219447/31250000000000)) x): 0 points increase in error, 0 points decrease in error
      (Rewrite<= fma-def_binary64 (+.f64 (*.f64 y (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000))) x)): 1 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000))) x): 35 points increase in error, 5 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 x (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000)))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in z around inf 0.3

      \[\leadsto \color{blue}{0.0692910599291889 \cdot y + \left(0.07512208616047561 \cdot \frac{y}{z} + x\right)} \]

    if -44451179406400.9141 < z < 33790.659544843395

    1. Initial program 0.2

      \[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(y, \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)}, x\right)} \]
      Proof
      (fma.f64 y (/.f64 (fma.f64 z (fma.f64 z 692910599291889/10000000000000000 307332350656623/625000000000000) 11167812716741/40000000000000) (fma.f64 z (+.f64 z 6012459259764103/1000000000000000) 104698244219447/31250000000000)) x): 0 points increase in error, 0 points decrease in error
      (fma.f64 y (/.f64 (fma.f64 z (Rewrite<= fma-def_binary64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000)) 11167812716741/40000000000000) (fma.f64 z (+.f64 z 6012459259764103/1000000000000000) 104698244219447/31250000000000)) x): 1 points increase in error, 0 points decrease in error
      (fma.f64 y (/.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 z (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000)) 11167812716741/40000000000000)) (fma.f64 z (+.f64 z 6012459259764103/1000000000000000) 104698244219447/31250000000000)) x): 1 points increase in error, 0 points decrease in error
      (fma.f64 y (/.f64 (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z)) 11167812716741/40000000000000) (fma.f64 z (+.f64 z 6012459259764103/1000000000000000) 104698244219447/31250000000000)) x): 0 points increase in error, 0 points decrease in error
      (fma.f64 y (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 z (+.f64 z 6012459259764103/1000000000000000)) 104698244219447/31250000000000))) x): 0 points increase in error, 1 points decrease in error
      (fma.f64 y (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000) (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z)) 104698244219447/31250000000000)) x): 0 points increase in error, 0 points decrease in error
      (Rewrite<= fma-def_binary64 (+.f64 (*.f64 y (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000))) x)): 1 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000))) x): 35 points increase in error, 5 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 x (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000)))): 0 points increase in error, 0 points decrease in error

    if 33790.659544843395 < z

    1. Initial program 40.6

      \[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.1

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \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)}, x\right)} \]
      Proof
      (fma.f64 y (/.f64 (fma.f64 z (fma.f64 z 692910599291889/10000000000000000 307332350656623/625000000000000) 11167812716741/40000000000000) (fma.f64 z (+.f64 z 6012459259764103/1000000000000000) 104698244219447/31250000000000)) x): 0 points increase in error, 0 points decrease in error
      (fma.f64 y (/.f64 (fma.f64 z (Rewrite<= fma-def_binary64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000)) 11167812716741/40000000000000) (fma.f64 z (+.f64 z 6012459259764103/1000000000000000) 104698244219447/31250000000000)) x): 1 points increase in error, 0 points decrease in error
      (fma.f64 y (/.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 z (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000)) 11167812716741/40000000000000)) (fma.f64 z (+.f64 z 6012459259764103/1000000000000000) 104698244219447/31250000000000)) x): 1 points increase in error, 0 points decrease in error
      (fma.f64 y (/.f64 (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z)) 11167812716741/40000000000000) (fma.f64 z (+.f64 z 6012459259764103/1000000000000000) 104698244219447/31250000000000)) x): 0 points increase in error, 0 points decrease in error
      (fma.f64 y (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 z (+.f64 z 6012459259764103/1000000000000000)) 104698244219447/31250000000000))) x): 0 points increase in error, 1 points decrease in error
      (fma.f64 y (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000) (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z)) 104698244219447/31250000000000)) x): 0 points increase in error, 0 points decrease in error
      (Rewrite<= fma-def_binary64 (+.f64 (*.f64 y (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000))) x)): 1 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000))) x): 35 points increase in error, 5 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 x (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (+.f64 (*.f64 (+.f64 z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000)))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in z around inf 0.5

      \[\leadsto \color{blue}{0.0692910599291889 \cdot y + x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification0.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -44451179406400.914:\\ \;\;\;\;\left(0.07512208616047561 \cdot \frac{y}{z} + x\right) + 0.0692910599291889 \cdot y\\ \mathbf{elif}\;z \leq 33790.659544843395:\\ \;\;\;\;\mathsf{fma}\left(y, \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)}, x\right)\\ \mathbf{else}:\\ \;\;\;\;x + 0.0692910599291889 \cdot y\\ \end{array} \]

Alternatives

Alternative 1
Error0.3
Cost20424
\[\begin{array}{l} t_0 := x + 0.0692910599291889 \cdot y\\ \mathbf{if}\;z \leq -3.3932590405823266 \cdot 10^{+67}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 33790.659544843395:\\ \;\;\;\;x + \mathsf{fma}\left(z, \mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), 0.279195317918525\right) \cdot \frac{y}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 2
Error0.4
Cost1608
\[\begin{array}{l} t_0 := x + 0.0692910599291889 \cdot y\\ \mathbf{if}\;z \leq -2.3164639797329128 \cdot 10^{+27}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 33790.659544843395:\\ \;\;\;\;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}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Error31.8
Cost1512
\[\begin{array}{l} \mathbf{if}\;z \leq -6.035101181330591 \cdot 10^{+173}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3.866266365353077 \cdot 10^{+158}:\\ \;\;\;\;0.0692910599291889 \cdot y\\ \mathbf{elif}\;z \leq -4.802044435221191 \cdot 10^{+90}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -5.9453753121206425 \cdot 10^{+62}:\\ \;\;\;\;0.0692910599291889 \cdot y\\ \mathbf{elif}\;z \leq -248700386378472.72:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.676144317931616 \cdot 10^{-260}:\\ \;\;\;\;y \cdot 0.08333333333333323\\ \mathbf{elif}\;z \leq 1.4921197461792551 \cdot 10^{-204}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.063162864954143 \cdot 10^{-130}:\\ \;\;\;\;y \cdot 0.08333333333333323\\ \mathbf{elif}\;z \leq 5.965900109089646 \cdot 10^{+46}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.731494153616483 \cdot 10^{+75}:\\ \;\;\;\;0.0692910599291889 \cdot y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 4
Error0.9
Cost1352
\[\begin{array}{l} t_0 := \left(0.07512208616047561 \cdot \frac{y}{z} + x\right) + 0.0692910599291889 \cdot y\\ \mathbf{if}\;z \leq -44451179406400.914:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 5.562347842229099 \cdot 10^{-14}:\\ \;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(-0.00277777777751721 + z \cdot \left(0.0007936505811533442 + z \cdot -0.0005951669793454025\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 5
Error15.5
Cost1112
\[\begin{array}{l} t_0 := x + 0.0692910599291889 \cdot y\\ \mathbf{if}\;z \leq -44451179406400.914:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -2.0560585005339336 \cdot 10^{-145}:\\ \;\;\;\;y \cdot 0.08333333333333323\\ \mathbf{elif}\;z \leq -5.516924450838331 \cdot 10^{-254}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 3.676144317931616 \cdot 10^{-260}:\\ \;\;\;\;y \cdot 0.08333333333333323\\ \mathbf{elif}\;z \leq 1.4921197461792551 \cdot 10^{-204}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 3.958664047259163 \cdot 10^{-137}:\\ \;\;\;\;y \cdot 0.08333333333333323\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 6
Error0.9
Cost1096
\[\begin{array}{l} t_0 := \left(0.07512208616047561 \cdot \frac{y}{z} + x\right) + 0.0692910599291889 \cdot y\\ \mathbf{if}\;z \leq -44451179406400.914:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 5.562347842229099 \cdot 10^{-14}:\\ \;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(-0.00277777777751721 + z \cdot 0.0007936505811533442\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 7
Error0.9
Cost968
\[\begin{array}{l} t_0 := \left(0.07512208616047561 \cdot \frac{y}{z} + x\right) + 0.0692910599291889 \cdot y\\ \mathbf{if}\;z \leq -44451179406400.914:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 5.562347842229099 \cdot 10^{-14}:\\ \;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 8
Error0.9
Cost840
\[\begin{array}{l} t_0 := x + 0.0692910599291889 \cdot y\\ \mathbf{if}\;z \leq -44451179406400.914:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 5.562347842229099 \cdot 10^{-14}:\\ \;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 9
Error25.7
Cost720
\[\begin{array}{l} \mathbf{if}\;x \leq -6.412825731361486 \cdot 10^{+32}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -9.511165745240703 \cdot 10^{-35}:\\ \;\;\;\;0.0692910599291889 \cdot y\\ \mathbf{elif}\;x \leq -3.6662658996466875 \cdot 10^{-126}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 3.5205530182735795 \cdot 10^{-31}:\\ \;\;\;\;0.0692910599291889 \cdot y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 10
Error1.0
Cost584
\[\begin{array}{l} t_0 := x + 0.0692910599291889 \cdot y\\ \mathbf{if}\;z \leq -44451179406400.914:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 5.562347842229099 \cdot 10^{-14}:\\ \;\;\;\;x + y \cdot 0.08333333333333323\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 11
Error31.1
Cost64
\[x \]

Error

Reproduce

herbie shell --seed 2022316 
(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))))