<!--
{
  "availability" : [
    "iOS: 14.0.0 - 17.4.0",
    "iPadOS: 14.0.0 - 17.4.0",
    "macCatalyst: 14.0.0 - 17.4.0",
    "macOS: 11.0.0 - 14.3.0",
    "tvOS: 14.0.0 - 17.4.0"
  ],
  "documentType" : "symbol",
  "framework" : "MLCompute",
  "identifier" : "/documentation/MLCompute/MLCArithmeticOperation",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "ML Compute"
    ],
    "preciseIdentifier" : "c:@E@MLCArithmeticOperation"
  },
  "title" : "MLCArithmeticOperation"
}
-->

# MLCArithmeticOperation

Constants that describe an arithmetic operation.

```
enum MLCArithmeticOperation
```

## Topics

### Basic Operations

[`MLCArithmeticOperation.add`](/documentation/MLCompute/MLCArithmeticOperation/add)

Calculates the element-wise sum of the inputs.

[`MLCArithmeticOperation.subtract`](/documentation/MLCompute/MLCArithmeticOperation/subtract)

Calculates the element-wise difference between the inputs.

[`MLCArithmeticOperation.multiply`](/documentation/MLCompute/MLCArithmeticOperation/multiply)

Calculates the element-wise product of the inputs.

[`MLCArithmeticOperation.multiplyNoNaN`](/documentation/MLCompute/MLCArithmeticOperation/multiplyNoNaN)

Calculates the element-wise product of the inputs, and returns `0` when the result isn’t a number or infinity.

[`MLCArithmeticOperation.divide`](/documentation/MLCompute/MLCArithmeticOperation/divide)

Calculates the element-wise division of the inputs.

[`MLCArithmeticOperation.divideNoNaN`](/documentation/MLCompute/MLCArithmeticOperation/divideNoNaN)

Calculates the element-wise division of the inputs, and returns `0` if the denominator is `0`.

[`MLCArithmeticOperation.min`](/documentation/MLCompute/MLCArithmeticOperation/min)

Calculates the element-wise minimum of the inputs.

[`MLCArithmeticOperation.max`](/documentation/MLCompute/MLCArithmeticOperation/max)

Calculates the element-wise maximum the inputs.

### Rounding Operations

[`MLCArithmeticOperation.floor`](/documentation/MLCompute/MLCArithmeticOperation/floor)

Calculates the element-wise floor of the inputs.

[`MLCArithmeticOperation.round`](/documentation/MLCompute/MLCArithmeticOperation/round)

Calculates the element-wise rounding of the inputs.

[`MLCArithmeticOperation.ceil`](/documentation/MLCompute/MLCArithmeticOperation/ceil)

Calculates the element-wise ceiling of the inputs.

### Trigonometric Operations

[`MLCArithmeticOperation.sin`](/documentation/MLCompute/MLCArithmeticOperation/sin)

Calculates the element-wise sine of the input.

[`MLCArithmeticOperation.cos`](/documentation/MLCompute/MLCArithmeticOperation/cos)

Calculates the element-wise cosine of the input.

[`MLCArithmeticOperation.tan`](/documentation/MLCompute/MLCArithmeticOperation/tan)

Calculates the element-wise tangent of the input.

[`MLCArithmeticOperation.asin`](/documentation/MLCompute/MLCArithmeticOperation/asin)

Calculates the element-wise inverse sine of the input.

[`MLCArithmeticOperation.acos`](/documentation/MLCompute/MLCArithmeticOperation/acos)

Calculates the element-wise inverse cosine of the input.

[`MLCArithmeticOperation.atan`](/documentation/MLCompute/MLCArithmeticOperation/atan)

Calculates the element-wise inverse tangent of the input.

[`MLCArithmeticOperation.sinh`](/documentation/MLCompute/MLCArithmeticOperation/sinh)

Calculates the element-wise hyperbolic sine of the input.

[`MLCArithmeticOperation.cosh`](/documentation/MLCompute/MLCArithmeticOperation/cosh)

Calculates the element-wise hyperbolic cosine of the input.

[`MLCArithmeticOperation.tanh`](/documentation/MLCompute/MLCArithmeticOperation/tanh)

Calculates the element-wise hyperbolic tangent of the input.

[`MLCArithmeticOperation.asinh`](/documentation/MLCompute/MLCArithmeticOperation/asinh)

Calculates the element-wise inverse hyperbolic sine of the input.

[`MLCArithmeticOperation.acosh`](/documentation/MLCompute/MLCArithmeticOperation/acosh)

Calculates the element-wise inverse hyperbolic cosine of the input.

[`MLCArithmeticOperation.atanh`](/documentation/MLCompute/MLCArithmeticOperation/atanh)

Calculates the element-wise inverse hyperbolic tangent of the input.

### Advanced Operations

[`MLCArithmeticOperation.sqrt`](/documentation/MLCompute/MLCArithmeticOperation/sqrt)

Calculates the element-wise square root of the input.

[`MLCArithmeticOperation.rsqrt`](/documentation/MLCompute/MLCArithmeticOperation/rsqrt)

Calculates the element-wise reciprocal of the square root of the input.

[`MLCArithmeticOperation.pow`](/documentation/MLCompute/MLCArithmeticOperation/pow)

Calculates the element-wise first input raised to the power of the second input.

[`MLCArithmeticOperation.exp`](/documentation/MLCompute/MLCArithmeticOperation/exp)

Calculates the element-wise result of the exponent raised to the power of the input.

[`MLCArithmeticOperation.exp2`](/documentation/MLCompute/MLCArithmeticOperation/exp2)

Calculates the element-wise result of the number 2 raised to the power of the input.

[`MLCArithmeticOperation.log`](/documentation/MLCompute/MLCArithmeticOperation/log)

Calculates the element-wise natural logarithm of the input.

[`MLCArithmeticOperation.log2`](/documentation/MLCompute/MLCArithmeticOperation/log2)

Calculates the element-wise base 2 logarithm of the input.

### Debugging

[`MLCArithmeticOperationCount`](/documentation/MLCompute/MLCArithmeticOperation/MLCArithmeticOperationCount)

The total number of arithmetic operations.

[`debugDescription`](/documentation/MLCompute/MLCArithmeticOperation/debugDescription)

A textual description of the arithmetic operation you use for debugging.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)