
The following is a list of primitive op codes, infix operators, procedures
and functions supported by XPCalc.

                          The primitive op codes are:

A => Auto Display on/off            |  T => Set digits to truncate
B => Display learn line             |  U => Set rounding mode
C => Change sign of x               |  V => Set non-rounding mode
D => Set degree trig mode           |  W => Write x (Top number) to file
E => Set radian trig mode           |  X => Learn, Execute (X learn, X)
F => ! => Factorial                 |  Y => Delete (Yank) number from list
G => Set Digits/Group               |  Z => Output the list of variables
H => Log screen to log file toggle  |  " => Start/Stop file name or comment
I => Input number from file         |  % => Set FMB = x, FMB on list
J => Run XPCalc code from file      |  / => x = x Mod FMB, FMB on list
K => Execute learn line x times     |  \ => Set Input and Output base to x
L => Reduce precision of x          |  $ => Restart/Reset configuration
M => Set digits in Mantissa         |  > => Write configuration file
N => Generate a random number       |  < => Read configuration file
O => x = 1 / x                      |  ] => Write command history file
P => Return Pi = 3.14159,26535,8... |  [ => Read command history file
Q => Quit to end the program        |  . => Write x in fixed-point decimal
R => Square root of x               |  # => Primorial (like factorial)
S => Square x                       |  ? => Help
--------------------------------------------------------------------------------

                           The infix operators are:

         A = X + Y  =>  Set A to X plus Y
         A = X - Y  =>  Set A to X minus Y
         A = X * Y  =>  Set A to X times Y
         A = X / Y  =>  Set A to X divided by Y
         A = X ^ Y  =>  Set A to X to the power Y
         A = Y @ X  =>  Set A to ATan2(Y over X)
         A = X # Y  =>  Set A to Mag(X, Y) = SqRt(Sq(X) + Sq(Y))
         A = X % Y  =>  Set A to Mod(X, Y) = X Modulo Y
         A = X \ Y  =>  Set A to Floor(X/Y), integer divide
         A = X & Y  =>  Set A to 1 if X and Y are not 0, else set A to 0
         A = X | Y  =>  Set A to 1 if X or Y, is not 0, else set A to 0
         A = X < Y  =>  Set A to 1 if X < Y, else set A to 0
         A = X > Y  =>  Set A to 1 if X > Y, else set A to 0
         A = X = Y  =>  Set A to 1 if X = Y, else set A to 0, same as ==
         A = X == Y  =>  Set A to 1 if X = Y, else set A to 0
         A = X <= Y  =>  Set A to 1 if X <= Y, else set A to 0
         A = X != Y  =>  Set A to 1 if X not = Y, else set A to 0
         A = X <> Y  =>  Set A to 1 if X not = Y, else set A to 0, same as !=
         A = X >= Y  =>  Set A to 1 if X >= Y, else set A to 0
         A = X -- Y  =>  Set A to X * Repunit(Y), 3--5 = 33333, five threes
--------------------------------------------------------------------------------

                         The assignment operators are:

             =  =>  Set Top to Top (no-op)
             X =  =>  Bring X to top of list
             = Y  =>  Set Top to Y
             += Y  =>  Set Top to Top plus Y
             -= Y  =>  Set Top to Top minus Y
             *= Y  =>  Set Top to Top times Y
             /= Y  =>  Set Top to Top divided by Y
             %= Y  =>  Set Top to Mod(Top, Y) = Top Modulo Y
             X = Y  =>  Set X to Y
             X += Y  =>  Set X to X plus Y
             X -= Y  =>  Set X to X minus Y
             X *= Y  =>  Set X to X times Y
             X /= Y  =>  Set X to X divided by Y
             X %= Y  =>  Set X to Mod(X, Y) = X Modulo Y
--------------------------------------------------------------------------------

                         The procedures supported are:

               AllD(X) => Compute all divisors of X
           AllowFHT(X) => Set Allow FHT multiple on if X != 0, else off
        AutoDisplay(X) => Set Auto display on if X != 0, else off
               Base(X) => Set Input and Output base to X, [2, 36]
              BaseI(X) => Set Input base to X, [2, 36]
              BaseO(X) => Set Output base to X, [2, 36]
              BernM    => Returns the Max index of saved Bernoulli numbers
                Cat    => Returns Catalan's constant G = 0.91596,55941,77219...
              ChDir(F) => Change directory to F = "ccc...c", F optional
          ClearBern    => Clear storage of saved Bernoulli numbers
         ClearEuler    => Clear storage of saved Euler numbers
          ClearHist    => Clear history of previous operator entries
           ClearLog    => Clear the log file
               Diag(X) => Set diagnostic mode on or off, (X) is optional
                 Ee    => Returns e = Exp(1) = 2.71828,18284,59045...
             EulerC    => Euler's constant gamma = 0.57721,56649,01532...
             EulerM    => Returns the Max index of saved Euler numbers
               Exit    => Totally quit the program with no questions asked
           ForceFHT(X) => Set Force FHT multiple on if X != 0, else off
            GenBern(X) => Generate and save Bernoulli number upto B(X)
           GenEuler(X) => Generate and save Euler number upto E(X)
              HelpH(X) => Set Height of Help form in pixels
              HelpW(X) => Set Width of Help form in pixels
              HistH(X) => Set Height of History form in pixels
              HistW(X) => Set Width of History form in pixels
               Ln10    => Returns the natural log of 10 = 2.30258,50929,94045...
          LogScreen(X) => Log screen to log file mode, on or off
           LX => LT    => Restore LastTop to top of the list
               Next    => Move to next item on the list (no argument)
              Pause    => Pause the calculations to free the processor
                PFA(X) => Run prime factor algorithm A on X
                PFB(X) => Run prime factor algorithm B on X
                PFE(X) => Run prime factor algorithm ECM on X (fastest)
               PTab(X) => Write prime table to XICalcPTab.txt, X primes
                Phi    => Returns Golden Ratio = (1 + SqRt(5)) / 2 = 1.61803...
               PhiP    => Returns Phi prime = (1 - SqRt(5)) / 2 = -0.61803,39...
                 Pi    => Same as the P command, Returns Pi = 3.14159,26535,8...
               PiAa    => Compute x = Pi by Borwein algorithm a
               PiAb    => Compute x = Pi by Borwein algorithm b
              PiAGM    => Compute x = Pi by Schoenhage AGM algorithm
               PiCh    => Compute x = Pi by Chudnovsky binary splitting algo
               PiGL    => Compute x = Pi by Gauss-Legendre algorithm
                Pri(X) => Set the execution priority in the operating system
              Quiet(X) => Set the quiet mode on or off, (X) is optional
                Ran    => Randomly start a new random number sequence
              ReadN(F) => Read number from file, F = "ccc...c" optional
            Restore    => Restore Configuration, History, & List
                Run(F) => Run XPCalc code from file F, F is optional
               RunH(X) => Set Height of Run form in pixels
               RunW(X) => Set Width of Run form in pixels
               Save    => Save Configuration, History, & List
            SaveTop(X) => Set "save top value in LastTop" on or off
              ScieN(X) => Force scientific notation on iff X != 0
        ScientificN(X) => Force scientific notation on iff X != 0
               SetC(X) => Set max commands in history
               SetD(X) => Set max decimal digits in display
               SetM(X) => Set digits in Mantissa
             SetMax(X) => Set max decimal digits allowed in mantissa
               Time    => Set timing mode on without other diags
               Ubiq    => Returns the ubiquitous constant U = 0.84721,30847,9...
              Write(X) => Output X, (X may be "ccc...c", X is optional)
            WriteLn(X) => Write(X) and a line feed
             WriteN(F) => Write X to file F = "ccc...c", F is optional
              XPCIn(F) => Enter file name F = "ccc...c" for J command
             XPLOut(F) => Enter file name F = "ccc...c" for H command
              XPNIn(F) => Enter file name F = "ccc...c" for I command
             XPNOut(F) => Enter file name F = "ccc...c" for W command

Note: Top is the item currently on top of the named number list.
--------------------------------------------------------------------------------

                         The functions supported are:

                      Abs(X) = AbsoluteValue(X) = |X|
                     ACos(X) = ArcCoSine(X)
                    ACosh(X) = ArcHyperbolicCoSine(X)
                     ACot(X) = ArcCoTangent(X)
                    ACoth(X) = ArcHyperbolicCoTangent(X)
                     ACsc(X) = ArcCoSecant(X)
                    ACsch(X) = ArcHyperbolicCoSecant(X)
                     AFib(X) = ArcFibonacciNumber(|X|), an integer
                   AGM(X, Y) = Arithmetic Geometric Mean = MeanC(X, Y)
                     ASec(X) = ArcSecant(X)
                    ASech(X) = ArcHyperbolicSecant(X)
                     ASin(X) = ArcSin(X)
                    ASinh(X) = ArcHyperbolicSine(X)
                     ATan(X) = ArcTangent(X)
                 ATan2(Y, X) = ArcTangent(Y over X)
                    ATanh(X) = ArcHyperbolicTangent(X)
                     Bern(X) = Bernoulli number B(Int(X))
                    BernD(X) = Denominator of Bernoulli number B(Int(X))
                   BernDL(X) = Denominator of Large Bernoulli number B(Int(X))
                    BernG(X) = Generalized Bernoulli number B(X)
                    BernN(X) = Numerator of Bernoulli number B(Int(X))
                   BernNL(X) = Numerator of Large Bernoulli number B(Int(X))
                     Beta(X) = Dirichlet beta function
                 BetaC(X, Y) = The complete beta function
                    BetaL(X) = Dirichlet beta function for large |X|
                  Bino(X, Y) = Binomial coefficient (X, Y), generalized
                 BinoS(X, Y) = Binomial coefficient (X, Y) by standard method
                  Ceiling(X) = Least integer >= X
                  Chin(X, Y) = add to Chinese remainder problem z == X mod Y
                 Chin1(X, Y) = Initialize Chinese remainder with X1, Y1
                      Cos(X) = CoSine(X)
                     Cosh(X) = HyperbolicCoSine(X)
                      Cot(X) = CoTangent(X)
                     Coth(X) = HyperbolicCoTangent(X)
                      Csc(X) = CoSecant(X)
                     Csch(X) = HyperbolicCoSecant(X)
                     CuRt(X) = CubeRoot(X) = X^(1/3)
                   Dig(X, Y) = Number of base Y digits in X, Y >= 2
                     DigD(X) = Number of decimal digits in X
                    Dilog(X) = Dilogarithm(X)
                DivInt(X, Y) = Floor(X/Y), integer divide
                DivRem(X, Y) = Floor(X/Y) and set Re to remainder
                       E1(X) = Exponential integral function one
                       Ei(X) = Exponential integral Ei(x) = -E1(-x)
                      Erf(X) = Error function
                     ErfC(X) = Complementary error function
                      Eta(X) = Dirichlet eta function
                    Euler(X) = Euler number E(X)
                   EulerG(X) = Generalized Euler number E(X)
                   EulerL(X) = Generalized Euler number E(X) for large |X|
                   EulerN(X) = Numerator of E(X) = E(X)
                      Exp(X) = eToThePower(X)
                     ExpL(X) = eToThePower(X) - 1
                      Fac(X) = Factorial of Int(X)
                  Fac2(X, Y) = Fac(Int(X)) / Fac(Int(Y)) by binary splitting
                     FacM(X) = (Factorial of Int(X)) Mod FMB
                 FacM2(X, Y) = Fac(Int(X)) / Fac(Int(Y)) Mod FMB by binary split
                    FacMS(X) = (Factorial of X) Mod FMB by standard method
                     FacS(X) = Factorial of Int(X) by standard method
                      Fib(X) = FibonacciNumber(X), Fib(0) = 0
                    Floor(X) = Greatest integer <= X
                     Frac(X) = FractionalPart(X)
                      Gam(X) = GammaFunction(X) = (X-1)!
                     Gam1(X) = 16-digit GammaFunction(X)
                  GamL(A, X) = Lower incomplete gamma function
                  GamP(A, X) = lower regularized incomplete gamma function
                  GamQ(A, X) = Upper regularized incomplete gamma function
                  GamU(A, X) = Upper incomplete gamma function
                   GCD(X, Y) = Greatest Common Divisor X, Y
                  GCDe(X, Y) = Extended GCD(X, Y) = X*X1 + Y*Y1
                      Int(X) = IntegerPart(X)
                      Inv(X) = 1 / X
                   Inv(X, Y) = Z = Inverse of X Mod Y, X*Z == 1 Mod Y
                    IsFib(X) = 1 (True) if X is a Fibonacci number, else 0
                   IsFib2(X) = IsFib(X) by second method
                     IsSq(X) = 1 (True) if X is a square, else 0
                  Kron(X, Y) = Kronecker-Legendre symbol X over Y
                      Lam(X) = Dirichlet lambda function
                   LCM(X, Y) = Least Common Multiple X, Y
              Lerch(X, S, A) = LerchPhi(X, S, A), preferred method
             Lerch1(X, S, A) = 16-digit LerchPhi(X, S, A)
             Lerch2(X, S, A) = LerchPhi(X, S, A) by simple sum
             LerchT(X, S, A) = LerchPhiT(X, S, A), traditional
            LerchT1(X, S, A) = 16-digit LerchPhiT(X, S, A)
            LerchT2(X, S, A) = LerchPhiT(X, S, A) by simple sum
                       Li(X) = Logarithmic integral = Ei(Ln(X))
                       Ln(X) = NaturalLog(X)
                      LnL(X) = NaturalLog(X + 1)
                      Log(X) = LogBase10(X)
                      Lop(X) = ReducePrecision(X)
                   Mag(X, Y) = SqRt(Sq(X), Sq(Y))
                   Max(X, Y) = Greater of X and Y
                 MeanC(X, Y) = Common mean of X and Y = AGM(X, Y)
                      MEq(X) = Mersenne equation = 2^X - 1
                   Min(X, Y) = Lesser of X and Y
                   Mod(X, Y) = X - (Floor(X/Y) * Y)
                  Mord(A, N) = Multiplicative order of base A (mod N) or 0
                      MPG(X) = The X'th Mersenne Prime Generator, MPG(1) = 3
                      MPP(X) = Mersenne Prime Power, MPP(1) = 2
                   MPrime(X) = 1 (True) if 2^X - 1 is a Mersenne Prime else 0
                       Mu(X) = Moebius Mu(X) function
              NormC(X, M, S) = Normal Cumulative distribution function (cdf)
                    NormS(X) = Standard Normal Cumulative distribution function
                        P(X) = The X'th prime
                      PEq(X) = Perfect equation = (2^X - 1) * 2^(X-1)
                      PGT(X) = First prime > X
                      Phi(X) = Euler's totient function
                  PhiL(X, A) = Legendre's formula
                       Pi(X) = Number of primes <= X by sieve or Lehmer
                      PiL(X) = number of primes <= X by Lehmer's formula
                     PiL1(X) = number of primes <= X by Legendre's formula
                      PiM(X) = number of primes <= X by Meissel's formula
                      PLT(X) = Largest prime < X
                      PNG(X) = The X'th Perfect Number Generator, PNG(1) = 6
               Polylog(S, X) = Polylogarithm(S, X)
                   Pow(X, Y) = X to the Y
                  PowM(X, Y) = (X to the Y) Mod FMB
                    Prime(X) = 1 (True) if X is Prime else 0
                    Primo(X) = Primorial, product of all primes <= X
                    PrimR(X) = Largest and smallest primitive root of X or 0
                   PrimRP(X) = Largest and smallest prime primitive root of X
                PrimRQ(X, Y) = 1 (True) if X is a primitive root of Y, else 0
                      Psi(X) = DigammaFunction(X)
              QuadR(a, b, c) = Roots of a*x^2 + b*x + c = 0, sets X1 and X2
                      Rev(X) = Digit Reversal of X base 10
                   Rev(X, Y) = Digit Reversal of X base Y
                       Ri(X) = Riemann prime counting function
                  RInt(X, Y) = RandomInteger between Int(X) and Int(Y) inclusive
                       RN(X) = RandomNumber(X=Seed)
                    Round(X) = Integer nearest to X
                      Sec(X) = Secant(X)
                     Sech(X) = HyperbolicSecant(X)
                      Sig(X) = Sum of divisors of X
                     Sig0(X) = Sum of divisors of X (-X)
                     Sign(X) = 0 if X=0, else = X / |X|
                      Sin(X) = Sine(X)
                     Sinh(X) = HyperbolicSine(X)
              Solve(X, Y, N) = Solve for z, X * z == Y Mod N
                  Sord(A, N) = Multiplicative suborder of base A (mod N) or 0
                       Sq(X) = X Squared
                   SqFree(X) = 1 (True) if X is a squarefree, else 0
                     SqRt(X) = SquareRoot(X)
                  SqRtRem(X) = Floor(SquareRoot(X)) and set Re to remainder
                  SumD(X, Y) = Sum of base Y digits in X, Y >= 2
                    SumDD(X) = Sum of decimal digits in X
                      Tan(X) = Tangent(X)
                     Tanh(X) = HyperbolicTangent(X)
                      Tau(X) = Number of divisors of X
                    ToDeg(X) = RadiansToDegrees(X)
                    ToRad(X) = DegreesToRadians(X)
                     Zeta(X) = Riemann zeta function
                 ZetaH(S, A) = Hurwitz zeta function
                          -X = Negative of X, 0 - X
                          +X = Positive of X, 0 + X
                          !X = Not X, 0 -> 1 else 0

Note that the ' character can be used to separate the arguments in functions
since commas are allowed in numeric input, ", " works also.
--------------------------------------------------------------------------------

                    The constant identifiers supported are:

                Cat = Catalan's constant G = 0.91596,55941,77219...
                 Ee = Exp(1) = e = 2.71828,18284,59045...
             EulerC = Euler's constant gamma = -Psi(1) = 0.57721,56649,01532...
               Ln10 = The natural log of 10 = 2.30258,50929,94045...
                Phi = Golden Ratio = (1 + SqRt(5)) / 2 = 1.61803,39887,49894...
               PhiP = Phi prime = (1 - SqRt(5)) / 2 = -0.61803,39887,49894...
                 Pi = Archimedes' Constant Pi = 3.14159,26535,89793...
               Ubiq = The ubiquitous constant U = 0.84721,30847,93979...

Note that these constant identifiers can be used in equations.
If the constant is already on the list, the list item is used.
If it is not on the, it is generated and put on the list.
--------------------------------------------------------------------------------

            +------------Function Keys on Run form------------+
            |   F1  => Display Help form (?)                  |
            |   F2  => Totally Quit/end the program (Q)       |
            |   F3  => Restore previous input command         |
            |   F4  => Restore previous input and accept      |
            |   F5  => Get Status of calculation              |
            |   F6  => Display Configuration form             |
            |   F7  => Display Restore Input History form     |
            |   F8  => Accept input and Calculate             |
            |   F9  => Toggle Logging to Log file on/off (H)  |
            |   F11 => Clear output text box                  |
            |   F12 => Pause (Pause)                          |
            |   Ctrl+F2  => Restart ($)                       |
            |   Ctrl+F9  => Clear Log File (ClearLog)         |
            |   Ctrl+F11 => Clear input text box              |
            |   Ctrl+S   => Save All (Save)                   |
            |   Ctrl+O   => Restore All (Restore)             |
            |   ESC => Clear Run form Input Text Box          |
            |   ESC => Interrupt/Abort a long calculation     |
            |  PgUp => Display previous newer command         |
            |  PgDn => Display previous older command         |
            +-------------------------------------------------+
--------------------------------------------------------------------------------

                Commands used in XPCalc code files:

        If {expression} Then {statements} Else {statements}
        GoTo {label} (label is a name without a colon)
        GoUpTo {label}
        Labels: A name followed by a colon (:)
        Continuation lines ending with + or -
        Batch Commands (Echo, @Echo, Pause, and Rem)
        Echo On/Off
        @Echo On/Off
        Pause
        Rem ... or //... (for remarks)
--------------------------------------------------------------------------------

-Harry
