OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [libstdc++-v3/] [src/] [math_stubs_long_double.cc] - Diff between revs 816 and 826

Only display areas with differences | Details | Blame | View Log

Rev 816 Rev 826
// Stub definitions for long double math.
// Stub definitions for long double math.
 
 
// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc.
// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc.
//
//
// This file is part of the GNU ISO C++ Library.  This library is free
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// any later version.
 
 
// This library is distributed in the hope that it will be useful,
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// GNU General Public License for more details.
 
 
// Under Section 7 of GPL version 3, you are granted additional
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// 3.1, as published by the Free Software Foundation.
 
 
// You should have received a copy of the GNU General Public License and
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.
// <http://www.gnu.org/licenses/>.
 
 
#include <cmath>
#include <cmath>
 
 
// For targets which do not have support for long double versions,
// For targets which do not have support for long double versions,
// we use the following crude approximations. We keep saying that we'll do
// we use the following crude approximations. We keep saying that we'll do
// better later, but never do.
// better later, but never do.
 
 
extern "C"
extern "C"
{
{
#ifndef _GLIBCXX_HAVE_FABSL
#ifndef _GLIBCXX_HAVE_FABSL
  long double
  long double
  fabsl(long double x)
  fabsl(long double x)
  {
  {
    return fabs((double) x);
    return fabs((double) x);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_ACOSL
#ifndef _GLIBCXX_HAVE_ACOSL
  long double
  long double
  acosl(long double x)
  acosl(long double x)
  {
  {
    return acos((double) x);
    return acos((double) x);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_ASINL
#ifndef _GLIBCXX_HAVE_ASINL
  long double
  long double
  asinl(long double x)
  asinl(long double x)
  {
  {
    return asin((double) x);
    return asin((double) x);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_ATANL
#ifndef _GLIBCXX_HAVE_ATANL
  long double
  long double
  atanl(long double x)
  atanl(long double x)
  {
  {
    return atan ((double) x);
    return atan ((double) x);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_ATAN2L
#ifndef _GLIBCXX_HAVE_ATAN2L
  long double
  long double
  atan2l(long double x, long double y)
  atan2l(long double x, long double y)
  {
  {
    return atan2((double) x, (double) y);
    return atan2((double) x, (double) y);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_CEILL
#ifndef _GLIBCXX_HAVE_CEILL
  long double
  long double
  ceill(long double x)
  ceill(long double x)
  {
  {
    return ceil((double) x);
    return ceil((double) x);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_COSL
#ifndef _GLIBCXX_HAVE_COSL
  long double
  long double
  cosl(long double x)
  cosl(long double x)
  {
  {
    return cos((double) x);
    return cos((double) x);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_COSHL
#ifndef _GLIBCXX_HAVE_COSHL
  long double
  long double
  coshl(long double x)
  coshl(long double x)
  {
  {
    return cosh((double) x);
    return cosh((double) x);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_EXPL
#ifndef _GLIBCXX_HAVE_EXPL
  long double
  long double
  expl(long double x)
  expl(long double x)
  {
  {
    return exp((double) x);
    return exp((double) x);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_FLOORL
#ifndef _GLIBCXX_HAVE_FLOORL
  long double
  long double
  floorl(long double x)
  floorl(long double x)
  {
  {
    return floor((double) x);
    return floor((double) x);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_FMODL
#ifndef _GLIBCXX_HAVE_FMODL
  long double
  long double
  fmodl(long double x, long double y)
  fmodl(long double x, long double y)
  {
  {
    return fmod((double) x, (double) y);
    return fmod((double) x, (double) y);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_FREXPL
#ifndef _GLIBCXX_HAVE_FREXPL
  long double
  long double
  frexpl(long double x, int *exp)
  frexpl(long double x, int *exp)
  {
  {
    return frexp((double) x, exp);
    return frexp((double) x, exp);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_SQRTL
#ifndef _GLIBCXX_HAVE_SQRTL
  long double
  long double
  sqrtl(long double x)
  sqrtl(long double x)
  {
  {
    return  sqrt((double) x);
    return  sqrt((double) x);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_HYPOTL
#ifndef _GLIBCXX_HAVE_HYPOTL
  long double
  long double
  hypotl(long double x, long double y)
  hypotl(long double x, long double y)
  {
  {
    long double s = fabsl(x) + fabsl(y);
    long double s = fabsl(x) + fabsl(y);
    if (s == 0.0L)
    if (s == 0.0L)
      return s;
      return s;
    x /= s; y /= s;
    x /= s; y /= s;
    return s * sqrtl(x * x + y * y);
    return s * sqrtl(x * x + y * y);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_LDEXPL
#ifndef _GLIBCXX_HAVE_LDEXPL
  long double
  long double
  ldexpl(long double x, int exp)
  ldexpl(long double x, int exp)
  {
  {
    return ldexp((double) x, exp);
    return ldexp((double) x, exp);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_LOGL
#ifndef _GLIBCXX_HAVE_LOGL
  long double
  long double
  logl(long double x)
  logl(long double x)
  {
  {
    return log((double) x);
    return log((double) x);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_LOG10L
#ifndef _GLIBCXX_HAVE_LOG10L
  long double
  long double
  log10l(long double x)
  log10l(long double x)
  {
  {
    return log10((double) x);
    return log10((double) x);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_MODFL
#ifndef _GLIBCXX_HAVE_MODFL
  long double
  long double
  modfl(long double x, long double *iptr)
  modfl(long double x, long double *iptr)
  {
  {
    double result, temp;
    double result, temp;
 
 
    result = modf((double) x, &temp);
    result = modf((double) x, &temp);
    *iptr = temp;
    *iptr = temp;
    return result;
    return result;
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_POWL
#ifndef _GLIBCXX_HAVE_POWL
  long double
  long double
  powl(long double x, long double y)
  powl(long double x, long double y)
  {
  {
    return pow((double) x, (double) y);
    return pow((double) x, (double) y);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_SINL
#ifndef _GLIBCXX_HAVE_SINL
  long double
  long double
  sinl(long double x)
  sinl(long double x)
  {
  {
    return sin((double) x);
    return sin((double) x);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_SINHL
#ifndef _GLIBCXX_HAVE_SINHL
  long double
  long double
  sinhl(long double x)
  sinhl(long double x)
  {
  {
    return sinh((double) x);
    return sinh((double) x);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_TANL
#ifndef _GLIBCXX_HAVE_TANL
  long double
  long double
  tanl(long double x)
  tanl(long double x)
  {
  {
    return tan((double) x);
    return tan((double) x);
  }
  }
#endif
#endif
 
 
#ifndef _GLIBCXX_HAVE_TANHL
#ifndef _GLIBCXX_HAVE_TANHL
  long double
  long double
  tanhl(long double x)
  tanhl(long double x)
  {
  {
    return tanh((double) x);
    return tanh((double) x);
  }
  }
#endif
#endif
} // extern "C"
} // extern "C"
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.