#16424: is_triangular_number() cleanup
-------------------------+-------------------------------------------------
Reporter: rws | Owner:
Type: | Status: needs_work
enhancement | Milestone: sage-6.3
Priority: minor | Resolution:
Component: | Merged in:
quadratic forms | Reviewers: Ralf Stephan
Keywords: | Work issues:
Authors: | Commit:
Vincent Delecroix | 5894592f6d380138198c4100fa0d55d7e75f3eb2
Report Upstream: N/A | Stopgaps:
Branch: |
public/16424 |
Dependencies: |
-------------------------+-------------------------------------------------
Changes (by {'newvalue': u'Vincent Delecroix', 'oldvalue': u'Ralf Stephan'}):
* status: needs_info => needs_work
* author: Ralf Stephan => Vincent Delecroix
* branch: u/rws/is_triangular_number___speed_up => public/16424
* reviewer: => Ralf Stephan
* commit: de05b593cb8497493ce92e742a7379bdc8bf8489 =>
5894592f6d380138198c4100fa0d55d7e75f3eb2
Comment:
Replying to [comment:3 vdelecroix]:
> see my branch at public/16424
>
> I rewrote the function as it can be done in a much cleaner/faster way.
Moreover, a function called `is_X` must return a boolean. It makes no
sense to have it return boolean or integer values. I decided to add an
extra argument `return_value` that does the job. I also rewrite the doc
which was very ugly.
>
> Tell me what you think...
>
> Anyway, I am not sure it is worth it to have a function which is just
equivalent to
> {{{
> is_triangular = lambda n: (8*n+1).is_square()
> }}}
Hi Vincent, the branch is fine. I would agree that the function is not
worth occupying one of the precious global slots. However, I think it is
still good to have, so you can set positive if you also remove it from
`quadratic_forms/all.py`.
----
New commits:
||[http://git.sagemath.org/sage.git/commit/?id=33a3e17881cb8f8b286358cd2098cffb4c4aae6e
33a3e17]||{{{trac #16424: merge sage.6.3.beta3}}}||
||[http://git.sagemath.org/sage.git/commit/?id=5894592f6d380138198c4100fa0d55d7e75f3eb2
5894592]||{{{trac #16424: revamp 'is_triangular_number'}}}||
--
Ticket URL: <http://trac.sagemath.org/ticket/16424#comment:5>
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.