bug-gsl
[Top][All Lists]

## RE: [Bug-gsl] bug with function gsl_ran_beta

 From: Wang, Frank Subject: RE: [Bug-gsl] bug with function gsl_ran_beta Date: Tue, 18 Nov 2008 18:59:54 -0400

```Hi Ralph,

Thank you very much for your quick response.

The problem is cuased by the truncation of double to unsiged int in the
function gsl_ran_gamma() in file gamma.c:

double
gsl_ran_gamma (const gsl_rng * r, const double a, const double b)
{
/* assume a > 0 */
unsigned int na = floor (a);

//Frank Wang add 11/18/2008 for fix bug when big a is inputed
if(a >= UINT_MAX )
return b*(gamma_large(r, floor(a)) + gamma_frac(r, a - floor(a)) );

if (a == na)
{
return b * gsl_ran_gamma_int (r, na);
}
else if (na == 0)
{
return b * gamma_frac (r, a);
}
else
{
return b * (gsl_ran_gamma_int (r, na) + gamma_frac (r, a - na)) ;
}
}

When this fix is applied, I get simulation compatible with R or Matlab.

Best Regards,

Frank

Sent: Tuesday, November 18, 2008 5:51 PM
To: Wang, Frank
Subject: Re: [Bug-gsl] bug with function gsl_ran_beta

Hi

I don't know what "exposedValue" variable is doing in your function
"Simulation" but if you comment it you are going to get the right sampled value
from the beta distribution (like R). The problem is not with the gsl_ran_beta.

void Simulation(double mean, double sd, double exposedValue, int size, bool
fixRandomSeed)
{
...

for(int kE = 0; kE < size; kE++)
{
double loss = 0;
if(sd > 1. && mean > 1.)
{
double x = gsl_ran_beta(r, betaAB.first, betaAB.second);
loss = x;  //* exposedValue;      // check this variable or
what it does
}
else
loss = mean;

cout << loss << "\n";
}
gsl_rng_free(r);
}

I hope that helps you.

Cheers
Ralph.
On Wed, Nov 19, 2008 at 2:08 AM, Wang, Frank

using gsl library:

When simulate in win32 I get:

beta1  464345  7.5026  5.9392  8300450000  329  1

464345
13.441800000000001
8300450000
1193280084.4218726
21329415807424.934
5498164443.7639704
5498111471.3260374
5498144966.7457933
5498107103.712388
5498097874.8369331
5497804839.1091223
5497962879.3275862
5498348140.7388935
5498310651.8006067
5498270628.820529
5498054322.7919359
5498114609.4608183
5498119109.7864475
5498159584.3738947
5498164700.2170744
5498086011.0154991
5498095680.8744516
5498006848.90833
5498070811.9395857
5498087417.6389866
5498026807.1669159
5498122445.9367285
5497952392.579668
5498106066.6511822
5498203756.786993
5498108846.2309923
5498048637.4160185
5498151840.4392099
5498191930.6450663
5497996830.5539083
5498051552.32374
5498060640.6092615
5497908399.5466995
5498119935.7092371
5498054853.0958071
5498098226.5945492
5498101849.9197855
5498154699.9752598
5497992952.4353313
5498057197.8844662
5498015676.8957071
5498104254.3332033
5497960503.8702707
5498091301.6851301
5498029113.6702051
5498116631.3597965
5498066298.9317265
5498147791.8874512
5498056680.7958651
5498007637.0482969
5498085947.1416807
5497977825.1033039
5498126344.0534906
5497943681.895689
5498163203.1894474
5497990924.5686588
5498078829.9846001
5498125133.7805986
5498126501.7405233
5498147393.4957542
5498181263.1347551
5498038604.6117105
5497974387.1937456
5498106367.9541016
5498043565.5655966
5497896470.6596165
5498154591.5600348
5498308920.7537546
5498012728.1607122
5498194171.7008448
5498083501.718545
5498023710.8567181
5497988464.5554075
5498122782.873313
5497946974.8896408
5498144160.6934872
5498086515.258625
5497955644.7909317
5498068356.5687408
5498192170.2630072
5498198662.2533474
5497997234.045969
5498118160.7723637
5498049511.2312117
5498000236.4571705
5498073273.3911152
5497990030.3130503
5498140238.7627163
5498102065.8602667
5498127414.6714096
5498018887.4798365
5498029817.9354734
5498024947.6399403
5498060491.0687075
5498036543.1245022
5498174801.9893436
5497970185.2885733
5498110399.3685369
5498014715.5597124
5498047981.7149143
5498075351.4674835
5498137763.5835609
5498012657.4867449
5497947453.3960915
5497977423.6984177
5497960772.4670792
5498003081.9502954
5497973383.6471834
5498098063.3361225
5498041744.9137144
5498027495.7109413
5498090673.1023769
5498064066.1248541
5498207924.9280634
5498081106.2818975
5497943072.4467802
5498096609.7475853
5498220642.5656404
5498167845.3062859
5498125813.8247986
5497907118.7000313
5498127255.3560286
5498078497.8242331
5497869517.6220646
5498149018.3140697
5498012425.0153332
5497964966.6998148
5498177432.7819319
5498149358.7511101
5498181275.5855932
5498133912.8475208
5498213364.5493383
5498147281.668663
5498045673.2753859
5497973269.6462851
5498128384.7655172
5498260148.0239506
5497939743.4531565
5497999339.0928097
5498050825.0487995
5498119519.2014999
5498088477.3913441
5498095064.3265705
5498139659.8860121
5498244114.8872099
5498040502.1340752
5498095597.5587158
5498011086.1352654
5498059340.1906481
5498092555.9781256
5498123444.9248943
5498052449.2462616
5498089697.6707745
5497958759.6879606
5497992120.6431217
5498063860.1185141
5498127023.1734629
5498060596.2904644
5497981513.5078459
5498163083.0468979
5498042076.3541222
5498082485.7807312
5498043278.61479
5498123446.6665344
5498207329.559803
5497995912.4189501
5497996498.5050859
5498014757.3182001
5498075627.0751314
5498120358.1212864
5497970627.6951084
5498147984.3777084
5498166787.4462795
5498193599.8504629
5498182687.5663986
5497861013.0707989
5498158480.4439173
5498110438.8790092
5498201090.8593006
5498264622.5608797
5498173024.1196814
5498112140.6525526
5498040723.6754856
5498115745.3500347
5498033331.2528534
5498049004.4010153
5498114146.7494688
5498037849.2854586
5498064702.8039684
5498175832.0131741
5497978269.4638681
5497998362.6134758
5498187772.6146908
5498134265.9656506
5498267691.469902
5497944127.2410154
5498141714.6558084
5498141734.5905113
5498186845.8831282
5498152748.2444315
5498188498.3360434
5498077873.9247913
5498156160.0596457
5498059453.475214
5497951975.8820724
5498221487.443614
5498006040.883852
5498135849.5156908
5498110508.1014805
5498131625.0616179
5498146040.9545536
5498136711.9506149
5498164027.6623802
5497961489.3518772
5498180427.1510458
5498083445.224781
5498085991.1830301
5498142367.998311
5498123635.6560469
5497952801.0104322
5498238527.6224566
5498141012.518425
5498202935.7893934
5498051646.9158745
5498141885.1992722
5498105244.8359718
5498116622.3068619
5498163957.22577
5497881195.1165304
5498019718.7447433
5498158908.0958662
5498136780.6597586
5498123731.5479383
5498232592.5290852
5498170683.9177113
5498051835.9580393
5497888851.2281361
5498099096.011858
5498096703.4391031
5498099429.8669672
5498151863.1491537
5498006890.3472662
5498135302.9372225
5498262404.2520418
5497863518.4468622
5498129427.0945177
5497996664.0504627
5497994931.6007643
5497993405.808074
5497940902.34867
5497909396.3238029
5498045308.1801805
5498078272.1381035
5497989578.7105417
5497965773.4691162
5498313142.6747904
5498097597.958499
5498117616.759222
5498205358.9119568
5497939837.900136
5498113794.3725138
5498264686.4694738
5498112085.5278597
5498064476.7472687
5497988974.0035009
5498166824.0080853
5498072465.1644983
5497971976.083745
5498182626.3397961
5497968838.078002
5498062527.3973646
5498015224.0198345
5498118132.1908493
5498173673.243865
5498080603.7031746
5498112548.5317183
5497924624.4215937
5498013134.9718237
5498052228.1909838
5498108097.5465593
5498200935.1551161
5498097039.0748205
5498141636.5519476
5498138070.0584383
5498033902.5371656
5497909684.6499567
5497944203.7811089
5498055763.8821669
5498081675.5630207
5498077505.0113058
5497984575.5704041
5498065354.3164215
5497998015.6075115
5498183812.9243345
5498122377.7300406
5498085693.4464445
5498229079.9141474
5498107982.0801353
5498020094.8201342
5497992283.0903406
5498067280.6769161
5497984606.9435024
5498083686.9770784
5497962845.7865629
5497961744.3907318
5498093358.5380831
5498290730.2210369
5498078046.4653006
5498177811.6326399
5497976971.8353605
5498027229.393693
5497938058.3481283
5497908081.5252886
5498069473.4896698
5497935989.9066238
5497984623.4586678
5498116151.2639284
5498070449.9178791
5497987349.2325277
5498113221.978857
5498194808.5422373
5497890153.4793119
5497990584.7269793
5498176001.1739864
5498108435.381794
5497987037.386673
5498071774.6048336
5497979285.9371147
5498121885.1890821

where beta1 is from beta1.cc:

#include <gsl/gsl_randist.h>
#include <ctime>
#include <iostream>
#include <iomanip>
#include <cmath>//for sqrt fabs

using namespace std;
void Simulation(double mean, double sd, double exposedValue, int size, bool
fixRandomSeed);
pair<double, double> calculate_betaAB(double& _meanLoss, double& _sd, double&
_exposedValue);

int main(int argc, char* argv[])
{
if(argc < 5)
{
cout << "proper usage: " << argv[0] << " <mean>, <sdc>, <sdi>,
<exposedValue>, <size>, <fixRandomSeed>" << endl;
exit(-1);
}
double mean=atof(argv[1]);
double sd=atof(argv[2])+atof(argv[3]);
double exposedValue=atof(argv[4]);
int size=(argc>5) ? atoi(argv[5]) : 1;
int fixRandomSeed=(argc>6) ? atoi(argv[6]) : 0;//default not fixed
cout << setprecision (17);

Simulation(mean, sd, exposedValue, size, fixRandomSeed);
}

void Simulation(double mean, double sd, double exposedValue, int size, bool
fixRandomSeed)
{
// initialize GSL simulator
gsl_rng * r = NULL;
gsl_rng_env_setup();
r = gsl_rng_alloc(gsl_rng_default);
// if fixRandomSeed, same numbers simulated every time
if(! fixRandomSeed) gsl_rng_set(r, time(NULL));

pair<double, double> betaAB = calculate_betaAB(mean, sd, exposedValue);
cout << mean << "\n";
cout << sd << "\n";
cout << exposedValue << "\n";
cout << betaAB.first << "\n";
cout << betaAB.second << "\n";

for(int kE = 0; kE < size; kE++)
{
double loss = 0;
if(sd > 1. && mean > 1.)
{
double x = gsl_ran_beta(r, betaAB.first, betaAB.second);
loss = x * exposedValue;
}
else
loss = mean;

cout << loss << "\n";
}
gsl_rng_free(r);
}

pair<double, double> calculate_betaAB(double& _meanLoss, double& _sd, double&
_exposedValue)
{
double  _betaA=0.,  _betaB=0.;

if(_meanLoss < 1e-3 || _exposedValue < 1e-3)
{
_meanLoss = 0;
_exposedValue = 0;
_sd = 0;
return pair<double, double>(_betaA, _betaB);
}

if(fabs(_meanLoss/_exposedValue-1.) < 1e-6)
{
_meanLoss = _exposedValue * (1. - 1e-6);
}

double
meanN = _meanLoss/_exposedValue,
sdN = _sd/_exposedValue,
tao = meanN*(1-meanN)/(sdN*sdN) - 1;

_betaA = meanN*tao;
_betaB = (1-meanN)*tao;

double betaMin = 0, reductionFactor = .99;
while(_betaA < betaMin || _betaB < betaMin)
{
_sd *= reductionFactor;
sdN = _sd/_exposedValue;
tao = meanN*(1-meanN)/(sdN*sdN) - 1;
_betaA = meanN*tao;
_betaB = (1-meanN)*tao;

}
return pair<double, double>(_betaA, _betaB);
}

But if simulate using R, we get different result:
> rbeta(329, 1193280084.4218726, 21329415807424.934)
[1] 5.594445e-05 5.594277e-05 5.594354e-05 5.594050e-05 5.594074e-05
[6] 5.594426e-05 5.594026e-05 5.594201e-05 5.594110e-05 5.594346e-05
[11] 5.594403e-05 5.594535e-05 5.594419e-05 5.594407e-05 5.594161e-05
[16] 5.594294e-05 5.594217e-05 5.593945e-05 5.593883e-05 5.594225e-05
[21] 5.594243e-05 5.594571e-05 5.593928e-05 5.594388e-05 5.594312e-05
[26] 5.594367e-05 5.594108e-05 5.594201e-05 5.594463e-05 5.594263e-05
[31] 5.594289e-05 5.594433e-05 5.594028e-05 5.594110e-05 5.594119e-05
[36] 5.594300e-05 5.594299e-05 5.594561e-05 5.594345e-05 5.594257e-05
[41] 5.594158e-05 5.594366e-05 5.594335e-05 5.594219e-05 5.594365e-05
[46] 5.594101e-05 5.593933e-05 5.594015e-05 5.594319e-05 5.594238e-05
[51] 5.594186e-05 5.594386e-05 5.594119e-05 5.594130e-05 5.594050e-05
[56] 5.594102e-05 5.594232e-05 5.594113e-05 5.594193e-05 5.594267e-05
[61] 5.594136e-05 5.593963e-05 5.593794e-05 5.594142e-05 5.594095e-05
[66] 5.594115e-05 5.594217e-05 5.593979e-05 5.594480e-05 5.594138e-05
[71] 5.594285e-05 5.594130e-05 5.593942e-05 5.594182e-05 5.594318e-05
[76] 5.593919e-05 5.593988e-05 5.594188e-05 5.594290e-05 5.594239e-05
[81] 5.594066e-05 5.594294e-05 5.594135e-05 5.594201e-05 5.594177e-05
[86] 5.594377e-05 5.594021e-05 5.594274e-05 5.593951e-05 5.594261e-05
[91] 5.594487e-05 5.594258e-05 5.594133e-05 5.594065e-05 5.594237e-05
[96] 5.593873e-05 5.594128e-05 5.594353e-05 5.594223e-05 5.594369e-05
[101] 5.594228e-05 5.594388e-05 5.594116e-05 5.594293e-05 5.594146e-05
[106] 5.594222e-05 5.594292e-05 5.594440e-05 5.594108e-05 5.594313e-05
[111] 5.594474e-05 5.593997e-05 5.594203e-05 5.594301e-05 5.594165e-05
[116] 5.594212e-05 5.594359e-05 5.594142e-05 5.594114e-05 5.594120e-05
[121] 5.594227e-05 5.594267e-05 5.594197e-05 5.594538e-05 5.594057e-05
[126] 5.594154e-05 5.594435e-05 5.594001e-05 5.594156e-05 5.594275e-05
[131] 5.594251e-05 5.594130e-05 5.594472e-05 5.594372e-05 5.594260e-05
[136] 5.594267e-05 5.593690e-05 5.594505e-05 5.594006e-05 5.594287e-05
[141] 5.594439e-05 5.594246e-05 5.594435e-05 5.594239e-05 5.594062e-05
[146] 5.594252e-05 5.594419e-05 5.594113e-05 5.593961e-05 5.594040e-05
[151] 5.593999e-05 5.594146e-05 5.593852e-05 5.593921e-05 5.594168e-05
[156] 5.593964e-05 5.594289e-05 5.594339e-05 5.593856e-05 5.594197e-05
[161] 5.594156e-05 5.594319e-05 5.594095e-05 5.594196e-05 5.594132e-05
[166] 5.594177e-05 5.594375e-05 5.594045e-05 5.594368e-05 5.594328e-05
[171] 5.594123e-05 5.594327e-05 5.594481e-05 5.594258e-05 5.594224e-05
[176] 5.594217e-05 5.594470e-05 5.594100e-05 5.594050e-05 5.594392e-05
[181] 5.594286e-05 5.594098e-05 5.594224e-05 5.594150e-05 5.594235e-05
[186] 5.594088e-05 5.594233e-05 5.594305e-05 5.594176e-05 5.594239e-05
[191] 5.594128e-05 5.594219e-05 5.594513e-05 5.594214e-05 5.594238e-05
[196] 5.594378e-05 5.594185e-05 5.594144e-05 5.594140e-05 5.594242e-05
[201] 5.594088e-05 5.594103e-05 5.594178e-05 5.594487e-05 5.594353e-05
[206] 5.594087e-05 5.594305e-05 5.594160e-05 5.594033e-05 5.594344e-05
[211] 5.594156e-05 5.594271e-05 5.594007e-05 5.594266e-05 5.594269e-05
[216] 5.594166e-05 5.594239e-05 5.594109e-05 5.594187e-05 5.594226e-05
[221] 5.594193e-05 5.594232e-05 5.594003e-05 5.593911e-05 5.594184e-05
[226] 5.593988e-05 5.594104e-05 5.594009e-05 5.594232e-05 5.594231e-05
[231] 5.594228e-05 5.594038e-05 5.593935e-05 5.594128e-05 5.594143e-05
[236] 5.594116e-05 5.594042e-05 5.594234e-05 5.594281e-05 5.594365e-05
[241] 5.594301e-05 5.594025e-05 5.594347e-05 5.594235e-05 5.594177e-05
[246] 5.594063e-05 5.594187e-05 5.594398e-05 5.594265e-05 5.594255e-05
[251] 5.594352e-05 5.594207e-05 5.594279e-05 5.594230e-05 5.593914e-05
[256] 5.594071e-05 5.594485e-05 5.594489e-05 5.594354e-05 5.594184e-05
[261] 5.594363e-05 5.594086e-05 5.594353e-05 5.594287e-05 5.594258e-05
[266] 5.594421e-05 5.594278e-05 5.594275e-05 5.594548e-05 5.594268e-05
[271] 5.594029e-05 5.594222e-05 5.594243e-05 5.594377e-05 5.594353e-05
[276] 5.594323e-05 5.593824e-05 5.594059e-05 5.594146e-05 5.594592e-05
[281] 5.594266e-05 5.594038e-05 5.594052e-05 5.594303e-05 5.594231e-05
[286] 5.594155e-05 5.594306e-05 5.594096e-05 5.594184e-05 5.594487e-05
[291] 5.594224e-05 5.594317e-05 5.594265e-05 5.594409e-05 5.594360e-05
[296] 5.594264e-05 5.594013e-05 5.594477e-05 5.594184e-05 5.594099e-05
[301] 5.594113e-05 5.594177e-05 5.594521e-05 5.594329e-05 5.594008e-05
[306] 5.594067e-05 5.594113e-05 5.594378e-05 5.594422e-05 5.594210e-05
[311] 5.594377e-05 5.594098e-05 5.594304e-05 5.594554e-05 5.594239e-05
[316] 5.594028e-05 5.594354e-05 5.594524e-05 5.594026e-05 5.594232e-05
[321] 5.594202e-05 5.594115e-05 5.594259e-05 5.594282e-05 5.594354e-05
[326] 5.594104e-05 5.594483e-05 5.593957e-05 5.594359e-05
> rbeta(329, 1193280084.4218726, 21329415807424.934)*8300450000
[1] 464335.3 464325.8 464334.7 464343.6 464356.6 464349.4 464352.2 464366.4
[9] 464347.9 464335.8 464351.7 464357.4 464353.4 464359.0 464329.7 464360.9
[17] 464345.1 464358.6 464362.3 464337.5 464344.7 464334.8 464341.1 464351.5
[25] 464341.7 464336.1 464332.2 464328.4 464329.8 464334.5 464346.7 464357.9
[33] 464356.3 464324.9 464360.3 464350.0 464378.2 464354.1 464333.5 464352.7
[41] 464336.5 464354.8 464339.7 464346.1 464322.0 464345.9 464337.1 464324.2
[49] 464374.6 464334.4 464328.4 464352.0 464325.3 464344.7 464331.0 464335.8
[57] 464340.4 464332.1 464337.6 464345.9 464349.5 464373.0 464349.1 464377.2
[65] 464333.2 464354.3 464353.0 464353.9 464331.7 464336.2 464335.5 464325.5
[73] 464342.0 464348.8 464361.2 464334.0 464341.3 464340.6 464344.2 464356.5
[81] 464327.7 464346.6 464333.9 464371.8 464373.8 464352.4 464340.9 464349.6
[89] 464330.6 464361.3 464338.6 464349.9 464350.7 464344.8 464350.5 464344.5
[97] 464354.2 464344.8 464331.7 464335.6 464345.9 464348.4 464359.9 464345.7
[105] 464346.7 464328.6 464335.8 464333.8 464348.9 464359.7 464356.4 464342.5
[113] 464334.4 464364.1 464339.4 464360.3 464358.8 464323.2 464328.9 464353.9
[121] 464337.9 464332.3 464357.3 464354.3 464339.3 464337.4 464341.7 464328.3
[129] 464344.7 464340.1 464342.0 464328.1 464347.7 464336.8 464341.7 464320.6
[137] 464345.2 464357.3 464343.7 464344.4 464328.6 464346.4 464349.1 464353.1
[145] 464348.3 464328.3 464344.3 464342.1 464322.6 464340.8 464334.5 464353.9
[153] 464327.1 464337.5 464359.0 464352.7 464341.3 464347.6 464321.7 464337.0
[161] 464357.5 464343.1 464346.5 464346.0 464324.6 464324.2 464334.9 464340.2
[169] 464342.2 464333.0 464340.5 464355.9 464338.5 464360.2 464350.4 464348.8
[177] 464343.5 464339.9 464365.6 464369.5 464345.2 464333.2 464357.5 464364.4
[185] 464341.6 464341.9 464325.2 464344.8 464353.3 464337.4 464338.2 464360.2
[193] 464342.1 464349.2 464352.6 464354.2 464329.7 464350.8 464336.9 464348.7
[201] 464347.1 464324.3 464336.6 464334.8 464350.6 464358.3 464338.0 464338.6
[209] 464363.5 464343.2 464364.0 464364.7 464363.9 464360.6 464343.0 464342.7
[217] 464330.9 464325.1 464331.3 464329.9 464330.2 464357.4 464364.1 464359.3
[225] 464340.9 464365.6 464370.5 464354.5 464332.6 464334.5 464322.5 464354.4
[233] 464347.8 464349.8 464355.4 464330.1 464337.1 464328.7 464341.6 464347.7
[241] 464361.8 464365.6 464347.5 464342.6 464332.0 464340.8 464346.1 464336.2
[249] 464322.9 464334.9 464336.7 464366.6 464329.9 464360.3 464340.2 464349.6
[257] 464343.3 464363.2 464355.8 464337.8 464332.0 464318.7 464360.0 464354.3
[265] 464341.2 464344.3 464359.4 464362.8 464345.2 464353.1 464337.3 464356.3
[273] 464358.4 464338.9 464336.1 464342.5 464328.9 464326.8 464360.2 464339.9
[281] 464337.7 464353.6 464358.2 464349.9 464330.0 464357.4 464340.2 464348.8
[289] 464338.7 464349.3 464348.0 464328.9 464342.9 464341.8 464342.8 464347.4
[297] 464337.3 464339.2 464356.8 464365.3 464334.8 464335.5 464342.4 464337.4
[305] 464354.0 464342.4 464325.5 464340.6 464341.8 464351.3 464358.3 464347.3
[313] 464360.5 464360.7 464345.0 464364.6 464335.3 464359.2 464334.0 464323.4
[321] 464351.7 464343.8 464344.8 464348.9 464342.2 464352.9 464326.6 464331.2
[329] 464339.1
>

And the simulation in matlab is compatible with R but not gsl:
>> betarnd(1193280084.4218726, 21329415807424.934, 1, 329)

ans =

Columns 1 through 3

5.594116976517125e-005    5.594307509432876e-005    5.594070890122974e-005

Columns 4 through 6

5.594177332334754e-005    5.594144151553507e-005    5.594089053261321e-005

Columns 7 through 9

5.594030500205040e-005    5.594370275773622e-005    5.594213745341622e-005

Columns 10 through 12

5.594508351092454e-005    5.594269314195854e-005    5.594260866676804e-005

Columns 13 through 15

5.594451999240399e-005    5.594245963180348e-005    5.594305400875034e-005

Columns 16 through 18

5.594185433681699e-005    5.594072859438816e-005    5.594141031579324e-005

Columns 19 through 21

5.594228230021101e-005    5.594157297423446e-005    5.594146386826913e-005

Columns 22 through 24

5.594506058785692e-005    5.594329221525053e-005    5.594161379926234e-005

Columns 25 through 27

5.593958791539053e-005    5.594194047656521e-005    5.594408676813533e-005

Columns 28 through 30

5.594399083014427e-005    5.594122318673591e-005    5.594384986057607e-005

Columns 31 through 33

5.594234346127621e-005    5.594139477283736e-005    5.594293705011108e-005

Columns 34 through 36

5.594073086240927e-005    5.594230409215802e-005    5.594249441789473e-005

Columns 37 through 39

5.594553075221999e-005    5.594291187142863e-005    5.594105668859674e-005

Columns 40 through 42

5.594474433223231e-005    5.594074329107559e-005    5.594010078897129e-005

Columns 43 through 45

5.594440796414004e-005    5.594173916568297e-005    5.593968250297051e-005

Columns 46 through 48

5.594292458988601e-005    5.594175710458801e-005    5.594374032079844e-005

Columns 49 through 51

5.594354261165516e-005    5.594241347608163e-005    5.594378642817889e-005

Columns 52 through 54

5.594226333778176e-005    5.594154349143463e-005    5.594481529631574e-005

Columns 55 through 57

5.593979170178477e-005    5.594239162531335e-005    5.594259214731444e-005

Columns 58 through 60

5.594215536371488e-005    5.594321473593332e-005    5.594244544837260e-005

Columns 61 through 63

5.594155859466059e-005    5.593905054251839e-005    5.594245391668895e-005

Columns 64 through 66

5.594260396480363e-005    5.594319179026371e-005    5.594453284025467e-005

Columns 67 through 69

5.594068430005155e-005    5.594178843671324e-005    5.594245629130760e-005

Columns 70 through 72

5.594398474523334e-005    5.594106841321869e-005    5.594030015682613e-005

Columns 73 through 75

5.594333663766317e-005    5.594138443570487e-005    5.594397516473450e-005

Columns 76 through 78

5.594281600191298e-005    5.594075978985455e-005    5.594320400046854e-005

Columns 79 through 81

5.594138105917462e-005    5.594210639826208e-005    5.594058408505395e-005

Columns 82 through 84

5.594266783717796e-005    5.594206713640681e-005    5.594081825097903e-005

Columns 85 through 87

5.594213730886654e-005    5.594008901435652e-005    5.594189873018662e-005

Columns 88 through 90

5.594169509798270e-005    5.594136866381966e-005    5.594222549493435e-005

Columns 91 through 93

5.594064246729882e-005    5.593985770431319e-005    5.594122029901508e-005

Columns 94 through 96

5.594030451695832e-005    5.593945892646234e-005    5.594104332297637e-005

Columns 97 through 99

5.594241219867560e-005    5.593866245759906e-005    5.594097500386313e-005

Columns 100 through 102

5.594100509324315e-005    5.594400885590403e-005    5.593993830691756e-005

Columns 103 through 105

5.594176152143722e-005    5.594137037119920e-005    5.594196226574183e-005

Columns 106 through 108

5.593960013535379e-005    5.594621560343711e-005    5.594524577113060e-005

Columns 109 through 111

5.594258634026199e-005    5.594454537456687e-005    5.594362505350935e-005

Columns 112 through 114

5.594260321811156e-005    5.594271728515317e-005    5.594246637209145e-005

Columns 115 through 117

5.594098611836930e-005    5.594395758665778e-005    5.594355038726018e-005

Columns 118 through 120

5.594167220418465e-005    5.594275405866850e-005    5.594351847165871e-005

Columns 121 through 123

5.594495544372725e-005    5.594246115312925e-005    5.593923513945442e-005

Columns 124 through 126

5.594220682809798e-005    5.594391995351501e-005    5.594103179856737e-005

Columns 127 through 129

5.594240692054585e-005    5.594033265664693e-005    5.593920593543774e-005

Columns 130 through 132

5.594091578374392e-005    5.594182037546823e-005    5.593912629764593e-005

Columns 133 through 135

5.594149051810737e-005    5.594209611650324e-005    5.594545000733681e-005

Columns 136 through 138

5.594333543639773e-005    5.594149643630383e-005    5.593925544144164e-005

Columns 139 through 141

5.594321675311616e-005    5.594073960402282e-005    5.594057406079971e-005

Columns 142 through 144

5.594202908874395e-005    5.594091291722255e-005    5.594409765156205e-005

Columns 145 through 147

5.594211773076534e-005    5.594087586154840e-005    5.594363919983146e-005

Columns 148 through 150

5.594288490319442e-005    5.594473536677860e-005    5.594132183935755e-005

Columns 151 through 153

5.594263058202289e-005    5.594156873402826e-005    5.594489702331298e-005

Columns 154 through 156

5.594201320139460e-005    5.594240815296570e-005    5.594431162664804e-005

Columns 157 through 159

5.594295817210537e-005    5.594052615021553e-005    5.594047891681678e-005

Columns 160 through 162

5.594290645156473e-005    5.594163180689243e-005    5.594100397206000e-005

Columns 163 through 165

5.594083594230064e-005    5.594114818501491e-005    5.594208432218143e-005

Columns 166 through 168

5.594247814370323e-005    5.593967970475020e-005    5.594241362400399e-005

Columns 169 through 171

5.594082099691715e-005    5.593903507706743e-005    5.594149550480690e-005

Columns 172 through 174

5.594269428721707e-005    5.594346864349968e-005    5.594146089639748e-005

Columns 175 through 177

5.594368382047081e-005    5.594133611976175e-005    5.594147665613353e-005

Columns 178 through 180

5.594134977890160e-005    5.593953989915858e-005    5.594056565582853e-005

Columns 181 through 183

5.594188226933005e-005    5.594145969881027e-005    5.594339960737660e-005

Columns 184 through 186

5.594190904741590e-005    5.594286669580462e-005    5.594271515720490e-005

Columns 187 through 189

5.594146631883104e-005    5.594141108731878e-005    5.594057223278254e-005

Columns 190 through 192

5.594104770031066e-005    5.594221862833955e-005    5.594243597662458e-005

Columns 193 through 195

5.593941991444301e-005    5.594119877973989e-005    5.594112296741930e-005

Columns 196 through 198

5.594175570142940e-005    5.593824596957060e-005    5.594293119963867e-005

Columns 199 through 201

5.593969727673485e-005    5.593896272165682e-005    5.594330218284805e-005

Columns 202 through 204

5.594113686773274e-005    5.594264265140797e-005    5.594168352597651e-005

Columns 205 through 207

5.594346190079130e-005    5.594073495881464e-005    5.594006975886668e-005

Columns 208 through 210

5.594309873095819e-005    5.594220825072766e-005    5.594110137742228e-005

Columns 211 through 213

5.594248140008957e-005    5.594301367194254e-005    5.594254802363307e-005

Columns 214 through 216

5.594016293014028e-005    5.594001486993711e-005    5.594058293821071e-005

Columns 217 through 219

5.594256500910926e-005    5.594109425016141e-005    5.594289308331455e-005

Columns 220 through 222

5.594229249482568e-005    5.594163003832667e-005    5.594401442994122e-005

Columns 223 through 225

5.594384939608320e-005    5.594289037614979e-005    5.594203252874224e-005

Columns 226 through 228

5.594411711264699e-005    5.594121514640738e-005    5.593922191404365e-005

Columns 229 through 231

5.594277295951864e-005    5.594138843500717e-005    5.594299490048719e-005

Columns 232 through 234

5.594071626249620e-005    5.594125677616457e-005    5.594253401237773e-005

Columns 235 through 237

5.594252203194769e-005    5.594115318828081e-005    5.594213417931235e-005

Columns 238 through 240

5.594259326990705e-005    5.594481403040698e-005    5.593983125341854e-005

Columns 241 through 243

5.593917122026502e-005    5.594233464653753e-005    5.594271942127088e-005

Columns 244 through 246

5.594232442625555e-005    5.594113433884619e-005    5.594128324085816e-005

Columns 247 through 249

5.593929364343796e-005    5.594388967258510e-005    5.594324040873973e-005

Columns 250 through 252

5.594270581799822e-005    5.594190054410396e-005    5.594387425711262e-005

Columns 253 through 255

5.594083541261257e-005    5.594353015155433e-005    5.594430442956734e-005

Columns 256 through 258

5.594710087408985e-005    5.594119594638482e-005    5.594205477029677e-005

Columns 259 through 261

5.594314970488333e-005    5.594283431775281e-005    5.594498307742395e-005

Columns 262 through 264

5.593898261291080e-005    5.594334618912552e-005    5.594366627060224e-005

Columns 265 through 267

5.594518553487815e-005    5.594423467947670e-005    5.594061683737755e-005

Columns 268 through 270

5.594088856361101e-005    5.594068730231142e-005    5.594244387741737e-005

Columns 271 through 273

5.594148313145216e-005    5.594137933092187e-005    5.593862135746419e-005

Columns 274 through 276

5.594299286679637e-005    5.594403696531395e-005    5.594525254837375e-005

Columns 277 through 279

5.594328898839665e-005    5.594334593858451e-005    5.594147261137798e-005

Columns 280 through 282

5.594119186283944e-005    5.594348612167743e-005    5.594228776904790e-005

Columns 283 through 285

5.594172363285791e-005    5.594290446015821e-005    5.594062969341811e-005

Columns 286 through 288

5.594353108010688e-005    5.594150696853143e-005    5.594251017381045e-005

Columns 289 through 291

5.594531330427777e-005    5.594163540564062e-005    5.594386936929013e-005

Columns 292 through 294

5.594251703846868e-005    5.594548315499818e-005    5.594335030538874e-005

Columns 295 through 297

5.594155305696483e-005    5.594032361066344e-005    5.594296913704375e-005

Columns 298 through 300

5.593974613298600e-005    5.593941468098726e-005    5.594379423031764e-005

Columns 301 through 303

5.594014940080572e-005    5.594152329303092e-005    5.594364278695840e-005

Columns 304 through 306

5.593944901954120e-005    5.593895605105796e-005    5.594235791926526e-005

Columns 307 through 309

5.594285699970353e-005    5.593964731939407e-005    5.594174629831634e-005

Columns 310 through 312

5.594417928908562e-005    5.594108469010708e-005    5.594058634647589e-005

Columns 313 through 315

5.594336850020918e-005    5.594245905389128e-005    5.594187704864646e-005

Columns 316 through 318

5.594096636080247e-005    5.594468494523105e-005    5.594015345062150e-005

Columns 319 through 321

5.593892498592166e-005    5.594164487432806e-005    5.594202721686563e-005

Columns 322 through 324

5.594095907488165e-005    5.594507587798059e-005    5.594285778360690e-005

Columns 325 through 327

5.594064658371119e-005    5.593915342269825e-005    5.594187234125282e-005

Columns 328 through 329

5.594398967798522e-005    5.594186763116568e-005
>> betarnd(1193280084.4218726, 21329415807424.934, 1, 329)*8300450000

ans =

Columns 1 through 5

4.643632275011640e+005    4.643398796883402e+005    4.643468629693436e+005
4.643219646395710e+005    4.643454759147766e+005

Columns 6 through 10

4.643123484260559e+005    4.643634182049825e+005    4.643585175792807e+005
4.643298196499965e+005    4.643705415353600e+005

Columns 11 through 15

4.643621234672779e+005    4.643311006028298e+005    4.643404501482427e+005
4.643436545108706e+005    4.643436021272134e+005

Columns 16 through 20

4.643293210731568e+005    4.643690225019546e+005    4.643484032541188e+005
4.643397160957493e+005    4.643610293196288e+005

Columns 21 through 25

4.643154353896919e+005    4.643446402328178e+005    4.643400062142421e+005
4.643295959149748e+005    4.643478468669749e+005

Columns 26 through 30

4.643435335050101e+005    4.643579103406923e+005    4.643524616517162e+005
4.643584472716897e+005    4.643418573022880e+005

Columns 31 through 35

4.643371631505659e+005    4.643384650179489e+005    4.643535931072372e+005
4.643552823833069e+005    4.643517201693080e+005

Columns 36 through 40

4.643494046401295e+005    4.643285093674614e+005    4.643580796692764e+005
4.643135727623609e+005    4.643179797630601e+005

Columns 41 through 45

4.643388882535854e+005    4.643261242738486e+005    4.643537726025506e+005
4.643677080464293e+005    4.643224087263740e+005

Columns 46 through 50

4.643720112785147e+005    4.643296982484204e+005    4.643362776499165e+005
4.643308059740513e+005    4.643371640036891e+005

Columns 51 through 55

4.643539375423049e+005    4.643589391592331e+005    4.643352608713623e+005
4.643426567244036e+005    4.643555144595868e+005

Columns 56 through 60

4.643624015577891e+005    4.643516167302441e+005    4.643184630555090e+005
4.643491298129691e+005    4.643305743963125e+005

Columns 61 through 65

4.643252628536691e+005    4.643335179898799e+005    4.643334529372681e+005
4.643609063271323e+005    4.643415604039882e+005

Columns 66 through 70

4.643515546051071e+005    4.643366269351653e+005    4.643330336514597e+005
4.643397790573603e+005    4.643620824212441e+005

Columns 71 through 75

4.643689676238144e+005    4.643392371603089e+005    4.643539357938063e+005
4.643485788819068e+005    4.643386388187275e+005

Columns 76 through 80

4.643592722300096e+005    4.643511989887276e+005    4.643557231388455e+005
4.643280432887639e+005    4.643428462004606e+005

Columns 81 through 85

4.643446976526951e+005    4.643703180037447e+005    4.643324495979446e+005
4.643270231148266e+005    4.643479137585869e+005

Columns 86 through 90

4.643285552443229e+005    4.643497320224798e+005    4.643682963700976e+005
4.643468523132139e+005    4.643681796457944e+005

Columns 91 through 95

4.643238592770349e+005    4.643527340808194e+005    4.643382581051545e+005
4.643308596926095e+005    4.643420183163197e+005

Columns 96 through 100

4.643463872295352e+005    4.643428775673898e+005    4.643486194788878e+005
4.643422110411792e+005    4.643409160503030e+005

Columns 101 through 105

4.643643522734116e+005    4.643458376472644e+005    4.643209376013739e+005
4.643477393960658e+005    4.643554928059244e+005

Columns 106 through 110

4.643433061765379e+005    4.643541382372177e+005    4.643406016184056e+005
4.643411767665339e+005    4.643291112816093e+005

Columns 111 through 115

4.643345942484544e+005    4.643334489767274e+005    4.643243199283715e+005
4.643546944775833e+005    4.643199128271390e+005

Columns 116 through 120

4.643535280642366e+005    4.643449431428578e+005    4.643355340600840e+005
4.643543382352680e+005    4.643625765383753e+005

Columns 121 through 125

4.643373158294369e+005    4.643442060014003e+005    4.643579584954574e+005
4.643382931928397e+005    4.643330377453567e+005

Columns 126 through 130

4.643544320927053e+005    4.643420748134670e+005    4.643490374981659e+005
4.643621399147669e+005    4.643673087480495e+005

Columns 131 through 135

4.643537992813899e+005    4.643533420670073e+005    4.643351222984800e+005
4.643466289321145e+005    4.643809062466746e+005

Columns 136 through 140

4.643190626934905e+005    4.643534464031382e+005    4.643476606548895e+005
4.643442722853824e+005    4.643380479466388e+005

Columns 141 through 145

4.643419676393427e+005    4.643455674219854e+005    4.643315251058494e+005
4.643422627785528e+005    4.643658369963028e+005

Columns 146 through 150

4.643486868065267e+005    4.643460593935046e+005    4.643442067059535e+005
4.643584844427633e+005    4.643401377461248e+005

Columns 151 through 155

4.643490111556829e+005    4.643481282964944e+005    4.643573791325794e+005
4.643313222659806e+005    4.643647923745302e+005

Columns 156 through 160

4.643539417191992e+005    4.643649112488547e+005    4.643678095202511e+005
4.643500058821677e+005    4.643375380537305e+005

Columns 161 through 165

4.643490069994099e+005    4.643429045957657e+005    4.643414880222358e+005
4.643615326310709e+005    4.643272055576847e+005

Columns 166 through 170

4.643456766366951e+005    4.643490670475120e+005    4.643365703479624e+005
4.643531013828349e+005    4.643546142686590e+005

Columns 171 through 175

4.643370892237912e+005    4.643277725704016e+005    4.643619434846910e+005
4.643460294895975e+005    4.643565796981872e+005

Columns 176 through 180

4.643740870838435e+005    4.643492459877483e+005    4.643637294138572e+005
4.643546075883882e+005    4.643335811834032e+005

Columns 181 through 185

4.643419569187990e+005    4.643400669702721e+005    4.643498522635567e+005
4.643454402406518e+005    4.643450666481066e+005

Columns 186 through 190

4.643416089798571e+005    4.643492875402543e+005    4.643333132784517e+005
4.643589265546824e+005    4.643487955969636e+005

Columns 191 through 195

4.643185494290022e+005    4.643493712638818e+005    4.643249015713516e+005
4.643575554129141e+005    4.643750533056700e+005

Columns 196 through 200

4.643295232034289e+005    4.643409412811477e+005    4.643598137831446e+005
4.643591033762975e+005    4.643520426510159e+005

Columns 201 through 205

4.643582152213663e+005    4.643513248886291e+005    4.643529985786041e+005
4.643588989306376e+005    4.643405572404293e+005

Columns 206 through 210

4.643607264756663e+005    4.643269038838187e+005    4.643589827249778e+005
4.643560590551210e+005    4.643269411530832e+005

Columns 211 through 215

4.643532804488290e+005    4.643608103600613e+005    4.643451858647363e+005
4.643484289391422e+005    4.643428390716066e+005

Columns 216 through 220

4.643373983298229e+005    4.643546118940772e+005    4.643267886875919e+005
4.643262664746865e+005    4.643295299666774e+005

Columns 221 through 225

4.643405380308517e+005    4.643253725780229e+005    4.643416531618026e+005
4.643614060550475e+005    4.643584701495933e+005

Columns 226 through 230

4.643186295302996e+005    4.643736476885003e+005    4.643201543037648e+005
4.643316645960849e+005    4.643515632181026e+005

Columns 231 through 235

4.643234393515186e+005    4.643526619888084e+005    4.643646675630445e+005
4.643522913564080e+005    4.643391036476305e+005

Columns 236 through 240

4.643204818076211e+005    4.643653946839592e+005    4.643416241458239e+005
4.643632703689794e+005    4.643511779329067e+005

Columns 241 through 245

4.643501373688814e+005    4.643535665383966e+005    4.643337887793146e+005
4.643246872703877e+005    4.643430460841355e+005

Columns 246 through 250

4.643472485948831e+005    4.643611417407431e+005    4.643488911763027e+005
4.643433345248755e+005    4.643284824845626e+005

Columns 251 through 255

4.643359203450010e+005    4.643515651992420e+005    4.643328435304719e+005
4.643415473230789e+005    4.643512589146242e+005

Columns 256 through 260

4.643441666357514e+005    4.643470442000009e+005    4.643431680038117e+005
4.643315277714049e+005    4.643636867361901e+005

Columns 261 through 265

4.643580780850057e+005    4.643498591853780e+005    4.643379006182123e+005
4.643677750677940e+005    4.643534609178956e+005

Columns 266 through 270

4.643355312905767e+005    4.643414713863077e+005    4.643432785670705e+005
4.643346300176565e+005    4.643409163850018e+005

Columns 271 through 275

4.643407158246979e+005    4.643416642311160e+005    4.643588544316301e+005
4.643269687623129e+005    4.643619018339601e+005

Columns 276 through 280

4.643397515337427e+005    4.643607933498398e+005    4.643280858735651e+005
4.643411077374230e+005    4.643495027330719e+005

Columns 281 through 285

4.643255324333838e+005    4.643411895076546e+005    4.643425946816248e+005
4.643551488206824e+005    4.643326650573082e+005

Columns 286 through 290

4.643765239685633e+005    4.643419318026134e+005    4.643598862957180e+005
4.643460507766492e+005    4.643460146183794e+005

Columns 291 through 295

4.643449351675858e+005    4.643411153174643e+005    4.643572044655832e+005
4.643602784236706e+005    4.643463008513494e+005

Columns 296 through 300

4.643385613931830e+005    4.643596008592218e+005    4.643520167635302e+005
4.643420537073856e+005    4.643541821260973e+005

Columns 301 through 305

4.643391453680849e+005    4.643713453262135e+005    4.643746668608572e+005
4.643206960167905e+005    4.643482957256964e+005

Columns 306 through 310

4.643356644732949e+005    4.643538264783296e+005    4.643487146737252e+005
4.643419335839302e+005    4.643593459637647e+005

Columns 311 through 315

4.643413723969312e+005    4.643307417397166e+005    4.643478223699888e+005
4.643242210645571e+005    4.643487571968277e+005

Columns 316 through 320

4.643514034924307e+005    4.643515331074679e+005    4.643532536224519e+005
4.643744618243399e+005    4.643601871972398e+005

Columns 321 through 325

4.643419462196911e+005    4.643320355220826e+005    4.643522681082228e+005
4.643426441267751e+005    4.643683841158581e+005

Columns 326 through 329

4.643499428782344e+005    4.643313150961776e+005    4.643463691049435e+005
4.643469157690397e+005

Thank you very much fro your help.

Frank

_______________________________________________
Bug-gsl mailing list