11.6 Compiling PackagesΒΆ

Once you have defined the package DrawComplex, you need to compile and test it. To compile the package, issue the system command )compile drawpak. FriCAS reads the file drawpak.spad and compiles its contents into machine binary. If all goes well, the file DRAWCX.NRLIB is created in your local directory for the package. To test the package, you must load the package before trying an operation.

Compile the package.

)compile drawpak

Expose the package.

)expose DRAWCX

Use an odd step size to avoid a pole at the origin.

setRealSteps 51
setImagSteps 51

Define f to be the Gamma function.

f(z) == Gamma(z)

Clip values of function with magnitude larger than 7.

setClipValue 7

Draw the Gamma function.

drawComplex(f,-%pi..%pi,-%pi..%pi, false)