#17088: PeriodicRegion.__div__: use integer arithmetic
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: defect | Status: needs_review
Priority: critical | Milestone: sage-6.4
Component: elliptic curves | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jdemeyer/ticket/17088 | 15b7588e82c7d67bbbab14fec4c14c862bcc4c1f
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by cremona):
Replying to [comment:8 jdemeyer]:
> Replying to [comment:7 cremona]:
> > At the moment I cannot see how the new code manages to do in one line
what the old code took 4 lines to do, but Jeroen is very clever so I will
look again.
> Part of the problem with the old code is that it's not clear what it is
supposed to do.
I agree. It took me doxens of hours (literally) to work out what RB's
code did, and I asure you that this whole file is now very much more
understandable than it was before. That was a while ago though.
>
> Anyway, I claim the following: if you assume that all the floating point
operations are exact, the 4 lines all do exactly the same so they can
easily be replaced by 1 line. I guess the addition of the 3 extra lines
was simply to hide floating-point rounding errors.
Something like that, but I am now unconvinced in the correctness of either
the old or the new.
There's a parallelogram, whose vertices in C are 0, w1, w2, w1+w2. The
state of the object at any time is held by a 2-dimensional array "data",
say of dimensions r x c, indicating, out of all the r*c sub-
parallelograms which the big one is divided into, those for which
data[i,j]=True have some property. The plots show this configuration.
When the structure is divided by n the entire thing is supposed to be
shrunk by 1/n and then replicated n*n times to fill the whole
parallelogram with n*n copies of the original configuration.
Back to the code...
--
Ticket URL: <http://trac.sagemath.org/ticket/17088#comment:10>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.