<!--
{
  "availability" : [

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

# simd_float2

A vector of two 32-bit floating-point elements.

```
typealias simd_float2 = SIMD2<Float>
```

## Topics

### Functions to Create Two-Element Vectors From Other Vectors

[`simd_make_float2(_:)`](/documentation/simd/simd_make_float2(_:)-3nphb)

Returns a new vector from the specified vector.

[`simd_make_float2(_:)`](/documentation/simd/simd_make_float2(_:)-3kta4)

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

[`simd_make_float2(_:)`](/documentation/simd/simd_make_float2(_:)-32usp)

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

[`simd_make_float2(_:)`](/documentation/simd/simd_make_float2(_:)-493yd)

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

[`simd_make_float2(_:)`](/documentation/simd/simd_make_float2(_:)-4e6k3)

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

### Functions to Create Two-Element Vectors From Scalar Values

[`simd_make_float2(_:)`](/documentation/simd/simd_make_float2(_:)-70ndk)

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

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

Returns a new vector from the specified scalar values.

[`vector2`](/documentation/simd/vector2-25p9a)

Returns a new vector from the specified scalar values.

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

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

### Functions to Create Two-Element Vectors From Vectors of Other Types

[`simd_float`](/documentation/simd/simd_float-14iup)

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

[`simd_float`](/documentation/simd/simd_float-148tt)

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

[`simd_float`](/documentation/simd/simd_float-14nqp)

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

[`simd_float`](/documentation/simd/simd_float-14dwx)

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

[`simd_float`](/documentation/simd/simd_float-14lvd)

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

[`simd_float`](/documentation/simd/simd_float-14c1l)

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

[`simd_float`](/documentation/simd/simd_float-14mw7)

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

[`simd_float`](/documentation/simd/simd_float-14cvb)

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

[`simd_float`](/documentation/simd/simd_float-149uz)

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

[`simd_float`](/documentation/simd/simd_float-14afr)

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

### Common Functions

[`simd_abs(_:)`](/documentation/simd/simd_abs(_:)-886vq)

Returns the absolute value of each element in a vector.

[`abs(_:)`](/documentation/simd/abs(_:)-6ckob)

Returns the absolute value of each element in a vector.

[`simd_clamp(_:_:_:)`](/documentation/simd/simd_clamp(_:_:_:)-9b6uf)

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

[`clamp(_:min:max:)`](/documentation/simd/clamp(_:min:max:)-5rthg)

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

[`clamp(_:min:max:)`](/documentation/simd/clamp(_:min:max:)-3oo0f)

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

[`simd_equal(_:_:)`](/documentation/simd/simd_equal(_:_:)-9z8e8)

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(_:)-42ipv)

Returns the fractional part of each element in a vector.

[`fract(_:)`](/documentation/simd/fract(_:)-7rplw)

Returns the fractional part of each element in a vector.

[`simd_sign(_:)`](/documentation/simd/simd_sign(_:)-6jld1)

Returns the sign of each element in a vector.

[`sign(_:)`](/documentation/simd/sign(_:)-2e6do)

Returns the sign of each element in a vector.

[`simd_step(_:_:)`](/documentation/simd/simd_step(_:_:)-9xjdc)

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

[`step(_:edge:)`](/documentation/simd/step(_:edge:)-1pthr)

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(_:)-2pzn6)

Returns the sum of all elements in a vector.

[`reduce_add(_:)`](/documentation/simd/reduce_add(_:)-39n2m)

Returns the sum of all elements in a vector.

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

Returns the maximum value in a vector.

[`reduce_max(_:)`](/documentation/simd/reduce_max(_:)-4zzwq)

Returns the maximum value in a vector.

[`simd_reduce_min(_:)`](/documentation/simd/simd_reduce_min(_:)-49sh0)

Returns the minimum value in a vector.

[`reduce_min(_:)`](/documentation/simd/reduce_min(_:)-76co5)

Returns the minimum value in a vector.

### Interpolation Functions

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

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

[`mix(_:_:t:)`](/documentation/simd/mix(_:_:t:)-2z3yo)

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

[`mix(_:_:t:)`](/documentation/simd/mix(_:_:t:)-14tli)

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

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

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

