r28523 - docs/Perl6/Spec/S32-setting-library

2009-10-01 Thread pugs-commits
Author: moritz Date: 2009-10-01 08:58:00 +0200 (Thu, 01 Oct 2009) New Revision: 28523 Modified: docs/Perl6/Spec/S32-setting-library/Numeric.pod Log: [S32::Num] More thoughts on Inf/NaN Complex, and on comparing Complex and Real numbers Also bring the goodness of the newly defined Numeric and

Re: r28523 - docs/Perl6/Spec/S32-setting-library

2009-10-01 Thread Jon Lang
On Wed, Sep 30, 2009 at 11:58 PM, pugs-comm...@feather.perl6.nl wrote: Author: moritz Date: 2009-10-01 08:58:00 +0200 (Thu, 01 Oct 2009) New Revision: 28523 Modified:   docs/Perl6/Spec/S32-setting-library/Numeric.pod Log: [S32::Num] More thoughts on Inf/NaN Complex, and on comparing

object possible representations (was Re: r28523 - ...)

2009-10-01 Thread Darren Duncan
Jon Lang wrote: On Wed, Sep 30, 2009 at 11:58 PM, pugs-comm...@feather.perl6.nl wrote: +CComplex is an immutable type. Each CComplex object stores two numbers, +the real and imaginary part. For all practical purposes a CComplex with +a CNaN in real or imaginary part may be considered a CNaN

Re: object possible representations (was Re: r28523 - ...)

2009-10-01 Thread Jon Lang
Darren Duncan wrote: Jon Lang wrote: I'm not sure that I feel comfortable locking CComplex into rectilinear coordinates as its internal storage method, as there will be cases where the code operates more smoothly if you're using polar coordinates to store the numbers: we should leave the

Re: object possible representations (was Re: r28523 - ...)

2009-10-01 Thread Jon Lang
Some further thoughts: Essentially, this could be done as an extension of the versioning system. The difference between possrep versioning and normal versioning would lie in the means by which the possrep dimension would be resolved if not specified. Namely, the compiler would make the decision

r28528 - in docs/Perl6/Spec: . S32-setting-library

2009-10-01 Thread pugs-commits
Author: lwall Date: 2009-10-01 18:53:43 +0200 (Thu, 01 Oct 2009) New Revision: 28528 Modified: docs/Perl6/Spec/S04-control.pod docs/Perl6/Spec/S32-setting-library/Basics.pod docs/Perl6/Spec/S32-setting-library/IO.pod Log: [S04] add statement_prefix:quietly [IO] add note function as say

Re: r28528 - in docs/Perl6/Spec: . S32-setting-library

2009-10-01 Thread Jon Lang
On Thu, Oct 1, 2009 at 9:53 AM, pugs-comm...@feather.perl6.nl wrote:  The Perl 6 equivalent to Perl 5's Ceval {...} is Ctry {...}.  (Perl 6's Ceval function only evaluates strings, not blocks.) -A Ctry block by default has a CCATCH block that handles all +A Ctry block by default has a CCATCH

Re: r28523 - docs/Perl6/Spec/S32-setting-library

2009-10-01 Thread Moritz Lenz
Jon Lang wrote: On Wed, Sep 30, 2009 at 11:58 PM, pugs-comm...@feather.perl6.nl wrote: Author: moritz Date: 2009-10-01 08:58:00 +0200 (Thu, 01 Oct 2009) New Revision: 28523 Modified: docs/Perl6/Spec/S32-setting-library/Numeric.pod Log: [S32::Num] More thoughts on Inf/NaN Complex, and

Re: r28523 - docs/Perl6/Spec/S32-setting-library

2009-10-01 Thread Jan Ingvoldstad
On Thu, Oct 1, 2009 at 10:15 PM, Moritz Lenz mor...@faui2k3.org wrote: What's the 0th root of a number, then? It would be a number $y for which $y ** 0 == $x, which can only be fulfilled for $x == 1. So in the general cases the answer to the question root($x, 0) is nonsense, which is best

Re: r28523 - docs/Perl6/Spec/S32-setting-library

2009-10-01 Thread Minimiscience
On Oct 1, 2009, at 4:15 PM, Moritz Lenz wrote: -Returns a list of all C$nth (complex) roots of C$x +Returns a list of all C$nth (complex) roots of C$x. Returns CNaN if +C $n = 0 , itself if C$n == 0, and is free to return a single CNaN Shouldn't this be C $n 0 ? What's the 0th root of

Re: r28523 - docs/Perl6/Spec/S32-setting-library

2009-10-01 Thread Minimiscience
On Oct 1, 2009, at 4:43 PM, Jan Ingvoldstad wrote: On Thu, Oct 1, 2009 at 10:15 PM, Moritz Lenz mor...@faui2k3.org wrote: What's the 0th root of a number, then? It would be a number $y for which $y ** 0 == $x, which can only be fulfilled for $x == 1. So in the general cases the answer to the

Re: r28523 - docs/Perl6/Spec/S32-setting-library

2009-10-01 Thread Moritz Lenz
Jan Ingvoldstad wrote: On Thu, Oct 1, 2009 at 10:15 PM, Moritz Lenz mor...@faui2k3.org wrote: What's the 0th root of a number, then? It would be a number $y for which $y ** 0 == $x, which can only be fulfilled for $x == 1. So in the general cases the answer to the question root($x, 0) is

99problems-31-to-40 failure

2009-10-01 Thread Kevin Phair
# P35 (**) Determine the prime factors of a given positive integer. This test fails for me with the latest Rakudo. It looks like this is because when a variable is pushed onto an array, and then auto-incremented, it is also auto-incremented inside the array. my @stuff; my $w = 1;

Re: r28523 - docs/Perl6/Spec/S32-setting-library

2009-10-01 Thread Jan Ingvoldstad
On Thu, Oct 1, 2009 at 11:03 PM, Minimiscience minimiscie...@gmail.comwrote: On Oct 1, 2009, at 4:43 PM, Jan Ingvoldstad wrote: On Thu, Oct 1, 2009 at 10:15 PM, Moritz Lenz mor...@faui2k3.org wrote: What's the 0th root of a number, then? It would be a number $y for which $y ** 0 == $x,

Re: object possible representations (was Re: r28523 - ...)

2009-10-01 Thread Darren Duncan
Jon Lang had some good thoughts on this. I want to clarify or expand on my proposal so it is more clearly understood. 1. First of all, and there may have been no confusion on this but I'll say it anyway: When a class has multiple possreps, one main point here is that users could use the

Re: 99problems-31-to-40 failure

2009-10-01 Thread Daniel Ruoso
Em Qui, 2009-10-01 às 12:22 -0400, Kevin Phair escreveu: This test fails for me with the latest Rakudo. It looks like this is because when a variable is pushed onto an array, and then auto-incremented, it is also auto-incremented inside the array. my @stuff; my $w = 1; @stuff.push($w);