Calculator

 

Menu location: Tools > Calculator.

 

The StatsDirect calculator can be used both within StatsDirect and independently as a replacement for the Windows calculator. The calculator evaluates expressions in the form of simple arithmetic or more complex algebra.

 

Calculator opens only when selected from the Tools menu. It docks below the worksheet or report and can be resized by dragging its divider. Use Pop out to move it into a separate window and Dock to return it. Close hides it without leaving a tab; reopening it retains your expression, result and saved calculations for the current session. Help can remain open alongside Calculator.

Long expressions wrap in the input box, which scrolls vertically when needed. Press Enter or select Calculate to evaluate an expression. Use Shift+Enter to add a line break. Line breaks outside quoted text are treated as whitespace.

All calculations are performed in IEEE-754 double precision (64-bit).

 

Save evaluates the expression and adds it with its result to the saved list. Select an item and use Recall to restore it, or Insert to insert its expression at the caret in a new calculation. Remove removes the selected saved item. Copy result copies the current result; Copy saved copies all saved calculations to the clipboard.

 

While a parameter dialog is open, a visible calculator temporarily floats so you can still use it. It returns to your chosen presentation when the dialog closes. The standalone calculator, launched independently of the main application, offers to copy saved expressions and results to the clipboard when it closes.

 

 

Constants  
PI 3.14159265358979323846 (π)
EE 2.71828182845904523536 (e)
   
Arithmetic Functions  
ABS absolute value
CLOG common (base 10) logarithm
CEXP anti log (base 10)
EXP anti log (base e)
LOG natural (base e, Napieran) logarithm
LOGIT logit: log(p/(1-p)), p=proportion
ALOGIT antilogit: exp(l)/(1+exp(l)), l=logit
SQR or SQRT square root
! factorial (maximum 170.624)
LOG! log factorial
IZ normal deviate for a p value
UZ upper tail p for a normal deviate
LZ lower tail p for a normal deviate
TRUNC or FIX integer part of a real number
CINT real number rounded to nearest integer
INT real number rounded down to the nearest integer (e.g. -2.5 gives -3)

 

Please note that the largest factorial allowed is 170.624, but you can work with Log factorials via the LOG! function, e.g. LOG!(272).

 

Arithmetic Operators  
^ exponentiation (to the power of)
+ addition
- subtraction; in front of a value it is negation, e.g. -5, -PI, -(3+2), -LOG(2)
* multiplication
/ division
\ integer division

 

Calculations give an order of priority to arithmetic operators, this must be considered when entering expressions. For example, the result of the expression "6 - 3/2" is 4.5 and not 1.5 because division takes priority over subtraction.

 

Priority of arithmetic operators in descending order

  1. Factorial (!) and Exponentiation (^ or **): factorial first, so 2^3! is 2^6 = 64; a chain of powers is worked from left to right, so 2^3^2 is (2^3)^2 = 64
  2. Negation (-X): -2^2 is -(2^2) = -4 and -3! is -(3!) = -6; write (-2)^2 for 4. Exception = x^-y: a minus sign straight after ^ belongs to the exponent, i.e. 4^-2 is 4^(-2) = 0.0625. Formulas typed into worksheet cells follow the Excel convention instead, where =-2^2 is 4. Versions before 5 understood a minus sign only as part of a number, so they gave -2^2 = 4 and could not evaluate -PI or -(3+2)
  3. Multiplication, Division and Integer Division (*, /, \)
  4. Addition and Subtraction (+, -)

 

Trigonometric Functions  
ARCCOS arc cosine
ARCCOSH arc hyperbolic cosine
ARCCOT arc cotangent
ARCCOTH arc hyperbolic cotangent
ARCCSC arc cosecant
ARCCSCH arc hyperbolic cosecant
ARCTANH arc hyperbolic tangent
ARCSEC arc secant
ARCSECH arc hyperbolic secant
ARCSIN arc sine
ARCSINH arc hyperbolic sine
ARCTAN or ATAN arc tangent
COS cosine
COT cotangent
COTH hyperbolic cotangent
CSC cosecant
CSCH hyperbolic cosecant
SIN sine
SINH hyperbolic sine
SECH hyperbolic secant
SEC secant
TAN tangent
TANH hyperbolic tangent

 

To convert degrees to radians, multiply degrees by pi/180. To convert radians to degrees, multiply radians by 180/pi.

 

Logical Functions  
AND logical AND
NOT logical NOT
OR logical OR
< less than
= equal to
> greater than