math procs

This page was created by the IDL library routine mk_html_help. For more information on this routine, refer to the IDL Online Help Navigator or type:

     ? mk_html_help

at the IDL command line prompt.

Last modified: Tue Dec 20 11:48:26 2005.


List of Routines


Routine Descriptions

BINOMIALDIST

[Next Routine] [List of Routines]
 NAME:
       binomialdist
     
 PURPOSE:
       Return the binomial distribution 
     
 CALLING SEQUENCE:
       RESULT = BINOMIALDIST(N)
     
 INPUTS:
       N : Number of Bernoulli trials to consider.

 OUTPUTS:
       Returns a vector containing the binomial distribution.

 RESTRICTIONS:
       N must be less than the value which makes N! larger than the
       largest usable floating point value on your machine!
       That's N < 151 on my machine, but will likely be different
       for you.

 PROCEDURES CALLED:
       FACTORIAL

 EXAMPLE:
       distribution = binomialdist(134)

 NOTES:
       The binomial distribution gives the probability distribution of 
       obtaining exactly i successes out of N Bernoulli trials (where the 
       result of each Bernoulli trial is true with probability p and false
       with probability q=1-p).

 MODIFICATION HISTORY:
   Written Tim Robishaw, Berkeley 01 Dec 2001.

(See /dzd2/heiles/idl/gen/math/binomialdist.pro)


ORDER

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
        ORDER
     
 PURPOSE:
        To return the order of magnitude of a number.
     
 CALLING SEQUENCE:
        result = ORDER(value)
     
 INPUTS:
        value : a number.
     
 OUTPUTS:
        Returns the order of magnitude of the input value.

 EXAMPLE:
        IDL> print, order(1.989d33)
                  33

 NOTES:
       The "order of magnitude" of a number is defined as the floor
       of the base-10 logarithm of that number.

 MODIFICATION HISTORY:
    21 Jun 2002  Written by Tim Robishaw, Berkeley

(See /dzd2/heiles/idl/gen/math/order.pro)


SIGN

[Previous Routine] [List of Routines]
 NAME:
       SIGN
   
 PURPOSE:
       Returns the sign of the input value(s).

 CALLING SEQUENCE:
       Result = SIGN(value)

 INPUTS:
       value : a number.

 KEYWORD PARAMETERS:
       None.

 OUTPUTS:
       Returns the sign of the input value(s).

 COMMON BLOCKS:
       None.

 EXAMPLE:
       IDL> print, sign([-3,0,3])
            -1.00000      0.00000      1.00000

 MODIFICATION HISTORY:
   10 Feb 2004  Written by Tim Robishaw, Berkeley

(See /dzd2/heiles/idl/gen/math/sign.pro)