
(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 13 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) 1.0))
(t_1 (+ t_0 7.0))
(t_2 (+ t_1 0.5))
(t_3 (/ PI (sin (* PI z))))
(t_4 (* (sqrt (* PI 2.0)) (pow t_2 (+ t_0 0.5)))))
(if (<= z -500.0)
(*
t_3
(*
(* t_4 (+ 0.0005530843701478336 (* z 0.0005530843701478336)))
(+ 263.3831869810514 (* z 436.8961725563396))))
(*
t_3
(*
(* t_4 (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 t_3 = ((double) M_PI) / sin((((double) M_PI) * z));
double t_4 = sqrt((((double) M_PI) * 2.0)) * pow(t_2, (t_0 + 0.5));
double tmp;
if (z <= -500.0) {
tmp = t_3 * ((t_4 * (0.0005530843701478336 + (z * 0.0005530843701478336))) * (263.3831869810514 + (z * 436.8961725563396)));
} else {
tmp = t_3 * ((t_4 * 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 t_3 = Math.PI / Math.sin((Math.PI * z));
double t_4 = Math.sqrt((Math.PI * 2.0)) * Math.pow(t_2, (t_0 + 0.5));
double tmp;
if (z <= -500.0) {
tmp = t_3 * ((t_4 * (0.0005530843701478336 + (z * 0.0005530843701478336))) * (263.3831869810514 + (z * 436.8961725563396)));
} else {
tmp = t_3 * ((t_4 * 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 t_3 = math.pi / math.sin((math.pi * z)) t_4 = math.sqrt((math.pi * 2.0)) * math.pow(t_2, (t_0 + 0.5)) tmp = 0 if z <= -500.0: tmp = t_3 * ((t_4 * (0.0005530843701478336 + (z * 0.0005530843701478336))) * (263.3831869810514 + (z * 436.8961725563396))) else: tmp = t_3 * ((t_4 * 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) t_3 = Float64(pi / sin(Float64(pi * z))) t_4 = Float64(sqrt(Float64(pi * 2.0)) * (t_2 ^ Float64(t_0 + 0.5))) tmp = 0.0 if (z <= -500.0) tmp = Float64(t_3 * Float64(Float64(t_4 * Float64(0.0005530843701478336 + Float64(z * 0.0005530843701478336))) * Float64(263.3831869810514 + Float64(z * 436.8961725563396)))); else tmp = Float64(t_3 * Float64(Float64(t_4 * 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; t_3 = pi / sin((pi * z)); t_4 = sqrt((pi * 2.0)) * (t_2 ^ (t_0 + 0.5)); tmp = 0.0; if (z <= -500.0) tmp = t_3 * ((t_4 * (0.0005530843701478336 + (z * 0.0005530843701478336))) * (263.3831869810514 + (z * 436.8961725563396))); else tmp = t_3 * ((t_4 * 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]}, Block[{t$95$3 = N[(Pi / N[Sin[N[(Pi * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[N[(Pi * 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[t$95$2, N[(t$95$0 + 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -500.0], N[(t$95$3 * N[(N[(t$95$4 * N[(0.0005530843701478336 + N[(z * 0.0005530843701478336), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(263.3831869810514 + N[(z * 436.8961725563396), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[(N[(t$95$4 * 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\\
t_3 := \frac{\pi}{\sin \left(\pi \cdot z\right)}\\
t_4 := \sqrt{\pi \cdot 2} \cdot {t\_2}^{\left(t\_0 + 0.5\right)}\\
\mathbf{if}\;z \leq -500:\\
\;\;\;\;t\_3 \cdot \left(\left(t\_4 \cdot \left(0.0005530843701478336 + z \cdot 0.0005530843701478336\right)\right) \cdot \left(263.3831869810514 + z \cdot 436.8961725563396\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3 \cdot \left(\left(t\_4 \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%
Taylor expanded in z around 0
lower-+.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6496.6%
Applied rewrites96.6%
Taylor expanded in z around 0
lower-+.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower-exp.f6497.3%
Applied rewrites97.3%
Evaluated real constant97.3%
Evaluated real constant97.3%
Taylor expanded in z around 0
Applied rewrites97.2%
if -500 < z Initial program 96.4%
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))
(t_3 (- (- 1.0 z) -6.0))
(t_4 (- (- 1.0 z) 0.5))
(t_5 (sqrt (+ PI PI)))
(t_6 (/ PI (sin (* PI z))))
(t_7 (- t_3 -0.5)))
(if (<=
(*
t_6
(*
(* (* (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)))))
5000.0)
(*
t_6
(*
(* (pow t_7 t_4) t_5)
(*
(exp (- t_7))
(-
(-
(-
(- (/ 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 (- -4.0 (- 1.0 z)))
(-
(/ 0.13857109526572012 (- (- 1.0 z) -5.0))
(-
(/ 9.984369578019572e-6 t_3)
(/ -1.5056327351493116e-7 (- (- 1.0 z) -7.0))))))))))
(*
(*
(/ PI (sin (* z PI)))
(*
(fma 0.0005530843701478336 z 0.0005530843701478336)
(* (pow (- (- 1.0 z) -6.5) t_4) t_5)))
(fma
(fma (fma 606.6766809167608 z 545.0353078428827) z 436.8961725563396)
z
263.3831869810514)))))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 t_3 = (1.0 - z) - -6.0;
double t_4 = (1.0 - z) - 0.5;
double t_5 = sqrt((((double) M_PI) + ((double) M_PI)));
double t_6 = ((double) M_PI) / sin((((double) M_PI) * z));
double t_7 = t_3 - -0.5;
double tmp;
if ((t_6 * (((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))))) <= 5000.0) {
tmp = t_6 * ((pow(t_7, t_4) * t_5) * (exp(-t_7) * (((((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 / (-4.0 - (1.0 - z))) - ((0.13857109526572012 / ((1.0 - z) - -5.0)) - ((9.984369578019572e-6 / t_3) - (-1.5056327351493116e-7 / ((1.0 - z) - -7.0)))))))));
} else {
tmp = ((((double) M_PI) / sin((z * ((double) M_PI)))) * (fma(0.0005530843701478336, z, 0.0005530843701478336) * (pow(((1.0 - z) - -6.5), t_4) * t_5))) * fma(fma(fma(606.6766809167608, z, 545.0353078428827), z, 436.8961725563396), z, 263.3831869810514);
}
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) t_3 = Float64(Float64(1.0 - z) - -6.0) t_4 = Float64(Float64(1.0 - z) - 0.5) t_5 = sqrt(Float64(pi + pi)) t_6 = Float64(pi / sin(Float64(pi * z))) t_7 = Float64(t_3 - -0.5) tmp = 0.0 if (Float64(t_6 * 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))))) <= 5000.0) tmp = Float64(t_6 * Float64(Float64((t_7 ^ t_4) * t_5) * Float64(exp(Float64(-t_7)) * Float64(Float64(Float64(Float64(Float64(676.5203681218851 / Float64(1.0 - z)) - -0.9999999999998099) - Float64(1259.1392167224028 / Float64(Float64(1.0 - z) - -1.0))) - Float64(-771.3234287776531 / Float64(Float64(1.0 - z) - -2.0))) - Float64(Float64(176.6150291621406 / Float64(Float64(1.0 - z) - -3.0)) - Float64(Float64(-12.507343278686905 / Float64(-4.0 - Float64(1.0 - z))) - Float64(Float64(0.13857109526572012 / Float64(Float64(1.0 - z) - -5.0)) - Float64(Float64(9.984369578019572e-6 / t_3) - Float64(-1.5056327351493116e-7 / Float64(Float64(1.0 - z) - -7.0)))))))))); else tmp = Float64(Float64(Float64(pi / sin(Float64(z * pi))) * Float64(fma(0.0005530843701478336, z, 0.0005530843701478336) * Float64((Float64(Float64(1.0 - z) - -6.5) ^ t_4) * t_5))) * fma(fma(fma(606.6766809167608, z, 545.0353078428827), z, 436.8961725563396), z, 263.3831869810514)); end return 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]}, Block[{t$95$3 = N[(N[(1.0 - z), $MachinePrecision] - -6.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(1.0 - z), $MachinePrecision] - 0.5), $MachinePrecision]}, Block[{t$95$5 = N[Sqrt[N[(Pi + Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$6 = N[(Pi / N[Sin[N[(Pi * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$3 - -0.5), $MachinePrecision]}, If[LessEqual[N[(t$95$6 * 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], 5000.0], N[(t$95$6 * N[(N[(N[Power[t$95$7, t$95$4], $MachinePrecision] * t$95$5), $MachinePrecision] * N[(N[Exp[(-t$95$7)], $MachinePrecision] * 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[(-771.3234287776531 / N[(N[(1.0 - z), $MachinePrecision] - -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(176.6150291621406 / N[(N[(1.0 - z), $MachinePrecision] - -3.0), $MachinePrecision]), $MachinePrecision] - N[(N[(-12.507343278686905 / N[(-4.0 - N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(0.13857109526572012 / N[(N[(1.0 - z), $MachinePrecision] - -5.0), $MachinePrecision]), $MachinePrecision] - N[(N[(9.984369578019572e-6 / t$95$3), $MachinePrecision] - N[(-1.5056327351493116e-7 / N[(N[(1.0 - z), $MachinePrecision] - -7.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi / N[Sin[N[(z * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(0.0005530843701478336 * z + 0.0005530843701478336), $MachinePrecision] * N[(N[Power[N[(N[(1.0 - z), $MachinePrecision] - -6.5), $MachinePrecision], t$95$4], $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(606.6766809167608 * z + 545.0353078428827), $MachinePrecision] * z + 436.8961725563396), $MachinePrecision] * z + 263.3831869810514), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
t_0 := \left(1 - z\right) - 1\\
t_1 := t\_0 + 7\\
t_2 := t\_1 + 0.5\\
t_3 := \left(1 - z\right) - -6\\
t_4 := \left(1 - z\right) - 0.5\\
t_5 := \sqrt{\pi + \pi}\\
t_6 := \frac{\pi}{\sin \left(\pi \cdot z\right)}\\
t_7 := t\_3 - -0.5\\
\mathbf{if}\;t\_6 \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) \leq 5000:\\
\;\;\;\;t\_6 \cdot \left(\left({t\_7}^{t\_4} \cdot t\_5\right) \cdot \left(e^{-t\_7} \cdot \left(\left(\left(\left(\frac{676.5203681218851}{1 - z} - -0.9999999999998099\right) - \frac{1259.1392167224028}{\left(1 - z\right) - -1}\right) - \frac{-771.3234287776531}{\left(1 - z\right) - -2}\right) - \left(\frac{176.6150291621406}{\left(1 - z\right) - -3} - \left(\frac{-12.507343278686905}{-4 - \left(1 - z\right)} - \left(\frac{0.13857109526572012}{\left(1 - z\right) - -5} - \left(\frac{9.984369578019572 \cdot 10^{-6}}{t\_3} - \frac{-1.5056327351493116 \cdot 10^{-7}}{\left(1 - z\right) - -7}\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\pi}{\sin \left(z \cdot \pi\right)} \cdot \left(\mathsf{fma}\left(0.0005530843701478336, z, 0.0005530843701478336\right) \cdot \left({\left(\left(1 - z\right) - -6.5\right)}^{t\_4} \cdot t\_5\right)\right)\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(606.6766809167608, z, 545.0353078428827\right), z, 436.8961725563396\right), z, 263.3831869810514\right)\\
\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)))))) < 5e3Initial program 96.4%
Applied rewrites97.5%
Applied rewrites97.5%
if 5e3 < (*.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%
Taylor expanded in z around 0
lower-+.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6496.6%
Applied rewrites96.6%
Taylor expanded in z around 0
lower-+.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower-exp.f6497.3%
Applied rewrites97.3%
Evaluated real constant97.3%
Evaluated real constant97.3%
Applied rewrites97.6%
(FPCore (z)
:precision binary64
(let* ((t_0 (- (- 1.0 z) 1.0))
(t_1 (+ t_0 7.0))
(t_2 (+ t_1 0.5))
(t_3 (/ PI (sin (* PI z)))))
(if (<=
(*
t_3
(*
(* (* (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)))))
5000.0)
(*
t_3
(*
(*
(exp (* (log (- 7.5 z)) (- 0.5 z)))
(* (exp (- z 7.5)) (sqrt (* 2.0 PI))))
(+
(-
(-
(-
(- (/ 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 (- (- 1.0 z) -6.0))
(/ -1.5056327351493116e-7 (- (- 1.0 z) -7.0)))))))
(*
(*
(/ PI (sin (* z PI)))
(*
(fma 0.0005530843701478336 z 0.0005530843701478336)
(* (pow (- (- 1.0 z) -6.5) (- (- 1.0 z) 0.5)) (sqrt (+ PI PI)))))
(fma
(fma (fma 606.6766809167608 z 545.0353078428827) z 436.8961725563396)
z
263.3831869810514)))))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 t_3 = ((double) M_PI) / sin((((double) M_PI) * z));
double tmp;
if ((t_3 * (((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))))) <= 5000.0) {
tmp = t_3 * ((exp((log((7.5 - z)) * (0.5 - z))) * (exp((z - 7.5)) * sqrt((2.0 * ((double) M_PI))))) * ((((((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 / ((1.0 - z) - -6.0)) - (-1.5056327351493116e-7 / ((1.0 - z) - -7.0))))));
} else {
tmp = ((((double) M_PI) / sin((z * ((double) M_PI)))) * (fma(0.0005530843701478336, z, 0.0005530843701478336) * (pow(((1.0 - z) - -6.5), ((1.0 - z) - 0.5)) * sqrt((((double) M_PI) + ((double) M_PI)))))) * fma(fma(fma(606.6766809167608, z, 545.0353078428827), z, 436.8961725563396), z, 263.3831869810514);
}
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) t_3 = Float64(pi / sin(Float64(pi * z))) tmp = 0.0 if (Float64(t_3 * 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))))) <= 5000.0) tmp = Float64(t_3 * Float64(Float64(exp(Float64(log(Float64(7.5 - z)) * Float64(0.5 - z))) * Float64(exp(Float64(z - 7.5)) * sqrt(Float64(2.0 * pi)))) * 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(-771.3234287776531 / Float64(Float64(1.0 - z) - -2.0))) - Float64(176.6150291621406 / Float64(Float64(1.0 - z) - -3.0))) + Float64(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 / Float64(Float64(1.0 - z) - -6.0)) - Float64(-1.5056327351493116e-7 / Float64(Float64(1.0 - z) - -7.0))))))); else tmp = Float64(Float64(Float64(pi / sin(Float64(z * pi))) * Float64(fma(0.0005530843701478336, z, 0.0005530843701478336) * Float64((Float64(Float64(1.0 - z) - -6.5) ^ Float64(Float64(1.0 - z) - 0.5)) * sqrt(Float64(pi + pi))))) * fma(fma(fma(606.6766809167608, z, 545.0353078428827), z, 436.8961725563396), z, 263.3831869810514)); end return 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]}, Block[{t$95$3 = N[(Pi / N[Sin[N[(Pi * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$3 * 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], 5000.0], N[(t$95$3 * N[(N[(N[Exp[N[(N[Log[N[(7.5 - z), $MachinePrecision]], $MachinePrecision] * N[(0.5 - z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Exp[N[(z - 7.5), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * Pi), $MachinePrecision]], $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[(-771.3234287776531 / N[(N[(1.0 - z), $MachinePrecision] - -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(176.6150291621406 / N[(N[(1.0 - z), $MachinePrecision] - -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(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] + N[(N[(9.984369578019572e-6 / N[(N[(1.0 - z), $MachinePrecision] - -6.0), $MachinePrecision]), $MachinePrecision] - N[(-1.5056327351493116e-7 / N[(N[(1.0 - z), $MachinePrecision] - -7.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi / N[Sin[N[(z * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(0.0005530843701478336 * z + 0.0005530843701478336), $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]), $MachinePrecision] * N[(N[(N[(606.6766809167608 * z + 545.0353078428827), $MachinePrecision] * z + 436.8961725563396), $MachinePrecision] * z + 263.3831869810514), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
t_0 := \left(1 - z\right) - 1\\
t_1 := t\_0 + 7\\
t_2 := t\_1 + 0.5\\
t_3 := \frac{\pi}{\sin \left(\pi \cdot z\right)}\\
\mathbf{if}\;t\_3 \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) \leq 5000:\\
\;\;\;\;t\_3 \cdot \left(\left(e^{\log \left(7.5 - z\right) \cdot \left(0.5 - z\right)} \cdot \left(e^{z - 7.5} \cdot \sqrt{2 \cdot \pi}\right)\right) \cdot \left(\left(\left(\left(\left(\frac{676.5203681218851}{1 - z} - -0.9999999999998099\right) - \frac{1259.1392167224028}{\left(1 - z\right) - -1}\right) - \frac{-771.3234287776531}{\left(1 - z\right) - -2}\right) - \frac{176.6150291621406}{\left(1 - z\right) - -3}\right) + \left(\left(\frac{12.507343278686905}{\left(1 - z\right) - -4} - \frac{0.13857109526572012}{\left(1 - z\right) - -5}\right) + \left(\frac{9.984369578019572 \cdot 10^{-6}}{\left(1 - z\right) - -6} - \frac{-1.5056327351493116 \cdot 10^{-7}}{\left(1 - z\right) - -7}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\pi}{\sin \left(z \cdot \pi\right)} \cdot \left(\mathsf{fma}\left(0.0005530843701478336, z, 0.0005530843701478336\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)\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(606.6766809167608, z, 545.0353078428827\right), z, 436.8961725563396\right), z, 263.3831869810514\right)\\
\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)))))) < 5e3Initial program 96.4%
Applied rewrites97.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-exp.f64N/A
lower--.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-PI.f6497.5%
Applied rewrites97.5%
if 5e3 < (*.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%
Taylor expanded in z around 0
lower-+.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6496.6%
Applied rewrites96.6%
Taylor expanded in z around 0
lower-+.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower-exp.f6497.3%
Applied rewrites97.3%
Evaluated real constant97.3%
Evaluated real constant97.3%
Applied rewrites97.6%
(FPCore (z)
:precision binary64
(*
(*
(/ PI (sin (* z PI)))
(*
(fma 0.0005530843701478336 z 0.0005530843701478336)
(* (pow (- (- 1.0 z) -6.5) (- (- 1.0 z) 0.5)) (sqrt (+ PI PI)))))
(fma
(fma (fma 606.6766809167608 z 545.0353078428827) z 436.8961725563396)
z
263.3831869810514)))double code(double z) {
return ((((double) M_PI) / sin((z * ((double) M_PI)))) * (fma(0.0005530843701478336, z, 0.0005530843701478336) * (pow(((1.0 - z) - -6.5), ((1.0 - z) - 0.5)) * sqrt((((double) M_PI) + ((double) M_PI)))))) * fma(fma(fma(606.6766809167608, z, 545.0353078428827), z, 436.8961725563396), z, 263.3831869810514);
}
function code(z) return Float64(Float64(Float64(pi / sin(Float64(z * pi))) * Float64(fma(0.0005530843701478336, z, 0.0005530843701478336) * Float64((Float64(Float64(1.0 - z) - -6.5) ^ Float64(Float64(1.0 - z) - 0.5)) * sqrt(Float64(pi + pi))))) * fma(fma(fma(606.6766809167608, z, 545.0353078428827), z, 436.8961725563396), z, 263.3831869810514)) end
code[z_] := N[(N[(N[(Pi / N[Sin[N[(z * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(0.0005530843701478336 * z + 0.0005530843701478336), $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]), $MachinePrecision] * N[(N[(N[(606.6766809167608 * z + 545.0353078428827), $MachinePrecision] * z + 436.8961725563396), $MachinePrecision] * z + 263.3831869810514), $MachinePrecision]), $MachinePrecision]
\left(\frac{\pi}{\sin \left(z \cdot \pi\right)} \cdot \left(\mathsf{fma}\left(0.0005530843701478336, z, 0.0005530843701478336\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)\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(606.6766809167608, z, 545.0353078428827\right), z, 436.8961725563396\right), z, 263.3831869810514\right)
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.6%
Applied rewrites96.6%
Taylor expanded in z around 0
lower-+.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower-exp.f6497.3%
Applied rewrites97.3%
Evaluated real constant97.3%
Evaluated real constant97.3%
Applied rewrites97.6%
(FPCore (z)
:precision binary64
(let* ((t_0 (- (- 1.0 z) 1.0)))
(*
(/ PI (sin (* PI z)))
(*
(*
(* (sqrt (* PI 2.0)) (pow (+ (+ t_0 7.0) 0.5) (+ t_0 0.5)))
(+ 0.0005530843701478336 (* z 0.0005530843701478336)))
(+ 263.3831869810514 (* z 436.8961725563396))))))double code(double z) {
double t_0 = (1.0 - z) - 1.0;
return (((double) M_PI) / sin((((double) M_PI) * z))) * (((sqrt((((double) M_PI) * 2.0)) * pow(((t_0 + 7.0) + 0.5), (t_0 + 0.5))) * (0.0005530843701478336 + (z * 0.0005530843701478336))) * (263.3831869810514 + (z * 436.8961725563396)));
}
public static double code(double z) {
double t_0 = (1.0 - z) - 1.0;
return (Math.PI / Math.sin((Math.PI * z))) * (((Math.sqrt((Math.PI * 2.0)) * Math.pow(((t_0 + 7.0) + 0.5), (t_0 + 0.5))) * (0.0005530843701478336 + (z * 0.0005530843701478336))) * (263.3831869810514 + (z * 436.8961725563396)));
}
def code(z): t_0 = (1.0 - z) - 1.0 return (math.pi / math.sin((math.pi * z))) * (((math.sqrt((math.pi * 2.0)) * math.pow(((t_0 + 7.0) + 0.5), (t_0 + 0.5))) * (0.0005530843701478336 + (z * 0.0005530843701478336))) * (263.3831869810514 + (z * 436.8961725563396)))
function code(z) t_0 = Float64(Float64(1.0 - z) - 1.0) return Float64(Float64(pi / sin(Float64(pi * z))) * Float64(Float64(Float64(sqrt(Float64(pi * 2.0)) * (Float64(Float64(t_0 + 7.0) + 0.5) ^ Float64(t_0 + 0.5))) * Float64(0.0005530843701478336 + Float64(z * 0.0005530843701478336))) * Float64(263.3831869810514 + Float64(z * 436.8961725563396)))) end
function tmp = code(z) t_0 = (1.0 - z) - 1.0; tmp = (pi / sin((pi * z))) * (((sqrt((pi * 2.0)) * (((t_0 + 7.0) + 0.5) ^ (t_0 + 0.5))) * (0.0005530843701478336 + (z * 0.0005530843701478336))) * (263.3831869810514 + (z * 436.8961725563396))); end
code[z_] := Block[{t$95$0 = N[(N[(1.0 - z), $MachinePrecision] - 1.0), $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[N[(N[(t$95$0 + 7.0), $MachinePrecision] + 0.5), $MachinePrecision], N[(t$95$0 + 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(0.0005530843701478336 + N[(z * 0.0005530843701478336), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(263.3831869810514 + N[(z * 436.8961725563396), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
t_0 := \left(1 - z\right) - 1\\
\frac{\pi}{\sin \left(\pi \cdot z\right)} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {\left(\left(t\_0 + 7\right) + 0.5\right)}^{\left(t\_0 + 0.5\right)}\right) \cdot \left(0.0005530843701478336 + z \cdot 0.0005530843701478336\right)\right) \cdot \left(263.3831869810514 + z \cdot 436.8961725563396\right)\right)
\end{array}
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.6%
Applied rewrites96.6%
Taylor expanded in z around 0
lower-+.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower-exp.f6497.3%
Applied rewrites97.3%
Evaluated real constant97.3%
Evaluated real constant97.3%
Taylor expanded in z around 0
Applied rewrites97.2%
(FPCore (z)
:precision binary64
(let* ((t_0 (- (- 1.0 z) 1.0)) (t_1 (+ (+ t_0 7.0) 0.5)))
(*
(/ 1.0 z)
(*
(* (* 2.5066282746310007 (pow t_1 (+ t_0 0.5))) (exp (- t_1)))
(+
263.3831869810514
(*
z
(+
436.8961725563396
(* z (+ 545.0353078428827 (* 606.6766809167608 z))))))))))double code(double z) {
double t_0 = (1.0 - z) - 1.0;
double t_1 = (t_0 + 7.0) + 0.5;
return (1.0 / z) * (((2.5066282746310007 * pow(t_1, (t_0 + 0.5))) * exp(-t_1)) * (263.3831869810514 + (z * (436.8961725563396 + (z * (545.0353078428827 + (606.6766809167608 * 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
real(8) :: t_0
real(8) :: t_1
t_0 = (1.0d0 - z) - 1.0d0
t_1 = (t_0 + 7.0d0) + 0.5d0
code = (1.0d0 / z) * (((2.5066282746310007d0 * (t_1 ** (t_0 + 0.5d0))) * exp(-t_1)) * (263.3831869810514d0 + (z * (436.8961725563396d0 + (z * (545.0353078428827d0 + (606.6766809167608d0 * z)))))))
end function
public static double code(double z) {
double t_0 = (1.0 - z) - 1.0;
double t_1 = (t_0 + 7.0) + 0.5;
return (1.0 / z) * (((2.5066282746310007 * Math.pow(t_1, (t_0 + 0.5))) * Math.exp(-t_1)) * (263.3831869810514 + (z * (436.8961725563396 + (z * (545.0353078428827 + (606.6766809167608 * z)))))));
}
def code(z): t_0 = (1.0 - z) - 1.0 t_1 = (t_0 + 7.0) + 0.5 return (1.0 / z) * (((2.5066282746310007 * math.pow(t_1, (t_0 + 0.5))) * math.exp(-t_1)) * (263.3831869810514 + (z * (436.8961725563396 + (z * (545.0353078428827 + (606.6766809167608 * z)))))))
function code(z) t_0 = Float64(Float64(1.0 - z) - 1.0) t_1 = Float64(Float64(t_0 + 7.0) + 0.5) return Float64(Float64(1.0 / z) * Float64(Float64(Float64(2.5066282746310007 * (t_1 ^ Float64(t_0 + 0.5))) * exp(Float64(-t_1))) * Float64(263.3831869810514 + Float64(z * Float64(436.8961725563396 + Float64(z * Float64(545.0353078428827 + Float64(606.6766809167608 * z)))))))) end
function tmp = code(z) t_0 = (1.0 - z) - 1.0; t_1 = (t_0 + 7.0) + 0.5; tmp = (1.0 / z) * (((2.5066282746310007 * (t_1 ^ (t_0 + 0.5))) * exp(-t_1)) * (263.3831869810514 + (z * (436.8961725563396 + (z * (545.0353078428827 + (606.6766809167608 * z))))))); end
code[z_] := Block[{t$95$0 = N[(N[(1.0 - z), $MachinePrecision] - 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 + 7.0), $MachinePrecision] + 0.5), $MachinePrecision]}, N[(N[(1.0 / z), $MachinePrecision] * N[(N[(N[(2.5066282746310007 * N[Power[t$95$1, N[(t$95$0 + 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[(-t$95$1)], $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 := \left(1 - z\right) - 1\\
t_1 := \left(t\_0 + 7\right) + 0.5\\
\frac{1}{z} \cdot \left(\left(\left(2.5066282746310007 \cdot {t\_1}^{\left(t\_0 + 0.5\right)}\right) \cdot e^{-t\_1}\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}
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.6%
Applied rewrites96.6%
Evaluated real constant97.3%
Taylor expanded in z around 0
lower-/.f6497.1%
Applied rewrites97.1%
(FPCore (z)
:precision binary64
(*
(/ PI (* z PI))
(*
(*
(* 2.5066282746310007 (exp (* (log (- 7.5 z)) (- 0.5 z))))
(exp (- (+ (+ (- (- 1.0 z) 1.0) 7.0) 0.5))))
(+
263.3831869810514
(*
z
(+
436.8961725563396
(* z (+ 545.0353078428827 (* 606.6766809167608 z)))))))))double code(double z) {
return (((double) M_PI) / (z * ((double) M_PI))) * (((2.5066282746310007 * exp((log((7.5 - z)) * (0.5 - z)))) * exp(-((((1.0 - z) - 1.0) + 7.0) + 0.5))) * (263.3831869810514 + (z * (436.8961725563396 + (z * (545.0353078428827 + (606.6766809167608 * z)))))));
}
public static double code(double z) {
return (Math.PI / (z * Math.PI)) * (((2.5066282746310007 * Math.exp((Math.log((7.5 - z)) * (0.5 - z)))) * Math.exp(-((((1.0 - z) - 1.0) + 7.0) + 0.5))) * (263.3831869810514 + (z * (436.8961725563396 + (z * (545.0353078428827 + (606.6766809167608 * z)))))));
}
def code(z): return (math.pi / (z * math.pi)) * (((2.5066282746310007 * math.exp((math.log((7.5 - z)) * (0.5 - z)))) * math.exp(-((((1.0 - z) - 1.0) + 7.0) + 0.5))) * (263.3831869810514 + (z * (436.8961725563396 + (z * (545.0353078428827 + (606.6766809167608 * z)))))))
function code(z) return Float64(Float64(pi / Float64(z * pi)) * Float64(Float64(Float64(2.5066282746310007 * exp(Float64(log(Float64(7.5 - z)) * Float64(0.5 - z)))) * exp(Float64(-Float64(Float64(Float64(Float64(1.0 - z) - 1.0) + 7.0) + 0.5)))) * Float64(263.3831869810514 + Float64(z * Float64(436.8961725563396 + Float64(z * Float64(545.0353078428827 + Float64(606.6766809167608 * z)))))))) end
function tmp = code(z) tmp = (pi / (z * pi)) * (((2.5066282746310007 * exp((log((7.5 - z)) * (0.5 - z)))) * exp(-((((1.0 - z) - 1.0) + 7.0) + 0.5))) * (263.3831869810514 + (z * (436.8961725563396 + (z * (545.0353078428827 + (606.6766809167608 * z))))))); end
code[z_] := N[(N[(Pi / N[(z * Pi), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.5066282746310007 * N[Exp[N[(N[Log[N[(7.5 - z), $MachinePrecision]], $MachinePrecision] * N[(0.5 - z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[(-N[(N[(N[(N[(1.0 - z), $MachinePrecision] - 1.0), $MachinePrecision] + 7.0), $MachinePrecision] + 0.5), $MachinePrecision])], $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]
\frac{\pi}{z \cdot \pi} \cdot \left(\left(\left(2.5066282746310007 \cdot e^{\log \left(7.5 - z\right) \cdot \left(0.5 - z\right)}\right) \cdot e^{-\left(\left(\left(\left(1 - z\right) - 1\right) + 7\right) + 0.5\right)}\right) \cdot \left(263.3831869810514 + z \cdot \left(436.8961725563396 + z \cdot \left(545.0353078428827 + 606.6766809167608 \cdot z\right)\right)\right)\right)
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.6%
Applied rewrites96.6%
Taylor expanded in z around 0
lower-*.f64N/A
lower-PI.f6496.2%
Applied rewrites96.2%
Taylor expanded in z around inf
lower-exp.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower--.f6496.2%
Applied rewrites96.2%
Evaluated real constant97.0%
(FPCore (z)
:precision binary64
(*
(/ PI (* z PI))
(*
(* (* (sqrt (* PI 2.0)) (pow 7.5 (+ (- (- 1.0 z) 1.0) 0.5))) (exp (- 7.5)))
(+
263.3831869810514
(*
z
(+
436.8961725563396
(* z (+ 545.0353078428827 (* 606.6766809167608 z)))))))))double code(double z) {
return (((double) M_PI) / (z * ((double) M_PI))) * (((sqrt((((double) M_PI) * 2.0)) * pow(7.5, (((1.0 - z) - 1.0) + 0.5))) * exp(-7.5)) * (263.3831869810514 + (z * (436.8961725563396 + (z * (545.0353078428827 + (606.6766809167608 * z)))))));
}
public static double code(double z) {
return (Math.PI / (z * Math.PI)) * (((Math.sqrt((Math.PI * 2.0)) * Math.pow(7.5, (((1.0 - z) - 1.0) + 0.5))) * Math.exp(-7.5)) * (263.3831869810514 + (z * (436.8961725563396 + (z * (545.0353078428827 + (606.6766809167608 * z)))))));
}
def code(z): return (math.pi / (z * math.pi)) * (((math.sqrt((math.pi * 2.0)) * math.pow(7.5, (((1.0 - z) - 1.0) + 0.5))) * math.exp(-7.5)) * (263.3831869810514 + (z * (436.8961725563396 + (z * (545.0353078428827 + (606.6766809167608 * z)))))))
function code(z) return Float64(Float64(pi / Float64(z * pi)) * Float64(Float64(Float64(sqrt(Float64(pi * 2.0)) * (7.5 ^ Float64(Float64(Float64(1.0 - z) - 1.0) + 0.5))) * exp(Float64(-7.5))) * Float64(263.3831869810514 + Float64(z * Float64(436.8961725563396 + Float64(z * Float64(545.0353078428827 + Float64(606.6766809167608 * z)))))))) end
function tmp = code(z) tmp = (pi / (z * pi)) * (((sqrt((pi * 2.0)) * (7.5 ^ (((1.0 - z) - 1.0) + 0.5))) * exp(-7.5)) * (263.3831869810514 + (z * (436.8961725563396 + (z * (545.0353078428827 + (606.6766809167608 * z))))))); end
code[z_] := N[(N[(Pi / N[(z * Pi), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Sqrt[N[(Pi * 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[7.5, N[(N[(N[(1.0 - z), $MachinePrecision] - 1.0), $MachinePrecision] + 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[(-7.5)], $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]
\frac{\pi}{z \cdot \pi} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot {7.5}^{\left(\left(\left(1 - z\right) - 1\right) + 0.5\right)}\right) \cdot e^{-7.5}\right) \cdot \left(263.3831869810514 + z \cdot \left(436.8961725563396 + z \cdot \left(545.0353078428827 + 606.6766809167608 \cdot z\right)\right)\right)\right)
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.6%
Applied rewrites96.6%
Taylor expanded in z around 0
lower-*.f64N/A
lower-PI.f6496.2%
Applied rewrites96.2%
Taylor expanded in z around 0
Applied rewrites95.5%
Taylor expanded in z around 0
Applied rewrites95.8%
(FPCore (z)
:precision binary64
(*
(/ PI (* z PI))
(*
(* (* (sqrt (* PI 2.0)) (exp (* (log (- 7.5 z)) (- 0.5 z)))) (exp -7.5))
(+
263.3831869810514
(*
z
(+
436.8961725563396
(* z (+ 545.0353078428827 (* 606.6766809167608 z)))))))))double code(double z) {
return (((double) M_PI) / (z * ((double) M_PI))) * (((sqrt((((double) M_PI) * 2.0)) * exp((log((7.5 - z)) * (0.5 - z)))) * exp(-7.5)) * (263.3831869810514 + (z * (436.8961725563396 + (z * (545.0353078428827 + (606.6766809167608 * z)))))));
}
public static double code(double z) {
return (Math.PI / (z * Math.PI)) * (((Math.sqrt((Math.PI * 2.0)) * Math.exp((Math.log((7.5 - z)) * (0.5 - z)))) * Math.exp(-7.5)) * (263.3831869810514 + (z * (436.8961725563396 + (z * (545.0353078428827 + (606.6766809167608 * z)))))));
}
def code(z): return (math.pi / (z * math.pi)) * (((math.sqrt((math.pi * 2.0)) * math.exp((math.log((7.5 - z)) * (0.5 - z)))) * math.exp(-7.5)) * (263.3831869810514 + (z * (436.8961725563396 + (z * (545.0353078428827 + (606.6766809167608 * z)))))))
function code(z) return Float64(Float64(pi / Float64(z * pi)) * Float64(Float64(Float64(sqrt(Float64(pi * 2.0)) * exp(Float64(log(Float64(7.5 - z)) * Float64(0.5 - z)))) * exp(-7.5)) * Float64(263.3831869810514 + Float64(z * Float64(436.8961725563396 + Float64(z * Float64(545.0353078428827 + Float64(606.6766809167608 * z)))))))) end
function tmp = code(z) tmp = (pi / (z * pi)) * (((sqrt((pi * 2.0)) * exp((log((7.5 - z)) * (0.5 - z)))) * exp(-7.5)) * (263.3831869810514 + (z * (436.8961725563396 + (z * (545.0353078428827 + (606.6766809167608 * z))))))); end
code[z_] := N[(N[(Pi / N[(z * Pi), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Sqrt[N[(Pi * 2.0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[Log[N[(7.5 - z), $MachinePrecision]], $MachinePrecision] * N[(0.5 - z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[-7.5], $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]
\frac{\pi}{z \cdot \pi} \cdot \left(\left(\left(\sqrt{\pi \cdot 2} \cdot e^{\log \left(7.5 - z\right) \cdot \left(0.5 - z\right)}\right) \cdot e^{-7.5}\right) \cdot \left(263.3831869810514 + z \cdot \left(436.8961725563396 + z \cdot \left(545.0353078428827 + 606.6766809167608 \cdot z\right)\right)\right)\right)
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.6%
Applied rewrites96.6%
Taylor expanded in z around 0
lower-*.f64N/A
lower-PI.f6496.2%
Applied rewrites96.2%
Taylor expanded in z around inf
lower-exp.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower--.f6496.2%
Applied rewrites96.2%
Taylor expanded in z around 0
Applied rewrites95.8%
(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.6%
Evaluated real constant96.3%
(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.6%
Evaluated real constant95.6%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
metadata-eval96.1%
Applied rewrites96.1%
lift-/.f64N/A
div-flipN/A
lower-unsound-/.f64N/A
lower-unsound-/.f6496.2%
Applied rewrites96.2%
(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.6%
Evaluated real constant95.6%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
metadata-eval96.1%
Applied rewrites96.1%
lift-/.f64N/A
mult-flipN/A
lower-*.f64N/A
lower-/.f6496.2%
Applied rewrites96.2%
(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.6%
Evaluated real constant95.6%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
metadata-eval96.1%
Applied rewrites96.1%
herbie shell --seed 2025189
(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))))))