---
title: "wrappingSubtract(_:ordering:)"
framework: synchronization
role: symbol
role_heading: Instance Method
path: "synchronization/atomic/wrappingsubtract(_:ordering:)-3795w"
---

# wrappingSubtract(_:ordering:)

Perform an atomic wrapping subtract operation and return the old and new value, applying the specified memory ordering.

## Declaration

```swift
@discardableResult func wrappingSubtract(_ operand: Int64, ordering: AtomicUpdateOrdering) -> (oldValue: Int64, newValue: Int64)
```

## Parameters

- `operand`: An integer value.
- `ordering`: The memory ordering to apply on this operation.

## Return Value

Return Value A tuple containing the original value before the operation and the new value after the operation.

## Discussion

Discussion note: This operation silently wraps around on overflow, like the &- operator does on Int64 values.
