//  y-cruncher Custom Formula File
//
//  This can be loaded directly from the Custom Compute menu or
//  entered from the command line as "custom:filename".
//
//      y-cruncher custom custom:"constant - algorithm"
//
//
//    Author:  Alexander J. Yee
//    Date:    November 4, 2018
//
//    Value: 2.29558714939263807403429804918949038759783220363858...
//
//        P = Log(1 + sqrt(2)) + sqrt(2)
//
//    https://en.wikipedia.org/wiki/Universal_parabolic_constant
//
//    Same as "Universal Parabolic Constant (unoptimized).cfg",
//    but avoids computing sqrt(2) twice.
//

{
    NameShort : "Universal Parabolic Constant"
    NameLong : "Universal Parabolic Constant"
    AlgorithmShort : "Definition"
    AlgorithmLong : "Direct Definition"
    Formula : {
        Scope : {
            Locals : [
                {sqrt2 : {Sqrt : 2}}
            ]
            Formula : {
                LinearCombination : [
                    [1 {Log : {
                        LinearCombination : [
                            [1 1]
                            [1 "sqrt2"]
                        ]
                    }}]
                    [1 "sqrt2"]
                ]
            }
        }
    }
}
