Commit 256affb8 authored by Morten Welinder's avatar Morten Welinder
Browse files

Massive update for statistical functions.

Using code from "R" gives better precision and we avoid a lot of root-
finding loops, i.e., we get speed too.
parent 3e62f1f3
1999-05-25 Morten Welinder <terra@diku.dk>
* src/mathfunc.c, src/mathfunc.h: New files, mostly taken from the
R package. (It's a GPL'ed gold mine.)
* src/*.c: Use <math.h>, not "math.h".
* src/utils.c (random_normal): Use qnorm, not inv_phi.
* src/fn-stat.c: Move all R code to mathfunc.c
Change all uses to phi to pnorm.
(gnumeric_normsinv): Use qnorm.
(gnumeric_confidence): Use qnorm.
(normsinv): Superseded by qnorm.
(help_lognormdist): Fix.
(gnumeric_lognormdist): Fix domain.
(gnumeric_lognormdist): Use plnorm.
(gnumeric_loginv): Use qlnorm.
(gnumeric_norminv): Use qnorm.
(gnumeric_tinv): Use qt.
(gnumeric_fdist): Use qf.
(gnumeric_gammainv): Use qgamma.
(gnumeric_chiinv): Use qchisq.
* src/Makefile.am (GNUMERIC_BASE_SOURCES): Add mathfunc.c and
mathfunc.h.
1999-05-25 Morten Welinder <terra@diku.dk>
* src/fn-string.c (gnumeric_code): Handle compilers for which the
......
1999-05-25 Morten Welinder <terra@diku.dk>
* src/mathfunc.c, src/mathfunc.h: New files, mostly taken from the
R package. (It's a GPL'ed gold mine.)
* src/*.c: Use <math.h>, not "math.h".
* src/utils.c (random_normal): Use qnorm, not inv_phi.
* src/fn-stat.c: Move all R code to mathfunc.c
Change all uses to phi to pnorm.
(gnumeric_normsinv): Use qnorm.
(gnumeric_confidence): Use qnorm.
(normsinv): Superseded by qnorm.
(help_lognormdist): Fix.
(gnumeric_lognormdist): Fix domain.
(gnumeric_lognormdist): Use plnorm.
(gnumeric_loginv): Use qlnorm.
(gnumeric_norminv): Use qnorm.
(gnumeric_tinv): Use qt.
(gnumeric_fdist): Use qf.
(gnumeric_gammainv): Use qgamma.
(gnumeric_chiinv): Use qchisq.
* src/Makefile.am (GNUMERIC_BASE_SOURCES): Add mathfunc.c and
mathfunc.h.
1999-05-25 Morten Welinder <terra@diku.dk>
* src/fn-string.c (gnumeric_code): Handle compilers for which the
......
1999-05-25 Morten Welinder <terra@diku.dk>
* src/mathfunc.c, src/mathfunc.h: New files, mostly taken from the
R package. (It's a GPL'ed gold mine.)
* src/*.c: Use <math.h>, not "math.h".
* src/utils.c (random_normal): Use qnorm, not inv_phi.
* src/fn-stat.c: Move all R code to mathfunc.c
Change all uses to phi to pnorm.
(gnumeric_normsinv): Use qnorm.
(gnumeric_confidence): Use qnorm.
(normsinv): Superseded by qnorm.
(help_lognormdist): Fix.
(gnumeric_lognormdist): Fix domain.
(gnumeric_lognormdist): Use plnorm.
(gnumeric_loginv): Use qlnorm.
(gnumeric_norminv): Use qnorm.
(gnumeric_tinv): Use qt.
(gnumeric_fdist): Use qf.
(gnumeric_gammainv): Use qgamma.
(gnumeric_chiinv): Use qchisq.
* src/Makefile.am (GNUMERIC_BASE_SOURCES): Add mathfunc.c and
mathfunc.h.
1999-05-25 Morten Welinder <terra@diku.dk>
* src/fn-string.c (gnumeric_code): Handle compilers for which the
......
1999-05-25 Morten Welinder <terra@diku.dk>
* src/mathfunc.c, src/mathfunc.h: New files, mostly taken from the
R package. (It's a GPL'ed gold mine.)
* src/*.c: Use <math.h>, not "math.h".
* src/utils.c (random_normal): Use qnorm, not inv_phi.
* src/fn-stat.c: Move all R code to mathfunc.c
Change all uses to phi to pnorm.
(gnumeric_normsinv): Use qnorm.
(gnumeric_confidence): Use qnorm.
(normsinv): Superseded by qnorm.
(help_lognormdist): Fix.
(gnumeric_lognormdist): Fix domain.
(gnumeric_lognormdist): Use plnorm.
(gnumeric_loginv): Use qlnorm.
(gnumeric_norminv): Use qnorm.
(gnumeric_tinv): Use qt.
(gnumeric_fdist): Use qf.
(gnumeric_gammainv): Use qgamma.
(gnumeric_chiinv): Use qchisq.
* src/Makefile.am (GNUMERIC_BASE_SOURCES): Add mathfunc.c and
mathfunc.h.
1999-05-25 Morten Welinder <terra@diku.dk>
* src/fn-string.c (gnumeric_code): Handle compilers for which the
......
......@@ -6,7 +6,7 @@
*/
#include <config.h>
#include <gnome.h>
#include "math.h"
#include <math.h>
#include "gnumeric.h"
#include "gnumeric-sheet.h"
#include "utils.h"
......
......@@ -7,7 +7,7 @@
*/
#include <config.h>
#include <gnome.h>
#include "math.h"
#include <math.h>
#include "gnumeric.h"
#include "gnumeric-sheet.h"
#include "utils.h"
......
......@@ -8,7 +8,7 @@
#include <config.h>
#include <gnome.h>
#include <ctype.h>
#include "math.h"
#include <math.h>
#include "numbers.h"
#include "gnumeric.h"
#include "gnumeric-sheet.h"
......
......@@ -9,7 +9,7 @@
*/
#include <config.h>
#include <gnome.h>
#include "math.h"
#include <math.h>
#include "gnumeric.h"
#include "gnumeric-sheet.h"
#include "utils.h"
......
......@@ -8,7 +8,7 @@
#include <config.h>
#include <gnome.h>
#include <ctype.h>
#include "math.h"
#include <math.h>
#include "gnumeric.h"
#include "gnumeric-sheet.h"
#include "utils.h"
......
......@@ -7,7 +7,6 @@
*/
#include <config.h>
#include <gnome.h>
#include "math.h"
#include "gnumeric.h"
#include "gnumeric-sheet.h"
#include "utils.h"
......
......@@ -7,7 +7,7 @@
#include <config.h>
#include <gnome.h>
#include "math.h"
#include <math.h>
#include "numbers.h"
#include "gnumeric.h"
#include "gnumeric-sheet.h"
......
This diff is collapsed.
......@@ -8,7 +8,7 @@
#include <config.h>
#include <gnome.h>
#include <ctype.h>
#include "math.h"
#include <math.h>
#include "gnumeric.h"
#include "gnumeric-sheet.h"
#include "utils.h"
......
......@@ -105,6 +105,8 @@ GNUMERIC_BASE_SOURCES = \
item-grid.c \
item-grid.h \
main.h \
mathfunc.c \
mathfunc.h \
number-match.c \
number-match.h \
numbers.h \
......
......@@ -6,7 +6,7 @@
*/
#include <config.h>
#include <gnome.h>
#include "math.h"
#include <math.h>
#include "gnumeric.h"
#include "gnumeric-sheet.h"
#include "utils.h"
......
......@@ -7,7 +7,7 @@
*/
#include <config.h>
#include <gnome.h>
#include "math.h"
#include <math.h>
#include "gnumeric.h"
#include "gnumeric-sheet.h"
#include "utils.h"
......
......@@ -8,7 +8,7 @@
#include <config.h>
#include <gnome.h>
#include <ctype.h>
#include "math.h"
#include <math.h>
#include "numbers.h"
#include "gnumeric.h"
#include "gnumeric-sheet.h"
......
......@@ -9,7 +9,7 @@
*/
#include <config.h>
#include <gnome.h>
#include "math.h"
#include <math.h>
#include "gnumeric.h"
#include "gnumeric-sheet.h"
#include "utils.h"
......
......@@ -8,7 +8,7 @@
#include <config.h>
#include <gnome.h>
#include <ctype.h>
#include "math.h"
#include <math.h>
#include "gnumeric.h"
#include "gnumeric-sheet.h"
#include "utils.h"
......
......@@ -7,7 +7,6 @@
*/
#include <config.h>
#include <gnome.h>
#include "math.h"
#include "gnumeric.h"
#include "gnumeric-sheet.h"
#include "utils.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment