Class SandboxInt64Math
Checked 64-bit integer arithmetic with sandbox error semantics. Overflow is detected with branchless bit tests for add/subtract and a minimized checked multiply path, so each operation is allocation-free and inlineable on the compiler's unboxed fast path and the interpreter alike — mirroring SandboxInt32Math. Every overflow / divide-by-zero raises the same InvalidInput error.
public static class SandboxInt64Math
- Inheritance
-
SandboxInt64Math
- Inherited Members
Methods
Add(long, long)
public static long Add(long left, long right)
Parameters
Returns
Divide(long, long)
public static long Divide(long left, long right)
Parameters
Returns
Multiply(long, long)
public static long Multiply(long left, long right)
Parameters
Returns
Negate(long)
public static long Negate(long value)
Parameters
valuelong
Returns
Remainder(long, long)
public static long Remainder(long left, long right)
Parameters
Returns
Subtract(long, long)
public static long Subtract(long left, long right)