Subject: | lgamma_r use NO_INIT |
Date: | Thu, 15 Oct 2009 11:18:05 +1100 |
To: | bug-Math-Libm [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
It'd be good if lgamma_r() had its sign output parameter as NO_INIT so
the current value doesn't have to be an integer, rather just a new value
stored to it. Perhaps per below.
--- Libm.xs.old 2009-10-15 11:11:14.000000000 +1100
+++ Libm.xs 2009-10-15 11:14:45.000000000 +1100
@@ -371,7 +371,7 @@
double
lgamma_r(x, signgamp)
double x
- int &signgamp
+ int &signgamp = NO_INIT
PROTOTYPE: $$
CODE:
#ifdef _AIX
--- test.pl.old 2000-06-25 15:00:00.000000000 +1000
+++ test.pl 2009-10-15 11:14:06.000000000 +1100
@@ -1,3 +1,5 @@
+#!/usr/bin/perl -w
+
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'
@@ -22,7 +24,7 @@
my $i = 1;
my $eps = 2**(-47);
-my $signgam = 0;
+my $signgam;
while (<DATA>) {
$i++;
my ($exp, @a) = split;