On Monday 10 September 2007 18:15, David Harvey wrote:
> > The binomial function then gets a prefix something like:
> >
> > try:
> >      call_fast_integer_function( x, m, _binomial_raw )
> > except CoercionError:
> >      # compute binomial slowly ....
> >
> > The principle refinement needed is:  How can  
> > call_fast_integer_function
> > bewritten generically?  What is _binomial_raw -- a c-function, a  
> > cython
> > function?
>
> I'm not too comfortable with this suggestion... it's too specific to  
> integer arguments.

It is disgustingly specific, but at the same time it is much better than 
having the int coercion code in every function that coerces ints.  I think 
something like this specific to a type is about the best you can do, but I'd 
loved to be proven wrong.

Anyhow, I think my overarching goal was to fit this kind of thing into some 
sort of coercion framework along with standard canonical coercion or a new 
standard ... I'm not sure (and that probably shows in my vagueness :) )

--
Joel

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to