On Sep 19, 9:58 pm, Mizuchi <ytj...@gmail.com> wrote:
> I think it could be better if either (1) sage provide a
> parameter for integrate that whether accept the principal value, (2) or at
> least print a warning instead throw an exception.

Well here's a way that voids your warranty (which you didn't have
anyway):

sage: integrate(x,x) #ensure maxima is initialized
1/2*x^2
sage: sage.libs.ecl.ecl_eval('(defun principal nil t)')
<ECL: PRINCIPAL>
sage: integrate(1/x^3,x,-1,3)
4/9
sage: sage.libs.ecl.ecl_eval('(defun principal nil (cond ($noprincipal
(diverg)) ((not pcprntd) (merror "Divergent Integral"))))')
<ECL: PRINCIPAL>

Everything should be back to normal after this, but this is obviously
not the way in which we'd put this in the library.

-- 
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.


Reply via email to