How do I check if a number is positive or negative in C#?
This code takes advantage of SIMD instructions to improve performance.
public static bool IsPositive(int n) { var v = new Vector(n); var result = Vector.GreaterThanAll(v, Vector.Zero); return result; }