It does seem to work if you say lgamma(80.0)  etc

Some kind of typing problem in the underlying routine?

Karl

On 01/10/2008, at 3:33 PM, Steve Cicala wrote:

> I'm getting some odd output from the lgamma function: it seems to be  
> oddly re-setting itself when fetching the log-gamma function values  
> of individual numbers:
>
> perldl> p lgamma(60)
> 184 1
> perldl> p lgamma(80)
> 13 1
> perldl> p lgamma(70)
> 226 1
> perldl> p lgamma(75)
> 247 1
> perldl> p lgamma(79)
> 8 1
> perldl> p lgamma(77)
> 0 1
> perldl> p lgamma(76)
> 251 1
>
>
> everything looks okay when these values are called as part of a  
> larger array:
>
> perldl> $a=sequence(100)+1
>
> perldl> ($b,)=lgamma($a)
>
> perldl> p $b
> [0 0 0.69314718  1.7917595  3.1780538  4.7874917  6.5792512   
> 8.5251614  10.604603  12.801827  15.104413  17.502308  19.987214   
> 22.552164  25.191221  27.899271   30.67186  33.505073  36.395445   
> 39.339884  42.335616  45.380139  48.471181  51.606676  54.784729   
> 58.003605  61.261702  64.557539  67.889743  71.257039  74.658236   
> 78.092224  81.557959  85.054467  88.580828  92.136176  95.719695   
> 99.330612   102.9682  106.63176  110.32064  114.03421  117.77188   
> 121.53308  125.31727  129.12393  132.95258  136.80272  140.67392   
> 144.56574  148.47777  152.40959  156.36084  160.33113  164.32011   
> 168.32745   172.3528  176.39585  180.45629  184.53383  188.62817   
> 192.73905  196.86618  201.00932   205.1682  209.34259  213.53224   
> 217.73693  221.95644  226.19055  230.43904  234.70172  238.97839   
> 243.26885  247.57291   251.8904  256.22114  260.56494  264.92165    
> 269.2911  273.67312  278.06757  282.47429  286.89313  291.32395    
> 295.7666  300.22095  304.68686  309.16419  313.65283  318.15264    
> 322.6635  327.18529  331.71789  336.26118  340.81506  345.37941   
> 349.95412  354.53909  359.13421]
>
> any ideas?
>
> Steve
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl


_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to