Skip to content

Class SandboxInt64Math

Namespace: DotBoxD.Kernels.Sandbox
Assembly: DotBoxD.Kernels.dll

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 DotBoxD.Kernels.Sandbox.SandboxInt32Math. Every overflow / divide-by-zero raises the same DotBoxD.Kernels.Sandbox.SandboxErrorCode.InvalidInput error.

public static class SandboxInt64Math

objectSandboxInt64Math

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

public static long Add(long left, long right)

left long

right long

long

public static long Divide(long left, long right)

left long

right long

long

public static long Multiply(long left, long right)

left long

right long

long

public static long Negate(long value)

value long

long

public static long Remainder(long left, long right)

left long

right long

long

public static long Subtract(long left, long right)

left long

right long

long