Hi,
complementing the previous mail:
1) Find enclosed an attachment with a test program. The problem arises for
mu>4e9, instead of 4e10 as pointed in previous mail.
2) Version of GSL used: 1.7
3) This problem has been tested with the following platforms:
-Solaris 8 on a SUNW,UltraSPARC-IIIi
gcc 2.95.2 (no options)
-Solaris 8 on a SUNW,UltraSPARC-IIIi
CC Solaris Forte Developer 7 C++ 5.4 (no options)
-GNU/Linux Debian 3.1 on a PIV
gcc 4.0.3 (no options)
-GNU/Linux Debian 3.1 on a PIV
Intel icc Version 9.0 (no options)
All of them showing the same problem
4) Aditionally, on linux platforms the test program hangs after mu =
4520353656.360241 using 100% of CPU without finishing.
Thank you in advance
Enrique
--
----------------------------------------------------------------
César Enrique García Dabó
Tf: (34) 922 315 361 Fax: (34) 922 315 032
e-mail: enrique.garcia at gtc dot iac do es
GRANTECAN
C/Vía Láctea s/n
38200 La Laguna (Sta. Cruz de Tenerife) SPAIN
----------------------------------------------------------------
----------
ADVERTENCIA: La informaci�n incluida en este e-mail es CONFIDENCIAL, siendo
para uso exclusivo del destinatario arriba mencionado. Si Usted lee este
mensaje y no es el destinatario indicado, le informamos que est� totalmente
prohibida cualquier utilizaci�n, divulgaci�n, distribuci�n y/o reproducci�n de
esta comunicaci�n sin autorizaci�n expresa en virtud de la legislaci�n vigente.
Si ha recibido este mensaje por error, le rogamos nos lo notifique
inmediatamente por esta misma v�a a GRAN TELESCOPIO DE CANARIAS, S.A. ([EMAIL
PROTECTED]) y proceda a su eliminaci�n.
DISCLAIMER: This message is intended exclusively for its addressee and may
contain information that is CONFIDENTIAL and protected by professional
privilege. If you are not the intended recipient you are hereby notified that
any dissemination, copy or disclosure of this communication is strictly
prohibited by law. If this message has been received in error, please
immediately notify us via e-mail to GRAN TELESCOPIO DE CANARIAS, S.A. ([EMAIL
PROTECTED]) and delete it.
#include <sys/time.h>
#include <math.h>
#include <gsl/gsl_randist.h>
int main(void)
{
int nMu = 30;
int nSim = 1000;
double minLogMu=8;
double maxLogMu=11;
unsigned long iSim,iMu;
double x,mu;
double xMean;
struct timeval tv;
//Set Random number generator
gsl_rng* rng;
rng = gsl_rng_alloc(gsl_rng_default);
gettimeofday(&tv,NULL);
gsl_rng_set(rng,tv.tv_usec);
for(iMu=0;iMu<nMu;iMu++)
{
mu=pow(10.,minLogMu + (maxLogMu - minLogMu) * iMu / (nMu - 1.));
xMean = 0;
for(iSim=0;iSim<nSim;iSim++)
{
xMean += gsl_ran_poisson(rng,mu);
}
xMean /= (double)nSim;
printf(" mu = %f Mean(x) = %f Ratio=%f\n",mu,xMean,xMean/mu);
}
}
_______________________________________________
Bug-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gsl