/**************************************************************************/
/*                                                                        */
/*                                 Sources                                */
/*                                from  the                               */
/*                           XSC SOFTWARE PACKAGE                         */
/*                                                                        */
/*                Copyright (c) 1997 University of Karlsruhe              */
/*                     Institute for Appl. Mathematics                    */
/*                                                                        */
/* This program is free software for non-commercial use. For details, see */
/* the file LICENSE.XSC, distributed with this software package.          */
/*                                                                        */
/* This program is distributed WITHOUT ANY WARRANTY. For details, see the */
/* file LICENSE.XSC, distributed with this software package.              */
/*                                                                        */
/**************************************************************************/

/* RCS $Id: z_dadd.c,v 1.2 1997/09/25 18:28:32 ae59 Exp $ */
/*
$Log: z_dadd.c,v $
 * Revision 1.2  1997/09/25  18:28:32  ae59
 * Copyright-message
 *
 * Revision 1.1  1994/01/27  13:26:03  ae59
 * Put under RCS control
 *
 */
/****************************************************************/
/*                                                              */
/*      Filename        : z_dadd.c                              */
/*                                                              */
/*      Entries         : void z_dadd(ZRI,ZII,ZRS,ZIS,A)        */
/*                        dotprecision *ZRI,*ZII,*ZRS,*ZIS;     */
/*                        d_otpz A;                             */
/*                                                              */
/*      Arguments       : ZRI=dotprecision variable(real lower) */
/*                        ZII=dotprecision variable(imag lower) */
/*                        ZRS=dotprecision variable(real upper) */
/*                        ZIS=dotprecision variable(imag upper) */
/*                        A = complex interval dotprec. value   */
/*                                                              */
/*      Description     : Add complex interval to dotprecision  */
/*                        variable                              */
/*                        Z = Z+A                               */
/*                                                              */
/*      Date            : 1992-07-22                            */
/*      1992-07-22 : changed local vars, initial, =b=           */
/*      1992-02-27 : new routine                                */
/****************************************************************/

#ifndef ALL_IN_ONE
#ifdef AIX
#include "/u/p88c/runtime/o_defs.h"
#else
#include "o_defs.h"
#endif
#define local
#endif

#ifdef LINT_ARGS
local void z_dadd(dotprecision *ZRI,dotprecision *ZII,dotprecision *ZRS,
                  dotprecision *ZIS,d_otpz A)
#else
local void z_dadd(ZRI,ZII,ZRS,ZIS,A)

dotprecision *ZRI;
dotprecision *ZII;
dotprecision *ZRS;
dotprecision *ZIS;
d_otpz A;
#endif

{
        d_otpz *ptemp= &A;
        d_otpi *pctemp= &(ptemp)->RE;

        E_TPUSH("z_dadd")
        d_vlcp((dotprecision*) &(pctemp)->INF);
        d_vlcp((dotprecision*) &(pctemp)->SUP);

        pctemp= &(ptemp)->IM;
        d_vlcp((dotprecision*) &(pctemp)->INF);
        d_vlcp((dotprecision*) &(pctemp)->SUP);

        d_dadd(ZRI,A.RE.INF);
        d_dadd(ZII,A.IM.INF);
        d_dadd(ZRS,A.RE.SUP);
        d_dadd(ZIS,A.IM.SUP);

        ptemp= &A;
        pctemp= &(ptemp)->RE;
        d_free((dotprecision*) &(pctemp)->INF);
        d_free((dotprecision*) &(pctemp)->SUP);

        pctemp= &(ptemp)->IM;
        d_free((dotprecision*) &(pctemp)->INF);
        d_free((dotprecision*) &(pctemp)->SUP);

        E_TPOPP("z_dadd")
        return;
}
