/* RCS $Id: j_lg10.c,v 1.2 1997/07/15 14:57:04 ae13 Exp $ */
/*
$Log: j_lg10.c,v $
 * Revision 1.2  1997/07/15  14:57:04  ae13
 * *** empty log message ***
 *
 * Revision 1.1  1997/05/16  13:26:20  ae13
 * Initial revision
 *
 */
/****************************************************************/
/*                                                              */
/*      Entries         : a_intv j_lg10(a_intv x)               */
/*                        a_intv x  ;                           */
/*                                                              */
/*      Arguments       : x = interval argument of lg10(x)      */
/*                                                              */
/*      Description     : Fast interval                         */
/*                        function for double IEEE              */
/*                        Floating-Point Arithmetic             */
/*                                                              */
/*      Date            : 1996-03-08                            */
/*                                                              */
/*      Author          : W. Hofschuster                        */
/*                                                              */
/****************************************************************/

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


#include "q_defs.h"
#include "q_fcth.h"

#ifdef LINT_ARGS
local a_intv j_lg10(a_intv x)
#else
local a_intv j_lg10(x)

a_intv x;
#endif
{
 a_intv res;
  if (x.INF==x.SUP)                     /* point interval */
    { 
      res.INF=q_lg10(x.INF);
      if (res.INF>=0) 
        {
          res.SUP=res.INF*q_l10p;
          res.INF*=q_l10m;
        }
      else
        {
          res.SUP=res.INF*q_l10m;
          res.INF*=q_l10p;
        }
    }
  else
    {
      res.INF=q_lg10(x.INF);
      if (res.INF>=0)
        res.INF*=q_l10m;
      else
        res.INF*=q_l10p;
      res.SUP=q_lg10(x.SUP);
      if (res.SUP>=0)
        res.SUP*=q_l10p;
      else
        res.SUP*=q_l10m;
    }   

 return(res);
}
