%$Id: posy.tex,v 25.95 2006/08/26 01:26:53 al Exp $ -*- LaTeX -*-
% man behavior posy .
% Copyright (C) 2001 Albert Davis
% Author: Albert Davis <aldavis@ieee.org>
%
% This file is part of "Gnucap", the Gnu Circuit Analysis Package
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2, or (at your option)
% any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
% 02110-1301, USA.
%------------------------------------------------------------------------
\section{{\tt POSY}: Polynomial with non-integer powers}
%------------------------------------------------------------------------
\subsection{Syntax}
\begin{verse}
{\tt POSY} {\it c1,p1 c2,p2 ...}\\
{\tt POSY} {\it c1,p1 c2,p2 ... args}
\end{verse}
%------------------------------------------------------------------------
\subsection{Purpose}

Defines a transfer function by a one dimensional ``posynomial'', like
a polynomial, except that the powers are arbitrary, and usually non-integer.
%------------------------------------------------------------------------
\subsection{Comments}

There is no corresponding capability in any SPICE that I know of.

For capacitors, this function defines {\em charge} as a function of
voltage.  For inductors, it defines {\em flux} as a function of
current.

For fixed sources, it defines voltage or current as a function of
time.

Normal use of this function required positive input (voltage or
current).  The result is zero if the input is negative.  Raising a
negative number to a non-integer power would produce a complex result, 
which implies a non-causal result, which cannot be represented in a
traditional transient analysis.

The transfer function is defined by:

\begin{verbatim}
if (in >= 0){
  out = (c1*in^p1) + (c2*in^p2) + ....
}else{
  out = 0.
}
\end{verbatim}
%------------------------------------------------------------------------
\subsection{Parameters}

\begin{description}
  
\item[{\tt MIN} = {\it x}] Minimum output value (clipping).  (Default
  = -infinity.)

\item[{\tt MAX} = {\it x}] Maximum output value (clipping).  (Default
  = infinity)

\item[{\tt ABS}] Absolute value, truth value.  (Default = false).  If
  set to true, the result will be always positive.

\item[{\tt ODD}] Make odd function, truth value.  (Default = false).
  If set to true, negative values of x will be evaluated as out =
  -f(-x), giving odd symmetry.
  
\item[{\tt EVEN}] Make even function, truth value.  (Default = false).
  If set to true, negative values of x will be evaluated as out =
  f(-x), giving even symmetry.


\end{description}
%------------------------------------------------------------------------
\subsection{Example} 

\begin{description}

\item[{\tt E1 (2 0 1 0) posy(1 .5)}] The output of {\tt E1} is the
square root of its input.

\end{description}
%------------------------------------------------------------------------
%------------------------------------------------------------------------
