Table of Contents

Class SandboxInt32Math

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

Checked 32-bit integer arithmetic with sandbox error semantics. Overflow is detected with branchless bit tests (no closures, no try/catch) so each operation is allocation-free and inlineable on the compiler's unboxed fast path and the interpreter alike. Every overflow / divide-by-zero raises the same InvalidInput error as before.

public static class SandboxInt32Math
Inheritance
SandboxInt32Math
Inherited Members

Methods

Add(int, int)

public static int Add(int left, int right)

Parameters

left int
right int

Returns

int

Divide(int, int)

public static int Divide(int left, int right)

Parameters

left int
right int

Returns

int

Multiply(int, int)

public static int Multiply(int left, int right)

Parameters

left int
right int

Returns

int

Negate(int)

public static int Negate(int value)

Parameters

value int

Returns

int

Remainder(int, int)

public static int Remainder(int left, int right)

Parameters

left int
right int

Returns

int

Subtract(int, int)

public static int Subtract(int left, int right)

Parameters

left int
right int

Returns

int