#17890: Remove _(rich)cmp_c_impl
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-6.6
Component: cython | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jdemeyer/ticket/17890 | 17bd067153ad40ced061147390687f514a7f7cba
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by jdemeyer):
Replying to [comment:40 vdelecroix]:
> 8. For `right_to_bool_sgn`:
> - I found the following more readable
> {{{
> cdef inline bint rich_to_bool_sgn(int op, long c):
> return rich_to_bool(op, (c > 0) - (c < 0))
> }}}
Sure, I can change that.
> - why the input is `long c` and not `int c`? the output of `mpz_cmp`
is an `int` for example.
It's an `inline` function, so it won't matter much for performance. `long`
is more general than `int`, so if there is ever a use case for a `long`,
it will be possible.
--
Ticket URL: <http://trac.sagemath.org/ticket/17890#comment:43>
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.