---
title: "signbit(with:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/signbit(with:name:)"
---

# signbit(with:name:)

Returns the sign bit of the input tensor elements.

## Declaration

```swift
func signbit(with tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
```

## Parameters

- `tensor`: The input tensor.
- `name`: An optional string which serves as an identifier for the operation.

## Return Value

Return Value A valid MPSGraphTensor object containing the elementwise result of the applied operation.

## Discussion

Discussion This operation returns true if the sign bit is set for the correspnding floating-point input element, otherwise it returns false.
