<!--
{
  "availability" : [

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

# simd_double2

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

```
typealias simd_double2 = SIMD2<Double>
```

## Topics

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

[`simd_make_double2(_:)`](/documentation/simd/simd_make_double2(_:)-3qby3)

Returns a new vector from the specified vector.

[`simd_make_double2(_:)`](/documentation/simd/simd_make_double2(_:)-3tt38)

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

[`simd_make_double2(_:)`](/documentation/simd/simd_make_double2(_:)-3hpld)

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

[`simd_make_double2(_:)`](/documentation/simd/simd_make_double2(_:)-4o3ot)

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

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

Returns a new vector from the specified vectors.

[`vector2`](/documentation/simd/vector2-8cpbh)

Returns a new vector from the specified vectors.

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

[`simd_make_double2(_:)`](/documentation/simd/simd_make_double2(_:)-r6xz)

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

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

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

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

[`simd_double`](/documentation/simd/simd_double-531gc)

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

[`simd_double`](/documentation/simd/simd_double-53bbw)

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

[`simd_double`](/documentation/simd/simd_double-536fw)

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

[`simd_double`](/documentation/simd/simd_double-53gf0)

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

[`simd_double`](/documentation/simd/simd_double-534k4)

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

[`simd_double`](/documentation/simd/simd_double-53ej8)

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

[`simd_double`](/documentation/simd/simd_double-5365s)

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

[`simd_double`](/documentation/simd/simd_double-53fzk)

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

[`simd_double`](/documentation/simd/simd_double-53czc)

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

[`simd_double`](/documentation/simd/simd_double-53di8)

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

### Common Functions

[`simd_abs(_:)`](/documentation/simd/simd_abs(_:)-8869e)

Returns the absolute value of each element in a vector.

[`abs(_:)`](/documentation/simd/abs(_:)-1p8t7)

Returns the absolute value of each element in a vector.

[`simd_clamp(_:_:_:)`](/documentation/simd/simd_clamp(_:_:_:)-6puwa)

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

[`clamp(_:min:max:)`](/documentation/simd/clamp(_:min:max:)-7n2jv)

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

[`clamp(_:min:max:)`](/documentation/simd/clamp(_:min:max:)-6d1s7)

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

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

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

Returns the fractional part of each element in a vector.

[`fract(_:)`](/documentation/simd/fract(_:)-2gjrn)

Returns the fractional part of each element in a vector.

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

Returns the sign of each element in a vector.

[`sign(_:)`](/documentation/simd/sign(_:)-5fczz)

Returns the sign of each element in a vector.

[`step(_:edge:)`](/documentation/simd/step(_:edge:)-2qauk)

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

[`simd_step(_:_:)`](/documentation/simd/simd_step(_:_:)-8jlf2)

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

Returns the sum of all elements in a vector.

[`reduce_add(_:)`](/documentation/simd/reduce_add(_:)-8iwo6)

Returns the sum of all elements in a vector.

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

Returns the maximum value in a vector.

[`reduce_max(_:)`](/documentation/simd/reduce_max(_:)-3rmpx)

Returns the maximum value in a vector.

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

Returns the minimum value in a vector.

[`reduce_min(_:)`](/documentation/simd/reduce_min(_:)-6mev7)

Returns the minimum value in a vector.

### Interpolation Functions

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

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

[`smoothstep(_:edge0:edge1:)`](/documentation/simd/smoothstep(_:edge0:edge1:)-2wqo9)

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

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

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

[`mix(_:_:t:)`](/documentation/simd/mix(_:_:t:)-7bjg5)

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

[`mix(_:_:t:)`](/documentation/simd/mix(_:_:t:)-3hfwb)

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

### Extrema Functions

[`simd_max(_:_:)`](/documentation/simd/simd_max(_:_:)-1sy2n)

Returns the maximum value of each element in a vector.

[`max(_:_:)`](/documentation/simd/max(_:_:)-3puhr)

Returns the maximum value of each element in a vector.

[`max(_:_:)`](/documentation/simd/max(_:_:)-8a5p5)

Returns the maximum value of each element in a vector.

[`fmax(_:_:)`](/documentation/simd/fmax(_:_:)-15te9)

Returns the maximum value of each element in a vector.

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

Returns the minimum value of each element in a vector.

[`min(_:_:)`](/documentation/simd/min(_:_:)-4sdw0)

Returns the minimum value of each element in a vector.

[`min(_:_:)`](/documentation/simd/min(_:_:)-9yz9x)

Returns the minimum value of each element in a vector.

[`fmin(_:_:)`](/documentation/simd/fmin(_:_:)-39mes)

Returns the minimum value of each element in a vector.

### Reciprocal and Reciprocal Square Root Functions

[`recip(_:)`](/documentation/simd/recip(_:)-43mv7)

Returns the reciprocal of each element in a vector.

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

Returns the reciprocal of each element in a vector.

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

Returns the fast reciprocal of each element in a vector.

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

Returns the precise reciprocal of each element in a vector.

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

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

[`rsqrt(_:)`](/documentation/simd/rsqrt(_:)-2k5rh)

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

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

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

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

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

### Exponential and Logarithmic Functions

[`exp(_:)`](/documentation/simd/exp(_:)-9nxip)

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

[`exp2(_:)`](/documentation/simd/exp2(_:)-4y2ne)

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

[`exp10(_:)`](/documentation/simd/exp10(_:)-4tdos)

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

[`expm1(_:)`](/documentation/simd/expm1(_:)-9aitr)

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

[`log(_:)`](/documentation/simd/log(_:)-2ieba)

Returns the natural logarithm of each element in a vector.

[`log2(_:)`](/documentation/simd/log2(_:)-779eu)

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

[`log10(_:)`](/documentation/simd/log10(_:)-337zw)

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

[`log1p(_:)`](/documentation/simd/log1p(_:)-40mka)

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-1dixl)

Returns the cross product of two vectors.

[`cross(_:_:)`](/documentation/simd/cross(_:_:)-916aw)

Returns the cross product of two vectors.

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

Returns the dot product of two vectors.

[`dot(_:_:)`](/documentation/simd/dot(_:_:)-6ayky)

Returns the dot product of two vectors.

[`simd_incircle`](/documentation/simd/simd_incircle-8iogb)

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

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

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

[`normalize(_:)`](/documentation/simd/normalize(_:)-5mqhk)

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

Returns the fast normalized vector.

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

Returns the precise normalized vector.

[`simd_orient`](/documentation/simd/simd_orient-9fgki)

Tests the orientation of the two supplied vectors.

[`simd_orient`](/documentation/simd/simd_orient-9b2wf)

Tests the orientation of the three supplied vectors.

[`simd_project`](/documentation/simd/simd_project-1mg5p)

Returns the first vector projected onto the second vector.

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

Returns the first vector projected onto the second vector.

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

Returns the fast projected vector.

[`simd_precise_project`](/documentation/simd/simd_precise_project-7t3qn)

Returns the precise projected vector.

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

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

[`reflect(_:n:)`](/documentation/simd/reflect(_:n:)-3rhgb)

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

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

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:)-1ghae)

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

