$\newcommand{\W}[1]{ \; #1 \; } \newcommand{\R}[1]{ {\rm #1} } \newcommand{\B}[1]{ {\bf #1} } \newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} } \newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} } \newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} } \newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }$
Absolute Zero Multiplication

Syntax
z = azmul(x, y)

Purpose
Evaluates multiplication with an absolute zero for any of the possible types listed below. The result is given by $$z = \left\{ \begin{array}{ll} 0 & {\rm if} \; x = 0 \\ x \cdot y & {\rm otherwise} \end{array} \right.$$ Note if x is zero and y is infinity, ieee multiplication would result in not a number whereas z would be zero.

Base
If Base satisfies the base type requirements and arguments x , y have prototypes       const Base& x      const Base& y  then the result z has prototype       Base z 
If the arguments x , y have prototype       const AD<Base>& x      const AD<Base>& y  then the result z has prototype       AD<Base> z 
If the arguments x , y have prototype       const VecAD<Base>::reference& x      const VecAD<Base>::reference& y  then the result z has prototype       AD<Base> z