---
title: NDArray.ScalarType.bfloat16
framework: coreai
role: symbol
role_heading: Case
path: coreai/ndarray/scalartype-swift.enum/bfloat16
---

# NDArray.ScalarType.bfloat16

A 16-bit brain floating-point type.

## Declaration

```swift
case bfloat16
```

## Discussion

Discussion BFloat16 (Brain Floating Point) uses 8 exponent bits and 7 mantissa bits, matching the exponent range of Float32 but with reduced precision. This type is widely supported across most operations including matrix multiplication, activation functions, and quantization.

## See Also

### Defining floating-point types

- [NDArray.ScalarType.float16](coreai/ndarray/scalartype-swift.enum/float16.md)
- [NDArray.ScalarType.float32](coreai/ndarray/scalartype-swift.enum/float32.md)
- [NDArray.ScalarType.float64](coreai/ndarray/scalartype-swift.enum/float64.md)
