On Mon, Apr 20, 2009 at 7:20 AM, Mike Hansen <mhan...@gmail.com> wrote:
>
>>
>> But this floor function can return a floating point number, so I would
>> need to coerce its result to type Integer. Did I miss any other import
>> statements to make  sage.calculus.calculus import Function_floor
>> return a result of type integer?
>
> This is because Function_floor is a class and the floor function is an
> instance of that class.
>
> sage: type(floor)
> <class 'sage.calculus.calculus.Function_floor'>
>
> sage: from sage.calculus.calculus import Function_floor
> sage: f = Function_floor()
> sage: f(2.3)
> 2
> sage: type(_)
> <type 'sage.rings.integer.Integer'>

Holy bit buckets! Of course. Problem fixed. Thank you, Mike.

-- 
Regards
Minh Van Nguyen

--~--~---------~--~----~------------~-------~--~----~
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
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to