Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | File Exchange
ATOMS : Distfun details
Login with GitLab


Distribution functions
(0 downloads for this version - 111575 downloads for all versions)
A more recent valid version exists: 1.1.1
Michael Baudin
Owner Organization
INRIA and others
Michael BAUDIN
prateek papriwal
Creation Date
May 30, 2012
Source created on
No source archive has been provided for this toolbox version.
Binaries available on
This toolbox is in the process of being built
            The goal of this toolbox is to provide accurate distribution functions. 
The provided functions are designed to be compatible with Matlab.

The goals of this toolbox are the following.
 * All functions are tested with tables (actually, csv datasets).
   The tests includes accuracy tests, so that the accuracy 
   should be from 13 to 15 significant digits.
 * For each distribution, we have 
   * the probability distribution function (PDF)
   * the cumulated distribution function (CDF)
   * the inverse CDF
   * the random number generator
   * the statistics (mean and variance)
 * The CDF provides the upper and the lower tail of the 
   distribution, for accuracy reasons. 
 * The uniform random numbers are of high quality.
   The default is to use the Mersenne-Twister generator.   
 * Each function has a consistent help page.
   This removes confusions in the meaning 
   of the parameters and clarifies the differences 
   with other computing languages (e.g. R).
The design is similar to Matlab's distribution functions. 
A significant difference with Matlab's function is that both 
the upper and lower tails are available in "distfun", while 
Matlab only provides the lower tail. 
Hence, "distfun" should provide a better accuracy when 
probabilities close to 1 are computed (e.g. p=1 - 1.e-4). 

The differences with Scilab is that a consistent set of 
functions is provided. 
First, Scilab currently does not provide the PDFs. 
Users may write their own functions: this is not as easy as it 
seems, and may lead to very innaccurate results if floating point 
issues are ignored. 
Secondly, Scilab does not provide a consistent sets of functions: 
the CDF and the random number generators are provided in two 
different toolboxes, with no consistency. 

The difference with Stixbox is that the current function are 
tested, accurate, with consistent help pages.


 * distfun_betacdf — Beta CDF
 * distfun_betainv — Beta Inverse CDF
 * distfun_betapdf — Beta PDF
 * distfun_betarnd — Beta random numbers
 * distfun_betastat — Beta mean and variance
 * distfun_expcdf — Exponential CDF
 * distfun_expinv — Exponential Inverse CDF
 * distfun_exppdf — Exponential PDF
 * distfun_exprnd — Exponential random numbers
 * distfun_expstat — Exponential mean and variance
 * distfun_gamcdf — Gamma CDF
 * distfun_gaminv — Gamma Inverse CDF
 * distfun_gampdf — Gamma PDF
 * distfun_gamrnd — Gamma random numbers
 * distfun_gamstat — Gamma mean and variance
 * distfun_logncdf — Lognormal CDF
 * distfun_logninv — Lognormal Inverse CDF
 * distfun_lognpdf — Lognormal PDF
 * distfun_lognrnd — Lognormal random numbers
 * distfun_lognstat — LogNormal mean and variance
 * distfun_normcdf — Normal CDF
 * distfun_norminv — Normal Inverse CDF
 * distfun_normpdf — Normal PDF
 * distfun_normrnd — Normal random numbers
 * distfun_normstat — Normal mean and variance
 * distfun_unifcdf — Uniform CDF
 * distfun_unifinv — Uniform Inverse CDF
 * distfun_unifpdf — Uniform PDF
 * distfun_unifrnd — Uniform random numbers
 * distfun_unifstat — Uniform mean and variance

 * distfun_erfcinv — Inverse erfc function
 * distfun_getpath — Returns path of current module

Random Number Generator
 * rng_overview — An overview of the Random Number Generators of the Distfun
 * distfun_genget — Get the current random number generator
 * distfun_genset — Set the current random number generator
 * distfun_seedget — Get the current state of the current random number
 * distfun_seedset — Set the current state of the current random number
 * distfun_streamget — Get the current stream
 * distfun_streaminit — Initializes the current substream
 * distfun_streamset — Set the current stream
Files (0)
News (0)
Comments (4)     Leave a comment 
Comment from Michael BAUDIN -- May 30, 2012, 01:05:23 PM    
The version 0.3.2 fixes the compilation on Linux. This was reported as bug #11127 on
bugzilla :
Comment from Holger Nahrstaedt -- June 1, 2012, 09:19:24 AM    
Compilation on Linux works, but the toolbox cannot be loaded. 

There is a problem with d_int

link(libdistfuncdfgatewa_path + filesep() + '../../src/cdflib/libcdflib' +

../../src/cdflib/ undefined symbol: d_int
Comment from Michael BAUDIN -- June 4, 2012, 09:12:59 PM    

Thank you very much for reporting this bug. 

We are analysing it with Prateek Papriwal, the student working on this toolbox for GSOC 

Best regards,

Leave a comment
You must register and log in before leaving a comment.
Login with GitLab
Email notifications
Send me email when this toolbox has changes, new files or a new release.
You must register and log in before setting up notifications.