Hi, Here is a brief example on how to use expy to implement the math module: (for more details, see http://expy.sf.net/) """Python math module by expy-cxpy.""" from expy import * expymodule(__name__) #includes, defines, etc. @prologue def myprolog(): return """ #include <math.h> """ @function(double) #return type: double def sqrt(x=double): #argument x: double """sqrt(x) --> the square root of x.""" return "sqrt(x)" #as an expression #a more terse way @function(double) def sin(x=double): """sin(x) --> the sin of x.""" pass #the deduced call: sin(x) #more functions ... expymodule(__name__) #end of module
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4