Re: [Rd] rmultinom.c error probability not sum to 1

2016-03-10 Thread M.van_Iterson
: r-devel@r-project.org Subject: Re: [Rd] rmultinom.c error probability not sum to 1 > On 10 Mar 2016, at 21:25 , m.van_iter...@lumc.nl wrote: > > Hi all, > > I should have given a better explanation of my problem. Here it is. > > I extracted from my code the bit that gives the e

Re: [Rd] rmultinom.c error probability not sum to 1

2016-03-10 Thread peter dalgaard
> Prob_tot: 1.017084 > Error: rbinom: probability sum should be 1, but is 0.948075 > > Maybe I miss some trivial C knowledge why this is not exactly one! > > Thanks in advance! > > Regards, > Maarten > ____________ > From: peter dalgaard [pda.

Re: [Rd] rmultinom.c error probability not sum to 1

2016-03-10 Thread Berend Hasselman
, but is 0.948075 > > Maybe I miss some trivial C knowledge why this is not exactly one! > > Thanks in advance! > > Regards, > Maarten > ____________ > From: peter dalgaard [pda...@gmail.com] > Sent: Thursday, March 10, 2016 1:26 PM > To: Iterson

Re: [Rd] rmultinom.c error probability not sum to 1

2016-03-10 Thread M.van_Iterson
_ From: peter dalgaard [pda...@gmail.com] Sent: Thursday, March 10, 2016 1:26 PM To: Iterson, M. van (MOLEPI) Cc: r-devel@r-project.org Subject: Re: [Rd] rmultinom.c error probability not sum to 1 On 10 Mar 2016, at 12:47 , m.van_iter...@lumc.nl wrote: > Dear a

Re: [Rd] rmultinom.c error probability not sum to 1

2016-03-10 Thread peter dalgaard
On 10 Mar 2016, at 12:47 , m.van_iter...@lumc.nl wrote: > Dear all, > > I have a questions regarding using the c function rmultinom.c. > > I got the following error message "rbinom: probability sum should be 1, but > is 0.999264" > > Which is thrown by: > > if(fabs((double)(p_tot - 1.)) > 1e

[Rd] rmultinom.c error probability not sum to 1

2016-03-10 Thread M.van_Iterson
Dear all, I have a questions regarding using the c function rmultinom.c. I got the following error message "rbinom: probability sum should be 1, but is 0.999264" Which is thrown by: if(fabs((double)(p_tot - 1.)) > 1e-7) MATHLIB_ERROR(_("rbinom: probability sum should be 1, but is %g"), (doub