[`smoothstep(_:edge0:edge1:)`](/documentation/simd/smoothstep(_:edge0:edge1:)-43udr)

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

### Extrema Functions

[`simd_max(_:_:)`](/documentation/simd/simd_max(_:_:)-6uws6)

Returns the maximum value of each element in a vector.

[`max(_:_:)`](/documentation/simd/max(_:_:)-35pzn)

Returns the maximum value of each element in a vector.

[`max(_:_:)`](/documentation/simd/max(_:_:)-9ye2a)

Returns the maximum value of each element in a vector.

[`fmax(_:_:)`](/documentation/simd/fmax(_:_:)-3cz61)

Returns the maximum value of each element in a vector.

[`simd_min(_:_:)`](/documentation/simd/simd_min(_:_:)-9xyee)

Returns the minimum value of each element in a vector.

[`min(_:_:)`](/documentation/simd/min(_:_:)-3eaa2)

Returns the minimum value of each element in a vector.

[`min(_:_:)`](/documentation/simd/min(_:_:)-6cnnq)

Returns the minimum value of each element in a vector.

[`fmin(_:_:)`](/documentation/simd/fmin(_:_:)-7jupb)

Returns the minimum value of each element in a vector.

### Reciprocal and Reciprocal Square Root Functions

[`simd_recip(_:)`](/documentation/simd/simd_recip(_:)-8nf6c)

Returns the reciprocal of each element in a vector.

[`recip(_:)`](/documentation/simd/recip(_:)-2opi)

Returns the reciprocal of each element in a vector.

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

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

[`rsqrt(_:)`](/documentation/simd/rsqrt(_:)-1er1q)

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

[`simd_precise_recip(_:)`](/documentation/simd/simd_precise_recip(_:)-66mt8)

Returns the precise reciprocal of each element in a vector.

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

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

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

Returns the fast reciprocal of each element in a vector.

[`simd_fast_rsqrt(_:)`](/documentation/simd/simd_fast_rsqrt(_:)-84cs6)

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

### Exponential and Logarithmic Functions

[`exp(_:)`](/documentation/simd/exp(_:)-3pa97)

Returns *e* raised to the power of each element in a vector.

[`exp2(_:)`](/documentation/simd/exp2(_:)-6sez2)

Returns 2 raised to the power of each element in a vector.

[`exp10(_:)`](/documentation/simd/exp10(_:)-6ga3o)

Returns 10 raised to the power of each element in a vector.

[`expm1(_:)`](/documentation/simd/expm1(_:)-3bqf9)

Returns *eˣ-1* for each element in a vector.

[`log(_:)`](/documentation/simd/log(_:)-1zfuo)

Returns the natural logarithm of each element in a vector.

[`log2(_:)`](/documentation/simd/log2(_:)-8x5g)

Returns the base 2 logarithm of each element in a vector.

[`log10(_:)`](/documentation/simd/log10(_:)-4yb6z)

Returns the base 10 logarithm of each element in a vector.

[`log1p(_:)`](/documentation/simd/log1p(_:)-15zc7)

Returns *log(1+x)* of each element in a vector.

[`exp`](/documentation/simd/exp)

Returns *e* raised to the power of each element in a vector.

[`exp2`](/documentation/simd/exp2)

Returns 2 raised to the power of each element in a vector.

[`exp10`](/documentation/simd/exp10)

Returns 10 raised to the power of each element in a vector.

[`expm1`](/documentation/simd/expm1)

Returns *eˣ-1* for each element in a vector.

[`log`](/documentation/simd/log)

Returns the natural logarithm of each element in a vector.

[`log2`](/documentation/simd/log2)

Returns the base 2 logarithm of each element in a vector.

[`log10`](/documentation/simd/log10)

Returns the base 10 logarithm of each element in a vector.

[`log1p`](/documentation/simd/log1p)

Returns *log(1+x)* for each element in a vector.

### Geometry Functions

[`simd_cross`](/documentation/simd/simd_cross-3ukic)

Returns the cross product of two vectors.

[`cross(_:_:)`](/documentation/simd/cross(_:_:)-53xk2)

Returns the cross product of two vectors.

[`simd_dot`](/documentation/simd/simd_dot-3pmfs)