Returns the sum of the absolute values of a vector.

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

Returns the sum of the absolute values of a vector.

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

Returns the maximum absolute value of a vector.

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

Returns the maximum absolute value of a vector.

### Length and Distance Functions

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

Returns the length of a vector.

[`length(_:)`](/documentation/simd/length(_:)-4gxdk)

Returns the length of a vector.

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

Returns the fast length of a vector.

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

Returns the precise length of a vector.

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

Returns the square of the length of a vector.

[`length_squared(_:)`](/documentation/simd/length_squared(_:)-8gxz9)

Returns the square of the length of a vector.

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

Returns the distance between two vectors.

[`simd_distance`](/documentation/simd/simd_distance-2d51k)

Returns the distance between two vectors.

[`simd_fast_distance`](/documentation/simd/simd_fast_distance-3vbs7)

Returns the fast distance between two vectors.

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

Returns the precise distance between two vectors.

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

Returns the square of the distance between two vectors.

[`distance_squared(_:_:)`](/documentation/simd/distance_squared(_:_:)-56tah)

Returns the square of the distance between two vectors.

### Hyperbolic Functions

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

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

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

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

[`atanh(_:)`](/documentation/simd/atanh(_:)-5l8ss)

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

[`cosh(_:)`](/documentation/simd/cosh(_:)-303ot)

Returns the hyperbolic cosine of each element in a vector.

[`sinh(_:)`](/documentation/simd/sinh(_:)-5gx9h)

Returns the hyperbolic sine of each element in a vector.

[`tanh(_:)`](/documentation/simd/tanh(_:)-739hq)

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

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(_:_:_:)-3ys1a)

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(_:)-75bqn)

Returns the cube root of each element in a vector.

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

Returns the ceiling of each element in a vector.

[`erf(_:)`](/documentation/simd/erf(_:)-7tfrz)

Returns the error function for each element in a vector.

[`erfc(_:)`](/documentation/simd/erfc(_:)-8i2r6)

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

[`floor(_:)`](/documentation/simd/floor(_:)-21h1y)

[`fma(_:_:_:)`](/documentation/simd/fma(_:_:_:)-4fxau)

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

[`fmod(_:_:)`](/documentation/simd/fmod(_:_:)-81hr1)

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

[`hypot(_:_:)`](/documentation/simd/hypot(_:_:)-9ecpz)

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(_:)-697vf)

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

[`nextafter(_:_:)`](/documentation/simd/nextafter(_:_:)-6qeuz)

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

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

[`remainder(_:_:)`](/documentation/simd/remainder(_:_:)-1l80m)

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(_:)-1ith)

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

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

[`tgamma(_:)`](/documentation/simd/tgamma(_:)-3id8t)

Returns the gamma function for each element in a vector.

[`trunc(_:)`](/documentation/simd/trunc(_:)-1xvcu)

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(_:)-1hgv5)

Returns the arccosine of each element in a vector.

[`asin(_:)`](/documentation/simd/asin(_:)-72orw)

Returns the arcsine of each element in a vector.

[`atan(_:)`](/documentation/simd/atan(_:)-9onaa)

Returns the arctangent of each element in a vector.

[`atan2(_:_:)`](/documentation/simd/atan2(_:_:)-6ogu4)

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

[`cos(_:)`](/documentation/simd/cos(_:)-3p9ym)

Returns the cosine of each element in a vector.

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

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

[`sin(_:)`](/documentation/simd/sin(_:)-3p88b)

Returns the sine of each element in a vector.

[`sinpi(_:)`](/documentation/simd/sinpi(_:)-4lgpo)

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

[`sincos(_:)`](/documentation/simd/sincos(_:)-9pa2l)

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

[`sincospi(_:)`](/documentation/simd/sincospi(_:)-3fwbj)

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

[`tan(_:)`](/documentation/simd/tan(_:)-5czlf)

Returns the tangent of each element in a vector.

[`tanpi(_:)`](/documentation/simd/tanpi(_:)-9z76)

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

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

[`isinf(_:)`](/documentation/simd/isinf(_:)-4wflm)

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

[`isnan(_:)`](/documentation/simd/isnan(_:)-9irpc)

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

[`isnormal(_:)`](/documentation/simd/isnormal(_:)-61nr1)

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

### Alternative Type Alias

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

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



---

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)