Jmat.Real.gamma, branch z less than 0.5

Percentage Accurate: 96.5% → 98.4%
Time: 1.5min
Alternatives: 12
Speedup: 1.6×

Specification

?
\[z \leq 0.5\]
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(1 - z\right) - 1\\ t_1 := t\_0 + 7\\ t_2 := t\_1 + 0.5\\ \frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {t\_2}^{\left(t\_0 + 0.5\right)}\right) \cdot e^{-t\_2}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{t\_0 + 1}\right) + \frac{-1259.1392167224028}{t\_0 + 2}\right) + \frac{771.3234287776531}{t\_0 + 3}\right) + \frac{-176.6150291621406}{t\_0 + 4}\right) + \frac{12.507343278686905}{t\_0 + 5}\right) + \frac{-0.13857109526572012}{t\_0 + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{t\_1}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{t\_0 + 8}\right)\right) \end{array} \end{array} \]
(FPCore (z)
 :precision binary64
 (let* ((t_0 (- (- 1.0 z) 1.0)) (t_1 (+ t_0 7.0)) (t_2 (+ t_1 0.5)))
   (*
    (/ PI (sin (* PI z)))
    (*
     (* (* (sqrt (* PI 2.0)) (pow t_2 (+ t_0 0.5))) (exp (- t_2)))
     (+
      (+
       (+
        (+
         (+
          (+
           (+
            (+ 0.9999999999998099 (/ 676.5203681218851 (+ t_0 1.0)))
            (/ -1259.1392167224028 (+ t_0 2.0)))
           (/ 771.3234287776531 (+ t_0 3.0)))
          (/ -176.6150291621406 (+ t_0 4.0)))
         (/ 12.507343278686905 (+ t_0 5.0)))
        (/ -0.13857109526572012 (+ t_0 6.0)))
       (/ 9.984369578019572e-6 t_1))
      (/ 1.5056327351493116e-7 (+ t_0 8.0)))))))
double code(double z) {
	double t_0 = (1.0 - z) - 1.0;
	double t_1 = t_0 + 7.0;
	double t_2 = t_1 + 0.5;
	return (((double) M_PI) / sin((((double) M_PI) * z))) * (((sqrt((((double) M_PI) * 2.0)) * pow(t_2, (t_0 + 0.5))) * exp(-t_2)) * ((((((((0.9999999999998099 + (676.5203681218851 / (t_0 + 1.0))) + (-1259.1392167224028 / (t_0 + 2.0))) + (771.3234287776531 / (t_0 + 3.0))) + (-176.6150291621406 / (t_0 + 4.0))) + (12.507343278686905 / (t_0 + 5.0))) + (-0.13857109526572012 / (t_0 + 6.0))) + (9.984369578019572e-6 / t_1)) + (1.5056327351493116e-7 / (t_0 + 8.0))));
}
public static double code(double z) {
	double t_0 = (1.0 - z) - 1.0;
	double t_1 = t_0 + 7.0;
	double t_2 = t_1 + 0.5;
	return (Math.PI / Math.sin((Math.PI * z))) * (((Math.sqrt((Math.PI * 2.0)) * Math.pow(t_2, (t_0 + 0.5))) * Math.exp(-t_2)) * ((((((((0.9999999999998099 + (676.5203681218851 / (t_0 + 1.0))) + (-1259.1392167224028 / (t_0 + 2.0))) + (771.3234287776531 / (t_0 + 3.0))) + (-176.6150291621406 / (t_0 + 4.0))) + (12.507343278686905 / (t_0 + 5.0))) + (-0.13857109526572012 / (t_0 + 6.0))) + (9.984369578019572e-6 / t_1)) + (1.5056327351493116e-7 / (t_0 + 8.0))));
}
def code(z):
	t_0 = (1.0 - z) - 1.0
	t_1 = t_0 + 7.0
	t_2 = t_1 + 0.5
	return (math.pi / math.sin((math.pi * z))) * (((math.sqrt((math.pi * 2.0)) * math.pow(t_2, (t_0 + 0.5))) * math.exp(-t_2)) * ((((((((0.9999999999998099 + (676.5203681218851 / (t_0 + 1.0))) + (-1259.1392167224028 / (t_0 + 2.0))) + (771.3234287776531 / (t_0 + 3.0))) + (-176.6150291621406 / (t_0 + 4.0))) + (12.507343278686905 / (t_0 + 5.0))) + (-0.13857109526572012 / (t_0 + 6.0))) + (9.984369578019572e-6 / t_1)) + (1.5056327351493116e-7 / (t_0 + 8.0))))
function code(z)
	t_0 = Float64(Float64(1.0 - z) - 1.0)
	t_1 = Float64(t_0 + 7.0)
	t_2 = Float64(t_1 + 0.5)
	return Float64(Float64(pi / sin(Float64(pi * z))) * Float64(Float64(Float64(sqrt(Float64(pi * 2.0)) * (t_2 ^ Float64(t_0 + 0.5))) * exp(Float64(-t_2))) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(0.9999999999998099 + Float64(676.5203681218851 / Float64(t_0 + 1.0))) + Float64(-1259.1392167224028 / Float64(t_0 + 2.0))) + Float64(771.3234287776531 / Float64(t_0 + 3.0))) + Float64(-176.6150291621406 / Float64(t_0 + 4.0))) + Float64(12.507343278686905 / Float64(t_0 + 5.0))) + Float64(-0.13857109526572012 / Float64(t_0 + 6.0))) + Float64(9.984369578019572e-6 / t_1)) + Float64(1.5056327351493116e-7 / Float64(t_0 + 8.0)))))
end
function tmp = code(z)
	t_0 = (1.0 - z) - 1.0;
	t_1 = t_0 + 7.0;
	t_2 = t_1 + 0.5;
	tmp = (pi / sin((pi * z))) * (((sqrt((pi * 2.0)) * (t_2 ^ (t_0 + 0.5))) * exp(-t_2)) * ((((((((0.9999999999998099 + (676.5203681218851 / (t_0 + 1.0))) + (-1259.1392167224028 / (t_0 + 2.0))) + (771.3234287776531 / (t_0 + 3.0))) + (-176.6150291621406 / (t_0 + 4.0))) + (12.507343278686905 / (t_0 + 5.0))) + (-0.13857109526572012 / (t_0 + 6.0))) + (9.984369578019572e-6 / t_1)) + (1.5056327351493116e-7 / (t_0 + 8.0))));