Returns the dot product of two vectors.

[`dot(_:_:)`](/documentation/simd/dot(_:_:)-1vb5g)

Returns the dot product of two vectors.

[`simd_incircle`](/documentation/simd/simd_incircle-1bi0y)

Tests if a single-precision point lies inside, on, or outside a circle.

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

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

[`normalize(_:)`](/documentation/simd/normalize(_:)-100kb)

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-9wxm2)

Returns the fast normalized vector.

[`simd_precise_normalize`](/documentation/simd/simd_precise_normalize-54d5a)

Returns the precise normalized vector.

[`simd_orient`](/documentation/simd/simd_orient-8wej6)

Tests the orientation of the two supplied vectors.

[`simd_orient`](/documentation/simd/simd_orient-6wf24)

Tests the orientation of the three supplied vectors.

[`simd_project`](/documentation/simd/simd_project-39liq)

Returns the first vector projected onto the second vector.

[`project(_:_:)`](/documentation/simd/project(_:_:)-9wt83)

Returns the first vector projected onto the second vector.

[`simd_precise_project`](/documentation/simd/simd_precise_project-4ei25)

Returns the precise projected vector.

[`simd_fast_project`](/documentation/simd/simd_fast_project-4chm1)

Returns the fast projected vector.

[`simd_reflect`](/documentation/simd/simd_reflect-7dnri)

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

[`reflect(_:n:)`](/documentation/simd/reflect(_:n:)-6w80i)

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

[`simd_refract`](/documentation/simd/simd_refract-4vcf3)

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

[`refract(_:n:eta:)`](/documentation/simd/refract(_:n:eta:)-5bv79)

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-10vvt)

Returns the sum of the absolute values of a vector.

[`norm_one(_:)`](/documentation/simd/norm_one(_:)-2y0m)

Returns the sum of the absolute values of a vector.

[`simd_norm_inf`](/documentation/simd/simd_norm_inf-91b24)

Returns the maximum absolute value of a vector.

[`norm_inf(_:)`](/documentation/simd/norm_inf(_:)-9lj66)

Returns the maximum absolute value of a vector.

### Length and Distance Functions

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

Returns the length of a vector.

[`length(_:)`](/documentation/simd/length(_:)-6g7q5)

Returns the length of a vector.

[`simd_fast_length`](/documentation/simd/simd_fast_length-59ep6)

Returns the fast length of a vector.

[`simd_precise_length`](/documentation/simd/simd_precise_length-77xwk)

Returns the precise length of a vector.

[`simd_length_squared`](/documentation/simd/simd_length_squared-3e32j)

Returns the square of the length of a vector.

[`length_squared(_:)`](/documentation/simd/length_squared(_:)-6tcxv)

Returns the square of the length of a vector.

[`distance(_:_:)`](/documentation/simd/distance(_:_:)-1p8ae)

Returns the distance between two vectors.

[`simd_distance`](/documentation/simd/simd_distance-598wa)

Returns the distance between two vectors.

[`simd_fast_distance`](/documentation/simd/simd_fast_distance-2jlix)

Returns the fast distance between two vectors.

[`simd_precise_distance`](/documentation/simd/simd_precise_distance-8hrn8)

Returns the precise distance between two vectors.

[`simd_distance_squared`](/documentation/simd/simd_distance_squared-7zevh)

Returns the square of the distance between two vectors.

[`distance_squared(_:_:)`](/documentation/simd/distance_squared(_:_:)-9nmpe)

Returns the square of the distance between two vectors.

### Hyperbolic Functions

[`acosh(_:)`](/documentation/simd/acosh(_:)-16wup)

Returns the inverse hyperbolic cosine of each element in a vector.

[`asinh(_:)`](/documentation/simd/asinh(_:)-14lj8)

Returns the inverse hyperbolic sine of each element in a vector.

[`atanh(_:)`](/documentation/simd/atanh(_:)-3o0hv)

Returns the inverse hyperbolic tangent of each element in a vector.

[`cosh(_:)`](/documentation/simd/cosh(_:)-4n03p)

Returns the hyperbolic cosine of each element in a vector.

[`sinh(_:)`](/documentation/simd/sinh(_:)-2ft5c)

