Instructions in project.
Used algorithm from University of Waterloo. You can use this to do your math homework :)