﻿ f06fd Method
f06fd multiplies a real vector by a scalar, preserving the input vector.

# Syntax

C#
```public static void f06fd(
int n,
double alpha,
double[] x,
int incx,
double[] y,
int incy,
out int ifail
)```
Visual Basic
```Public Shared Sub f06fd ( _
n As Integer, _
alpha As Double, _
x As Double(), _
incx As Integer, _
y As Double(), _
incy As Integer, _
<OutAttribute> ByRef ifail As Integer _
)```
Visual C++
```public:
static void f06fd(
int n,
double alpha,
array<double>^ x,
int incx,
array<double>^ y,
int incy,
[OutAttribute] int% ifail
)```
F#
```static member f06fd :
n : int *
alpha : float *
x : float[] *
incx : int *
y : float[] *
incy : int *
ifail : int byref -> unit
```

#### Parameters

n
Type: System..::..Int32
On entry: $n$, the number of elements in $x$ and $y$.
alpha
Type: System..::..Double
On entry: the scalar $\alpha$.
x
Type: array<System..::..Double>[]()[][]
An array of size [dim1]
Note: the dimension of the array x must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,1+\left({\mathbf{n}}-1\right)×\left|{\mathbf{incx}}\right|\right)$.
On entry: the $n$-element vector $x$.
If ${\mathbf{incx}}>0$, ${x}_{\mathit{i}}$ must be stored in ${\mathbf{x}}\left[1+\left(\mathit{i}-1\right)×{\mathbf{incx}}\right]$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$.
If ${\mathbf{incx}}<0$, ${x}_{\mathit{i}}$ must be stored in ${\mathbf{x}}\left[1-\left({\mathbf{n}}-\mathit{i}\right)×{\mathbf{incx}}\right]$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$.
Intermediate elements of x are not referenced.
incx
Type: System..::..Int32
On entry: the increment in the subscripts of x between successive elements of $x$.
y
Type: array<System..::..Double>[]()[][]
An array of size [dim1]
Note: the dimension of the array y must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,1+\left({\mathbf{n}}-1\right)×\left|{\mathbf{incy}}\right|\right)$.
On exit: the vector $y$.
If ${\mathbf{incy}}>0$, ${y}_{\mathit{i}}$ will be stored in ${\mathbf{y}}\left[1+\left(\mathit{i}-1\right)×{\mathbf{incy}}\right]$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$.
If ${\mathbf{incy}}<0$, ${y}_{\mathit{i}}$ will be stored in ${\mathbf{y}}\left[1-\left({\mathbf{n}}-\mathit{i}\right)×{\mathbf{incy}}\right]$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$.
Intermediate elements of y are unchanged.
incy
Type: System..::..Int32
On entry: the increment in the subscripts of y between successive elements of $y$.
ifail
Type: System..::..Int32%
On exit: $\mathbf{ifail}=0$ unless the method detects an error (see [Error Indicators and Warnings]).

# Description

f06fd performs the operation
 $y←αx$
where $x$ and $y$ are $n$-element real vectors scattered with stride incx and incy respectively, and $\alpha$ is a real scalar.

None.

# Error Indicators and Warnings

${\mathbf{ifail}}=-9000$
An error occured, see message report.
${\mathbf{ifail}}=-8000$
Negative dimension for array $〈\mathit{\text{value}}〉$
${\mathbf{ifail}}=-6000$
Invalid Parameters $〈\mathit{\text{value}}〉$
${\mathbf{ifail}}=-6000$
Invalid Parameters $〈\mathit{\text{value}}〉$

Not applicable.

None.