Returns the hyperbolic sine of each element in a vector.

[`tanh(_:)`](/documentation/simd/tanh(_:)-8avnx)

Returns the hyperbolic tangent of each element in a vector.

[`acosh`](/documentation/simd/acosh)

Returns the inverse hyperbolic cosine of each element in a vector.

[`asinh`](/documentation/simd/asinh)

Returns the inverse hyperbolic sine of each element in a vector.

[`atanh`](/documentation/simd/atanh)

Returns the inverse hyperbolic tangent of each element in a vector.

[`cosh`](/documentation/simd/cosh)

Returns the hyperbolic cosine of each element in a vector.

[`sinh`](/documentation/simd/sinh)

Returns the hyperbolic sine of each element in a vector.

[`tanh`](/documentation/simd/tanh)

Returns the hyperbolic tangent of each element in a vector.

### Logic Functions

[`simd_select(_:_:_:)`](/documentation/simd/simd_select(_:_:_:)-9jdc0)

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(_:_:_:)-5g70k)

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

### Math Functions

[`cbrt(_:)`](/documentation/simd/cbrt(_:)-1t3k)

Returns the cube root of each element in a vector.

[`ceil(_:)`](/documentation/simd/ceil(_:)-8j6zo)

Returns the ceiling of each element in a vector.

[`erf(_:)`](/documentation/simd/erf(_:)-1unjp)

Returns the error function for each element in a vector.

[`erfc(_:)`](/documentation/simd/erfc(_:)-1hisg)

Returns the complementary error function for each element in a vector.

[`floor(_:)`](/documentation/simd/floor(_:)-1e9me)

Returns the floor of each element in a vector.

[`fma(_:_:_:)`](/documentation/simd/fma(_:_:_:)-69k8u)

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

[`fmod(_:_:)`](/documentation/simd/fmod(_:_:)-566aw)

Returns the modulus after dividing each element in a vector by the corresponding element in a second vector.

[`hypot(_:_:)`](/documentation/simd/hypot(_:_:)-1zs4i)

Returns the hypotenuse of a right-angled triangle with the sides that are adjacent to the right angle that two vectors define.

[`lgamma(_:)`](/documentation/simd/lgamma(_:)-1ksbv)

Returns the natural logarithm of the absolute value of the gamma function of each element in a vector.

[`nextafter(_:_:)`](/documentation/simd/nextafter(_:_:)-8mat0)

Returns the next representable value of each element in a vector in the direction of the corresponding element in a second vector.

[`pow(_:_:)`](/documentation/simd/pow(_:_:)-15e0y)

Returns each element in a vector raised to the power of the corresponding element in a second vector.

[`remainder(_:_:)`](/documentation/simd/remainder(_:_:)-37wwd)

Returns the remainder after dividing each element in an array by the corresponding element in a second array of double-precision values.

[`round(_:)`](/documentation/simd/round(_:)-608of)

Returns each element in a vector rounded to the nearest integer.

[`cbrt`](/documentation/simd/cbrt)

Returns the cube root of each element in a vector.

[`copysign`](/documentation/simd/copysign)

Returns each element of a vector, with the sign of the corresponding element in a second vector.

[`erf`](/documentation/simd/erf)

Returns the error function for each element in a vector.

[`erfc`](/documentation/simd/erfc)

Returns the complementary error function for each element in a vector.

[`fabs`](/documentation/simd/fabs)

Returns the absolute value of each element in a vector.

[`fdim`](/documentation/simd/fdim)

Returns the positive difference between corresponding elements in two vectors.

[`fma`](/documentation/simd/fma)

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

[`fmod`](/documentation/simd/fmod)

Returns the modulus after dividing each element in a vector by the corresponding element in a second vector.

[`hypot`](/documentation/simd/hypot)

Returns the hypotenuse of a right-angled triangle with the sides that are adjacent to the right angle that two vectors define.

[`nextafter`](/documentation/simd/nextafter)

Returns the next representable value of each element in a vector in the direction of the corresponding element in a second vector.

[`pow`](/documentation/simd/pow)

Returns each element in a vector raised to the power of the corresponding element in a second vector.

[`remainder`](/documentation/simd/remainder)

