First checkin before refactoring c++ code to c#
Before modifying calc and solve
Remove preprocessor directives allow GC
remove duplicate defined vars
Rewrite 4. to 4.0
Add closing bracket and reformat whitespace
remove iostream decl
Convert *x[i] to x[i].Value
Convert calls to calc
use enum for return values
fix decl of grad
fix usage of x[j]
Fix numerical lib calls up
Fix array decl
Fix up use of ConstraintEnum
fix up define helpers to local variables

this is a hack and low on performance
but we can refactor later
Fix up external use of Math lib functions
Fix usage of constraint enums
Fix more Math lib usage
Fix last compile error