Campbell CR800 Specifikace Strana 239

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 324
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 238
Section 8. Processing and Math Instructions
XOR Operator Example
The example sets the variable Msg based on the value of variables A, B, and C,
assuming that no variable is a Null. If A = 10, B = 8, and C = 11, the left
expression is True and the right expression is False. Because only one
comparison expression is True, the XOR expression evaluates True.
Dim A, B, C 'Declare variables.
A = 10: B = 8: C = 11 'Assign values.
If A > B XOR B > C Then 'Evaluate expressions.
Msg = True
Else
Msg = False.
End If
Derived Math Functions
The following is a list of nonintrinsic mathematical functions that can be
derived from the intrinsic math functions provided with CRBasic:
Function CRBasic equivalent
Secant Sec = 1 / Cos(X)
Cosecant Cosec = 1 / Sin(X)
Cotangent Cotan = 1 / Tan(X)
Inverse Secant Arcsec = Atn(X / Sqr(X * X - 1)) + Sgn(Sgn(X) -1) *
1.5708
Inverse Cosecant Arccosec = Atn(X/Sqr(X * X - 1)) + (Sgn(X) - 1) * 1.5708
Inverse Cotangent Arccotan = Atn(X) + 1.5708
Hyperbolic Secant HSec = 2 / (Exp(X) + Exp(-X))
Hyperbolic Cosecant HCosec = 2 / (Exp(X) - Exp(-X))
Hyperbolic Cotangent HCotan = (Exp(X) + Exp(-X)) / (Exp(X) - Exp(-X))
Inverse Hyperbolic Sine HArcsin = Log(X + Sqr(X * X + 1))
Inverse Hyperbolic Cosine HArccos = Log(X + Sqr(X * X - 1))
Inverse Hyperbolic Tangent HArctan = Log((1 + X) / (1 - X)) / 2
Inverse Hyperbolic Secant HArcsec = Log((Sqr(-X * X + 1) + 1) / X)
Inverse Hyperbolic Cosecant HArccosec = Log((Sgn(X) * Sqr(X * X + 1) +1) / X)
Inverse Hyperbolic Cotangent HArccotan = Log((X + 1) / (X - 1)) / 2
Logarithm LogN = Log(X) / Log(N)
8-37
Zobrazit stránku 238
1 2 ... 234 235 236 237 238 239 240 241 242 243 244 ... 323 324

Komentáře k této Příručce

Žádné komentáře