Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7686 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45717 invoked by uid 1010); 10 Feb 2004 08:15:07 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 45588 invoked from network); 10 Feb 2004 08:15:05 -0000 Received: from unknown (HELO iko.gotobg.net) (80.168.8.116) by pb1.pair.com with SMTP; 10 Feb 2004 08:15:05 -0000 Received: from cpanel by iko.gotobg.net with local (Exim 4.24) id 1AqT2x-0002DA-0B; Tue, 10 Feb 2004 10:15:07 +0200 Received: from pD9E61B58.dip.t-dialin.net (pD9E61B58.dip.t-dialin.net [217.230.27.88]) by hristov.com (IMP) with HTTP for ; Tue, 10 Feb 2004 10:15:06 +0200 Message-ID: <1076400906.4028930abe6f5@hristov.com> Date: Tue, 10 Feb 2004 10:15:06 +0200 To: Paul Hudson Cc: internals@lists.php.net References: <20040210005241.A2CDB2E3116@mra03.ex.eclipse.net.uk> In-Reply-To: <20040210005241.A2CDB2E3116@mra03.ex.eclipse.net.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.1 X-Originating-IP: 217.230.27.88 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - iko.gotobg.net X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [32001 32001] / [47 12] X-AntiAbuse: Sender Address Domain - hristov.com Subject: Re: [PHP-DEV] FW: [PATCH] Bug #24064: Standard deviation From: php@hristov.com (Andrey Hristov) Hi, as Derick stated 2 days ago, the problem is not in the extension but in the MIME header. The attachment must be text/plain. Andrey Quoting Paul Hudson : > Er, either the php-internals MARC archive doesn't show all attachments, or > my diff file got stripped en route for not having a .txt extension. I've > attached it again, just to make sure. > > > Paul > -- > > -----Original Message----- > From: Paul Hudson [mailto:webjedi@hudzilla.eclipse.co.uk] > Sent: 10 February 2004 00:30 > To: 'internals@lists.php.net' > Subject: [PATCH] Bug #24064: Standard deviation > > Hi there, > > Bug #24064 (submitted by tularis@php.net) requests a standard deviation > function for PHP. I realise that any of you could implement this in 10 > minutes, but according to the bug database it is still Open so I figured I > would give it a try myself! > > There are probably a dozen errors in the code and/or places where it could > be better optimised, but I'm hoping one of you might be able to help with > that. So, the attached diff file implements the function array_std_dev(), > to calculate standard deviation using the deviation method. > > With the function in place, standard deviation is calculated like this: > > $scores = array(18,5,7,18,3,2,10); > print array_std_dev($score); > // prints 6.6833125519211 > ?> > > My first attempt at implementing this was using an extra array to buffer the > deviations - this was more out of curiosity to see how the array stuff > works. Sadly, it caused PHP to segfault and I couldn't figure out why - can > any of you help me spot the brain fart? (I've attached the offending code > in bad_stddev_code.txt) > > Yours, > > > Paul > > PS: I'm not on the internals list, so I would appreciate it if you would CC > me on your reply. >