projects
/
pspp-builds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
17753a2
)
NPAR TESTS: Fix "NPAR TESTS BINOMIAL, P = 0.5; N1/N2 < 1" test failure.
author
Ben Pfaff
<blp@cs.stanford.edu>
Tue, 21 Dec 2010 08:00:25 +0000
(
00:00
-0800)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Tue, 21 Dec 2010 08:00:25 +0000
(
00:00
-0800)
src/language/stats/npar.c
patch
|
blob
|
history
diff --git
a/src/language/stats/npar.c
b/src/language/stats/npar.c
index 6adeca46cd0acd58a59dafd878f55bb16d6b3d72..73db1ad0b369fbe63889931220d1403d4f0ba97e 100644
(file)
--- a/
src/language/stats/npar.c
+++ b/
src/language/stats/npar.c
@@
-826,6
+826,7
@@
npar_binomial (struct lexer *lexer, struct dataset *ds,
struct binomial_test *btp = pool_alloc (specs->pool, sizeof (*btp));
struct one_sample_test *tp = &btp->parent;
struct npar_test *nt = &tp->parent;
struct binomial_test *btp = pool_alloc (specs->pool, sizeof (*btp));
struct one_sample_test *tp = &btp->parent;
struct npar_test *nt = &tp->parent;
+ bool equals;
nt->execute = binomial_execute;
nt->insert_variables = one_sample_insert_variables;
nt->execute = binomial_execute;
nt->insert_variables = one_sample_insert_variables;
@@
-836,6
+837,7
@@
npar_binomial (struct lexer *lexer, struct dataset *ds,
if ( lex_match (lexer, T_LPAREN) )
{
if ( lex_match (lexer, T_LPAREN) )
{
+ equals = false;
if ( lex_force_num (lexer) )
{
btp->p = lex_number (lexer);
if ( lex_force_num (lexer) )
{
btp->p = lex_number (lexer);
@@
-846,10
+848,9
@@
npar_binomial (struct lexer *lexer, struct dataset *ds,
return 0;
}
else
return 0;
}
else
- /* Kludge: q2c swallows the '=' so put it back here */
- lex_put_back (lexer, T_EQUALS);
+ equals = true;
- if (lex_match (lexer, T_EQUALS) )
+ if (
equals ||
lex_match (lexer, T_EQUALS) )
{
if (parse_variables_const_pool (lexer, specs->pool, dataset_dict (ds),
&tp->vars, &tp->n_vars,
{
if (parse_variables_const_pool (lexer, specs->pool, dataset_dict (ds),
&tp->vars, &tp->n_vars,