#15003: calling factorials of RIF
-------------------------------------+-------------------------------------
       Reporter:  dkrenn             |        Owner:
           Type:  defect             |       Status:  positive_review
       Priority:  minor              |    Milestone:  sage-6.2
      Component:  numerical          |   Resolution:
       Keywords:  factorial RIF      |    Merged in:
  RealIntervalField calling          |    Reviewers:  Ralf Stephan
  inconsistent beginner              |  Work issues:
        Authors:  amitjamadagni      |       Commit:
Report Upstream:  N/A                |  fac03faa1b344513c0242b6f3e3c0022809fbe34
         Branch:                     |     Stopgaps:
  u/rws/ticket/15003                 |
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by ppurka):

 Replying to [comment:20 rws]:
 > But that is an enhancement while this is a defect. And this is not only
 independent from that but the refactoring will also benefit from this
 ticket being separate and not waited on until eternity.
 >
 > Please see #16166.

 Thanks for opening the new ticket. This ticket is also an enhancement to
 `RIF`. And the implementation here is not complete because the same change
 should happen to, for example, `CIF`. Even after the current ticket, we
 still have inconsistent behavior depending on whether the element is in
 `RIF` or `RR` or `ZZ`, etc.

 For example, suppose you run a long program or sequence of functions where
 the output happens to become an element of `QQ`:
 {{{
 sage: a = QQ(2)  # suppose "a" is got as an output of a function
 sage: a.factorial()
 ...
 AttributeError: 'sage.rings.rational.Rational' object has no attribute
 'factorial'

 sage: a = ZZ(2)  # for another input to the function, output is an element
 of ZZ
 sage: a.factorial()
 2
 }}}
 From the end user point of view, the behavior is very inconsistent and
 depends on whether after all the computations you get back an element from
 `QQ` or `ZZ`. This needs to be fixed more generally, and this is why I
 said I wasn't ready to give it positive review in comment:11

 My question was: should we fix all these different fields just by patching
 them one by one, OR is there a general way to fix all the fields at one
 go?

--
Ticket URL: <http://trac.sagemath.org/ticket/15003#comment:21>
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.

Reply via email to