end
code[z_] := Block[{t$95$0 = N[(N[(1.0 - z), $MachinePrecision] - 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + 7.0), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + 0.5), $MachinePrecision]}, N[(N[(Pi / N[Sin[N[(Pi * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Sqrt[N[(Pi * 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[t$95$2, N[(t$95$0 + 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[(-t$95$2)], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(0.9999999999998099 + N[(676.5203681218851 / N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1259.1392167224028 / N[(t$95$0 + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(771.3234287776531 / N[(t$95$0 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-176.6150291621406 / N[(t$95$0 + 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(12.507343278686905 / N[(t$95$0 + 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.13857109526572012 / N[(t$95$0 + 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.984369578019572e-6 / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(1.5056327351493116e-7 / N[(t$95$0 + 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(1 - z\right) - 1\\
t_1 := t\_0 + 7\\
t_2 := t\_1 + 0.5\\
\frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {t\_2}^{\left(t\_0 + 0.5\right)}\right) \cdot e^{-t\_2}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{t\_0 + 1}\right) + \frac{-1259.1392167224028}{t\_0 + 2}\right) + \frac{771.3234287776531}{t\_0 + 3}\right) + \frac{-176.6150291621406}{t\_0 + 4}\right) + \frac{12.507343278686905}{t\_0 + 5}\right) + \frac{-0.13857109526572012}{t\_0 + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{t\_1}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{t\_0 + 8}\right)\right)
\end{array}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 12 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 96.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(1 - z\right) - 1\\ t_1 := t\_0 + 7\\ t_2 := t\_1 + 0.5\\ \frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {t\_2}^{\left(t\_0 + 0.5\right)}\right) \cdot e^{-t\_2}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{t\_0 + 1}\right) + \frac{-1259.1392167224028}{t\_0 + 2}\right) + \frac{771.3234287776531}{t\_0 + 3}\right) + \frac{-176.6150291621406}{t\_0 + 4}\right) + \frac{12.507343278686905}{t\_0 + 5}\right) + \frac{-0.13857109526572012}{t\_0 + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{t\_1}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{t\_0 + 8}\right)\right) \end{array} \end{array} \]
(FPCore (z)
 :precision binary64
 (let* ((t_0 (- (- 1.0 z) 1.0)) (t_1 (+ t_0 7.0)) (t_2 (+ t_1 0.5)))
   (*
    (/ PI (sin (* PI z)))
    (*
     (* (* (sqrt (* PI 2.0)) (pow t_2 (+ t_0 0.5))) (exp (- t_2)))
     (+
      (+
       (+
        (+
         (+
          (+
           (+
            (+ 0.9999999999998099 (/ 676.5203681218851 (+ t_0 1.0)))
            (/ -1259.1392167224028 (+ t_0 2.0)))
           (/ 771.3234287776531 (+ t_0 3.0)))
          (/ -176.6150291621406 (+ t_0 4.0)))
         (/ 12.507343278686905 (+ t_0 5.0)))
        (/ -0.13857109526572012 (+ t_0 6.0)))
       (/ 9.984369578019572e-6 t_1))
      (/ 1.5056327351493116e-7 (+ t_0 8.0)))))))
double code(double z) {
	double t_0 = (1.0 - z) - 1.0;
	double t_1 = t_0 + 7.0;
	double t_2 = t_1 + 0.5;
	return (((double) M_PI) / sin((((double) M_PI) * z))) * (((sqrt((((double) M_PI) * 2.0)) * pow(t_2, (t_0 + 0.5))) * exp(-t_2)) * ((((((((0.9999999999998099 + (676.5203681218851 / (t_0 + 1.0))) + (-1259.1392167224028 / (t_0 + 2.0))) + (771.3234287776531 / (t_0 + 3.0))) + (-176.6150291621406 / (t_0 + 4.0))) + (12.507343278686905 / (t_0 + 5.0))) + (-0.13857109526572012 / (t_0 + 6.0))) + (9.984369578019572e-6 / t_1)) + (1.5056327351493116e-7 / (t_0 + 8.0))));
}
public static double code(double z) {
	double t_0 = (1.0 - z) - 1.0;
	double t_1 = t_0 + 7.0;
	double t_2 = t_1 + 0.5;
	return (Math.PI / Math.sin((Math.PI * z))) * (((Math.sqrt((Math.PI * 2.0)) * Math.pow(t_2, (t_0 + 0.5))) * Math.exp(-t_2)) * ((((((((0.9999999999998099 + (676.5203681218851 / (t_0 + 1.0))) + (-1259.1392167224028 / (t_0 + 2.0))) + (771.3234287776531 / (t_0 + 3.0))) + (-176.6150291621406 / (t_0 + 4.0))) + (12.507343278686905 / (t_0 + 5.0))) + (-0.13857109526572012 / (t_0 + 6.0))) + (9.984369578019572e-6 / t_1)) + (1.5056327351493116e-7 / (t_0 + 8.0))));
}
def code(z):
	t_0 = (1.0 - z) - 1.0
	t_1 = t_0 + 7.0
	t_2 = t_1 + 0.5
	return (math.pi / math.sin((math.pi * z))) * (((math.sqrt((math.pi * 2.0)) * math.pow(t_2, (t_0 + 0.5))) * math.exp(-t_2)) * ((((((((0.9999999999998099 + (676.5203681218851 / (t_0 + 1.0))) + (-1259.1392167224028 / (t_0 + 2.0))) + (771.3234287776531 / (t_0 + 3.0))) + (-176.6150291621406 / (t_0 + 4.0))) + (12.507343278686905 / (t_0 + 5.0))) + (-0.13857109526572012 / (t_0 + 6.0))) + (9.984369578019572e-6 / t_1)) + (1.5056327351493116e-7 / (t_0 + 8.0))))
function code(z)
	t_0 = Float64(Float64(1.0 - z) - 1.0)
	t_1 = Float64(t_0 + 7.0)
	t_2 = Float64(t_1 + 0.5)
	return Float64(Float64(pi / sin(Float64(pi * z))) * Float64(Float64(Float64(sqrt(Float64(pi * 2.0)) * (t_2 ^ Float64(t_0 + 0.5))) * exp(Float64(-t_2))) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(0.9999999999998099 + Float64(676.5203681218851 / Float64(t_0 + 1.0))) + Float64(-1259.1392167224028 / Float64(t_0 + 2.0))) + Float64(771.3234287776531 / Float64(t_0 + 3.0))) + Float64(-176.6150291621406 / Float64(t_0 + 4.0))) + Float64(12.507343278686905 / Float64(t_0 + 5.0))) + Float64(-0.13857109526572012 / Float64(t_0 + 6.0))) + Float64(9.984369578019572e-6 / t_1)) + Float64(1.5056327351493116e-7 / Float64(t_0 + 8.0)))))
end
function tmp = code(z)
	t_0 = (1.0 - z) - 1.0;
	t_1 = t_0 + 7.0;
	t_2 = t_1 + 0.5;
	tmp = (pi / sin((pi * z))) * (((sqrt((pi * 2.0)) * (t_2 ^ (t_0 + 0.5))) * exp(-t_2)) * ((((((((0.9999999999998099 + (676.5203681218851 / (t_0 + 1.0))) + (-1259.1392167224028 / (t_0 + 2.0))) + (771.3234287776531 / (t_0 + 3.0))) + (-176.6150291621406 / (t_0 + 4.0))) + (12.507343278686905 / (t_0 + 5.0))) + (-0.13857109526572012 / (t_0 + 6.0))) + (9.984369578019572e-6 / t_1)) + (1.5056327351493116e-7 / (t_0 + 8.0))));
end
code[z_] := Block[{t$95$0 = N[(N[(1.0 - z), $MachinePrecision] - 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + 7.0), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + 0.5), $MachinePrecision]}, N[(N[(Pi / N[Sin[N[(Pi * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Sqrt[N[(Pi * 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[t$95$2, N[(t$95$0 + 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[(-t$95$2)], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(0.9999999999998099 + N[(676.5203681218851 / N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1259.1392167224028 / N[(t$95$0 + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(771.3234287776531 / N[(t$95$0 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-176.6150291621406 / N[(t$95$0 + 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(12.507343278686905 / N[(t$95$0 + 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.13857109526572012 / N[(t$95$0 + 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.984369578019572e-6 / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(1.5056327351493116e-7 / N[(t$95$0 + 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(1 - z\right) - 1\\
t_1 := t\_0 + 7\\
t_2 := t\_1 + 0.5\\
\frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {t\_2}^{\left(t\_0 + 0.5\right)}\right) \cdot e^{-t\_2}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{t\_0 + 1}\right) + \frac{-1259.1392167224028}{t\_0 + 2}\right) + \frac{771.3234287776531}{t\_0 + 3}\right) + \frac{-176.6150291621406}{t\_0 + 4}\right) + \frac{12.507343278686905}{t\_0 + 5}\right) + \frac{-0.13857109526572012}{t\_0 + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{t\_1}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{t\_0 + 8}\right)\right)
\end{array}
\end{array}

Alternative 1: 98.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(1 - z\right) + 6\\ t_1 := -0.0007941933558411801 - \frac{z - 1}{-1259.1392167224028}\\ t_2 := \frac{676.5203681218851}{1 - z} - 0.9999999999998099\\ t_3 := 0.5 + t\_0\\ \left(\frac{\pi}{\sin \left(z \cdot \pi\right)} \cdot \frac{\sqrt{2 \cdot \pi} \cdot {t\_3}^{\left(\left(1 - z\right) + -0.5\right)}}{e^{t\_3}}\right) \cdot \left(\left(\left(\frac{\left(\frac{457679.80848377093}{\left(1 - z\right) \cdot \left(1 - z\right)} - 0.9999999999996197\right) \cdot t\_1 + t\_2 \cdot 1}{t\_2 \cdot t\_1} + \left(\frac{771.3234287776531}{\left(1 - z\right) + 2} + \frac{-176.6150291621406}{\left(1 - z\right) + 3}\right)\right) + \left(\frac{12.507343278686905}{\left(1 - z\right) + 4} + \frac{-0.13857109526572012}{\left(1 - z\right) + 5}\right)\right) + \left(\frac{9.984369578019572 \cdot 10^{-6}}{t\_0} + \frac{1.5056327351493116 \cdot 10^{-7}}{\left(1 - z\right) + 7}\right)\right) \end{array} \end{array} \]
(FPCore (z)
 :precision binary64
 (let* ((t_0 (+ (- 1.0 z) 6.0))
        (t_1 (- -0.0007941933558411801 (/ (- z 1.0) -1259.1392167224028)))
        (t_2 (- (/ 676.5203681218851 (- 1.0 z)) 0.9999999999998099))
        (t_3 (+ 0.5 t_0)))
   (*
    (*
     (/ PI (sin (* z PI)))
     (/ (* (sqrt (* 2.0 PI)) (pow t_3 (+ (- 1.0 z) -0.5))) (exp t_3)))
    (+
     (+
      (+
       (/
        (+
         (*
          (- (/ 457679.80848377093 (* (- 1.0 z) (- 1.0 z))) 0.9999999999996197)
          t_1)
         (* t_2 1.0))
        (* t_2 t_1))
       (+
        (/ 771.3234287776531 (+ (- 1.0 z) 2.0))
        (/ -176.6150291621406 (+ (- 1.0 z) 3.0))))
      (+
       (/ 12.507343278686905 (+ (- 1.0 z) 4.0))
       (/ -0.13857109526572012 (+ (- 1.0 z) 5.0))))
     (+
      (/ 9.984369578019572e-6 t_0)
      (/ 1.5056327351493116e-7 (+ (- 1.0 z) 7.0)))))))
double code(double z) {
	double t_0 = (1.0 - z) + 6.0;
	double t_1 = -0.0007941933558411801 - ((z - 1.0) / -1259.1392167224028);
	double t_2 = (676.5203681218851 / (1.0 - z)) - 0.9999999999998099;
	double t_3 = 0.5 + t_0;
	return ((((double) M_PI) / sin((z * ((double) M_PI)))) * ((sqrt((2.0 * ((double) M_PI))) * pow(t_3, ((1.0 - z) + -0.5))) / exp(t_3))) * ((((((((457679.80848377093 / ((1.0 - z) * (1.0 - z))) - 0.9999999999996197) * t_1) + (t_2 * 1.0)) / (t_2 * t_1)) + ((771.3234287776531 / ((1.0 - z) + 2.0)) + (-176.6150291621406 / ((1.0 - z) + 3.0)))) + ((12.507343278686905 / ((1.0 - z) + 4.0)) + (-0.13857109526572012 / ((1.0 - z) + 5.0)))) + ((9.984369578019572e-6 / t_0) + (1.5056327351493116e-7 / ((1.0 - z) + 7.0))));
}
public static double code(double z) {
	double t_0 = (1.0 - z) + 6.0;
	double t_1 = -0.0007941933558411801 - ((z - 1.0) / -1259.1392167224028);
	double t_2 = (676.5203681218851 / (1.0 - z)) - 0.9999999999998099;
	double t_3 = 0.5 + t_0;
	return ((Math.PI / Math.sin((z * Math.PI))) * ((Math.sqrt((2.0 * Math.PI)) * Math.pow(t_3, ((1.0 - z) + -0.5))) / Math.exp(t_3))) * ((((((((457679.80848377093 / ((1.0 - z) * (1.0 - z))) - 0.9999999999996197) * t_1) + (t_2 * 1.0)) / (t_2 * t_1)) + ((771.3234287776531 / ((1.0 - z) + 2.0)) + (-176.6150291621406 / ((1.0 - z) + 3.0)))) + ((12.507343278686905 / ((1.0 - z) + 4.0)) + (-0.13857109526572012 / ((1.0 - z) + 5.0)))) + ((9.984369578019572e-6 / t_0) + (1.5056327351493116e-7 / ((1.0 - z) + 7.0))));
}
def code(z):
	t_0 = (1.0 - z) + 6.0
	t_1 = -0.0007941933558411801 - ((z - 1.0) / -1259.1392167224028)
	t_2 = (676.5203681218851 / (1.0 - z)) - 0.9999999999998099
	t_3 = 0.5 + t_0
	return ((math.pi / math.sin((z * math.pi))) * ((math.sqrt((2.0 * math.pi)) * math.pow(t_3, ((1.0 - z) + -0.5))) / math.exp(t_3))) * ((((((((457679.80848377093 / ((1.0 - z) * (1.0 - z))) - 0.9999999999996197) * t_1) + (t_2 * 1.0)) / (t_2 * t_1)) + ((771.3234287776531 / ((1.0 - z) + 2.0)) + (-176.6150291621406 / ((1.0 - z) + 3.0)))) + ((12.507343278686905 / ((1.0 - z) + 4.0)) + (-0.13857109526572012 / ((1.0 - z) + 5.0)))) + ((9.984369578019572e-6 / t_0) + (1.5056327351493116e-7 / ((1.0 - z) + 7.0))))
function code(z)
	t_0 = Float64(Float64(1.0 - z) + 6.0)
	t_1 = Float64(-0.0007941933558411801 - Float64(Float64(z - 1.0) / -1259.1392167224028))
	t_2 = Float64(Float64(676.5203681218851 / Float64(1.0 - z)) - 0.9999999999998099)
	t_3 = Float64(0.5 + t_0)
	return Float64(Float64(Float64(pi / sin(Float64(z * pi))) * Float64(Float64(sqrt(Float64(2.0 * pi)) * (t_3 ^ Float64(Float64(1.0 - z) + -0.5))) / exp(t_3))) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(457679.80848377093 / Float64(Float64(1.0 - z) * Float64(1.0 - z))) - 0.9999999999996197) * t_1) + Float64(t_2 * 1.0)) / Float64(t_2 * t_1)) + Float64(Float64(771.3234287776531 / Float64(Float64(1.0 - z) + 2.0)) + Float64(-176.6150291621406 / Float64(Float64(1.0 - z) + 3.0)))) + Float64(Float64(12.507343278686905 / Float64(Float64(1.0 - z) + 4.0)) + Float64(-0.13857109526572012 / Float64(Float64(1.0 - z) + 5.0)))) + Float64(Float64(9.984369578019572e-6 / t_0) + Float64(1.5056327351493116e-7 / Float64(Float64(1.0 - z) + 7.0)))))
end
function tmp = code(z)
	t_0 = (1.0 - z) + 6.0;
	t_1 = -0.0007941933558411801 - ((z - 1.0) / -1259.1392167224028);
	t_2 = (676.5203681218851 / (1.0 - z)) - 0.9999999999998099;
	t_3 = 0.5 + t_0;
	tmp = ((pi / sin((z * pi))) * ((sqrt((2.0 * pi)) * (t_3 ^ ((1.0 - z) + -0.5))) / exp(t_3))) * ((((((((457679.80848377093 / ((1.0 - z) * (1.0 - z))) - 0.9999999999996197) * t_1) + (t_2 * 1.0)) / (t_2 * t_1)) + ((771.3234287776531 / ((1.0 - z) + 2.0)) + (-176.6150291621406 / ((1.0 - z) + 3.0)))) + ((12.507343278686905 / ((1.0 - z) + 4.0)) + (-0.13857109526572012 / ((1.0 - z) + 5.0)))) + ((9.984369578019572e-6 / t_0) + (1.5056327351493116e-7 / ((1.0 - z) + 7.0))));
end
code[z_] := Block[{t$95$0 = N[(N[(1.0 - z), $MachinePrecision] + 6.0), $MachinePrecision]}, Block[{t$95$1 = N[(-0.0007941933558411801 - N[(N[(z - 1.0), $MachinePrecision] / -1259.1392167224028), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(676.5203681218851 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - 0.9999999999998099), $MachinePrecision]}, Block[{t$95$3 = N[(0.5 + t$95$0), $MachinePrecision]}, N[(N[(N[(Pi / N[Sin[N[(z * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sqrt[N[(2.0 * Pi), $MachinePrecision]], $MachinePrecision] * N[Power[t$95$3, N[(N[(1.0 - z), $MachinePrecision] + -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Exp[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(457679.80848377093 / N[(N[(1.0 - z), $MachinePrecision] * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.9999999999996197), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$2 * 1.0), $MachinePrecision]), $MachinePrecision] / N[(t$95$2 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(771.3234287776531 / N[(N[(1.0 - z), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] + N[(-176.6150291621406 / N[(N[(1.0 - z), $MachinePrecision] + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(12.507343278686905 / N[(N[(1.0 - z), $MachinePrecision] + 4.0), $MachinePrecision]), $MachinePrecision] + N[(-0.13857109526572012 / N[(N[(1.0 - z), $MachinePrecision] + 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(9.984369578019572e-6 / t$95$0), $MachinePrecision] + N[(1.5056327351493116e-7 / N[(N[(1.0 - z), $MachinePrecision] + 7.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(1 - z\right) + 6\\
t_1 := -0.0007941933558411801 - \frac{z - 1}{-1259.1392167224028}\\
t_2 := \frac{676.5203681218851}{1 - z} - 0.9999999999998099\\
t_3 := 0.5 + t\_0\\
\left(\frac{\pi}{\sin \left(z \cdot \pi\right)} \cdot \frac{\sqrt{2 \cdot \pi} \cdot {t\_3}^{\left(\left(1 - z\right) + -0.5\right)}}{e^{t\_3}}\right) \cdot \left(\left(\left(\frac{\left(\frac{457679.80848377093}{\left(1 - z\right) \cdot \left(1 - z\right)} - 0.9999999999996197\right) \cdot t\_1 + t\_2 \cdot 1}{t\_2 \cdot t\_1} + \left(\frac{771.3234287776531}{\left(1 - z\right) + 2} + \frac{-176.6150291621406}{\left(1 - z\right) + 3}\right)\right) + \left(\frac{12.507343278686905}{\left(1 - z\right) + 4} + \frac{-0.13857109526572012}{\left(1 - z\right) + 5}\right)\right) + \left(\frac{9.984369578019572 \cdot 10^{-6}}{t\_0} + \frac{1.5056327351493116 \cdot 10^{-7}}{\left(1 - z\right) + 7}\right)\right)
\end{array}
\end{array}
Derivation
  1. Initial program 97.3%

    \[\frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}^{\left(\left(\left(1 - z\right) - 1\right) + 0.5\right)}\right) \cdot e^{-\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{\left(\left(1 - z\right) - 1\right) + 1}\right) + \frac{-1259.1392167224028}{\left(\left(1 - z\right) - 1\right) + 2}\right) + \frac{771.3234287776531}{\left(\left(1 - z\right) - 1\right) + 3}\right) + \frac{-176.6150291621406}{\left(\left(1 - z\right) - 1\right) + 4}\right) + \frac{12.507343278686905}{\left(\left(1 - z\right) - 1\right) + 5}\right) + \frac{-0.13857109526572012}{\left(\left(1 - z\right) - 1\right) + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{\left(\left(1 - z\right) - 1\right) + 7}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{\left(\left(1 - z\right) - 1\right) + 8}\right)\right) \]
  2. Add Preprocessing
  3. Applied egg-rr0

    \[\leadsto expr\]
  4. Applied egg-rr0

    \[\leadsto expr\]
  5. Add Preprocessing

Alternative 2: 98.5% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(1 - z\right) + 6\\ t_1 := 0.5 + t\_0\\ \left(\frac{\pi}{\sin \left(z \cdot \pi\right)} \cdot \frac{\sqrt{2 \cdot \pi} \cdot {t\_1}^{\left(\left(1 - z\right) + -0.5\right)}}{e^{t\_1}}\right) \cdot \left(\left(\left(\left(\left(\frac{676.5203681218851}{1 - z} + 0.9999999999998099\right) + \frac{-1259.1392167224028}{\left(1 - z\right) + 1}\right) + \left(\frac{771.3234287776531}{\left(1 - z\right) + 2} + \frac{-176.6150291621406}{\left(1 - z\right) + 3}\right)\right) + \left(\frac{12.507343278686905}{\left(1 - z\right) + 4} + \frac{-0.13857109526572012}{\left(1 - z\right) + 5}\right)\right) + \left(\frac{9.984369578019572 \cdot 10^{-6}}{t\_0} + \frac{1.5056327351493116 \cdot 10^{-7}}{\left(1 - z\right) + 7}\right)\right) \end{array} \end{array} \]
(FPCore (z)
 :precision binary64
 (let* ((t_0 (+ (- 1.0 z) 6.0)) (t_1 (+ 0.5 t_0)))
   (*
    (*
     (/ PI (sin (* z PI)))
     (/ (* (sqrt (* 2.0 PI)) (pow t_1 (+ (- 1.0 z) -0.5))) (exp t_1)))
    (+
     (+
      (+
       (+
        (+ (/ 676.5203681218851 (- 1.0 z)) 0.9999999999998099)
        (/ -1259.1392167224028 (+ (- 1.0 z) 1.0)))
       (+
        (/ 771.3234287776531 (+ (- 1.0 z) 2.0))
        (/ -176.6150291621406 (+ (- 1.0 z) 3.0))))
      (+
       (/ 12.507343278686905 (+ (- 1.0 z) 4.0))
       (/ -0.13857109526572012 (+ (- 1.0 z) 5.0))))
     (+
      (/ 9.984369578019572e-6 t_0)
      (/ 1.5056327351493116e-7 (+ (- 1.0 z) 7.0)))))))
double code(double z) {
	double t_0 = (1.0 - z) + 6.0;
	double t_1 = 0.5 + t_0;
	return ((((double) M_PI) / sin((z * ((double) M_PI)))) * ((sqrt((2.0 * ((double) M_PI))) * pow(t_1, ((1.0 - z) + -0.5))) / exp(t_1))) * ((((((676.5203681218851 / (1.0 - z)) + 0.9999999999998099) + (-1259.1392167224028 / ((1.0 - z) + 1.0))) + ((771.3234287776531 / ((1.0 - z) + 2.0)) + (-176.6150291621406 / ((1.0 - z) + 3.0)))) + ((12.507343278686905 / ((1.0 - z) + 4.0)) + (-0.13857109526572012 / ((1.0 - z) + 5.0)))) + ((9.984369578019572e-6 / t_0) + (1.5056327351493116e-7 / ((1.0 - z) + 7.0))));
}
public static double code(double z) {
	double t_0 = (1.0 - z) + 6.0;
	double t_1 = 0.5 + t_0;
	return ((Math.PI / Math.sin((z * Math.PI))) * ((Math.sqrt((2.0 * Math.PI)) * Math.pow(t_1, ((1.0 - z) + -0.5))) / Math.exp(t_1))) * ((((((676.5203681218851 / (1.0 - z)) + 0.9999999999998099) + (-1259.1392167224028 / ((1.0 - z) + 1.0))) + ((771.3234287776531 / ((1.0 - z) + 2.0)) + (-176.6150291621406 / ((1.0 - z) + 3.0)))) + ((12.507343278686905 / ((1.0 - z) + 4.0)) + (-0.13857109526572012 / ((1.0 - z) + 5.0)))) + ((9.984369578019572e-6 / t_0) + (1.5056327351493116e-7 / ((1.0 - z) + 7.0))));
}
def code(z):
	t_0 = (1.0 - z) + 6.0
	t_1 = 0.5 + t_0
	return ((math.pi / math.sin((z * math.pi))) * ((math.sqrt((2.0 * math.pi)) * math.pow(t_1, ((1.0 - z) + -0.5))) / math.exp(t_1))) * ((((((676.5203681218851 / (1.0 - z)) + 0.9999999999998099) + (-1259.1392167224028 / ((1.0 - z) + 1.0))) + ((771.3234287776531 / ((1.0 - z) + 2.0)) + (-176.6150291621406 / ((1.0 - z) + 3.0)))) + ((12.507343278686905 / ((1.0 - z) + 4.0)) + (-0.13857109526572012 / ((1.0 - z) + 5.0)))) + ((9.984369578019572e-6 / t_0) + (1.5056327351493116e-7 / ((1.0 - z) + 7.0))))
function code(z)
	t_0 = Float64(Float64(1.0 - z) + 6.0)
	t_1 = Float64(0.5 + t_0)
	return Float64(Float64(Float64(pi / sin(Float64(z * pi))) * Float64(Float64(sqrt(Float64(2.0 * pi)) * (t_1 ^ Float64(Float64(1.0 - z) + -0.5))) / exp(t_1))) * Float64(Float64(Float64(Float64(Float64(Float64(676.5203681218851 / Float64(1.0 - z)) + 0.9999999999998099) + Float64(-1259.1392167224028 / Float64(Float64(1.0 - z) + 1.0))) + Float64(Float64(771.3234287776531 / Float64(Float64(1.0 - z) + 2.0)) + Float64(-176.6150291621406 / Float64(Float64(1.0 - z) + 3.0)))) + Float64(Float64(12.507343278686905 / Float64(Float64(1.0 - z) + 4.0)) + Float64(-0.13857109526572012 / Float64(Float64(1.0 - z) + 5.0)))) + Float64(Float64(9.984369578019572e-6 / t_0) + Float64(1.5056327351493116e-7 / Float64(Float64(1.0 - z) + 7.0)))))
end
function tmp = code(z)
	t_0 = (1.0 - z) + 6.0;
	t_1 = 0.5 + t_0;
	tmp = ((pi / sin((z * pi))) * ((sqrt((2.0 * pi)) * (t_1 ^ ((1.0 - z) + -0.5))) / exp(t_1))) * ((((((676.5203681218851 / (1.0 - z)) + 0.9999999999998099) + (-1259.1392167224028 / ((1.0 - z) + 1.0))) + ((771.3234287776531 / ((1.0 - z) + 2.0)) + (-176.6150291621406 / ((1.0 - z) + 3.0)))) + ((12.507343278686905 / ((1.0 - z) + 4.0)) + (-0.13857109526572012 / ((1.0 - z) + 5.0)))) + ((9.984369578019572e-6 / t_0) + (1.5056327351493116e-7 / ((1.0 - z) + 7.0))));
end
code[z_] := Block[{t$95$0 = N[(N[(1.0 - z), $MachinePrecision] + 6.0), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 + t$95$0), $MachinePrecision]}, N[(N[(N[(Pi / N[Sin[N[(z * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sqrt[N[(2.0 * Pi), $MachinePrecision]], $MachinePrecision] * N[Power[t$95$1, N[(N[(1.0 - z), $MachinePrecision] + -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Exp[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(N[(676.5203681218851 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + 0.9999999999998099), $MachinePrecision] + N[(-1259.1392167224028 / N[(N[(1.0 - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(771.3234287776531 / N[(N[(1.0 - z), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] + N[(-176.6150291621406 / N[(N[(1.0 - z), $MachinePrecision] + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(12.507343278686905 / N[(N[(1.0 - z), $MachinePrecision] + 4.0), $MachinePrecision]), $MachinePrecision] + N[(-0.13857109526572012 / N[(N[(1.0 - z), $MachinePrecision] + 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(9.984369578019572e-6 / t$95$0), $MachinePrecision] + N[(1.5056327351493116e-7 / N[(N[(1.0 - z), $MachinePrecision] + 7.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(1 - z\right) + 6\\
t_1 := 0.5 + t\_0\\
\left(\frac{\pi}{\sin \left(z \cdot \pi\right)} \cdot \frac{\sqrt{2 \cdot \pi} \cdot {t\_1}^{\left(\left(1 - z\right) + -0.5\right)}}{e^{t\_1}}\right) \cdot \left(\left(\left(\left(\left(\frac{676.5203681218851}{1 - z} + 0.9999999999998099\right) + \frac{-1259.1392167224028}{\left(1 - z\right) + 1}\right) + \left(\frac{771.3234287776531}{\left(1 - z\right) + 2} + \frac{-176.6150291621406}{\left(1 - z\right) + 3}\right)\right) + \left(\frac{12.507343278686905}{\left(1 - z\right) + 4} + \frac{-0.13857109526572012}{\left(1 - z\right) + 5}\right)\right) + \left(\frac{9.984369578019572 \cdot 10^{-6}}{t\_0} + \frac{1.5056327351493116 \cdot 10^{-7}}{\left(1 - z\right) + 7}\right)\right)
\end{array}
\end{array}
Derivation
  1. Initial program 97.3%

    \[\frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}^{\left(\left(\left(1 - z\right) - 1\right) + 0.5\right)}\right) \cdot e^{-\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{\left(\left(1 - z\right) - 1\right) + 1}\right) + \frac{-1259.1392167224028}{\left(\left(1 - z\right) - 1\right) + 2}\right) + \frac{771.3234287776531}{\left(\left(1 - z\right) - 1\right) + 3}\right) + \frac{-176.6150291621406}{\left(\left(1 - z\right) - 1\right) + 4}\right) + \frac{12.507343278686905}{\left(\left(1 - z\right) - 1\right) + 5}\right) + \frac{-0.13857109526572012}{\left(\left(1 - z\right) - 1\right) + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{\left(\left(1 - z\right) - 1\right) + 7}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{\left(\left(1 - z\right) - 1\right) + 8}\right)\right) \]
  2. Add Preprocessing
  3. Applied egg-rr0

    \[\leadsto expr\]
  4. Add Preprocessing

Alternative 3: 97.3% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := -0.0007941933558411801 + \frac{z + -1}{1259.1392167224028}\\ t_1 := 0.5 + \left(\left(1 - z\right) + 6\right)\\ t_2 := \frac{676.5203681218851}{1 - z} + -0.9999999999998099\\ \left(\frac{1}{z} \cdot \frac{\sqrt{2 \cdot \pi} \cdot {t\_1}^{\left(\left(1 - z\right) + -0.5\right)}}{e^{t\_1}}\right) \cdot \left(\left(\frac{771.3234287776531}{3 - z} + \left(\frac{-176.6150291621406}{4 - z} + \frac{\left(\frac{457679.80848377093}{\left(1 - z\right) \cdot \left(1 - z\right)} + -0.9999999999996197\right) \cdot t\_0 + t\_2}{t\_0 \cdot t\_2}\right)\right) + \left(\frac{-0.13857109526572012}{6 - z} + \left(\frac{12.507343278686905}{5 - z} + \left(\frac{9.984369578019572 \cdot 10^{-6}}{7 - z} + \frac{1.5056327351493116 \cdot 10^{-7}}{8 - z}\right)\right)\right)\right) \end{array} \end{array} \]
(FPCore (z)
 :precision binary64
 (let* ((t_0 (+ -0.0007941933558411801 (/ (+ z -1.0) 1259.1392167224028)))
        (t_1 (+ 0.5 (+ (- 1.0 z) 6.0)))
        (t_2 (+ (/ 676.5203681218851 (- 1.0 z)) -0.9999999999998099)))
   (*
    (*
     (/ 1.0 z)
     (/ (* (sqrt (* 2.0 PI)) (pow t_1 (+ (- 1.0 z) -0.5))) (exp t_1)))
    (+
     (+
      (/ 771.3234287776531 (- 3.0 z))
      (+
       (/ -176.6150291621406 (- 4.0 z))
       (/
        (+
         (*
          (+
           (/ 457679.80848377093 (* (- 1.0 z) (- 1.0 z)))
           -0.9999999999996197)
          t_0)
         t_2)
        (* t_0 t_2))))
     (+
      (/ -0.13857109526572012 (- 6.0 z))
      (+
       (/ 12.507343278686905 (- 5.0 z))
       (+
        (/ 9.984369578019572e-6 (- 7.0 z))
        (/ 1.5056327351493116e-7 (- 8.0 z)))))))))
double code(double z) {
	double t_0 = -0.0007941933558411801 + ((z + -1.0) / 1259.1392167224028);
	double t_1 = 0.5 + ((1.0 - z) + 6.0);
	double t_2 = (676.5203681218851 / (1.0 - z)) + -0.9999999999998099;
	return ((1.0 / z) * ((sqrt((2.0 * ((double) M_PI))) * pow(t_1, ((1.0 - z) + -0.5))) / exp(t_1))) * (((771.3234287776531 / (3.0 - z)) + ((-176.6150291621406 / (4.0 - z)) + (((((457679.80848377093 / ((1.0 - z) * (1.0 - z))) + -0.9999999999996197) * t_0) + t_2) / (t_0 * t_2)))) + ((-0.13857109526572012 / (6.0 - z)) + ((12.507343278686905 / (5.0 - z)) + ((9.984369578019572e-6 / (7.0 - z)) + (1.5056327351493116e-7 / (8.0 - z))))));
}
public static double code(double z) {
	double t_0 = -0.0007941933558411801 + ((z + -1.0) / 1259.1392167224028);
	double t_1 = 0.5 + ((1.0 - z) + 6.0);
	double t_2 = (676.5203681218851 / (1.0 - z)) + -0.9999999999998099;
	return ((1.0 / z) * ((Math.sqrt((2.0 * Math.PI)) * Math.pow(t_1, ((1.0 - z) + -0.5))) / Math.exp(t_1))) * (((771.3234287776531 / (3.0 - z)) + ((-176.6150291621406 / (4.0 - z)) + (((((457679.80848377093 / ((1.0 - z) * (1.0 - z))) + -0.9999999999996197) * t_0) + t_2) / (t_0 * t_2)))) + ((-0.13857109526572012 / (6.0 - z)) + ((12.507343278686905 / (5.0 - z)) + ((9.984369578019572e-6 / (7.0 - z)) + (1.5056327351493116e-7 / (8.0 - z))))));
}
def code(z):
	t_0 = -0.0007941933558411801 + ((z + -1.0) / 1259.1392167224028)
	t_1 = 0.5 + ((1.0 - z) + 6.0)
	t_2 = (676.5203681218851 / (1.0 - z)) + -0.9999999999998099
	return ((1.0 / z) * ((math.sqrt((2.0 * math.pi)) * math.pow(t_1, ((1.0 - z) + -0.5))) / math.exp(t_1))) * (((771.3234287776531 / (3.0 - z)) + ((-176.6150291621406 / (4.0 - z)) + (((((457679.80848377093 / ((1.0 - z) * (1.0 - z))) + -0.9999999999996197) * t_0) + t_2) / (t_0 * t_2)))) + ((-0.13857109526572012 / (6.0 - z)) + ((12.507343278686905 / (5.0 - z)) + ((9.984369578019572e-6 / (7.0 - z)) + (1.5056327351493116e-7 / (8.0 - z))))))
function code(z)
	t_0 = Float64(-0.0007941933558411801 + Float64(Float64(z + -1.0) / 1259.1392167224028))
	t_1 = Float64(0.5 + Float64(Float64(1.0 - z) + 6.0))
	t_2 = Float64(Float64(676.5203681218851 / Float64(1.0 - z)) + -0.9999999999998099)
	return Float64(Float64(Float64(1.0 / z) * Float64(Float64(sqrt(Float64(2.0 * pi)) * (t_1 ^ Float64(Float64(1.0 - z) + -0.5))) / exp(t_1))) * Float64(Float64(Float64(771.3234287776531 / Float64(3.0 - z)) + Float64(Float64(-176.6150291621406 / Float64(4.0 - z)) + Float64(Float64(Float64(Float64(Float64(457679.80848377093 / Float64(Float64(1.0 - z) * Float64(1.0 - z))) + -0.9999999999996197) * t_0) + t_2) / Float64(t_0 * t_2)))) + Float64(Float64(-0.13857109526572012 / Float64(6.0 - z)) + Float64(Float64(12.507343278686905 / Float64(5.0 - z)) + Float64(Float64(9.984369578019572e-6 / Float64(7.0 - z)) + Float64(1.5056327351493116e-7 / Float64(8.0 - z)))))))
end
function tmp = code(z)
	t_0 = -0.0007941933558411801 + ((z + -1.0) / 1259.1392167224028);
	t_1 = 0.5 + ((1.0 - z) + 6.0);
	t_2 = (676.5203681218851 / (1.0 - z)) + -0.9999999999998099;
	tmp = ((1.0 / z) * ((sqrt((2.0 * pi)) * (t_1 ^ ((1.0 - z) + -0.5))) / exp(t_1))) * (((771.3234287776531 / (3.0 - z)) + ((-176.6150291621406 / (4.0 - z)) + (((((457679.80848377093 / ((1.0 - z) * (1.0 - z))) + -0.9999999999996197) * t_0) + t_2) / (t_0 * t_2)))) + ((-0.13857109526572012 / (6.0 - z)) + ((12.507343278686905 / (5.0 - z)) + ((9.984369578019572e-6 / (7.0 - z)) + (1.5056327351493116e-7 / (8.0 - z))))));
end
code[z_] := Block[{t$95$0 = N[(-0.0007941933558411801 + N[(N[(z + -1.0), $MachinePrecision] / 1259.1392167224028), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.5 + N[(N[(1.0 - z), $MachinePrecision] + 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(676.5203681218851 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + -0.9999999999998099), $MachinePrecision]}, N[(N[(N[(1.0 / z), $MachinePrecision] * N[(N[(N[Sqrt[N[(2.0 * Pi), $MachinePrecision]], $MachinePrecision] * N[Power[t$95$1, N[(N[(1.0 - z), $MachinePrecision] + -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Exp[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(771.3234287776531 / N[(3.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(-176.6150291621406 / N[(4.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(N[(457679.80848377093 / N[(N[(1.0 - z), $MachinePrecision] * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -0.9999999999996197), $MachinePrecision] * t$95$0), $MachinePrecision] + t$95$2), $MachinePrecision] / N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.13857109526572012 / N[(6.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(12.507343278686905 / N[(5.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(9.984369578019572e-6 / N[(7.0 - z), $MachinePrecision]), $MachinePrecision] + N[(1.5056327351493116e-7 / N[(8.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := -0.0007941933558411801 + \frac{z + -1}{1259.1392167224028}\\
t_1 := 0.5 + \left(\left(1 - z\right) + 6\right)\\
t_2 := \frac{676.5203681218851}{1 - z} + -0.9999999999998099\\
\left(\frac{1}{z} \cdot \frac{\sqrt{2 \cdot \pi} \cdot {t\_1}^{\left(\left(1 - z\right) + -0.5\right)}}{e^{t\_1}}\right) \cdot \left(\left(\frac{771.3234287776531}{3 - z} + \left(\frac{-176.6150291621406}{4 - z} + \frac{\left(\frac{457679.80848377093}{\left(1 - z\right) \cdot \left(1 - z\right)} + -0.9999999999996197\right) \cdot t\_0 + t\_2}{t\_0 \cdot t\_2}\right)\right) + \left(\frac{-0.13857109526572012}{6 - z} + \left(\frac{12.507343278686905}{5 - z} + \left(\frac{9.984369578019572 \cdot 10^{-6}}{7 - z} + \frac{1.5056327351493116 \cdot 10^{-7}}{8 - z}\right)\right)\right)\right)
\end{array}
\end{array}
Derivation
  1. Initial program 97.3%

    \[\frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}^{\left(\left(\left(1 - z\right) - 1\right) + 0.5\right)}\right) \cdot e^{-\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{\left(\left(1 - z\right) - 1\right) + 1}\right) + \frac{-1259.1392167224028}{\left(\left(1 - z\right) - 1\right) + 2}\right) + \frac{771.3234287776531}{\left(\left(1 - z\right) - 1\right) + 3}\right) + \frac{-176.6150291621406}{\left(\left(1 - z\right) - 1\right) + 4}\right) + \frac{12.507343278686905}{\left(\left(1 - z\right) - 1\right) + 5}\right) + \frac{-0.13857109526572012}{\left(\left(1 - z\right) - 1\right) + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{\left(\left(1 - z\right) - 1\right) + 7}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{\left(\left(1 - z\right) - 1\right) + 8}\right)\right) \]
  2. Add Preprocessing
  3. Applied egg-rr0

    \[\leadsto expr\]
  4. Applied egg-rr0

    \[\leadsto expr\]
  5. Taylor expanded in z around 0 0

    \[\leadsto expr\]
  6. Simplified0

    \[\leadsto expr\]
  7. Applied egg-rr0

    \[\leadsto expr\]
  8. Add Preprocessing

Alternative 4: 97.2% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \sqrt{2 \cdot \pi} \cdot \left(\frac{{\left(7.5 - z\right)}^{\left(0.5 - z\right)}}{0.0037967495627271876 + z \cdot -0.006297992560283669} \cdot \frac{e^{z + -7.5}}{z}\right) \end{array} \]
(FPCore (z)
 :precision binary64
 (*
  (sqrt (* 2.0 PI))
  (*
   (/
    (pow (- 7.5 z) (- 0.5 z))
    (+ 0.0037967495627271876 (* z -0.006297992560283669)))
   (/ (exp (+ z -7.5)) z))))
double code(double z) {
	return sqrt((2.0 * ((double) M_PI))) * ((pow((7.5 - z), (0.5 - z)) / (0.0037967495627271876 + (z * -0.006297992560283669))) * (exp((z + -7.5)) / z));
}
public static double code(double z) {
	return Math.sqrt((2.0 * Math.PI)) * ((Math.pow((7.5 - z), (0.5 - z)) / (0.0037967495627271876 + (z * -0.006297992560283669))) * (Math.exp((z + -7.5)) / z));
}
def code(z):
	return math.sqrt((2.0 * math.pi)) * ((math.pow((7.5 - z), (0.5 - z)) / (0.0037967495627271876 + (z * -0.006297992560283669))) * (math.exp((z + -7.5)) / z))
function code(z)
	return Float64(sqrt(Float64(2.0 * pi)) * Float64(Float64((Float64(7.5 - z) ^ Float64(0.5 - z)) / Float64(0.0037967495627271876 + Float64(z * -0.006297992560283669))) * Float64(exp(Float64(z + -7.5)) / z)))
end
function tmp = code(z)
	tmp = sqrt((2.0 * pi)) * ((((7.5 - z) ^ (0.5 - z)) / (0.0037967495627271876 + (z * -0.006297992560283669))) * (exp((z + -7.5)) / z));
end
code[z_] := N[(N[Sqrt[N[(2.0 * Pi), $MachinePrecision]], $MachinePrecision] * N[(N[(N[Power[N[(7.5 - z), $MachinePrecision], N[(0.5 - z), $MachinePrecision]], $MachinePrecision] / N[(0.0037967495627271876 + N[(z * -0.006297992560283669), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Exp[N[(z + -7.5), $MachinePrecision]], $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\sqrt{2 \cdot \pi} \cdot \left(\frac{{\left(7.5 - z\right)}^{\left(0.5 - z\right)}}{0.0037967495627271876 + z \cdot -0.006297992560283669} \cdot \frac{e^{z + -7.5}}{z}\right)
\end{array}
Derivation
  1. Initial program 97.3%

    \[\frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}^{\left(\left(\left(1 - z\right) - 1\right) + 0.5\right)}\right) \cdot e^{-\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{\left(\left(1 - z\right) - 1\right) + 1}\right) + \frac{-1259.1392167224028}{\left(\left(1 - z\right) - 1\right) + 2}\right) + \frac{771.3234287776531}{\left(\left(1 - z\right) - 1\right) + 3}\right) + \frac{-176.6150291621406}{\left(\left(1 - z\right) - 1\right) + 4}\right) + \frac{12.507343278686905}{\left(\left(1 - z\right) - 1\right) + 5}\right) + \frac{-0.13857109526572012}{\left(\left(1 - z\right) - 1\right) + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{\left(\left(1 - z\right) - 1\right) + 7}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{\left(\left(1 - z\right) - 1\right) + 8}\right)\right) \]
  2. Simplified0

    \[\leadsto expr\]
  3. Add Preprocessing
  4. Applied egg-rr0

    \[\leadsto expr\]
  5. Taylor expanded in z around 0 0

    \[\leadsto expr\]
  6. Simplified0

    \[\leadsto expr\]
  7. Taylor expanded in z around 0 0

    \[\leadsto expr\]
  8. Simplified0

    \[\leadsto expr\]
  9. Applied egg-rr0

    \[\leadsto expr\]
  10. Add Preprocessing

Alternative 5: 96.1% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \sqrt{2 \cdot \pi} \cdot \frac{{\left(7.5 - z\right)}^{\left(0.5 - z\right)} \cdot e^{z + -7.5}}{z \cdot 0.0037967495627271876} \end{array} \]
(FPCore (z)
 :precision binary64
 (*
  (sqrt (* 2.0 PI))
  (/
   (* (pow (- 7.5 z) (- 0.5 z)) (exp (+ z -7.5)))
   (* z 0.0037967495627271876))))
double code(double z) {
	return sqrt((2.0 * ((double) M_PI))) * ((pow((7.5 - z), (0.5 - z)) * exp((z + -7.5))) / (z * 0.0037967495627271876));
}
public static double code(double z) {
	return Math.sqrt((2.0 * Math.PI)) * ((Math.pow((7.5 - z), (0.5 - z)) * Math.exp((z + -7.5))) / (z * 0.0037967495627271876));
}
def code(z):
	return math.sqrt((2.0 * math.pi)) * ((math.pow((7.5 - z), (0.5 - z)) * math.exp((z + -7.5))) / (z * 0.0037967495627271876))
function code(z)
	return Float64(sqrt(Float64(2.0 * pi)) * Float64(Float64((Float64(7.5 - z) ^ Float64(0.5 - z)) * exp(Float64(z + -7.5))) / Float64(z * 0.0037967495627271876)))
end
function tmp = code(z)
	tmp = sqrt((2.0 * pi)) * ((((7.5 - z) ^ (0.5 - z)) * exp((z + -7.5))) / (z * 0.0037967495627271876));
end
code[z_] := N[(N[Sqrt[N[(2.0 * Pi), $MachinePrecision]], $MachinePrecision] * N[(N[(N[Power[N[(7.5 - z), $MachinePrecision], N[(0.5 - z), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(z + -7.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(z * 0.0037967495627271876), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\sqrt{2 \cdot \pi} \cdot \frac{{\left(7.5 - z\right)}^{\left(0.5 - z\right)} \cdot e^{z + -7.5}}{z \cdot 0.0037967495627271876}
\end{array}
Derivation
  1. Initial program 97.3%

    \[\frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}^{\left(\left(\left(1 - z\right) - 1\right) + 0.5\right)}\right) \cdot e^{-\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{\left(\left(1 - z\right) - 1\right) + 1}\right) + \frac{-1259.1392167224028}{\left(\left(1 - z\right) - 1\right) + 2}\right) + \frac{771.3234287776531}{\left(\left(1 - z\right) - 1\right) + 3}\right) + \frac{-176.6150291621406}{\left(\left(1 - z\right) - 1\right) + 4}\right) + \frac{12.507343278686905}{\left(\left(1 - z\right) - 1\right) + 5}\right) + \frac{-0.13857109526572012}{\left(\left(1 - z\right) - 1\right) + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{\left(\left(1 - z\right) - 1\right) + 7}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{\left(\left(1 - z\right) - 1\right) + 8}\right)\right) \]
  2. Simplified0

    \[\leadsto expr\]
  3. Add Preprocessing
  4. Applied egg-rr0

    \[\leadsto expr\]
  5. Taylor expanded in z around 0 0

    \[\leadsto expr\]
  6. Simplified0

    \[\leadsto expr\]
  7. Taylor expanded in z around 0 0

    \[\leadsto expr\]
  8. Simplified0

    \[\leadsto expr\]
  9. Add Preprocessing

Alternative 6: 96.3% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \sqrt{\sqrt[3]{\pi \cdot \left(\pi \cdot \pi\right)} \cdot 15} \cdot \frac{e^{-7.5} \cdot 263.3831869810514}{z} \end{array} \]
(FPCore (z)
 :precision binary64
 (*
  (sqrt (* (cbrt (* PI (* PI PI))) 15.0))
  (/ (* (exp -7.5) 263.3831869810514) z)))
double code(double z) {
	return sqrt((cbrt((((double) M_PI) * (((double) M_PI) * ((double) M_PI)))) * 15.0)) * ((exp(-7.5) * 263.3831869810514) / z);
}
public static double code(double z) {
	return Math.sqrt((Math.cbrt((Math.PI * (Math.PI * Math.PI))) * 15.0)) * ((Math.exp(-7.5) * 263.3831869810514) / z);
}
function code(z)
	return Float64(sqrt(Float64(cbrt(Float64(pi * Float64(pi * pi))) * 15.0)) * Float64(Float64(exp(-7.5) * 263.3831869810514) / z))
end
code[z_] := N[(N[Sqrt[N[(N[Power[N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * 15.0), $MachinePrecision]], $MachinePrecision] * N[(N[(N[Exp[-7.5], $MachinePrecision] * 263.3831869810514), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\sqrt{\sqrt[3]{\pi \cdot \left(\pi \cdot \pi\right)} \cdot 15} \cdot \frac{e^{-7.5} \cdot 263.3831869810514}{z}
\end{array}
Derivation
  1. Initial program 97.3%

    \[\frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}^{\left(\left(\left(1 - z\right) - 1\right) + 0.5\right)}\right) \cdot e^{-\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{\left(\left(1 - z\right) - 1\right) + 1}\right) + \frac{-1259.1392167224028}{\left(\left(1 - z\right) - 1\right) + 2}\right) + \frac{771.3234287776531}{\left(\left(1 - z\right) - 1\right) + 3}\right) + \frac{-176.6150291621406}{\left(\left(1 - z\right) - 1\right) + 4}\right) + \frac{12.507343278686905}{\left(\left(1 - z\right) - 1\right) + 5}\right) + \frac{-0.13857109526572012}{\left(\left(1 - z\right) - 1\right) + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{\left(\left(1 - z\right) - 1\right) + 7}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{\left(\left(1 - z\right) - 1\right) + 8}\right)\right) \]
  2. Simplified0

    \[\leadsto expr\]
  3. Add Preprocessing
  4. Taylor expanded in z around 0 0

    \[\leadsto expr\]
  5. Simplified0

    \[\leadsto expr\]
  6. Applied egg-rr0

    \[\leadsto expr\]
  7. Applied egg-rr0

    \[\leadsto expr\]
  8. Applied egg-rr0

    \[\leadsto expr\]
  9. Add Preprocessing

Alternative 7: 96.3% accurate, 1.7× speedup?

\[\begin{array}{l} \\ 263.3831869810514 \cdot \frac{\sqrt{15} \cdot \left(e^{-7.5} \cdot \sqrt{\pi}\right)}{z} \end{array} \]
(FPCore (z)
 :precision binary64
 (* 263.3831869810514 (/ (* (sqrt 15.0) (* (exp -7.5) (sqrt PI))) z)))
double code(double z) {
	return 263.3831869810514 * ((sqrt(15.0) * (exp(-7.5) * sqrt(((double) M_PI)))) / z);
}
public static double code(double z) {
	return 263.3831869810514 * ((Math.sqrt(15.0) * (Math.exp(-7.5) * Math.sqrt(Math.PI))) / z);
}
def code(z):
	return 263.3831869810514 * ((math.sqrt(15.0) * (math.exp(-7.5) * math.sqrt(math.pi))) / z)
function code(z)
	return Float64(263.3831869810514 * Float64(Float64(sqrt(15.0) * Float64(exp(-7.5) * sqrt(pi))) / z))
end
function tmp = code(z)
	tmp = 263.3831869810514 * ((sqrt(15.0) * (exp(-7.5) * sqrt(pi))) / z);
end
code[z_] := N[(263.3831869810514 * N[(N[(N[Sqrt[15.0], $MachinePrecision] * N[(N[Exp[-7.5], $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
263.3831869810514 \cdot \frac{\sqrt{15} \cdot \left(e^{-7.5} \cdot \sqrt{\pi}\right)}{z}
\end{array}
Derivation
  1. Initial program 97.3%

    \[\frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}^{\left(\left(\left(1 - z\right) - 1\right) + 0.5\right)}\right) \cdot e^{-\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{\left(\left(1 - z\right) - 1\right) + 1}\right) + \frac{-1259.1392167224028}{\left(\left(1 - z\right) - 1\right) + 2}\right) + \frac{771.3234287776531}{\left(\left(1 - z\right) - 1\right) + 3}\right) + \frac{-176.6150291621406}{\left(\left(1 - z\right) - 1\right) + 4}\right) + \frac{12.507343278686905}{\left(\left(1 - z\right) - 1\right) + 5}\right) + \frac{-0.13857109526572012}{\left(\left(1 - z\right) - 1\right) + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{\left(\left(1 - z\right) - 1\right) + 7}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{\left(\left(1 - z\right) - 1\right) + 8}\right)\right) \]
  2. Simplified0

    \[\leadsto expr\]
  3. Add Preprocessing
  4. Taylor expanded in z around 0 0

    \[\leadsto expr\]
  5. Simplified0

    \[\leadsto expr\]
  6. Applied egg-rr0

    \[\leadsto expr\]
  7. Applied egg-rr0

    \[\leadsto expr\]
  8. Taylor expanded in z around 0 0

    \[\leadsto expr\]
  9. Simplified0

    \[\leadsto expr\]
  10. Add Preprocessing

Alternative 8: 95.9% accurate, 1.7× speedup?

\[\begin{array}{l} \\ 263.3831869810514 \cdot \left(\sqrt{\pi} \cdot \left(e^{-7.5} \cdot \frac{\sqrt{15}}{z}\right)\right) \end{array} \]
(FPCore (z)
 :precision binary64
 (* 263.3831869810514 (* (sqrt PI) (* (exp -7.5) (/ (sqrt 15.0) z)))))
double code(double z) {
	return 263.3831869810514 * (sqrt(((double) M_PI)) * (exp(-7.5) * (sqrt(15.0) / z)));
}
public static double code(double z) {
	return 263.3831869810514 * (Math.sqrt(Math.PI) * (Math.exp(-7.5) * (Math.sqrt(15.0) / z)));
}
def code(z):
	return 263.3831869810514 * (math.sqrt(math.pi) * (math.exp(-7.5) * (math.sqrt(15.0) / z)))
function code(z)
	return Float64(263.3831869810514 * Float64(sqrt(pi) * Float64(exp(-7.5) * Float64(sqrt(15.0) / z))))
end
function tmp = code(z)
	tmp = 263.3831869810514 * (sqrt(pi) * (exp(-7.5) * (sqrt(15.0) / z)));
end
code[z_] := N[(263.3831869810514 * N[(N[Sqrt[Pi], $MachinePrecision] * N[(N[Exp[-7.5], $MachinePrecision] * N[(N[Sqrt[15.0], $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
263.3831869810514 \cdot \left(\sqrt{\pi} \cdot \left(e^{-7.5} \cdot \frac{\sqrt{15}}{z}\right)\right)
\end{array}
Derivation
  1. Initial program 97.3%

    \[\frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}^{\left(\left(\left(1 - z\right) - 1\right) + 0.5\right)}\right) \cdot e^{-\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{\left(\left(1 - z\right) - 1\right) + 1}\right) + \frac{-1259.1392167224028}{\left(\left(1 - z\right) - 1\right) + 2}\right) + \frac{771.3234287776531}{\left(\left(1 - z\right) - 1\right) + 3}\right) + \frac{-176.6150291621406}{\left(\left(1 - z\right) - 1\right) + 4}\right) + \frac{12.507343278686905}{\left(\left(1 - z\right) - 1\right) + 5}\right) + \frac{-0.13857109526572012}{\left(\left(1 - z\right) - 1\right) + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{\left(\left(1 - z\right) - 1\right) + 7}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{\left(\left(1 - z\right) - 1\right) + 8}\right)\right) \]
  2. Simplified0

    \[\leadsto expr\]
  3. Add Preprocessing
  4. Taylor expanded in z around 0 0

    \[\leadsto expr\]
  5. Simplified0

    \[\leadsto expr\]
  6. Applied egg-rr0

    \[\leadsto expr\]
  7. Taylor expanded in z around 0 0

    \[\leadsto expr\]
  8. Simplified0

    \[\leadsto expr\]
  9. Add Preprocessing

Alternative 9: 95.5% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \sqrt{\pi \cdot 15} \cdot \left(263.3831869810514 \cdot \left(e^{-7.5} \cdot \frac{1}{z}\right)\right) \end{array} \]
(FPCore (z)
 :precision binary64
 (* (sqrt (* PI 15.0)) (* 263.3831869810514 (* (exp -7.5) (/ 1.0 z)))))
double code(double z) {
	return sqrt((((double) M_PI) * 15.0)) * (263.3831869810514 * (exp(-7.5) * (1.0 / z)));
}
public static double code(double z) {
	return Math.sqrt((Math.PI * 15.0)) * (263.3831869810514 * (Math.exp(-7.5) * (1.0 / z)));
}
def code(z):
	return math.sqrt((math.pi * 15.0)) * (263.3831869810514 * (math.exp(-7.5) * (1.0 / z)))
function code(z)
	return Float64(sqrt(Float64(pi * 15.0)) * Float64(263.3831869810514 * Float64(exp(-7.5) * Float64(1.0 / z))))
end
function tmp = code(z)
	tmp = sqrt((pi * 15.0)) * (263.3831869810514 * (exp(-7.5) * (1.0 / z)));
end
code[z_] := N[(N[Sqrt[N[(Pi * 15.0), $MachinePrecision]], $MachinePrecision] * N[(263.3831869810514 * N[(N[Exp[-7.5], $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\sqrt{\pi \cdot 15} \cdot \left(263.3831869810514 \cdot \left(e^{-7.5} \cdot \frac{1}{z}\right)\right)
\end{array}
Derivation
  1. Initial program 97.3%

    \[\frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}^{\left(\left(\left(1 - z\right) - 1\right) + 0.5\right)}\right) \cdot e^{-\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{\left(\left(1 - z\right) - 1\right) + 1}\right) + \frac{-1259.1392167224028}{\left(\left(1 - z\right) - 1\right) + 2}\right) + \frac{771.3234287776531}{\left(\left(1 - z\right) - 1\right) + 3}\right) + \frac{-176.6150291621406}{\left(\left(1 - z\right) - 1\right) + 4}\right) + \frac{12.507343278686905}{\left(\left(1 - z\right) - 1\right) + 5}\right) + \frac{-0.13857109526572012}{\left(\left(1 - z\right) - 1\right) + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{\left(\left(1 - z\right) - 1\right) + 7}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{\left(\left(1 - z\right) - 1\right) + 8}\right)\right) \]
  2. Simplified0

    \[\leadsto expr\]
  3. Add Preprocessing
  4. Taylor expanded in z around 0 0

    \[\leadsto expr\]
  5. Simplified0

    \[\leadsto expr\]
  6. Applied egg-rr0

    \[\leadsto expr\]
  7. Applied egg-rr0

    \[\leadsto expr\]
  8. Applied egg-rr0

    \[\leadsto expr\]
  9. Add Preprocessing

Alternative 10: 95.4% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \frac{\sqrt{\pi \cdot 15}}{\frac{z}{e^{-7.5} \cdot 263.3831869810514}} \end{array} \]
(FPCore (z)
 :precision binary64
 (/ (sqrt (* PI 15.0)) (/ z (* (exp -7.5) 263.3831869810514))))
double code(double z) {
	return sqrt((((double) M_PI) * 15.0)) / (z / (exp(-7.5) * 263.3831869810514));
}
public static double code(double z) {
	return Math.sqrt((Math.PI * 15.0)) / (z / (Math.exp(-7.5) * 263.3831869810514));
}
def code(z):
	return math.sqrt((math.pi * 15.0)) / (z / (math.exp(-7.5) * 263.3831869810514))
function code(z)
	return Float64(sqrt(Float64(pi * 15.0)) / Float64(z / Float64(exp(-7.5) * 263.3831869810514)))
end
function tmp = code(z)
	tmp = sqrt((pi * 15.0)) / (z / (exp(-7.5) * 263.3831869810514));
end
code[z_] := N[(N[Sqrt[N[(Pi * 15.0), $MachinePrecision]], $MachinePrecision] / N[(z / N[(N[Exp[-7.5], $MachinePrecision] * 263.3831869810514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\sqrt{\pi \cdot 15}}{\frac{z}{e^{-7.5} \cdot 263.3831869810514}}
\end{array}
Derivation
  1. Initial program 97.3%

    \[\frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}^{\left(\left(\left(1 - z\right) - 1\right) + 0.5\right)}\right) \cdot e^{-\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{\left(\left(1 - z\right) - 1\right) + 1}\right) + \frac{-1259.1392167224028}{\left(\left(1 - z\right) - 1\right) + 2}\right) + \frac{771.3234287776531}{\left(\left(1 - z\right) - 1\right) + 3}\right) + \frac{-176.6150291621406}{\left(\left(1 - z\right) - 1\right) + 4}\right) + \frac{12.507343278686905}{\left(\left(1 - z\right) - 1\right) + 5}\right) + \frac{-0.13857109526572012}{\left(\left(1 - z\right) - 1\right) + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{\left(\left(1 - z\right) - 1\right) + 7}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{\left(\left(1 - z\right) - 1\right) + 8}\right)\right) \]
  2. Simplified0

    \[\leadsto expr\]
  3. Add Preprocessing
  4. Taylor expanded in z around 0 0

    \[\leadsto expr\]
  5. Simplified0

    \[\leadsto expr\]
  6. Applied egg-rr0

    \[\leadsto expr\]
  7. Applied egg-rr0

    \[\leadsto expr\]
  8. Applied egg-rr0

    \[\leadsto expr\]
  9. Add Preprocessing

Alternative 11: 95.4% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \sqrt{\pi \cdot 15} \cdot \frac{e^{-7.5} \cdot 263.3831869810514}{z} \end{array} \]
(FPCore (z)
 :precision binary64
 (* (sqrt (* PI 15.0)) (/ (* (exp -7.5) 263.3831869810514) z)))
double code(double z) {
	return sqrt((((double) M_PI) * 15.0)) * ((exp(-7.5) * 263.3831869810514) / z);
}
public static double code(double z) {
	return Math.sqrt((Math.PI * 15.0)) * ((Math.exp(-7.5) * 263.3831869810514) / z);
}
def code(z):
	return math.sqrt((math.pi * 15.0)) * ((math.exp(-7.5) * 263.3831869810514) / z)
function code(z)
	return Float64(sqrt(Float64(pi * 15.0)) * Float64(Float64(exp(-7.5) * 263.3831869810514) / z))
end
function tmp = code(z)
	tmp = sqrt((pi * 15.0)) * ((exp(-7.5) * 263.3831869810514) / z);
end
code[z_] := N[(N[Sqrt[N[(Pi * 15.0), $MachinePrecision]], $MachinePrecision] * N[(N[(N[Exp[-7.5], $MachinePrecision] * 263.3831869810514), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\sqrt{\pi \cdot 15} \cdot \frac{e^{-7.5} \cdot 263.3831869810514}{z}
\end{array}
Derivation
  1. Initial program 97.3%

    \[\frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}^{\left(\left(\left(1 - z\right) - 1\right) + 0.5\right)}\right) \cdot e^{-\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{\left(\left(1 - z\right) - 1\right) + 1}\right) + \frac{-1259.1392167224028}{\left(\left(1 - z\right) - 1\right) + 2}\right) + \frac{771.3234287776531}{\left(\left(1 - z\right) - 1\right) + 3}\right) + \frac{-176.6150291621406}{\left(\left(1 - z\right) - 1\right) + 4}\right) + \frac{12.507343278686905}{\left(\left(1 - z\right) - 1\right) + 5}\right) + \frac{-0.13857109526572012}{\left(\left(1 - z\right) - 1\right) + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{\left(\left(1 - z\right) - 1\right) + 7}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{\left(\left(1 - z\right) - 1\right) + 8}\right)\right) \]
  2. Simplified0

    \[\leadsto expr\]
  3. Add Preprocessing
  4. Taylor expanded in z around 0 0

    \[\leadsto expr\]
  5. Simplified0

    \[\leadsto expr\]
  6. Applied egg-rr0

    \[\leadsto expr\]
  7. Applied egg-rr0

    \[\leadsto expr\]
  8. Add Preprocessing

Alternative 12: 94.7% accurate, 2.5× speedup?

\[\begin{array}{l} \\ e^{-7.5} \cdot \left(\frac{263.3831869810514}{z} \cdot \sqrt{\pi \cdot 15}\right) \end{array} \]
(FPCore (z)
 :precision binary64
 (* (exp -7.5) (* (/ 263.3831869810514 z) (sqrt (* PI 15.0)))))
double code(double z) {
	return exp(-7.5) * ((263.3831869810514 / z) * sqrt((((double) M_PI) * 15.0)));
}
public static double code(double z) {
	return Math.exp(-7.5) * ((263.3831869810514 / z) * Math.sqrt((Math.PI * 15.0)));
}
def code(z):
	return math.exp(-7.5) * ((263.3831869810514 / z) * math.sqrt((math.pi * 15.0)))
function code(z)
	return Float64(exp(-7.5) * Float64(Float64(263.3831869810514 / z) * sqrt(Float64(pi * 15.0))))
end
function tmp = code(z)
	tmp = exp(-7.5) * ((263.3831869810514 / z) * sqrt((pi * 15.0)));
end
code[z_] := N[(N[Exp[-7.5], $MachinePrecision] * N[(N[(263.3831869810514 / z), $MachinePrecision] * N[Sqrt[N[(Pi * 15.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
e^{-7.5} \cdot \left(\frac{263.3831869810514}{z} \cdot \sqrt{\pi \cdot 15}\right)
\end{array}
Derivation
  1. Initial program 97.3%

    \[\frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}^{\left(\left(\left(1 - z\right) - 1\right) + 0.5\right)}\right) \cdot e^{-\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{\left(\left(1 - z\right) - 1\right) + 1}\right) + \frac{-1259.1392167224028}{\left(\left(1 - z\right) - 1\right) + 2}\right) + \frac{771.3234287776531}{\left(\left(1 - z\right) - 1\right) + 3}\right) + \frac{-176.6150291621406}{\left(\left(1 - z\right) - 1\right) + 4}\right) + \frac{12.507343278686905}{\left(\left(1 - z\right) - 1\right) + 5}\right) + \frac{-0.13857109526572012}{\left(\left(1 - z\right) - 1\right) + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{\left(\left(1 - z\right) - 1\right) + 7}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{\left(\left(1 - z\right) - 1\right) + 8}\right)\right) \]
  2. Simplified0

    \[\leadsto expr\]
  3. Add Preprocessing
  4. Taylor expanded in z around 0 0

    \[\leadsto expr\]
  5. Simplified0

    \[\leadsto expr\]
  6. Applied egg-rr0

    \[\leadsto expr\]
  7. Applied egg-rr0

    \[\leadsto expr\]
  8. Applied egg-rr0

    \[\leadsto expr\]
  9. Add Preprocessing

Reproduce

?
herbie shell --seed 2024110 
(FPCore (z)
  :name "Jmat.Real.gamma, branch z less than 0.5"
  :precision binary64
  :pre (<= z 0.5)
  (* (/ PI (sin (* PI z))) (* (* (* (sqrt (* PI 2.0)) (pow (+ (+ (- (- 1.0 z) 1.0) 7.0) 0.5) (+ (- (- 1.0 z) 1.0) 0.5))) (exp (- (+ (+ (- (- 1.0 z) 1.0) 7.0) 0.5)))) (+ (+ (+ (+ (+ (+ (+ (+ 0.9999999999998099 (/ 676.5203681218851 (+ (- (- 1.0 z) 1.0) 1.0))) (/ -1259.1392167224028 (+ (- (- 1.0 z) 1.0) 2.0))) (/ 771.3234287776531 (+ (- (- 1.0 z) 1.0) 3.0))) (/ -176.6150291621406 (+ (- (- 1.0 z) 1.0) 4.0))) (/ 12.507343278686905 (+ (- (- 1.0 z) 1.0) 5.0))) (/ -0.13857109526572012 (+ (- (- 1.0 z) 1.0) 6.0))) (/ 9.984369578019572e-6 (+ (- (- 1.0 z) 1.0) 7.0))) (/ 1.5056327351493116e-7 (+ (- (- 1.0 z) 1.0) 8.0))))))