Hints:
System.Math.E
≈ e,
System.Math.PI
≈ π.
cmath.cs
to find out how the complex function are defined.
complex.cs
and
cmath.cs
files and place them in the directory of your math-exercise,
wget http://62.107.14.89/~fedorov/prog/lib/complex/complex.cs wget http://62.107.14.89/~fedorov/prog/lib/complex/cmath.csAdd the following lines to your Makefile to build the
cmath.dll
library,
cmath.dll : cmath.cs complex.cs mcs -target:library -out:cmath.dll cmath.cs complex.csIf you put the files in another directory, say
/path/to/my/lib
, than the lines should be modified slightly,
LIBDIR = /path/to/my/lib cmath.dll : $(LIBDIR)/cmath.cs $(LIBDIR)/complex.cs mcs -target:library -out:cmath.dll $^Link this library when compiling your
main.cs
,
main.exe : main.cs cmath.dll mcs -reference:cmath.dll main.cs