Sage is a python module. 

The following is an example which defines a class from which you can 
manipulate functions :



-------------------------------------------------

#! /usr/bin/sage -python
# -*- coding: utf8 -*-

from sage.all import *

class MaClasse(object):
    def __init__(self,exp):
        self.sage = exp
        self.sageFast = self.sage._fast_float_(x)
    def Derr(self):
        return MaClasse(self.sage.derivative())
    def Evaluation(self,xe):
        return numerical_approx(self.sageFast(xe))


var('x,y')
f = MaClasse(x**2+2)

print f.Derr().sage
print f.Derr().Evaluation(3)
print f.Evaluation(8)


--------------------------------------

Copy-paste it in a text file, make it executable, and enjoy !

Laurent



--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to