/**************************************************************************/
/*                                                                        */
/*                                 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: d_sign.c,v 1.2 1997/09/25 17:14:41 ae59 Exp $ */
/*
$Log: d_sign.c,v $
 * Revision 1.2  1997/09/25  17:14:41  ae59
 * Copyright-message
 *
 * Revision 1.1  1994/01/27  13:22:08  ae59
 * Put under RCS control
 *
 */
/****************************************************************/
/*                                                              */
/*      Filename        : d_sign.c                              */
/*                                                              */
/*      Entries         : a_intg d_sign(a)                      */
/*                        dotprecision a;                       */
/*                                                              */
/*      Arguments       : a = dotprecision variable             */
/*                                                              */
/*      Description     : sign of dotprecision variable         */
/*                                                              */
/*      Date            : 1990-08-09                            */
/****************************************************************/

#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 a_intg d_sign(dotprecision a)
#else
local a_intg d_sign(a)

dotprecision a;
#endif
        {
        a_intg sign;

        if (a[A_BEGIN]==ZERO)
           sign = 0;
        else
           sign =  (a[A_SIGN]) ? -1 : 1;

        if (a[A_STATUS] & A_TEMPORARY) d_free(&a);

        return(sign);
        }
