> On Feb 9, 2017, at 7:39 AM, Simon Bauer wrote:
>
> Hi,
>
> when I turn on -W in one of my perl scripts then I get a lot of warnings
> concerning Math::Complex
>
> Prototype mismatch: sub Math::Complex::abs (_) vs none at
> /usr/share/perl/5.22/Math/Comple
On Thu, Feb 9, 2017 at 9:39 AM, Simon Bauer wrote:
> when I turn on -W in one of my perl scripts then I get a lot of warnings
> concerning Math::Complex
>
> Prototype mismatch: sub Math::Complex::abs (_) vs none at
> /usr/share/perl/5.22/Math/Complex.pm line 667.
> Prototype
Hi,
when I turn on -W in one of my perl scripts then I get a lot of warnings concerning Math::Complex
Prototype mismatch: sub Math::Complex::abs (_) vs none at /usr/share/perl/5.22/Math/Complex.pm line 667.
Prototype mismatch: sub Math::Complex::sqrt (_) vs none at /usr/share/perl/5.22
Thank you. The useful note about CORE, in particular, is new to me.
cts
--- On Sun, 6/24/12, Rob Dixon wrote:
> From: Rob Dixon
> Subject: Re: how to do a reference to a func in Math::Trig
> To: "Perl Beginners"
> Cc: "Charles Smith"
> Date: Sunday, June
On 24/06/2012 19:51, Rob Dixon wrote:
or by aliasing the current package's 'sin' and 'cos' subroutines with
the CORE functions:
use strict;
use warnings;
use Math::Trig;
BEGIN {
no warnings 'once';
*sin = \&a
On 24/06/2012 06:59, Charles Smith wrote:
Thank you, that was the clue I needed! This now works for me:
...
$f = $opts{f} || "sin";
...
$f = "Math::Complex::$f";
...
print eval ($amplitude) * (&$f (2 * pi * $i/$n) + eval ($dc))."\n";
and
Thank you, that was the clue I needed! This now works for me:
...
$f = $opts{f} || "sin";
...
$f = "Math::Complex::$f";
...
print eval ($amplitude) * (&$f (2 * pi * $i/$n) + eval ($dc))."\n";
and so I can use this, my "siggen" pgm wit
Charles Smith wrote:
[snip]
>
> But this pgm fails:
>
> #!/usr/bin/env perl
> use Math::Trig;
> my $a = \&Math::Trig::cos;
> &$a(0);
>
> Undefined subroutine &Math::Trig::cos called at modfunctor line 7.
>
The cos sub is defined in Math::Complex, whic
n/env perl
sub b { print "hello world\n"; }
my $a = \&b;
&$a;
prints
hello world
But this pgm fails:
#!/usr/bin/env perl
use Math::Trig;
my $a = \&Math::Trig::cos;
&$a(0);
Undefined subroutine &Math::Trig::cos called at modfunctor line 7.
(and other tested variation
On 12-06-23 10:12 AM, Charles Smith wrote:
I'm experimenting with Math::Trig and would like to be able to pass the
function in as a parameter:
$f = $opts{f} || &sin;
$f = $opts{f} || \&sin;
See `perldoc perlreftut` and `perldoc perlref`.
--
Just my 0.0002 million
Hi,
I'm experimenting with Math::Trig and would like to be able to pass the
function in as a parameter:
$f = $opts{f} || &sin;
...
&$f($w);
Undefined subroutine &main::sin called at (eval
9)[/usr/lib/perl5/5.14.2/perl5db.pl:640] line 2.
I have also tried:
$f =
On 06/06/2011 05:06, eventual wrote:
> Hi,
> Looking at the combination script below, what must I do so that the output of
> Round 1, Round 2 and Round 3 are identical.
> Thanks.
>
> # script below ###
>
> #!/usr/bin/perl
> use strict;
> use warni
Hi,
Looking at the combination script below, what must I do so that the output of
Round 1, Round 2 and Round 3 are identical.
Thanks.
# script below ###
#!/usr/bin/perl
use strict;
use warnings;
use Math::Combinatorics
Hi Shlomi.
OK, seems like it's Red Hat Enterprise Linux 5 / CentOS 5. You can find a
package for Net-SSH-Perl for them on the DAG package repository:
http://dag.wieers.com/rpm/packages/perl-Net-SSH-Perl/
You should install from it.
You should install GMP using yum: "yum install gmp-devel" or
On Thu, 25 Feb 2010 19:54:13 +1000, Salvador Fandino
wrote:
On 02/25/2010 07:14 AM, Dave Tang wrote:
Dear list,
I'm trying to use Net::SSH::Perl, but it requires the Math::GMP module.
I have installed a GMP library (required for Math::GMP) but when I try
to install Math::GMP I get an
On Thu, 25 Feb 2010 19:54:13 +1000, Salvador Fandino
wrote:
On 02/25/2010 07:14 AM, Dave Tang wrote:
Dear list,
I'm trying to use Net::SSH::Perl, but it requires the Math::GMP module.
I have installed a GMP library (required for Math::GMP) but when I try
to install Math::GMP I get an
On 02/25/2010 07:14 AM, Dave Tang wrote:
Dear list,
I'm trying to use Net::SSH::Perl, but it requires the Math::GMP module.
I have installed a GMP library (required for Math::GMP) but when I try
to install Math::GMP I get an error. Here's the transcript. May someone
shed some light?
On Thu, 25 Feb 2010 18:30:33 +1000, Octavian Rasnita
wrote:
From: "Dave Tang"
Dear list,
I'm trying to use Net::SSH::Perl, but it requires the Math::GMP module.
I have installed a GMP library (required for Math::GMP) but when I try
to install Math::GMP I get an er
On Thursday 25 Feb 2010 10:27:28 Dave Tang wrote:
> On Thu, 25 Feb 2010 17:27:25 +1000, Shlomi Fish
>
> wrote:
> > Hi Dave!
>
> Hi Shlomi!
>
Hi Dave.
> Thank you for your reply.
>
> [snip]
>
> >> I'm trying to use Net::SSH::Perl, but
From: "Dave Tang"
Dear list,
I'm trying to use Net::SSH::Perl, but it requires the Math::GMP module. I
have installed a GMP library (required for Math::GMP) but when I try to
install Math::GMP I get an error. Here's the transcript. May someone shed
some light?
I d
On Thu, 25 Feb 2010 17:27:25 +1000, Shlomi Fish
wrote:
Hi Dave!
Hi Shlomi!
Thank you for your reply.
[snip]
I'm trying to use Net::SSH::Perl, but it requires the Math::GMP module.
I
have installed a GMP library (required for Math::GMP) but when I try to
install Math::GMP I g
Hi Dave!
On Thursday 25 Feb 2010 08:14:11 Dave Tang wrote:
> Dear list,
>
> I'm trying to use Net::SSH::Perl, but it requires the Math::GMP module. I
> have installed a GMP library (required for Math::GMP) but when I try to
> install Math::GMP I get an error. Here's th
Dear list,
I'm trying to use Net::SSH::Perl, but it requires the Math::GMP module. I
have installed a GMP library (required for Math::GMP) but when I try to
install Math::GMP I get an error. Here's the transcript. May someone shed
some light?
perl Makefile.PL
Checking if y
Uri Guttman wrote:
It's generally considered very rude - but the world is full of rude
arseholes. Many of them can be found on the perl list.
which perl list? there are many. do you include yourself as you are on
this list? do you actually help people here (don't recall seeing you in
many thr
On Tue, 23 Feb 2010 11:23:23 +1000, Steve Bertrand
wrote:
I belong to several
technical lists, and the de-facto standard is to Reply-All.
Understood and thank you for your answer.
--
Dave Tang
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beg
On 2010.02.22 17:44, Uri Guttman wrote:
>> "1" == 120 writes:
>
> >> "off list", as I don't like to clog everyone's email with my thank
> >> you note.
> >>
> 1> It's generally considered very rude - but the world is full of rude
> 1> arseholes. Many of them can be found on the per
> "1" == 120 writes:
>> "off list", as I don't like to clog everyone's email with my thank
>> you note.
>>
1> It's generally considered very rude - but the world is full of rude
1> arseholes. Many of them can be found on the perl list.
which perl list? there are many. do you incl
120 wrote:
On Mon, 2010-02-22 at 11:06 +1000, Dave Tang wrote:
On Fri, 19 Feb 2010 22:58:24 +1000, 120 wrote:
Apologies for my error - if I may point out that sending 'off list'
replies is also equally rude.
May I ask about this netiquette? I usually thank people who have helped me
"off l
On Mon, 2010-02-22 at 11:06 +1000, Dave Tang wrote:
> On Fri, 19 Feb 2010 22:58:24 +1000, 120 wrote:
>
> > Apologies for my error - if I may point out that sending 'off list'
> > replies is also equally rude.
>
> May I ask about this netiquette? I usually thank people who have helped me
> "off
On Fri, 19 Feb 2010 22:58:24 +1000, 120 wrote:
Apologies for my error - if I may point out that sending 'off list'
replies is also equally rude.
May I ask about this netiquette? I usually thank people who have helped me
"off list", as I don't like to clog everyone's email with my thank you
On Fri, 2010-02-19 at 14:25 +0200, Shlomi Fish wrote:
> Hi,
>
> On Friday 19 Feb 2010 14:12:51 120 wrote:
> > I know I can do this:
> >
> > $bitvalue=$bitvalue|32
> >
> > but is there a shorthand for this?
> >
> > $bitvalue=|32 does not appear valid - but I'm sure there is probably a
> > way?
>
Hi,
On Friday 19 Feb 2010 14:12:51 120 wrote:
> I know I can do this:
>
> $bitvalue=$bitvalue|32
>
> but is there a shorthand for this?
>
> $bitvalue=|32 does not appear valid - but I'm sure there is probably a
> way?
Yes, there is:
<<<
$bitvalue |= 32;
>>>
You can also do +=, -=, *=, .= etc
I know I can do this:
$bitvalue=$bitvalue|32
but is there a shorthand for this?
$bitvalue=|32 does not appear valid - but I'm sure there is probably a
way?
Daniel
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.p
t;
>
>
It looks to me that you have 2 perls - a threaded perl in /usr/bin/, and an
unthreaded perl in /yaprod/freeware/.
It also looks to me that the Math::GMP that you're trying to use was built
for (and by) the perl in /usr/bin/. If you're using the perl in
/yaprod/freeware/, then you
-Ursprüngliche Nachricht-
Von: Brian J. Miller [mailto:wigg...@danconia.org]
Gesendet: Dienstag, 28. April 2009 14:15
An: SCHWARTZKOPFF, Michael, Dr. (Extern)
Cc: beginners@perl.org
Betreff: Re: Problem with threaded Math::GMP
SCHWARTZKOPFF, Michael, Dr. (Extern) wrote:
> Hi,
>
SCHWARTZKOPFF, Michael, Dr. (Extern) wrote:
> Hi,
>
> I wanted to the Net::SSH::Perl but perl complained about a missing
> Math::GMP. So did a
> cpan install Math::GMP
> and finally found
> /usr/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Math/GMP.pm
> on my sys
Hi,
I wanted to the Net::SSH::Perl but perl complained about a missing
Math::GMP. So did a
cpan install Math::GMP
and finally found
/usr/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Math/GMP.pm
on my system. But when I add this path to my lib and started my program
I get the error:
perl
On Mon, Apr 13, 2009 at 06:12, Gunnar Hjalmarsson wrote:
snip
>> Also, if you make that change you need to check the for loop as well:
>>
>> for my $i (0 .. 10) {
>
> Actually no.
>
> $ perl -wle '
> @rank = qw/A 2 3 4 5 6 7 8 9 10 J Q K A/;
> print map $_."[cdhs]", @rank[10..10+4];
> '
> Use of u
Chas. Owens wrote:
On Sun, Apr 12, 2009 at 21:58, Gunnar Hjalmarsson wrote:
Chas. Owens wrote:
my @rank = qw/ 2 3 4 5 6 7 8 9 10 J Q K A /;
my @rank = qw/A 2 3 4 5 6 7 8 9 10 J Q K A /;
--^
snip
That depends on who you play with.
Ok.
Also, if you make that change you
On Sun, Apr 12, 2009 at 21:58, Gunnar Hjalmarsson wrote:
> Chas. Owens wrote:
>>
>> my @rank = qw/ 2 3 4 5 6 7 8 9 10 J Q K A /;
>
> my @rank = qw/A 2 3 4 5 6 7 8 9 10 J Q K A /;
> --^
snip
That depends on who you play with. Also, if you make that change you
need to check the
Chas. Owens wrote:
my @rank = qw/ 2 3 4 5 6 7 8 9 10 J Q K A /;
my @rank = qw/A 2 3 4 5 6 7 8 9 10 J Q K A /;
--^
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail
On Sun, Apr 12, 2009 at 18:34, Andrew Fithian wrote:
> Hello everyone,
> I have a program that needs to find straights in a hand of cards. The hand
> is a string with no whitespace sorted by the cards' ranks, eg "9d10cJhQsKd".
> How can I identify if that hand contains a straight with a single reg
Andrew Fithian wrote:
I have a program that needs to find straights in a hand of cards.
Only straights?
The hand is a string with no whitespace sorted by the cards' ranks,
eg "9d10cJhQsKd". How can I identify if that hand contains a straight
with a single regex?
Why on earth would you want
Hello everyone,
I have a program that needs to find straights in a hand of cards. The hand
is a string with no whitespace sorted by the cards' ranks, eg "9d10cJhQsKd".
How can I identify if that hand contains a straight with a single regex? Is
that even possible?
Is there a way to escape the regex
> Hi,
>
> I have a variable for which I ultimately want to substitute w/ some
> math. Is there a way to get the result "6"?
>
> my $number=123;
> $number =~s/123/1+2+3/s; #This method results in "1+2+3", not the "6"
> I am looking for
> p
On Sat, Dec 20, 2008 at 01:04, hotkitty wrote:
> Hi,
>
> I have a variable for which I ultimately want to substitute w/ some
> math. Is there a way to get the result "6"?
>
> my $number=123;
> $number =~s/123/1+2+3/s; #This method results in "1+2+3"
Hi,
I have a variable for which I ultimately want to substitute w/ some
math. Is there a way to get the result "6"?
my $number=123;
$number =~s/123/1+2+3/s; #This method results in "1+2+3", not the "6"
I am looking for
print "$number";
--
To unsubscribe
On Thursday 20 November 2008 12:50:23 am Graham Saathoff wrote:
> Is this right? Any suggestions for how to build something like
> this?
I would suggest that you get a copy of this book "Learning Perl" 5th
Edition.
ISBN: 978-0-596-52010-6
Authors: Randal L. Schwartz, Tom Phoenix & brian d foy (T
Hi Graham,
Graham Saathoff wrote:
Is this right? Any suggestions for how to build something like this?
Well, you have the right idea in that you're planning out what you are
doing. In general, if you have hundreds of files, what you should do
depends on how big they are. You mention
rd/value to each line? Maybe this should be done before
concatenation, but I'm not sure how.)
* Read the file into an array, using a comma to delimit fields in the array.
* Do some math -- add all of the "totals" columns together and output
that number to a text file, with a brief t
On Jan 12, 6:06 am, [EMAIL PROTECTED] (Anjan Purkayastha)
wrote:
> i too am having problems installing the Math::Complex module.
Math::Complex (and Math::Trig) has been part of core perl for quite
some time.
I would expect that you already have it.
Cheers,
Rob
--
To unsubscribe, e-mail: [EM
On Jan 11, 2008 2:06 PM, ANJAN PURKAYASTHA <[EMAIL PROTECTED]> wrote:
> i too am having problems installing the Math::Complex module. Specifically,
> LWP does not seem to be available. At the end of the build steps I get an
> error message:
> writing makefile for Math::Complex
i too am having problems installing the Math::Complex module. Specifically,
LWP does not seem to be available. At the end of the build steps I get an
error message:
writing makefile for Math::Complex
Not OK
running make test
Can't test without successul make
Running make install
make had ret
On Jan 11, 2008 1:46 PM, Jenny Chen <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> How is everybody doing? I need to use Math::Trig::acos(), but not able to
> find it on CPAN. Does anyone know where I can download it from?
>
> Thanks
>
> Jenny
>
acos is in
Hi everyone,
How is everybody doing? I need to use Math::Trig::acos(), but not able to
find it on CPAN. Does anyone know where I can download it from?
Thanks
Jenny
On Tue, 10 Jul 2007, Chas Owens wrote:
On 7/10/07, Vincent Li <[EMAIL PROTECTED]> wrote:
I am trying to experiment a simple perl math caculation script I wrote:
#!/usr/bin/perl
use strict;
use warnings;
my %operator = (
minus => '-',
add =&g
On Tue, 10 Jul 2007 11:32:54 -0700 (PDT)
Vincent Li <[EMAIL PROTECTED]> wrote:
>
> I am trying to experiment a simple perl math caculation script I wrote:
>
> #!/usr/bin/perl
> use strict;
> use warnings;
>
> my %operator = (
> minus =>
On 7/10/07, Vincent Li <[EMAIL PROTECTED]> wrote:
I am trying to experiment a simple perl math caculation script I wrote:
#!/usr/bin/perl
use strict;
use warnings;
my %operator = (
minus => '-',
add => '+',
multiply => '*',
On Jul 10, 2:32 pm, [EMAIL PROTECTED] (Vincent Li) wrote:
> I am trying to experiment a simple perl math caculation script I wrote:
>
> #!/usr/bin/perl
> use strict;
> use warnings;
>
> my %operator = (
> minus => '-',
> add =>
I am trying to experiment a simple perl math caculation script I wrote:
#!/usr/bin/perl
use strict;
use warnings;
my %operator = (
minus => '-',
add => '+',
multiply => '*',
divide => '/',
);
my $big = 5;
my $small = 2;
fo
On 06/03/2007 10:42 AM, Mumia W. wrote:
[...] the docs say that the Math::GMP
module is not used by Math::BigInt::GMP. Math::BigInt::GMP uses the
binary GMP library if it's installed, so perhaps you could look there.
Duh. Of course you have the binary GMP library installed--othe
On 06/03/2007 08:40 AM, David Unric wrote:
Any idea why the following code falls back to slow standard Perl
implementation of BigInt module instead of highspeed GMP being used ?
(no warnings, GMP module _is_ installed)
---
use Math::BigInt lib => 'GMP';
m
Any idea why the following code falls back to slow standard Perl
implementation of BigInt module instead of highspeed GMP being used ?
(no warnings, GMP module _is_ installed)
---
use Math::BigInt lib => 'GMP';
my $fac = Math::BigInt->new('4000'
Thanks. I got that corrected. Actually, in my code, $n wasnt a
Math::BigFloat OBJECT.
On 4/25/07, Rob Dixon <[EMAIL PROTECTED]> wrote:
Somu wrote:
> On 4/25/07, Tom Phoenix <[EMAIL PROTECTED]> wrote:
>>
>> On 4/24/07, Somu <[EMAIL PROTECTED]> wrote:
>>&g
methods. Bcoz the examples in the doc
aren't working. Can i get some simple examples?
What are you doing that isn't working? "Because" if the documentation
examples don't work for you, why should this work?
#!/usr/bin/perl
use strict;
use warnings;
use Math::BigFloat
On 4/25/07, Somu <[EMAIL PROTECTED]> wrote:
Actually the following isnt working:
use Math::BigFloat;
$n = 0;
if ($n->is_zero()) {print 'you entered zero'}
snip
Umm, that is because $n is not a Math::BigFloat. Math::BigFloat is
not a pragma, it is a class that overloads
Actually the following isnt working:
use Math::BigFloat;
$n = 0;
if ($n->is_zero()) {print 'you entered zero'}
On 4/25/07, Tom Phoenix <[EMAIL PROTECTED]> wrote:
On 4/24/07, Somu <[EMAIL PROTECTED]> wrote:
> I'm unable to compare numbers using the module
simple examples?
What are you doing that isn't working? "Because" if the documentation
examples don't work for you, why should this work?
#!/usr/bin/perl
use strict;
use warnings;
use Math::BigFloat;
my $big = Math::BigFloat->new(200);
my $other = Math::BigFloat->
I'm unable to compare numbers using the module. Actually i can only
use it to create numbers like 0 or inf or 1 or their negatives. But i
dont know how to use their methods. Bcoz the examples in the doc
aren't working. Can i get some simple examples?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
F
On Fri, 15 Sep 2006 08:33:02 -0700, Bryan R Harris wrote:
> Thank you, everyone!
>
> Note, it appears that the fifth root of -12.17 is not complex, try this:
>
> % perl -wle '$_=(-1.648382957144284)**5; print'
>
> ... but I don't blame perl for not finding it.
The fact that 0.2 has no exact bin
Thank you, everyone!
Note, it appears that the fifth root of -12.17 is not complex, try this:
% perl -wle '$_=(-1.648382957144284)**5; print'
... but I don't blame perl for not finding it.
Thanks for the tips on -wle, and for the info on print. I'm not sure how
I'll do it, but I really need
Bryan R Harris schreef:
> Can someone explain this behavior?
>
> % perl -e 'print -12.17**0.2, "\n"'
> -1.64838295714428
> % perl -e 'print (-12.17)**(0.2), "\n"'
> -12.17% perl -e 'print ((-12.17)**(0.2)), "\n"'
> nan%
Use "perl -we ...", or "perl -Mwarnings -e ...".
--
Affijn, Ruud
"Gewoon i
On 09/14/2006 06:47 PM, Bryan R Harris wrote:
Can someone explain this behavior?
% perl -e 'print -12.17**0.2, "\n"'
-1.64838295714428
% perl -e 'print (-12.17)**(0.2), "\n"'
-12.17% perl -e 'print ((-12.17)**(0.2)), "\n"'
nan%
Yes, the "\n" isn't getting printed for some reason on the 2nd tw
Bryan R Harris wrote:
Can someone explain this behavior?
% perl -e 'print -12.17**0.2, "\n"'
-1.64838295714428
This means
print(-(12.17 ** 0.2), "\n")
because exponentiation has a higher priority than unary minus. (See the table of
priorities in perldoc perlop).
% perl -e 'print (-12.17)
Bryan R Harris wrote:
>
> Can someone explain this behavior?
perldoc perlfunc
[snip]
Any function in the list below may be used either with or without
parentheses around its arguments. (The syntax descriptions omit the
parentheses.) If you use the parentheses, the simple (b
Can someone explain this behavior?
% perl -e 'print -12.17**0.2, "\n"'
-1.64838295714428
% perl -e 'print (-12.17)**(0.2), "\n"'
-12.17% perl -e 'print ((-12.17)**(0.2)), "\n"'
nan%
Yes, the "\n" isn't getting printed for some reason on the 2nd two examples.
Bottom line:
-12.17**0.2 ==> -1.6
On 8/21/06, chen li wrote:
Dear all,
I read a file into an array reference. I want to pass
it as an argument when create the new object from
Math::MatrixReal. But when I read the usage of this
module I can't find how. Does anyone there give me a
hand?
Thanks,
Li
Here are the code I use
Dear all,
I read a file into an array reference. I want to pass
it as an argument when create the new object from
Math::MatrixReal. But when I read the usage of this
module I can't find how. Does anyone there give me a
hand?
Thanks,
Li
Here are the code I use:
my $re
--- David Greenberg <[EMAIL PROTECTED]> wrote:
> I'm sure there's an easier/better way of doing this,
> but in the interest of
> simplicity, let's look at this approach:
>
> First, a red flag goes up when you say that you have
> an array of 12
> numbers. Will it always be twelve?
>
> The seco
nd standard deviation for very
>>>three numbers. I just wonder which math module is
>>>available to do the job.
>>
>>Wonder no longer :) Find out for sure:
>>
>> http://search.cpane.org/
>
>
>
> I think you meant http://search.cpan.org. :)
In
I have an array contains 12 numbers. I want to
calculate the mean and standard deviation for very
three numbers. I just wonder which math module is
available to do the job.
Wonder no longer :) Find out for sure:
http://search.cpane.org/
I think you meant http://search.cpan.org
-Original Message-
From: JupiterHost.Net [mailto:[EMAIL PROTECTED]
Sent: Monday, August 14, 2006 4:48 PM
To: beginners@perl.org
Subject: Re: math module and array manipulation
> chen li wrote:
>> Dear all,
>>
>> I have an array contains 12 numbers. I want to
>
chen li wrote:
Dear all,
I have an array contains 12 numbers. I want to
calculate the mean and standard deviation for very
three numbers. I just wonder which math module is
available to do the job.
Wonder no longer :) Find out for sure:
http://search.cpane.org/
--
To unsubscribe, e-mail
Dear all,
I have an array contains 12 numbers. I want to
calculate the mean and standard deviation for very
three numbers. I just wonder which math module is
available to do the job.
Thanks,
Li
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has
On Sunday 16 July 2006 13:20, Charles K. Clarkson wrote:
> Daniel D Jones wrote:
> : Ah! Simple change:
>
>Subroutines should not normally operate on external data.
What do you mean by "operate on?" I avoid altering external data, but I don't
see the harm in reading external data. Too, thi
Daniel D Jones wrote:
: Ah! Simple change:
Subroutines should not normally operate on external data.
Pass data into and out of each subroutine. As a matter of style,
I avoidsqashingwordsinvariableandsuborutinenamesalltogether. I
like to use an underscore for most names.
run_tests( [EMAIL P
Daniel D Jones schreef:
> Given something like the following:
>
> my @variables = [3, 7, 13, 4, 12];
> my @tests = ("2*a+b==c", "c-d+a==e");
>
> I need to be able to evaluate the mathematical truth of the tests
#!/usr/bin/perl
# beware: this approach is wrong
use warnings;
use strict;
my
On Sunday 16 July 2006 07:26, Paul Johnson wrote:
> On Sun, Jul 16, 2006 at 05:48:10AM -0400, Daniel D Jones wrote:
> > It certainly does help. I thought about substitution but couldn't
> > come up with a syntax. This seems to be exactly what I was looking
> > for, but I'm running into a problem.
On Sun, Jul 16, 2006 at 05:48:10AM -0400, Daniel D Jones wrote:
> It certainly does help. I thought about substitution but couldn't
> come up with a syntax. This seems to be exactly what I was looking
> for, but I'm running into a problem. Here's code which demonstrates
> it:
[ ... ]
> As you
On Saturday 15 July 2006 21:13, Rob Dixon wrote:
> Daniel D Jones wrote:
> > Given something like the following:
> >
> > my @variables = [3, 7, 13, 4, 12];
>
> You want round brackets here. You've created an array with just one
> element, with a reference to an anonymous array as its value.
Doh
John W. Krahn wrote:
>
> Rob Dixon wrote:
>>
>>s/([a-z])/$variables[ord($1) - ord('a')]/ge;
>
> You don't need the /e option there. (Try it if you don't believe me.)
Fascinating. Thanks John. And all because the expression's inside an array
index.
s/([a-z])/$variables[do{
my $n = ord(
Rob Dixon wrote:
>
> You can do exactly that in Perl, and a lot more simply:
>
> my @variables = (3, 7, 13, 4, 12);
> my @tests = ("2*a+b==c", "c-d+a==e");
>
> foreach (@tests) {
> s/([a-z])/$variables[ord($1) - ord('a')]/ge;
You don't need the /e option there. (Try it if you don't b
On Jul 15, 2006, at 5:15 PM, Daniel D Jones wrote:
Given something like the following:
my @variables = [3, 7, 13, 4, 12];
As an aside, you meant parentheses here, not brackets. (Brackets
return a reference to an anonymous array containing the list, not the
list itself.)
my @tests = ("2
Daniel D Jones wrote:
> Given something like the following:
>
> my @variables = [3, 7, 13, 4, 12];
You want round brackets here. You've created an array with just one element,
with a reference to an anonymous array as its value.
> my @tests = ("2*a+b==c", "c-d+a==e");
>
> I need to be able to
On 7/15/06, Daniel D Jones <[EMAIL PROTECTED]> wrote:
my @variables = [3, 7, 13, 4, 12];
my @tests = ("2*a+b==c", "c-d+a==e");
I need to be able to evaluate the mathematical truth of the tests,
May I suggest Parse::RecDescent? If you can make a grammar out of your
algebra, you'll have an easy
Given something like the following:
my @variables = [3, 7, 13, 4, 12];
my @tests = ("2*a+b==c", "c-d+a==e");
I need to be able to evaluate the mathematical truth of the tests, using the
values from @variables, where $variable[0] holds the value of the
variable 'a', $variables[1] holds the value
RICHARD FERNANDEZ wrote:
>
> Thanks for the response. I did manage to solve the Math::Pari install
> problem by following Jeff Eggen's idea about configuring it with
> machine=none. I have no idea about whether or not, as he mentions, it's
> unusably slow because I proce
This has lingered long enough without response. Sorry it took me a while
to get back to it after initially seeing it. I had this same problem a
couple of years ago. It does appear that Math::PARI has an active
maintainer again so you might try dropping him a line about this issue.
I solved it by
RICHARD FERNANDEZ wrote:
> I'm trying to build Math::Pari along the way to building Net::SFTP, but
> the make fails with the following error:
>
> pariinl.h: In function `mulssmod':
> pariinl.h:887: error: asm-specifier for variable `hiremainder' conflicts
> with
I'm trying to build Math::Pari along the way to building Net::SFTP, but
the make fails with the following error:
pariinl.h: In function `mulssmod':
pariinl.h:887: error: asm-specifier for variable `hiremainder' conflicts
with asm clobber list
pariinl.h:887: confused by earlier erro
1 - 100 of 198 matches
Mail list logo