<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/simd/simd_half4",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "simd"
    ],
    "preciseIdentifier" : "c:@T@simd_half4"
  },
  "title" : "simd_half4"
}
-->

# simd_half4

A vector of four 16-bit floating-point elements.

```
typealias simd_half4 = SIMD4<Float16>
```

## Topics

### Functions to create four-element vectors from other vectors

[`simd_make_half4(_:)`](/documentation/simd/simd_make_half4(_:)-fx5r)

Returns a new vector from the specified two-element vector, and other elements set to zero.

[`simd_make_half4(_:)`](/documentation/simd/simd_make_half4(_:)-iuj0)

Returns a new vector from the specified three-element vector, and other elements set to zero.

[`simd_make_half4(_:)`](/documentation/simd/simd_make_half4(_:)-9u2ra)

Returns a new vector from the specified vector.

[`simd_make_half4(_:)`](/documentation/simd/simd_make_half4(_:)-10t2p)

Returns a new vector by truncating the specified eight-element vector.

[`simd_make_half4(_:)`](/documentation/simd/simd_make_half4(_:)-43737)

Returns a new vector by truncating the specified 16-element vector.

[`simd_make_half4(_:)`](/documentation/simd/simd_make_half4(_:)-60ltf)

Returns a new vector by truncating the specified 32-element vector.

[`simd_make_half4(_:_:)`](/documentation/simd/simd_make_half4(_:_:)-2ea2z)

Returns a new vector from the specified vectors.

[`simd_make_half4_undef(_:)`](/documentation/simd/simd_make_half4_undef(_:)-16ipv)

Returns a new vector from the specified two-element vector, and other elements undefined.

[`simd_make_half4_undef(_:)`](/documentation/simd/simd_make_half4_undef(_:)-136jo)

Returns a new vector from the specified three-element vector, and other elements undefined.

### Functions to create four-element vectors from scalar values

[`simd_make_half4(_:)`](/documentation/simd/simd_make_half4(_:)-6lkh9)

Returns a new vector with the first element set to a scalar value, and other elements set to zero.

[`simd_make_half4(_:_:_:_:)`](/documentation/simd/simd_make_half4(_:_:_:_:))

Returns a new vector from the specified scalar values.

[`simd_make_half4_undef(_:)`](/documentation/simd/simd_make_half4_undef(_:)-4axzi)

Returns a new vector with the first element set to a scalar value, and other elements undefined.

[`simd_make_half4(_:_:)`](/documentation/simd/simd_make_half4(_:_:)-2n13g)

Returns a new vector from a scalar value and a vector.

[`simd_make_half4(_:_:)`](/documentation/simd/simd_make_half4(_:_:)-6uygn)

Returns a new vector from a vector and a scalar value.

[`simd_make_half4(_:_:_:)`](/documentation/simd/simd_make_half4(_:_:_:)-43wuv)

Returns a new vector from a scalar value, a vector, and a scalar value.

[`simd_make_half4(_:_:_:)`](/documentation/simd/simd_make_half4(_:_:_:)-74ybg)

Returns a new vector from two scalar values and a vector.

[`simd_make_half4(_:_:_:)`](/documentation/simd/simd_make_half4(_:_:_:)-6g0kb)

Returns a new vector from a vector and scalar values.

### Functions to create four-element vectors from vectors of other types

[`simd_half`](/documentation/simd/simd_half-3g8pd)

Returns a new vector from the specified vector of 8-bit, signed-integer elements.

[`simd_half`](/documentation/simd/simd_half-3fyxd)

Returns a new vector from the specified vector of 8-bit, unsigned-integer elements.

[`simd_half`](/documentation/simd/simd_half-3g3td)

Returns a new vector from the specified vector of 16-bit, signed-integer elements.

[`simd_half`](/documentation/simd/simd_half-3fu1d)

Returns a new vector from the specified vector of 16-bit, unsigned-integer elements.

[`simd_half`](/documentation/simd/simd_half-3gau9)

Returns a new vector from the specified vector of 32-bit, signed-integer elements.

[`simd_half`](/documentation/simd/simd_half-3g0m9)

Returns a new vector from the specified vector of 32-bit, unsigned-integer elements.

[`simd_half`](/documentation/simd/simd_half-3g9t7)

Returns a new vector from the specified vector of 64-bit, signed-integer elements.

[`simd_half`](/documentation/simd/simd_half-3fzzf)

Returns a new vector from the specified vector of 64-bit, unsigned-integer elements.

[`simd_half`](/documentation/simd/simd_half-3g13n)

Returns a new vector from the specified vector of 16-bit, floating-point elements.

[`simd_half`](/documentation/simd/simd_half-3fxvr)

Returns a new vector from the specified vector of 32-bit, floating-point elements.

[`simd_half`](/documentation/simd/simd_half-3fxbf)

Returns a new vector from the specified vector of 64-bit, floating-point elements.

### Common functions

[`simd_abs(_:)`](/documentation/simd/simd_abs(_:)-81q3k)

Returns the absolute value of each element in a vector.

[`simd_clamp(_:_:_:)`](/documentation/simd/simd_clamp(_:_:_:)-2vvpa)

Returns each element in a vector clamped to a specified range.

[`simd_equal(_:_:)`](/documentation/simd/simd_equal(_:_:)-6nuuw)

Returns true if every element in a vector is exactly equal to the corresponding element in a second vector, and otherwise returns false.

[`simd_fract(_:)`](/documentation/simd/simd_fract(_:)-3w251)

Returns the fractional part of each element in a vector.

