\documentclass[nocolor,memo]{j3}
\renewcommand{\hdate}{6 January 2004}
\renewcommand{\vers}{J3/04-181}
\usepackage{lineno}
\usepackage{longtable}
\usepackage{xr}
\externaldocument{007}
\input pdftest
\begin{document}
\vspace{-10pt}
\begin{tabbing}
Subject: \hspace*{0.25in}\=MaxAbsLoc and other combined intrinsics\\
From: \>Van Snyder\\
Reference: \>03-258r1, part of section 2.4.4.1\\
\end{tabbing}
\pagewiselinenumbers
\leftlinenumbers
\linenumbers*
\section*{Number}
TBD
\section*{Title}
MaxAbsLoc and other combined intrinsics.
\section*{Submitted By}
J3
\section*{Status}
For consideration.
\section*{Basic Functionality}
In several cases, intrinsic functions ought to be combined. For example,
in linear algebra one usually wants to know the location of the element
with the maximum absolute value, not the one with the most positive
value.
\section*{Rationale}
One can get the desired effect by compounding existing intrinsic
functions. For example, the location of the element in a rank-1 array A
with maximum absolute value can be determined using MAXLOC(ABS(A)) +
LBOUND(A) - 1. This works and is portable, but some processors may
compute it less efficiently than the best that could be done~--- they
might compute ABS(A) and put it in an array temp, and then compute MAXLOC
of that temp. The stuff about LBOUND(A)-1 is there because the lower
bound of an array expression is always 1, no matter what the bounds of
the operands are. As a consequence, program authors would be tempted to
carry out this computation with a loop instead of the above expression.
This increases code bulk, which is the single best predictor of lifetime
ownership cost.
\section*{Estimated Impact}
Minor --- a few new intrinsic function definitions.
\section*{Detailed Specification}
Provide a few new compounded intrinsic functions. The most important one
from the point of view of linear algebra is a compounding of MAXLOC and
ABS, perhaps called MaxAbsLoc. For symmetry, users would expect also to
find MaxAbsVal, MinAbsLoc and MinAbsVal. Other combinations might be
useful for other disciplines.
\section*{History}
\label{lastpage}
\end{document}