Текст подпрограммы и версий
av00r_p.zip  av00e_p.zip  av00c_p.zip 
Тексты тестовых примеров
tav00r_p.zip  tav00e_p.zip  tav00c_p.zip 

Функция:  AV00R (модуль AV00R_p)

Назначение

Суммирование компонент вектора с расширенной (Extended) точностью.

Математическое описание

Вычисляется сумма компонент вектора длины  N с помощью алгоритма попарного суммирования.

Использование

function AV00R(var S :Array of Real; N :Integer): Real;

Параметры

S - одномерный массив длины  N, в котором задается исходный вектор (тип: вещественный);
N - длина вектора  S (тип: целый).

Версии

AV00E - суммирование элементов вектора при помощи алгоритма попарного суммирования с расширенной (Extended) точностью.
AV00C - суммирование элементов комплексного вектора при помощи алгоритма попарного суммирования.

Вызываемые подпрограммы: нет

Замечания по использованию

  1. 

В функции АV00E параметр  S имеет тип Extended.

  2. 

В функции АV00С параметр  S имеет тип Complex.

  3.  Исходная информация, заданная в массиве  S, не сохраняется.

Пример использования

Unit TAV00R_p;
interface
uses
SysUtils, Math, { Delphi }
LStruct, Lfunc, UtRes_p, AV00R_p;

function TAV00R: String;

implementation

function TAV00R: String;
var
N :Integer;
R :Real;
const
P :Array [0..99] of Real = ( 0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876,
0.00009876,0.00009876,0.00009876,0.00009876 );
begin
Result := '';
N := 100;
R := AV00R(P,N);
Result := Result + Format(' %20.16f',[R]) + #$0D#$0A;
UtRes('TAV00R',Result);  { вывод результатов в файл TAV00R.res }
exit;
end;

end.

Результат:     R  =  0.009876