# _SignedCheckedArithmetic
<span class="source-link">[[Source]](src/builtin/signed.md#L553)</span>
```pony
primitive val _SignedCheckedArithmetic
```

## Constructors

### create
<span class="source-link">[[Source]](src/builtin/signed.md#L553)</span>


```pony
new val create()
: _SignedCheckedArithmetic val^
```

#### Returns

* [_SignedCheckedArithmetic](builtin-_SignedCheckedArithmetic) val^

---

## Public Functions

### eq
<span class="source-link">[[Source]](src/builtin/signed.md#L554)</span>


```pony
fun box eq(
  that: _SignedCheckedArithmetic val)
: Bool val
```
#### Parameters

*   that: [_SignedCheckedArithmetic](builtin-_SignedCheckedArithmetic) val

#### Returns

* [Bool](builtin-Bool) val

---

### ne
<span class="source-link">[[Source]](src/builtin/signed.md#L554)</span>


```pony
fun box ne(
  that: _SignedCheckedArithmetic val)
: Bool val
```
#### Parameters

*   that: [_SignedCheckedArithmetic](builtin-_SignedCheckedArithmetic) val

#### Returns

* [Bool](builtin-Bool) val

---

## Private Functions

### _mulc\[U: [_UnsignedInteger](builtin-_UnsignedInteger)\[U\] val, T: (([I8](builtin-I8) val | [I16](builtin-I16) val | [I32](builtin-I32) val | [I64](builtin-I64) val | [I128](builtin-I128) val | [ILong](builtin-ILong) val | [ISize](builtin-ISize) val) & [_SignedInteger](builtin-_SignedInteger)\[T, U\] val)\]
<span class="source-link">[[Source]](src/builtin/signed.md#L554)</span>


basically exactly what the runtime functions __muloti4, mulodi4 etc. are doing
and roughly as fast as these.

Additionally on (at least some) 32 bit systems, the runtime function for checked 64 bit integer addition __mulodi4 is not available.
So we shouldn't use: `@"llvm.smul.with.overflow.i64"[(I64, Bool)](this, y)`

Also see https://bugs.llvm.org/show_bug.cgi?id=14469

That's basically why we rolled our own.


```pony
fun box _mulc[U: _UnsignedInteger[U] val, T: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val) & _SignedInteger[T, U] val)](
  x: T,
  y: T)
: (T , Bool val)
```
#### Parameters

*   x: T
*   y: T

#### Returns

* (T , [Bool](builtin-Bool) val)

---