[`simd_sign(_:)`](/documentation/simd/simd_sign(_:)-7533b)

Returns the sign of each element in a vector.

[`simd_step(_:_:)`](/documentation/simd/simd_step(_:_:)-4knqw)

Returns zero for each element in a vector less than a specified edge, and otherwise returns one.

### Reduce functions

[`simd_reduce_add(_:)`](/documentation/simd/simd_reduce_add(_:)-2ylck)

Returns the sum of all elements in a vector.

[`simd_reduce_max(_:)`](/documentation/simd/simd_reduce_max(_:)-4qtu6)

Returns the maximum value in a vector.

[`simd_reduce_min(_:)`](/documentation/simd/simd_reduce_min(_:)-4ulc6)

Returns the minimum value in a vector.

### Interpolation functions

[`simd_mix(_:_:_:)`](/documentation/simd/simd_mix(_:_:_:)-4uou1)

Returns an element-wise linearly interpolated value between two vectors.

[`simd_smoothstep(_:_:_:)`](/documentation/simd/simd_smoothstep(_:_:_:)-7gsfq)

Returns an element-wise smoothly interpolated value between two vectors.

### Extrema functions

[`simd_max(_:_:)`](/documentation/simd/simd_max(_:_:)-64l5l)

Returns the maximum value of each element in a vector.

[`simd_min(_:_:)`](/documentation/simd/simd_min(_:_:)-1ep1a)

Returns the minimum value of each element in a vector.

### Reciprocal and reciprocal square root functions

[`simd_recip(_:)`](/documentation/simd/simd_recip(_:)-822hi)

Returns the reciprocal of each element in a vector.

[`simd_rsqrt(_:)`](/documentation/simd/simd_rsqrt(_:)-i99u)

Returns the reciprocal square root of each element in a vector.

[`simd_precise_recip(_:)`](/documentation/simd/simd_precise_recip(_:)-6pwwe)

Returns the precise reciprocal of each element in a vector.

[`simd_precise_rsqrt(_:)`](/documentation/simd/simd_precise_rsqrt(_:)-13530)

Returns the precise reciprocal square root of each element in a vector.

[`simd_fast_recip(_:)`](/documentation/simd/simd_fast_recip(_:)-7d3)

Returns the fast reciprocal of each element in a vector.

[`simd_fast_rsqrt(_:)`](/documentation/simd/simd_fast_rsqrt(_:)-8pakw)

Returns the fast reciprocal square root of each element in a vector.

### Geometry functions

[`simd_dot`](/documentation/simd/simd_dot-87ssc)

Returns the dot product of two vectors.

[`simd_normalize`](/documentation/simd/simd_normalize-9o6iq)

Returns a vector pointing in the same direction of the supplied vector, with a length of 1.

[`simd_fast_normalize`](/documentation/simd/simd_fast_normalize-3vaz)

Returns the fast normalized vector.

[`simd_precise_normalize`](/documentation/simd/simd_precise_normalize-4vqaw)

Returns the precise normalized vector.

[`simd_project`](/documentation/simd/simd_project-24ld6)

Returns the first vector projected onto the second vector.

[`simd_precise_project`](/documentation/simd/simd_precise_project-1cw2i)

Returns the precise projected vector.

[`simd_fast_project`](/documentation/simd/simd_fast_project-6ymj6)

Returns the fast projected vector.

[`simd_reflect`](/documentation/simd/simd_reflect-9r760)

Returns the reflection direction of an incident vector and a unit normal vector.

[`simd_refract`](/documentation/simd/simd_refract-6q75f)

Returns the refraction direction of an incident vector, a unit normal vector, and an index of refraction eta.

### Vector norm functions

[`simd_norm_one`](/documentation/simd/simd_norm_one-sdw3)

Returns the sum of the absolute values of a vector.

[`simd_norm_inf`](/documentation/simd/simd_norm_inf-97p52)

Returns the maximum absolute value of a vector.

### Length and distance functions

[`simd_length`](/documentation/simd/simd_length-3fmwz)

Returns the length of a vector.

[`simd_fast_length`](/documentation/simd/simd_fast_length-4om0k)

Returns the fast length of a vector.

[`simd_precise_length`](/documentation/simd/simd_precise_length-7dx4e)

Returns the precise length of a vector.

[`simd_length_squared`](/documentation/simd/simd_length_squared-2t92l)

Returns the square of the length of a vector.

[`simd_distance`](/documentation/simd/simd_distance-9tmum)

Returns the distance between two vectors.

[`simd_fast_distance`](/documentation/simd/simd_fast_distance-7jdgd)

Returns the fast distance between two vectors.

[`simd_precise_distance`](/documentation/simd/simd_precise_distance-3g45n)

Returns the precise distance between two vectors.

[`simd_distance_squared`](/documentation/simd/simd_distance_squared-1uyo7)

Returns the square of the distance between two vectors.

### Logic functions

[`simd_select(_:_:_:)`](/documentation/simd/simd_select(_:_:_:)-4vjt)

Returns a vector that contains elements from either the first or second parameter, based on the corresponding element’s high-order bit in the mask.

[`simd_bitselect(_:_:_:)`](/documentation/simd/simd_bitselect(_:_:_:)-6gy8u)

Returns a vector that contains elements from either the first or second parameter, based on the corresponding element in the third parameter.

### Math functions

[`simd_muladd(_:_:_:)`](/documentation/simd/simd_muladd(_:_:_:)-99g6r)

Returns the multiply-add result for corresponding elements in three vectors.



---

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)