It seems that you cannot use arbitrary .Net code in SQL CLR but have to develop specifically for it, by decorating your code with attributes like SqlFunction
and using its own special types like SqlDouble
instead of just System.Double
.
Nevertheless, I'd expect you can write a small wrapper/adapter .Net library and then reference and call Math.NET Numerics routines from there.