Returns the remainder after dividing each element in an array by the corresponding element in a second array of double-precision values.

[`rint`](/documentation/simd/rint)

Returns each element in a vector rounded to the nearest integer in the specified direction.

[`round`](/documentation/simd/round)

Returns each element in a vector rounded to the nearest integer.

[`simd_muladd(_:_:_:)`](/documentation/simd/simd_muladd(_:_:_:)-45h2k)

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

[`tgamma(_:)`](/documentation/simd/tgamma(_:)-2aqvi)

Returns the gamma function for each element in a vector.

[`trunc(_:)`](/documentation/simd/trunc(_:)-6neoe)

Returns each element in a vector rounded toward zero to the nearest integer.

[`sqrt`](/documentation/simd/sqrt)

Returns the square root of each element in a vector.

[`tgamma`](/documentation/simd/tgamma)

Returns the gamma function for each element in a vector.

### Trigonometric Functions

[`acos(_:)`](/documentation/simd/acos(_:)-1ya4v)

Returns the arccosine of each element in a vector.

[`asin(_:)`](/documentation/simd/asin(_:)-4tbvj)

Returns the arcsine of each element in a vector.

[`atan(_:)`](/documentation/simd/atan(_:)-5v3x)

Returns the arctangent of each element in a vector.

[`atan2(_:_:)`](/documentation/simd/atan2(_:_:)-4dpoz)

Returns the arctangent of each pair of corresponding elements in two vectors.

[`cos(_:)`](/documentation/simd/cos(_:)-59waa)

Returns the cosine of each element in a vector.

[`cospi(_:)`](/documentation/simd/cospi(_:)-2cd9u)

Returns the cosine of each element in a vector multiplied by pi.

[`sin(_:)`](/documentation/simd/sin(_:)-5k8vo)

Returns the sine of each element in a vector.

[`sinpi(_:)`](/documentation/simd/sinpi(_:)-524r6)

Returns the sine of each element in a vector multiplied by pi.

[`sincos(_:)`](/documentation/simd/sincos(_:)-4uhuq)

Returns the sine and cosine of each element in a vector.

[`sincospi(_:)`](/documentation/simd/sincospi(_:)-11sii)

Returns the sine and cosine of each element in a vector multiplied by pi.

[`tan(_:)`](/documentation/simd/tan(_:)-4rx9f)

Returns the tangent of each element in a vector.

[`tanpi(_:)`](/documentation/simd/tanpi(_:)-3a1w1)

Returns the tangent of each element in a vector multiplied by pi.

[`acos`](/documentation/simd/acos)

Returns the arccosine of each element in a vector.

[`asin`](/documentation/simd/asin)

Returns the arcsine of each element in a vector.

[`atan`](/documentation/simd/atan)

Returns the arctangent of each element in a vector.

[`atan2`](/documentation/simd/atan2)

Returns the arctangent of each pair of corresponding elements in two vectors.

[`cos`](/documentation/simd/cos)

Returns the cosine of each element in a vector.

[`cospi`](/documentation/simd/cospi)

Returns the cosine of each element in a vector multiplied by pi.

[`sin`](/documentation/simd/sin)

Returns the sine of each element in a vector.

[`sinpi`](/documentation/simd/sinpi)

Returns the sine of each element in a vector multiplied by pi.

[`tan`](/documentation/simd/tan)

Returns the tangent of each element in a vector.

[`tanpi`](/documentation/simd/tanpi)

Returns the tangent of each element in a vector multiplied by pi.

### Classification Functions

[`isfinite(_:)`](/documentation/simd/isfinite(_:)-zthr)

Returns true for each element that is finite in a vector.

[`isinf(_:)`](/documentation/simd/isinf(_:)-9bb5h)

Returns true for each element that is infinite in a vector.

[`isnan(_:)`](/documentation/simd/isnan(_:)-7diw7)

Returns true for each element that is not a number (NaN) in a vector.

[`isnormal(_:)`](/documentation/simd/isnormal(_:)-3n6dc)

Returns true for each element that is normal in a vector.

### Alternative Type Alias

[`vector_float2`](/documentation/simd/vector_float2)

[`float2`](/documentation/simd/float2)



---

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)