
(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}
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}
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
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}
(FPCore (z)
:precision binary64
(let* ((t_0 (+ (* -1.0 z) 7.0)) (t_1 (+ t_0 0.5)))
(if (<= z -500.0)
(*
(*
(/ PI (sin (* z PI)))
(* (pow (- (- 1.0 z) -6.5) (- (- 1.0 z) 0.5)) (sqrt (+ PI PI))))
0.1456731240789439)
(*
(/ PI (sin (* PI z)))
(*
(*
(* (sqrt (* PI 2.0)) (pow t_1 (+ (* -1.0 z) 0.5)))
(exp (- t_1)))
(+
(+
(+
(+
(+
0.9999999999998099
(+
(-
(/ 676.5203681218851 (- 1.0 z))
(/ 1259.1392167224028 (- (- 1.0 z) -1.0)))
(-
(/
771.3234287776531
(/
(- (pow 1.0 3.0) (pow (+ z -2.0) 3.0))
(fma
1.0
1.0
(fma (+ z -2.0) (+ z -2.0) (* 1.0 (+ z -2.0))))))
(/ 176.6150291621406 (- (- 1.0 z) -3.0)))))
(/ 1.0 (/ (- (- z) -5.0) 12.507343278686905)))
(/ -0.13857109526572012 (+ (* -1.0 z) 6.0)))
(/ 9.984369578019572e-6 t_0))
(/ 1.5056327351493116e-7 (+ (* -1.0 z) 8.0))))))))double code(double z) {
double t_0 = (-1.0 * z) + 7.0;
double t_1 = t_0 + 0.5;
double tmp;
if (z <= -500.0) {
tmp = ((((double) M_PI) / sin((z * ((double) M_PI)))) * (pow(((1.0 - z) - -6.5), ((1.0 - z) - 0.5)) * sqrt((((double) M_PI) + ((double) M_PI))))) * 0.1456731240789439;
} else {
tmp = (((double) M_PI) / sin((((double) M_PI) * z))) * (((sqrt((((double) M_PI) * 2.0)) * pow(t_1, ((-1.0 * z) + 0.5))) * exp(-t_1)) * (((((0.9999999999998099 + (((676.5203681218851 / (1.0 - z)) - (1259.1392167224028 / ((1.0 - z) - -1.0))) + ((771.3234287776531 / ((pow(1.0, 3.0) - pow((z + -2.0), 3.0)) / fma(1.0, 1.0, fma((z + -2.0), (z + -2.0), (1.0 * (z + -2.0)))))) - (176.6150291621406 / ((1.0 - z) - -3.0))))) + (1.0 / ((-z - -5.0) / 12.507343278686905))) + (-0.13857109526572012 / ((-1.0 * z) + 6.0))) + (9.984369578019572e-6 / t_0)) + (1.5056327351493116e-7 / ((-1.0 * z) + 8.0))));
}
return tmp;
}
function code(z) t_0 = Float64(Float64(-1.0 * z) + 7.0) t_1 = Float64(t_0 + 0.5) tmp = 0.0 if (z <= -500.0) tmp = Float64(Float64(Float64(pi / sin(Float64(z * pi))) * Float64((Float64(Float64(1.0 - z) - -6.5) ^ Float64(Float64(1.0 - z) - 0.5)) * sqrt(Float64(pi + pi)))) * 0.1456731240789439); else tmp = Float64(Float64(pi / sin(Float64(pi * z))) * Float64(Float64(Float64(sqrt(Float64(pi * 2.0)) * (t_1 ^ Float64(Float64(-1.0 * z) + 0.5))) * exp(Float64(-t_1))) * Float64(Float64(Float64(Float64(Float64(0.9999999999998099 + Float64(Float64(Float64(676.5203681218851 / Float64(1.0 - z)) - Float64(1259.1392167224028 / Float64(Float64(1.0 - z) - -1.0))) + Float64(Float64(771.3234287776531 / Float64(Float64((1.0 ^ 3.0) - (Float64(z + -2.0) ^ 3.0)) / fma(1.0, 1.0, fma(Float64(z + -2.0), Float64(z + -2.0), Float64(1.0 * Float64(z + -2.0)))))) - Float64(176.6150291621406 / Float64(Float64(1.0 - z) - -3.0))))) + Float64(1.0 / Float64(Float64(Float64(-z) - -5.0) / 12.507343278686905))) + Float64(-0.13857109526572012 / Float64(Float64(-1.0 * z) + 6.0))) + Float64(9.984369578019572e-6 / t_0)) + Float64(1.5056327351493116e-7 / Float64(Float64(-1.0 * z) + 8.0))))); end return tmp end
code[z_] := Block[{t$95$0 = N[(N[(-1.0 * z), $MachinePrecision] + 7.0), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + 0.5), $MachinePrecision]}, If[LessEqual[z, -500.0], N[(N[(N[(Pi / N[Sin[N[(z * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[(1.0 - z), $MachinePrecision] - -6.5), $MachinePrecision], N[(N[(1.0 - z), $MachinePrecision] - 0.5), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(Pi + Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.1456731240789439), $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$1, N[(N[(-1.0 * z), $MachinePrecision] + 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[(-t$95$1)], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(0.9999999999998099 + N[(N[(N[(676.5203681218851 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - N[(1259.1392167224028 / N[(N[(1.0 - z), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(771.3234287776531 / N[(N[(N[Power[1.0, 3.0], $MachinePrecision] - N[Power[N[(z + -2.0), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 * 1.0 + N[(N[(z + -2.0), $MachinePrecision] * N[(z + -2.0), $MachinePrecision] + N[(1.0 * N[(z + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(176.6150291621406 / N[(N[(1.0 - z), $MachinePrecision] - -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[((-z) - -5.0), $MachinePrecision] / 12.507343278686905), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.13857109526572012 / N[(N[(-1.0 * z), $MachinePrecision] + 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.984369578019572e-6 / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(1.5056327351493116e-7 / N[(N[(-1.0 * z), $MachinePrecision] + 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := -1 \cdot z + 7\\
t_1 := t\_0 + 0.5\\
\mathbf{if}\;z \leq -500:\\
\;\;\;\;\left(\frac{\pi}{\sin \left(z \cdot \pi\right)} \cdot \left({\left(\left(1 - z\right) - -6.5\right)}^{\left(\left(1 - z\right) - 0.5\right)} \cdot \sqrt{\pi + \pi}\right)\right) \cdot 0.1456731240789439\\
\mathbf{else}:\\
\;\;\;\;\frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {t\_1}^{\left(-1 \cdot z + 0.5\right)}\right) \cdot e^{-t\_1}\right) \cdot \left(\left(\left(\left(\left(0.9999999999998099 + \left(\left(\frac{676.5203681218851}{1 - z} - \frac{1259.1392167224028}{\left(1 - z\right) - -1}\right) + \left(\frac{771.3234287776531}{\frac{{1}^{3} - {\left(z + -2\right)}^{3}}{\mathsf{fma}\left(1, 1, \mathsf{fma}\left(z + -2, z + -2, 1 \cdot \left(z + -2\right)\right)\right)}} - \frac{176.6150291621406}{\left(1 - z\right) - -3}\right)\right)\right) + \frac{1}{\frac{\left(-z\right) - -5}{12.507343278686905}}\right) + \frac{-0.13857109526572012}{-1 \cdot z + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{t\_0}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{-1 \cdot z + 8}\right)\right)\\
\end{array}
if z < -500Initial program 96.4%
Applied rewrites96.4%
Applied rewrites96.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-exp.f6496.0%
Applied rewrites96.0%
Evaluated real constant96.0%
if -500 < z Initial program 96.4%
Applied rewrites98.3%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
flip3--N/A
lower-unsound-/.f64N/A
lower-unsound--.f64N/A
lower-unsound-pow.f64N/A
lower-unsound-pow.f64N/A
lower-+.f64N/A
lower-unsound-fma.f64N/A
lower-unsound-fma.f64N/A
lower-+.f64N/A
lower-+.f64N/A
lower-unsound-*.f64N/A
lower-+.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
lift-/.f64N/A
div-flipN/A
lower-unsound-/.f64N/A
lower-unsound-/.f6498.3%
lift-+.f64N/A
add-flipN/A
metadata-evalN/A
lower--.f6498.3%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6498.3%
Applied rewrites98.3%
(FPCore (z)
:precision binary64
(let* ((t_0 (+ (- z) 7.0)) (t_1 (+ t_0 0.5)))
(if (<= z -500.0)
(*
(*
(/ PI (sin (* z PI)))
(* (pow (- (- 1.0 z) -6.5) (- (- 1.0 z) 0.5)) (sqrt (+ PI PI))))
0.1456731240789439)
(*
(/ PI (sin (* PI z)))
(*
(* (* (sqrt (* PI 2.0)) (pow t_1 (+ (- z) 0.5))) (exp (- t_1)))
(+
(+
(+
(+
(+
0.9999999999998099
(+
(-
(/ 676.5203681218851 (- 1.0 z))
(/ 1259.1392167224028 (- (- 1.0 z) -1.0)))
(-
(/
771.3234287776531
(/
(- (pow 1.0 3.0) (pow (+ z -2.0) 3.0))
(fma
1.0
1.0
(fma (+ z -2.0) (+ z -2.0) (* 1.0 (+ z -2.0))))))
(/ 176.6150291621406 (- (- 1.0 z) -3.0)))))
(/ 12.507343278686905 (+ (- z) 5.0)))
(/ -0.13857109526572012 (+ (- z) 6.0)))
(/ 9.984369578019572e-6 t_0))
(/ 1.5056327351493116e-7 (+ (- z) 8.0))))))))double code(double z) {
double t_0 = -z + 7.0;
double t_1 = t_0 + 0.5;
double tmp;
if (z <= -500.0) {
tmp = ((((double) M_PI) / sin((z * ((double) M_PI)))) * (pow(((1.0 - z) - -6.5), ((1.0 - z) - 0.5)) * sqrt((((double) M_PI) + ((double) M_PI))))) * 0.1456731240789439;
} else {
tmp = (((double) M_PI) / sin((((double) M_PI) * z))) * (((sqrt((((double) M_PI) * 2.0)) * pow(t_1, (-z + 0.5))) * exp(-t_1)) * (((((0.9999999999998099 + (((676.5203681218851 / (1.0 - z)) - (1259.1392167224028 / ((1.0 - z) - -1.0))) + ((771.3234287776531 / ((pow(1.0, 3.0) - pow((z + -2.0), 3.0)) / fma(1.0, 1.0, fma((z + -2.0), (z + -2.0), (1.0 * (z + -2.0)))))) - (176.6150291621406 / ((1.0 - z) - -3.0))))) + (12.507343278686905 / (-z + 5.0))) + (-0.13857109526572012 / (-z + 6.0))) + (9.984369578019572e-6 / t_0)) + (1.5056327351493116e-7 / (-z + 8.0))));
}
return tmp;
}
function code(z) t_0 = Float64(Float64(-z) + 7.0) t_1 = Float64(t_0 + 0.5) tmp = 0.0 if (z <= -500.0) tmp = Float64(Float64(Float64(pi / sin(Float64(z * pi))) * Float64((Float64(Float64(1.0 - z) - -6.5) ^ Float64(Float64(1.0 - z) - 0.5)) * sqrt(Float64(pi + pi)))) * 0.1456731240789439); else tmp = Float64(Float64(pi / sin(Float64(pi * z))) * Float64(Float64(Float64(sqrt(Float64(pi * 2.0)) * (t_1 ^ Float64(Float64(-z) + 0.5))) * exp(Float64(-t_1))) * Float64(Float64(Float64(Float64(Float64(0.9999999999998099 + Float64(Float64(Float64(676.5203681218851 / Float64(1.0 - z)) - Float64(1259.1392167224028 / Float64(Float64(1.0 - z) - -1.0))) + Float64(Float64(771.3234287776531 / Float64(Float64((1.0 ^ 3.0) - (Float64(z + -2.0) ^ 3.0)) / fma(1.0, 1.0, fma(Float64(z + -2.0), Float64(z + -2.0), Float64(1.0 * Float64(z + -2.0)))))) - Float64(176.6150291621406 / Float64(Float64(1.0 - z) - -3.0))))) + Float64(12.507343278686905 / Float64(Float64(-z) + 5.0))) + Float64(-0.13857109526572012 / Float64(Float64(-z) + 6.0))) + Float64(9.984369578019572e-6 / t_0)) + Float64(1.5056327351493116e-7 / Float64(Float64(-z) + 8.0))))); end return tmp end
code[z_] := Block[{t$95$0 = N[((-z) + 7.0), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + 0.5), $MachinePrecision]}, If[LessEqual[z, -500.0], N[(N[(N[(Pi / N[Sin[N[(z * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[(1.0 - z), $MachinePrecision] - -6.5), $MachinePrecision], N[(N[(1.0 - z), $MachinePrecision] - 0.5), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(Pi + Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.1456731240789439), $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$1, N[((-z) + 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[(-t$95$1)], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(0.9999999999998099 + N[(N[(N[(676.5203681218851 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - N[(1259.1392167224028 / N[(N[(1.0 - z), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(771.3234287776531 / N[(N[(N[Power[1.0, 3.0], $MachinePrecision] - N[Power[N[(z + -2.0), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] / N[(1.0 * 1.0 + N[(N[(z + -2.0), $MachinePrecision] * N[(z + -2.0), $MachinePrecision] + N[(1.0 * N[(z + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(176.6150291621406 / N[(N[(1.0 - z), $MachinePrecision] - -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(12.507343278686905 / N[((-z) + 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.13857109526572012 / N[((-z) + 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.984369578019572e-6 / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(1.5056327351493116e-7 / N[((-z) + 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \left(-z\right) + 7\\
t_1 := t\_0 + 0.5\\
\mathbf{if}\;z \leq -500:\\
\;\;\;\;\left(\frac{\pi}{\sin \left(z \cdot \pi\right)} \cdot \left({\left(\left(1 - z\right) - -6.5\right)}^{\left(\left(1 - z\right) - 0.5\right)} \cdot \sqrt{\pi + \pi}\right)\right) \cdot 0.1456731240789439\\
\mathbf{else}:\\
\;\;\;\;\frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {t\_1}^{\left(\left(-z\right) + 0.5\right)}\right) \cdot e^{-t\_1}\right) \cdot \left(\left(\left(\left(\left(0.9999999999998099 + \left(\left(\frac{676.5203681218851}{1 - z} - \frac{1259.1392167224028}{\left(1 - z\right) - -1}\right) + \left(\frac{771.3234287776531}{\frac{{1}^{3} - {\left(z + -2\right)}^{3}}{\mathsf{fma}\left(1, 1, \mathsf{fma}\left(z + -2, z + -2, 1 \cdot \left(z + -2\right)\right)\right)}} - \frac{176.6150291621406}{\left(1 - z\right) - -3}\right)\right)\right) + \frac{12.507343278686905}{\left(-z\right) + 5}\right) + \frac{-0.13857109526572012}{\left(-z\right) + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{t\_0}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{\left(-z\right) + 8}\right)\right)\\
\end{array}
if z < -500Initial program 96.4%
Applied rewrites96.4%
Applied rewrites96.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-exp.f6496.0%
Applied rewrites96.0%
Evaluated real constant96.0%
if -500 < z Initial program 96.4%
Applied rewrites98.3%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
flip3--N/A
lower-unsound-/.f64N/A
lower-unsound--.f64N/A
lower-unsound-pow.f64N/A
lower-unsound-pow.f64N/A
lower-+.f64N/A
lower-unsound-fma.f64N/A
lower-unsound-fma.f64N/A
lower-+.f64N/A
lower-+.f64N/A
lower-unsound-*.f64N/A
lower-+.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6498.3%
Applied rewrites98.3%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6498.3%
Applied rewrites98.3%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6498.3%
Applied rewrites98.3%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6498.3%
Applied rewrites98.3%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6498.3%
Applied rewrites98.3%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6498.3%
Applied rewrites98.3%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6498.3%
Applied rewrites98.3%
(FPCore (z)
:precision binary64
(let* ((t_0 (- (- 1.0 z) 1.0)) (t_1 (+ t_0 7.0)) (t_2 (+ t_1 0.5)))
(if (<= z -500.0)
(*
(*
(/ PI (sin (* z PI)))
(* (pow (- (- 1.0 z) -6.5) (- (- 1.0 z) 0.5)) (sqrt (+ PI PI))))
0.1456731240789439)
(*
(/ PI (sin (* PI z)))
(*
(* (* (sqrt (* PI 2.0)) (pow t_2 (+ t_0 0.5))) (exp (- t_2)))
(+
(+
(+
(+
(+
0.9999999999998099
(+
(-
(/ 676.5203681218851 (- 1.0 z))
(/ 1259.1392167224028 (- (- 1.0 z) -1.0)))
(-
(/ 771.3234287776531 (- (- 1.0 z) -2.0))
(/ 176.6150291621406 (- (- 1.0 z) -3.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;
double tmp;
if (z <= -500.0) {
tmp = ((((double) M_PI) / sin((z * ((double) M_PI)))) * (pow(((1.0 - z) - -6.5), ((1.0 - z) - 0.5)) * sqrt((((double) M_PI) + ((double) M_PI))))) * 0.1456731240789439;
} else {
tmp = (((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 / (1.0 - z)) - (1259.1392167224028 / ((1.0 - z) - -1.0))) + ((771.3234287776531 / ((1.0 - z) - -2.0)) - (176.6150291621406 / ((1.0 - z) - -3.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))));
}
return tmp;
}
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;
double tmp;
if (z <= -500.0) {
tmp = ((Math.PI / Math.sin((z * Math.PI))) * (Math.pow(((1.0 - z) - -6.5), ((1.0 - z) - 0.5)) * Math.sqrt((Math.PI + Math.PI)))) * 0.1456731240789439;
} else {
tmp = (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 / (1.0 - z)) - (1259.1392167224028 / ((1.0 - z) - -1.0))) + ((771.3234287776531 / ((1.0 - z) - -2.0)) - (176.6150291621406 / ((1.0 - z) - -3.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))));
}
return tmp;
}
def code(z): t_0 = (1.0 - z) - 1.0 t_1 = t_0 + 7.0 t_2 = t_1 + 0.5 tmp = 0 if z <= -500.0: tmp = ((math.pi / math.sin((z * math.pi))) * (math.pow(((1.0 - z) - -6.5), ((1.0 - z) - 0.5)) * math.sqrt((math.pi + math.pi)))) * 0.1456731240789439 else: tmp = (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 / (1.0 - z)) - (1259.1392167224028 / ((1.0 - z) - -1.0))) + ((771.3234287776531 / ((1.0 - z) - -2.0)) - (176.6150291621406 / ((1.0 - z) - -3.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)))) return tmp
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) tmp = 0.0 if (z <= -500.0) tmp = Float64(Float64(Float64(pi / sin(Float64(z * pi))) * Float64((Float64(Float64(1.0 - z) - -6.5) ^ Float64(Float64(1.0 - z) - 0.5)) * sqrt(Float64(pi + pi)))) * 0.1456731240789439); else tmp = 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(0.9999999999998099 + Float64(Float64(Float64(676.5203681218851 / Float64(1.0 - z)) - 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(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 return tmp end
function tmp_2 = code(z) t_0 = (1.0 - z) - 1.0; t_1 = t_0 + 7.0; t_2 = t_1 + 0.5; tmp = 0.0; if (z <= -500.0) tmp = ((pi / sin((z * pi))) * ((((1.0 - z) - -6.5) ^ ((1.0 - z) - 0.5)) * sqrt((pi + pi)))) * 0.1456731240789439; else tmp = (pi / sin((pi * z))) * (((sqrt((pi * 2.0)) * (t_2 ^ (t_0 + 0.5))) * exp(-t_2)) * (((((0.9999999999998099 + (((676.5203681218851 / (1.0 - z)) - (1259.1392167224028 / ((1.0 - z) - -1.0))) + ((771.3234287776531 / ((1.0 - z) - -2.0)) - (176.6150291621406 / ((1.0 - z) - -3.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 tmp_2 = tmp; 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]}, If[LessEqual[z, -500.0], N[(N[(N[(Pi / N[Sin[N[(z * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[(1.0 - z), $MachinePrecision] - -6.5), $MachinePrecision], N[(N[(1.0 - z), $MachinePrecision] - 0.5), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(Pi + Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.1456731240789439), $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[(0.9999999999998099 + N[(N[(N[(676.5203681218851 / N[(1.0 - z), $MachinePrecision]), $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]), $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}
t_0 := \left(1 - z\right) - 1\\
t_1 := t\_0 + 7\\
t_2 := t\_1 + 0.5\\
\mathbf{if}\;z \leq -500:\\
\;\;\;\;\left(\frac{\pi}{\sin \left(z \cdot \pi\right)} \cdot \left({\left(\left(1 - z\right) - -6.5\right)}^{\left(\left(1 - z\right) - 0.5\right)} \cdot \sqrt{\pi + \pi}\right)\right) \cdot 0.1456731240789439\\
\mathbf{else}:\\
\;\;\;\;\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(0.9999999999998099 + \left(\left(\frac{676.5203681218851}{1 - z} - \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)\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}
if z < -500Initial program 96.4%
Applied rewrites96.4%
Applied rewrites96.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-exp.f6496.0%
Applied rewrites96.0%
Evaluated real constant96.0%
if -500 < z Initial program 96.4%
Applied rewrites98.3%
(FPCore (z)
:precision binary64
(let* ((t_0 (+ (- z) 7.5))
(t_1 (sqrt (+ PI PI)))
(t_2 (- (- 1.0 z) 1.0))
(t_3 (+ t_2 7.0))
(t_4 (+ t_3 0.5))
(t_5 (/ PI (sin (* z PI)))))
(if (<=
(*
(/ PI (sin (* PI z)))
(*
(* (* (sqrt (* PI 2.0)) (pow t_4 (+ t_2 0.5))) (exp (- t_4)))
(+
(+
(+
(+
(+
(+
(+
(+
0.9999999999998099
(/ 676.5203681218851 (+ t_2 1.0)))
(/ -1259.1392167224028 (+ t_2 2.0)))
(/ 771.3234287776531 (+ t_2 3.0)))
(/ -176.6150291621406 (+ t_2 4.0)))
(/ 12.507343278686905 (+ t_2 5.0)))
(/ -0.13857109526572012 (+ t_2 6.0)))
(/ 9.984369578019572e-6 t_3))
(/ 1.5056327351493116e-7 (+ t_2 8.0)))))
2e+200)
(*
(* t_5 (* (exp (- t_0)) (* (pow t_0 (- (- z) -0.5)) t_1)))
(+
(/ 1.5056327351493116e-7 (- (- z) -8.0))
(+
(/ 9.984369578019572e-6 (- (- z) -7.0))
(+
(/ -0.13857109526572012 (- (- z) -6.0))
(+
(/ 12.507343278686905 (- (- z) -5.0))
(+
(+
0.9999999999998099
(-
(/ 676.5203681218851 (- 1.0 z))
(/ 1259.1392167224028 (- (- 1.0 z) -1.0))))
(-
(/ -771.3234287776531 (- -2.0 (- 1.0 z)))
(/ 176.6150291621406 (- (- 1.0 z) -3.0)))))))))
(*
(* t_5 (* (pow (- (- 1.0 z) -6.5) (- (- 1.0 z) 0.5)) t_1))
0.1456731240789439))))double code(double z) {
double t_0 = -z + 7.5;
double t_1 = sqrt((((double) M_PI) + ((double) M_PI)));
double t_2 = (1.0 - z) - 1.0;
double t_3 = t_2 + 7.0;
double t_4 = t_3 + 0.5;
double t_5 = ((double) M_PI) / sin((z * ((double) M_PI)));
double tmp;
if (((((double) M_PI) / sin((((double) M_PI) * z))) * (((sqrt((((double) M_PI) * 2.0)) * pow(t_4, (t_2 + 0.5))) * exp(-t_4)) * ((((((((0.9999999999998099 + (676.5203681218851 / (t_2 + 1.0))) + (-1259.1392167224028 / (t_2 + 2.0))) + (771.3234287776531 / (t_2 + 3.0))) + (-176.6150291621406 / (t_2 + 4.0))) + (12.507343278686905 / (t_2 + 5.0))) + (-0.13857109526572012 / (t_2 + 6.0))) + (9.984369578019572e-6 / t_3)) + (1.5056327351493116e-7 / (t_2 + 8.0))))) <= 2e+200) {
tmp = (t_5 * (exp(-t_0) * (pow(t_0, (-z - -0.5)) * t_1))) * ((1.5056327351493116e-7 / (-z - -8.0)) + ((9.984369578019572e-6 / (-z - -7.0)) + ((-0.13857109526572012 / (-z - -6.0)) + ((12.507343278686905 / (-z - -5.0)) + ((0.9999999999998099 + ((676.5203681218851 / (1.0 - z)) - (1259.1392167224028 / ((1.0 - z) - -1.0)))) + ((-771.3234287776531 / (-2.0 - (1.0 - z))) - (176.6150291621406 / ((1.0 - z) - -3.0))))))));
} else {
tmp = (t_5 * (pow(((1.0 - z) - -6.5), ((1.0 - z) - 0.5)) * t_1)) * 0.1456731240789439;
}
return tmp;
}
public static double code(double z) {
double t_0 = -z + 7.5;
double t_1 = Math.sqrt((Math.PI + Math.PI));
double t_2 = (1.0 - z) - 1.0;
double t_3 = t_2 + 7.0;
double t_4 = t_3 + 0.5;
double t_5 = Math.PI / Math.sin((z * Math.PI));
double tmp;
if (((Math.PI / Math.sin((Math.PI * z))) * (((Math.sqrt((Math.PI * 2.0)) * Math.pow(t_4, (t_2 + 0.5))) * Math.exp(-t_4)) * ((((((((0.9999999999998099 + (676.5203681218851 / (t_2 + 1.0))) + (-1259.1392167224028 / (t_2 + 2.0))) + (771.3234287776531 / (t_2 + 3.0))) + (-176.6150291621406 / (t_2 + 4.0))) + (12.507343278686905 / (t_2 + 5.0))) + (-0.13857109526572012 / (t_2 + 6.0))) + (9.984369578019572e-6 / t_3)) + (1.5056327351493116e-7 / (t_2 + 8.0))))) <= 2e+200) {
tmp = (t_5 * (Math.exp(-t_0) * (Math.pow(t_0, (-z - -0.5)) * t_1))) * ((1.5056327351493116e-7 / (-z - -8.0)) + ((9.984369578019572e-6 / (-z - -7.0)) + ((-0.13857109526572012 / (-z - -6.0)) + ((12.507343278686905 / (-z - -5.0)) + ((0.9999999999998099 + ((676.5203681218851 / (1.0 - z)) - (1259.1392167224028 / ((1.0 - z) - -1.0)))) + ((-771.3234287776531 / (-2.0 - (1.0 - z))) - (176.6150291621406 / ((1.0 - z) - -3.0))))))));
} else {
tmp = (t_5 * (Math.pow(((1.0 - z) - -6.5), ((1.0 - z) - 0.5)) * t_1)) * 0.1456731240789439;
}
return tmp;
}
def code(z): t_0 = -z + 7.5 t_1 = math.sqrt((math.pi + math.pi)) t_2 = (1.0 - z) - 1.0 t_3 = t_2 + 7.0 t_4 = t_3 + 0.5 t_5 = math.pi / math.sin((z * math.pi)) tmp = 0 if ((math.pi / math.sin((math.pi * z))) * (((math.sqrt((math.pi * 2.0)) * math.pow(t_4, (t_2 + 0.5))) * math.exp(-t_4)) * ((((((((0.9999999999998099 + (676.5203681218851 / (t_2 + 1.0))) + (-1259.1392167224028 / (t_2 + 2.0))) + (771.3234287776531 / (t_2 + 3.0))) + (-176.6150291621406 / (t_2 + 4.0))) + (12.507343278686905 / (t_2 + 5.0))) + (-0.13857109526572012 / (t_2 + 6.0))) + (9.984369578019572e-6 / t_3)) + (1.5056327351493116e-7 / (t_2 + 8.0))))) <= 2e+200: tmp = (t_5 * (math.exp(-t_0) * (math.pow(t_0, (-z - -0.5)) * t_1))) * ((1.5056327351493116e-7 / (-z - -8.0)) + ((9.984369578019572e-6 / (-z - -7.0)) + ((-0.13857109526572012 / (-z - -6.0)) + ((12.507343278686905 / (-z - -5.0)) + ((0.9999999999998099 + ((676.5203681218851 / (1.0 - z)) - (1259.1392167224028 / ((1.0 - z) - -1.0)))) + ((-771.3234287776531 / (-2.0 - (1.0 - z))) - (176.6150291621406 / ((1.0 - z) - -3.0)))))))) else: tmp = (t_5 * (math.pow(((1.0 - z) - -6.5), ((1.0 - z) - 0.5)) * t_1)) * 0.1456731240789439 return tmp
function code(z) t_0 = Float64(Float64(-z) + 7.5) t_1 = sqrt(Float64(pi + pi)) t_2 = Float64(Float64(1.0 - z) - 1.0) t_3 = Float64(t_2 + 7.0) t_4 = Float64(t_3 + 0.5) t_5 = Float64(pi / sin(Float64(z * pi))) tmp = 0.0 if (Float64(Float64(pi / sin(Float64(pi * z))) * Float64(Float64(Float64(sqrt(Float64(pi * 2.0)) * (t_4 ^ Float64(t_2 + 0.5))) * exp(Float64(-t_4))) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(0.9999999999998099 + Float64(676.5203681218851 / Float64(t_2 + 1.0))) + Float64(-1259.1392167224028 / Float64(t_2 + 2.0))) + Float64(771.3234287776531 / Float64(t_2 + 3.0))) + Float64(-176.6150291621406 / Float64(t_2 + 4.0))) + Float64(12.507343278686905 / Float64(t_2 + 5.0))) + Float64(-0.13857109526572012 / Float64(t_2 + 6.0))) + Float64(9.984369578019572e-6 / t_3)) + Float64(1.5056327351493116e-7 / Float64(t_2 + 8.0))))) <= 2e+200) tmp = Float64(Float64(t_5 * Float64(exp(Float64(-t_0)) * Float64((t_0 ^ Float64(Float64(-z) - -0.5)) * t_1))) * Float64(Float64(1.5056327351493116e-7 / Float64(Float64(-z) - -8.0)) + Float64(Float64(9.984369578019572e-6 / Float64(Float64(-z) - -7.0)) + Float64(Float64(-0.13857109526572012 / Float64(Float64(-z) - -6.0)) + Float64(Float64(12.507343278686905 / Float64(Float64(-z) - -5.0)) + Float64(Float64(0.9999999999998099 + Float64(Float64(676.5203681218851 / Float64(1.0 - z)) - Float64(1259.1392167224028 / Float64(Float64(1.0 - z) - -1.0)))) + Float64(Float64(-771.3234287776531 / Float64(-2.0 - Float64(1.0 - z))) - Float64(176.6150291621406 / Float64(Float64(1.0 - z) - -3.0))))))))); else tmp = Float64(Float64(t_5 * Float64((Float64(Float64(1.0 - z) - -6.5) ^ Float64(Float64(1.0 - z) - 0.5)) * t_1)) * 0.1456731240789439); end return tmp end
function tmp_2 = code(z) t_0 = -z + 7.5; t_1 = sqrt((pi + pi)); t_2 = (1.0 - z) - 1.0; t_3 = t_2 + 7.0; t_4 = t_3 + 0.5; t_5 = pi / sin((z * pi)); tmp = 0.0; if (((pi / sin((pi * z))) * (((sqrt((pi * 2.0)) * (t_4 ^ (t_2 + 0.5))) * exp(-t_4)) * ((((((((0.9999999999998099 + (676.5203681218851 / (t_2 + 1.0))) + (-1259.1392167224028 / (t_2 + 2.0))) + (771.3234287776531 / (t_2 + 3.0))) + (-176.6150291621406 / (t_2 + 4.0))) + (12.507343278686905 / (t_2 + 5.0))) + (-0.13857109526572012 / (t_2 + 6.0))) + (9.984369578019572e-6 / t_3)) + (1.5056327351493116e-7 / (t_2 + 8.0))))) <= 2e+200) tmp = (t_5 * (exp(-t_0) * ((t_0 ^ (-z - -0.5)) * t_1))) * ((1.5056327351493116e-7 / (-z - -8.0)) + ((9.984369578019572e-6 / (-z - -7.0)) + ((-0.13857109526572012 / (-z - -6.0)) + ((12.507343278686905 / (-z - -5.0)) + ((0.9999999999998099 + ((676.5203681218851 / (1.0 - z)) - (1259.1392167224028 / ((1.0 - z) - -1.0)))) + ((-771.3234287776531 / (-2.0 - (1.0 - z))) - (176.6150291621406 / ((1.0 - z) - -3.0)))))))); else tmp = (t_5 * ((((1.0 - z) - -6.5) ^ ((1.0 - z) - 0.5)) * t_1)) * 0.1456731240789439; end tmp_2 = tmp; end
code[z_] := Block[{t$95$0 = N[((-z) + 7.5), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(Pi + Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(1.0 - z), $MachinePrecision] - 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + 7.0), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 + 0.5), $MachinePrecision]}, Block[{t$95$5 = N[(Pi / N[Sin[N[(z * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[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$4, N[(t$95$2 + 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[(-t$95$4)], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(0.9999999999998099 + N[(676.5203681218851 / N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1259.1392167224028 / N[(t$95$2 + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(771.3234287776531 / N[(t$95$2 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-176.6150291621406 / N[(t$95$2 + 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(12.507343278686905 / N[(t$95$2 + 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.13857109526572012 / N[(t$95$2 + 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.984369578019572e-6 / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(1.5056327351493116e-7 / N[(t$95$2 + 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+200], N[(N[(t$95$5 * N[(N[Exp[(-t$95$0)], $MachinePrecision] * N[(N[Power[t$95$0, N[((-z) - -0.5), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.5056327351493116e-7 / N[((-z) - -8.0), $MachinePrecision]), $MachinePrecision] + N[(N[(9.984369578019572e-6 / N[((-z) - -7.0), $MachinePrecision]), $MachinePrecision] + N[(N[(-0.13857109526572012 / N[((-z) - -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(12.507343278686905 / N[((-z) - -5.0), $MachinePrecision]), $MachinePrecision] + N[(N[(0.9999999999998099 + N[(N[(676.5203681218851 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - N[(1259.1392167224028 / N[(N[(1.0 - z), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-771.3234287776531 / N[(-2.0 - N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(176.6150291621406 / N[(N[(1.0 - z), $MachinePrecision] - -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$5 * N[(N[Power[N[(N[(1.0 - z), $MachinePrecision] - -6.5), $MachinePrecision], N[(N[(1.0 - z), $MachinePrecision] - 0.5), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] * 0.1456731240789439), $MachinePrecision]]]]]]]]
\begin{array}{l}
t_0 := \left(-z\right) + 7.5\\
t_1 := \sqrt{\pi + \pi}\\
t_2 := \left(1 - z\right) - 1\\
t_3 := t\_2 + 7\\
t_4 := t\_3 + 0.5\\
t_5 := \frac{\pi}{\sin \left(z \cdot \pi\right)}\\
\mathbf{if}\;\frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {t\_4}^{\left(t\_2 + 0.5\right)}\right) \cdot e^{-t\_4}\right) \cdot \left(\left(\left(\left(\left(\left(\left(\left(0.9999999999998099 + \frac{676.5203681218851}{t\_2 + 1}\right) + \frac{-1259.1392167224028}{t\_2 + 2}\right) + \frac{771.3234287776531}{t\_2 + 3}\right) + \frac{-176.6150291621406}{t\_2 + 4}\right) + \frac{12.507343278686905}{t\_2 + 5}\right) + \frac{-0.13857109526572012}{t\_2 + 6}\right) + \frac{9.984369578019572 \cdot 10^{-6}}{t\_3}\right) + \frac{1.5056327351493116 \cdot 10^{-7}}{t\_2 + 8}\right)\right) \leq 2 \cdot 10^{+200}:\\
\;\;\;\;\left(t\_5 \cdot \left(e^{-t\_0} \cdot \left({t\_0}^{\left(\left(-z\right) - -0.5\right)} \cdot t\_1\right)\right)\right) \cdot \left(\frac{1.5056327351493116 \cdot 10^{-7}}{\left(-z\right) - -8} + \left(\frac{9.984369578019572 \cdot 10^{-6}}{\left(-z\right) - -7} + \left(\frac{-0.13857109526572012}{\left(-z\right) - -6} + \left(\frac{12.507343278686905}{\left(-z\right) - -5} + \left(\left(0.9999999999998099 + \left(\frac{676.5203681218851}{1 - z} - \frac{1259.1392167224028}{\left(1 - z\right) - -1}\right)\right) + \left(\frac{-771.3234287776531}{-2 - \left(1 - z\right)} - \frac{176.6150291621406}{\left(1 - z\right) - -3}\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_5 \cdot \left({\left(\left(1 - z\right) - -6.5\right)}^{\left(\left(1 - z\right) - 0.5\right)} \cdot t\_1\right)\right) \cdot 0.1456731240789439\\
\end{array}
if (*.f64 (/.f64 (PI.f64) (sin.f64 (*.f64 (PI.f64) z))) (*.f64 (*.f64 (*.f64 (sqrt.f64 (*.f64 (PI.f64) #s(literal 2 binary64))) (pow.f64 (+.f64 (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 7 binary64)) #s(literal 1/2 binary64)) (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 1/2 binary64)))) (exp.f64 (neg.f64 (+.f64 (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 7 binary64)) #s(literal 1/2 binary64))))) (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 #s(literal 9999999999998099/10000000000000000 binary64) (/.f64 #s(literal 6765203681218851/10000000000000 binary64) (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 1 binary64)))) (/.f64 #s(literal -3147848041806007/2500000000000 binary64) (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 2 binary64)))) (/.f64 #s(literal 7713234287776531/10000000000000 binary64) (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 3 binary64)))) (/.f64 #s(literal -883075145810703/5000000000000 binary64) (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 4 binary64)))) (/.f64 #s(literal 2501468655737381/200000000000000 binary64) (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 5 binary64)))) (/.f64 #s(literal -3464277381643003/25000000000000000 binary64) (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 6 binary64)))) (/.f64 #s(literal 2496092394504893/250000000000000000000 binary64) (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 7 binary64)))) (/.f64 #s(literal 3764081837873279/25000000000000000000000 binary64) (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 8 binary64)))))) < 1.9999999999999999e200Initial program 96.4%
Applied rewrites98.3%
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
flip3--N/A
lower-unsound-/.f64N/A
lower-unsound--.f64N/A
lower-unsound-pow.f64N/A
lower-unsound-pow.f64N/A
lower-+.f64N/A
lower-unsound-fma.f64N/A
lower-unsound-fma.f64N/A
lower-+.f64N/A
lower-+.f64N/A
lower-unsound-*.f64N/A
lower-+.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
Taylor expanded in z around 0
lower-*.f6498.3%
Applied rewrites98.3%
Applied rewrites97.7%
if 1.9999999999999999e200 < (*.f64 (/.f64 (PI.f64) (sin.f64 (*.f64 (PI.f64) z))) (*.f64 (*.f64 (*.f64 (sqrt.f64 (*.f64 (PI.f64) #s(literal 2 binary64))) (pow.f64 (+.f64 (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 7 binary64)) #s(literal 1/2 binary64)) (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 1/2 binary64)))) (exp.f64 (neg.f64 (+.f64 (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 7 binary64)) #s(literal 1/2 binary64))))) (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 #s(literal 9999999999998099/10000000000000000 binary64) (/.f64 #s(literal 6765203681218851/10000000000000 binary64) (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 1 binary64)))) (/.f64 #s(literal -3147848041806007/2500000000000 binary64) (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 2 binary64)))) (/.f64 #s(literal 7713234287776531/10000000000000 binary64) (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 3 binary64)))) (/.f64 #s(literal -883075145810703/5000000000000 binary64) (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 4 binary64)))) (/.f64 #s(literal 2501468655737381/200000000000000 binary64) (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 5 binary64)))) (/.f64 #s(literal -3464277381643003/25000000000000000 binary64) (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 6 binary64)))) (/.f64 #s(literal 2496092394504893/250000000000000000000 binary64) (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 7 binary64)))) (/.f64 #s(literal 3764081837873279/25000000000000000000000 binary64) (+.f64 (-.f64 (-.f64 #s(literal 1 binary64) z) #s(literal 1 binary64)) #s(literal 8 binary64)))))) Initial program 96.4%
Applied rewrites96.4%
Applied rewrites96.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-exp.f6496.0%
Applied rewrites96.0%
Evaluated real constant96.0%
(FPCore (z)
:precision binary64
(let* ((t_0 (- (log (- z))))
(t_1 (- (- 1.0 z) 1.0))
(t_2 (+ (+ t_1 7.0) 0.5)))
(if (<= z -0.46)
(/
(*
PI
(*
(*
(exp
(+
(* (- z) (+ (- t_0) (- (/ (fma -0.5 t_0 7.5) z))))
(- z 7.5)))
(sqrt (+ PI PI)))
0.9999999999998099))
(sin (* z PI)))
(*
(/ PI (sin (* PI z)))
(*
(* (* 2.5066282746310007 (pow t_2 (+ t_1 0.5))) (exp (- t_2)))
(+
263.3831869810514
(*
z
(+
436.8961725563396
(* z (+ 545.0353078428827 (* 606.6766809167608 z)))))))))))double code(double z) {
double t_0 = -log(-z);
double t_1 = (1.0 - z) - 1.0;
double t_2 = (t_1 + 7.0) + 0.5;
double tmp;
if (z <= -0.46) {
tmp = (((double) M_PI) * ((exp(((-z * (-t_0 + -(fma(-0.5, t_0, 7.5) / z))) + (z - 7.5))) * sqrt((((double) M_PI) + ((double) M_PI)))) * 0.9999999999998099)) / sin((z * ((double) M_PI)));
} else {
tmp = (((double) M_PI) / sin((((double) M_PI) * z))) * (((2.5066282746310007 * pow(t_2, (t_1 + 0.5))) * exp(-t_2)) * (263.3831869810514 + (z * (436.8961725563396 + (z * (545.0353078428827 + (606.6766809167608 * z)))))));
}
return tmp;
}
function code(z) t_0 = Float64(-log(Float64(-z))) t_1 = Float64(Float64(1.0 - z) - 1.0) t_2 = Float64(Float64(t_1 + 7.0) + 0.5) tmp = 0.0 if (z <= -0.46) tmp = Float64(Float64(pi * Float64(Float64(exp(Float64(Float64(Float64(-z) * Float64(Float64(-t_0) + Float64(-Float64(fma(-0.5, t_0, 7.5) / z)))) + Float64(z - 7.5))) * sqrt(Float64(pi + pi))) * 0.9999999999998099)) / sin(Float64(z * pi))); else tmp = Float64(Float64(pi / sin(Float64(pi * z))) * Float64(Float64(Float64(2.5066282746310007 * (t_2 ^ Float64(t_1 + 0.5))) * exp(Float64(-t_2))) * Float64(263.3831869810514 + Float64(z * Float64(436.8961725563396 + Float64(z * Float64(545.0353078428827 + Float64(606.6766809167608 * z)))))))); end return tmp end
code[z_] := Block[{t$95$0 = (-N[Log[(-z)], $MachinePrecision])}, Block[{t$95$1 = N[(N[(1.0 - z), $MachinePrecision] - 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + 7.0), $MachinePrecision] + 0.5), $MachinePrecision]}, If[LessEqual[z, -0.46], N[(N[(Pi * N[(N[(N[Exp[N[(N[((-z) * N[((-t$95$0) + (-N[(N[(-0.5 * t$95$0 + 7.5), $MachinePrecision] / z), $MachinePrecision])), $MachinePrecision]), $MachinePrecision] + N[(z - 7.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(Pi + Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 0.9999999999998099), $MachinePrecision]), $MachinePrecision] / N[Sin[N[(z * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(Pi / N[Sin[N[(Pi * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.5066282746310007 * N[Power[t$95$2, N[(t$95$1 + 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[(-t$95$2)], $MachinePrecision]), $MachinePrecision] * N[(263.3831869810514 + N[(z * N[(436.8961725563396 + N[(z * N[(545.0353078428827 + N[(606.6766809167608 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := -\log \left(-z\right)\\
t_1 := \left(1 - z\right) - 1\\
t_2 := \left(t\_1 + 7\right) + 0.5\\
\mathbf{if}\;z \leq -0.46:\\
\;\;\;\;\frac{\pi \cdot \left(\left(e^{\left(-z\right) \cdot \left(\left(-t\_0\right) + \left(-\frac{\mathsf{fma}\left(-0.5, t\_0, 7.5\right)}{z}\right)\right) + \left(z - 7.5\right)} \cdot \sqrt{\pi + \pi}\right) \cdot 0.9999999999998099\right)}{\sin \left(z \cdot \pi\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(2.5066282746310007 \cdot {t\_2}^{\left(t\_1 + 0.5\right)}\right) \cdot e^{-t\_2}\right) \cdot \left(263.3831869810514 + z \cdot \left(436.8961725563396 + z \cdot \left(545.0353078428827 + 606.6766809167608 \cdot z\right)\right)\right)\right)\\
\end{array}
if z < -0.46000000000000002Initial program 96.4%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites14.0%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-/.f643.7%
Applied rewrites3.7%
Applied rewrites4.6%
if -0.46000000000000002 < z Initial program 96.4%
Taylor expanded in z around 0
lower-+.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6496.5%
Applied rewrites96.5%
Evaluated real constant97.3%
(FPCore (z) :precision binary64 (* (* (/ PI (sin (* z PI))) (* (pow (- (- 1.0 z) -6.5) (- (- 1.0 z) 0.5)) (sqrt (+ PI PI)))) 0.1456731240789439))
double code(double z) {
return ((((double) M_PI) / sin((z * ((double) M_PI)))) * (pow(((1.0 - z) - -6.5), ((1.0 - z) - 0.5)) * sqrt((((double) M_PI) + ((double) M_PI))))) * 0.1456731240789439;
}
public static double code(double z) {
return ((Math.PI / Math.sin((z * Math.PI))) * (Math.pow(((1.0 - z) - -6.5), ((1.0 - z) - 0.5)) * Math.sqrt((Math.PI + Math.PI)))) * 0.1456731240789439;
}
def code(z): return ((math.pi / math.sin((z * math.pi))) * (math.pow(((1.0 - z) - -6.5), ((1.0 - z) - 0.5)) * math.sqrt((math.pi + math.pi)))) * 0.1456731240789439
function code(z) return Float64(Float64(Float64(pi / sin(Float64(z * pi))) * Float64((Float64(Float64(1.0 - z) - -6.5) ^ Float64(Float64(1.0 - z) - 0.5)) * sqrt(Float64(pi + pi)))) * 0.1456731240789439) end
function tmp = code(z) tmp = ((pi / sin((z * pi))) * ((((1.0 - z) - -6.5) ^ ((1.0 - z) - 0.5)) * sqrt((pi + pi)))) * 0.1456731240789439; end
code[z_] := N[(N[(N[(Pi / N[Sin[N[(z * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[(1.0 - z), $MachinePrecision] - -6.5), $MachinePrecision], N[(N[(1.0 - z), $MachinePrecision] - 0.5), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(Pi + Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.1456731240789439), $MachinePrecision]
\left(\frac{\pi}{\sin \left(z \cdot \pi\right)} \cdot \left({\left(\left(1 - z\right) - -6.5\right)}^{\left(\left(1 - z\right) - 0.5\right)} \cdot \sqrt{\pi + \pi}\right)\right) \cdot 0.1456731240789439
Initial program 96.4%
Applied rewrites96.4%
Applied rewrites96.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-exp.f6496.0%
Applied rewrites96.0%
Evaluated real constant96.0%
(FPCore (z) :precision binary64 (* 263.3831869810514 (/ (* (exp -7.5) 6.864684246478268) z)))
double code(double z) {
return 263.3831869810514 * ((exp(-7.5) * 6.864684246478268) / z);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(z)
use fmin_fmax_functions
real(8), intent (in) :: z
code = 263.3831869810514d0 * ((exp((-7.5d0)) * 6.864684246478268d0) / z)
end function
public static double code(double z) {
return 263.3831869810514 * ((Math.exp(-7.5) * 6.864684246478268) / z);
}
def code(z): return 263.3831869810514 * ((math.exp(-7.5) * 6.864684246478268) / z)
function code(z) return Float64(263.3831869810514 * Float64(Float64(exp(-7.5) * 6.864684246478268) / z)) end
function tmp = code(z) tmp = 263.3831869810514 * ((exp(-7.5) * 6.864684246478268) / z); end
code[z_] := N[(263.3831869810514 * N[(N[(N[Exp[-7.5], $MachinePrecision] * 6.864684246478268), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
263.3831869810514 \cdot \frac{e^{-7.5} \cdot 6.864684246478268}{z}
Initial program 96.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites95.3%
Evaluated real constant96.0%
(FPCore (z) :precision binary64 (/ 1.0 (/ z 1.0000000000000002)))
double code(double z) {
return 1.0 / (z / 1.0000000000000002);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(z)
use fmin_fmax_functions
real(8), intent (in) :: z
code = 1.0d0 / (z / 1.0000000000000002d0)
end function
public static double code(double z) {
return 1.0 / (z / 1.0000000000000002);
}
def code(z): return 1.0 / (z / 1.0000000000000002)
function code(z) return Float64(1.0 / Float64(z / 1.0000000000000002)) end
function tmp = code(z) tmp = 1.0 / (z / 1.0000000000000002); end
code[z_] := N[(1.0 / N[(z / 1.0000000000000002), $MachinePrecision]), $MachinePrecision]
\frac{1}{\frac{z}{1.0000000000000002}}
Initial program 96.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites95.3%
Evaluated real constant95.3%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
metadata-eval95.9%
Applied rewrites95.9%
lift-/.f64N/A
div-flipN/A
lower-unsound-/.f64N/A
lower-unsound-/.f6496.0%
Applied rewrites96.0%
(FPCore (z) :precision binary64 (* 1.0000000000000002 (/ 1.0 z)))
double code(double z) {
return 1.0000000000000002 * (1.0 / z);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(z)
use fmin_fmax_functions
real(8), intent (in) :: z
code = 1.0000000000000002d0 * (1.0d0 / z)
end function
public static double code(double z) {
return 1.0000000000000002 * (1.0 / z);
}
def code(z): return 1.0000000000000002 * (1.0 / z)
function code(z) return Float64(1.0000000000000002 * Float64(1.0 / z)) end
function tmp = code(z) tmp = 1.0000000000000002 * (1.0 / z); end
code[z_] := N[(1.0000000000000002 * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]
1.0000000000000002 \cdot \frac{1}{z}
Initial program 96.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites95.3%
Evaluated real constant95.3%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
metadata-eval95.9%
Applied rewrites95.9%
lift-/.f64N/A
mult-flipN/A
lower-*.f64N/A
lower-/.f6495.9%
Applied rewrites95.9%
(FPCore (z) :precision binary64 (/ 1.0000000000000002 z))
double code(double z) {
return 1.0000000000000002 / z;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(z)
use fmin_fmax_functions
real(8), intent (in) :: z
code = 1.0000000000000002d0 / z
end function
public static double code(double z) {
return 1.0000000000000002 / z;
}
def code(z): return 1.0000000000000002 / z
function code(z) return Float64(1.0000000000000002 / z) end
function tmp = code(z) tmp = 1.0000000000000002 / z; end
code[z_] := N[(1.0000000000000002 / z), $MachinePrecision]
\frac{1.0000000000000002}{z}
Initial program 96.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites95.3%
Evaluated real constant95.3%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
metadata-eval95.9%
Applied rewrites95.9%
herbie shell --seed 2025210
(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))))))