//  y-cruncher Custom Formula File
//
//  This can be loaded directly from the Custom Compute menu or
//  entered from the command line as "custom:filename.cfg".
//      y-cruncher custom custom:"filename.cfg"
//
//
//    Author:  Alexander J. Yee
//    Date:    September 30, 2018
//
//    Value: 3.14159265358979323846264338327950288419716939937510...
//
//    Formula: Chien-Lih Hwang's 6-term formula (1997)
//
//        Pi = 732 ArcTan(1/239) + 128 ArcTan(1/1023) - 272 ArcTan(1/5832)
//            + 48 ArcTan(1/110443) - 48 ArcTan(1/4841182) - 400 ArcTan(1/6826318)
//
//    This uses Euler's ArcTan formula which is slightly faster
//    than the usual Taylor series.
//

{
    NameShort : "Pi"
    NameLong : "Pi"
    AlgorithmShort : "Hwang"
    AlgorithmLong : "Hwang's 6-term Formula (1997)"
    Formula : {
        LinearCombination : [
            [87474 {SeriesHypergeometric : {
                    CoefficientP : 1
                    CoefficientQ : 1
                    CoefficientD : 28561
                    PolynomialP : [0 1]
                    PolynomialQ : [28561 57122]
                    PolynomialR : [0 1]
            }}]
            [65472 {SeriesHypergeometric : {
                    CoefficientP : 1
                    CoefficientQ : 1
                    CoefficientD : 523265
                    PolynomialP : [0 1]
                    PolynomialQ : [523265 1046530]
                    PolynomialR : [0 1]
            }}]
            [-1586304 {SeriesHypergeometric : {
                    CoefficientP : 1
                    CoefficientQ : 1
                    CoefficientD : 34012225
                    PolynomialP : [0 2]
                    PolynomialQ : [34012225 68024450]
                    PolynomialR : [0 2]
            }}]
            [2650632 {SeriesHypergeometric : {
                    CoefficientP : 1
                    CoefficientQ : 1
                    CoefficientD : 6098828125
                    PolynomialP : [0 1]
                    PolynomialQ : [6098828125 12197656250]
                    PolynomialR : [0 1]
            }}]
            [-232376736 {SeriesHypergeometric : {
                    CoefficientP : 1
                    CoefficientQ : 1
                    CoefficientD : 23437043157125
                    PolynomialP : [0 2]
                    PolynomialQ : [23437043157125 46874086314250]
                    PolynomialR : [0 2]
            }}]
            [-109221088 {SeriesHypergeometric : {
                    CoefficientP : 1
                    CoefficientQ : 1
                    CoefficientD : 1863944697485
                    PolynomialP : [0 2]
                    PolynomialQ : [46598617437125 93197234874250]
                    PolynomialR : [0 2]
            }}]
        ]
    }
}
