On Tuesday, October 30, 2012 6:31:17 PM UTC-4, Benjamin Jones wrote: > > On Tue, Oct 30, 2012 at 2:58 PM, David Roe <roed...@gmail.com<javascript:>> > wrote: > > I think this is a bug: the type of the result should be consistent. > > David > > > > > > On Tue, Oct 30, 2012 at 3:54 PM, mmarco <mma...@unizar.es <javascript:>> > wrote: > >> > >> There is an inconsistency in the behaviour of the cosine function > >> sage: type(cos(1)) > >> <type 'sage.symbolic.expression.Expression'> > >> sage: type(cos(pi)) > >> <type 'sage.symbolic.expression.Expression'> > >> sage: type(cos(0)) > >> <type 'int'> > >> > >> It also happens with the sine: > >> > >> sage: type(sin(0)) > >> <type 'int'> > >> sage: type(sin(pi)) > >> <type 'sage.symbolic.expression.Expression'> > >> > >> and the exponential: > >> sage: type(exp(0)) > >> <type 'int'> > >> sage: type(exp(1)) > >> <type 'sage.symbolic.expression.Expression'> > >> > >> the logarithm: > >> > >> sage: type(log(1)) > >> <type 'int'> > >> sage: type(log(2)) > >> <type 'sage.symbolic.expression.Expression'> > >> sage: type(log(0)) > >> <type 'sage.symbolic.expression.Expression'> > >> > >> > >> > >> Is there some reason for this or is it a bug? Shouldn't the answer be, > >> at least, a sage Integer and not a python int? > >> > > There is a ticket for this on trac somewhere.. can't locate its number > ATM. > > http://trac.sagemath.org/sage_trac/ticket/10133
By the way, this ticket's discussion suggests that Integer is indeed the appropriate class... -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To post to this group, send email to sage-devel@googlegroups.com. To unsubscribe from this group, send email to sage-devel+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel?hl=en.