On Mar 13, 9:56 pm, "Georg S. Weber"
wrote:
> Hi all,
>
> is there already an operator named %% (double-percent)?
> Somewhere in Python or its relatives?
>
> If not, we could have the best of both worlds. Just let act in Cython
> % as the corresponding C operator, i.e. -1 % 5 == -1 (to have maxim
Hi all,
is there already an operator named %% (double-percent)?
Somewhere in Python or its relatives?
If not, we could have the best of both worlds. Just let act in Cython
% as the corresponding C operator, i.e. -1 % 5 == -1 (to have maximal
speed), and let in Cython %% act as the Python % opera
Nick Alexander wrote:
>> *plants tongue in cheek* Besides, Cython has *five* letters in common
>> with Python, and only *one* letter in common with C. Clearly, that
>> helps us see where the priorities should be :).
>
> However, all of the letters in C are the same, whereas only 5/6 of the
> l
On Mar 13, 2009, at 5:30 AM, Georg S. Weber wrote:
> On 12 Mrz., 16:51, Carl Witty wrote:
>> On Thu, Mar 12, 2009 at 4:16 AM, David Joyner
>> wrote:
>>
>>> I have an ignorant question: what are the canonical reps of
>>> ZZZ/nZZZ in C? (-n/2,n/2]?
>>> Is the issue to decide between the interva
> *plants tongue in cheek* Besides, Cython has *five* letters in common
> with Python, and only *one* letter in common with C. Clearly, that
> helps us see where the priorities should be :).
However, all of the letters in C are the same, whereas only 5/6 of the
letters in Python are the same.
> [X] Get -1, because they're C ints, and besides we wouldn't be using
> Cython if we didn't care about performance
When I sit down to program something in Cython, I expect the ease of
programming in Python, with the speed benefits of programming in C.
When I'm implementing an algorithm, I'm th
Ryan Hinton wrote:
> One more quick thought. The first sentence of the Cython tutorial
> (chapter two of the manual):
>
> The fundamental nature of Cython can be summed up as follows: Cython is
> Python with C data types.
>
> I understand there are thorny corner-cases and even common cases wh
One more quick thought. The first sentence of the Cython tutorial
(chapter two of the manual):
The fundamental nature of Cython can be summed up as follows: Cython is
Python with C data types.
I understand there are thorny corner-cases and even common cases where
it's best to break with Pyth
On Fri, Mar 13, 2009 at 5:30 AM, Georg S. Weber
wrote:
>
>
>
> On 12 Mrz., 16:51, Carl Witty wrote:
>> On Thu, Mar 12, 2009 at 4:16 AM, David Joyner wrote:
>>
>> > I have an ignorant question: what are the canonical reps of
>> > ZZZ/nZZZ in C? (-n/2,n/2]?
>> > Is the issue to decide between the
On 12 Mrz., 16:51, Carl Witty wrote:
> On Thu, Mar 12, 2009 at 4:16 AM, David Joyner wrote:
>
> > I have an ignorant question: what are the canonical reps of
> > ZZZ/nZZZ in C? (-n/2,n/2]?
> > Is the issue to decide between the interval [0,n-1] as reps of ZZ/nZZ
> > (Python)
> > vs (-n/2,n/2]
On Mar 12, 2009, at 2:17 PM, Jason Grout wrote:
> Craig Citro wrote:
>> and be *as fast as humanly possible*. Plus, when we move things from
>> Python down to Cython, we already have changes to make -- for
>> instance, x**2 has to change, because C doesn't support
>> exponentiation, so why would
Craig Citro wrote:
> and be *as fast as humanly possible*. Plus, when we move things from
> Python down to Cython, we already have changes to make -- for
> instance, x**2 has to change, because C doesn't support
> exponentiation, so why would it be any different for %?
Cython doesn't automatic
>> [X] Get -1, because they're C ints, and besides we wouldn't be using
>> Cython if we didn't care about performance
I support this because I would like Cython to remain primarily a way
to interface to C code rather than become the "default language of
sage".
Nick
--~--~-~--~~-
> [ ] Get 4, because it should behave just like in Python, even though
> it will require extra logic and be a bit slower
>
> [X] Get -1, because they're C ints, and besides we wouldn't be using
> Cython if we didn't care about performance
>
> [ ] Let the programmer decide (e.g. using http://wiki.c
On Thu, Mar 12, 2009 at 4:16 AM, David Joyner wrote:
>
> I have an ignorant question: what are the canonical reps of
> ZZZ/nZZZ in C? (-n/2,n/2]?
> Is the issue to decide between the interval [0,n-1] as reps of ZZ/nZZ (Python)
> vs (-n/2,n/2] (C)?
In C, ZZ/nZZ does not have canonical representat
Robert,
Since I hit the problem I'm motivated to chime in. I also followed the
email trail on the cython list.
Quick summary:
[X] Let the programmer decide, with
[X'] Get 4 as the default
There are obviously some cases where speed is paramount and others where
Python compatibility is paramo
I have an ignorant question: what are the canonical reps of
ZZZ/nZZZ in C? (-n/2,n/2]?
Is the issue to decide between the interval [0,n-1] as reps of ZZ/nZZ (Python)
vs (-n/2,n/2] (C)?
The only C book I have in my office doesn't have this and my
browser seems to have some problems ("ASSERT: *** S
17 matches
Mail list logo