VEC_$SP_DP Domain/OS VEC_$SP_DP
NAME
vec_$sp_dp - copy a single-precision vector to a double-precision vector
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/vec.h>
void vec_$sp_dp(
float *sp_vec,
double *dp_vec,
long int &length)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/vec.ins.pas';
procedure vec_$sp_dp(
in sp_vec: univ vec_$real_vector;
in dp_vec: univ vec_$double_vector;
in length: integer32);
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/vec.ins.ftn'
parameter (nvec = 10)
double precision dp_vec(nvec)
real sp_vec(nvec)
integer*4 length
call vec_$sp_dp(sp_vec, dp_vec, length)
DESCRIPTION
Vec_$sp_dp copies length elements from the single-precision vector sp_vec
to the double-precision vector dp_vec.
In C, the resulting operation is
for (i = 0; i < length; ++i)
dp_vec[i] = (double)sp_vec[i];
In Pascal, the resulting operation is
for i := 1 to length do
begin
dp_vec[i] := sp_vec[i];
end
In FORTRAN, the resulting operation is
do 10 i=1, length
dp_vec(i) = dble(sp_vec(i))
10 continue
sp_vec
The single-precision vector to copy from.
dp_vec
The double-precision vector to copy to.
length
The number of elements to copy.
NOTES
In C and Pascal, vec_$sp_dp copies row vectors; whereas in FORTRAN, it
copies column vectors.
SEE ALSO
vec_$dp_sp, vec_$sp_dp_i.