Table of Contents

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 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

left long
right long

Returns

long

Divide(long, long)

public static long Divide(long left, long right)

Parameters

left long
right long

Returns

long

Multiply(long, long)

public static long Multiply(long left, long right)

Parameters

left long
right long

Returns

long

Negate(long)

public static long Negate(long value)

Parameters

value long

Returns

long

Remainder(long, long)

public static long Remainder(long left, long right)

Parameters

left long
right long

Returns

long

Subtract(long, long)

public static long Subtract(long left, long right)

Parameters

left long
right long

Returns

long