guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building guile 1.8.6 on Tru64 5.1b


From: Didier Godefroy
Subject: Re: Building guile 1.8.6 on Tru64 5.1b
Date: Tue, 21 Apr 2009 20:25:27 +0200
User-agent: Microsoft-Entourage/12.17.0.090302

>> numbers.c: In function 'scm_c_make_polar':
>> numbers.c:5356: warning: implicit declaration of function 'sincos'
>> numbers.c:5356: warning: incompatible implicit declaration of built-in
>> function 'sincos'
> 
> I was about to suggest the same as Linas did, but a quick search led to
> this:
> 
>   https://bugs.freedesktop.org/show_bug.cgi?id=4401

Right. I saw that too.
Plus I haven't found a system header yet containing any sincos

> The attached patch is less radical than the Cairo one.  Can you try it
> and report back?

Ok, I will test this now. I will report back about the result shortly.
In the mean time, I'm pasting below the man page from tru64 V5.1b:

> diff --git a/libguile/numbers.c b/libguile/numbers.c
> index 52dfb73..37435b5 100644
> --- a/libguile/numbers.c
> +++ b/libguile/numbers.c
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,
> 2006, 2007, 2008 Free Software Foundation, Inc.
> +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,
> 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
>   *
>   * Portions Copyright 1990, 1991, 1992, 1993 by AT&T Bell Laboratories
>   * and Bellcore.  See scm_divide.
> @@ -5352,7 +5352,12 @@ SCM
>  scm_c_make_polar (double mag, double ang)
>  {
>    double s, c;
> -#if HAVE_SINCOS
> +
> +  /* The sincos(3) function is undocumented an broken on Tru64.  Thus we only
> +     use it on Glibc-based systems that have it (it's a GNU extension).  See
> +     http://lists.gnu.org/archive/html/guile-user/2009-04/msg00033.html for
> +     details.  */
> +#if (defined HAVE_SINCOS) && (defined __GLIBC__) && (defined _GNU_SOURCE)
>    sincos (ang, &s, &c);
>  #else
>    s = sin (ang);




sin(3)                                       sin(3)

NAME

  sin, sind, cos, cosd, tan, tand, cot, cotd, asin, asind, acos, acosd,
atan,
  atand, atan2, atand2 - Trigonometric and inverse trigonometric functions
in
  radian and degree calculations.

SYNOPSIS

  #include <math.h>

  double sin(
      double x );

  float sinf(
      float x );

  long double sinl(
      long double x );

  double sind(
      double x );

  float     sindf(
      float x );

  long double sindl(
      long double x,
      float     x );

  double cos(
      double x );

  float cosf(
      float x );

  long double cosl(
      long double x );

  double cosd(
      double x );

  float cosdf(
      float x );

  long double cosdl(
      long double x );

  double tan(
      double x );

  float tanf(
      float x );

  long double tanl(
      long double x );

  double tand(
      double x );

  float tandf(
      float x );

  long double tandl(
      long double x );

  double cot(
      double x );

  float cotf(
      float x );

  long double cotl(
      long double x );

  double cotd(
      double x );

  float cotdf(
      float x );

  long double cotdl(
      long double x );

  double asin(
      double x );

  float asinf(
      float x );

  long double asinl(
      long double x );

  double asind(
      double x );

  float asindf(
      float x );

  long double asindl(
      long double x );

  double acos(
      double x );

  float acosf(
      float x );

  long double acosl(
      long double x );

  double acosd(
      double x );

  float acosdf(
      float x );

  long double acosdl(
      long double x );

  double atan(
      double x );

  float atanf(
      float x );

  long double atanl(
      long double x );

  double atand(
      double x );

  float atandf(
      float x );

  long double atandl(
      long double x );

  double atan2(
      double y,
      double x );

  float atan2f(
      float y,
      float x );

  long double atan2l(
      long double y,
      long double x );

  double atand2(
      double y,
      double x );

  float atand2f(
      float y,
      float x );

  long double atand2l(
      long double y,
      long double x );

LIBRARY

  Math Library (libm)

STANDARDS

  Interfaces documented on this reference page conform to industry standards
  as follows:

  acos():  XPG4

  asin():  XPG4

  atan():  XPG4

  atan2():  XPG4

  cos():  XPG4

  sin():  XPG4

  tan():  XPG4

  Refer to the standards(5) reference page for more information about indus-
  try standards and associated tags.

DESCRIPTION

  The sin(), sinf(), and sinl() functions compute the sine of x, measured in
  radians.

  The sind(), sindf(), and sindl() functions compute the sine of x, measured
  in degrees.

  The cos(), cosf(), and cosl() functions compute the cosine of x, measured
  in radians.

  The cosd(), cosdf(), and cosdl() functions compute the cosine of x, meas-
  ured in degrees.

  The tan(), tanf(), and tanl() functions compute the tangent of x, measured
  in radians.

  The tand(), tandf(), and tandl() functions compute the tangent of x, meas-
  ured in degrees.

  The cot(), cotf(), and cotl() functions compute the cotangent of x, meas-
  ured in radians.

  The cotd(), cotdf(), and cotdl() functions compute the cotangent of x,
  measured in degrees.

  The asin(), asinf(), and asinl() functions compute the principal value of
  the arc sine of x in the interval [-pi/2,pi/2] radians. The value of x
must
  be in the domain [-1,1].

  The asind(), asindf(), and asindl() functions compute the principal value
  of the arc sine of x in the interval [-90,90] degrees. The value of x must
  be in the domain [-1,1].

  The acos(), acosf(), and acosl() functions compute the principal value of
  the arc cosine of x in the interval [0,pi] radians. The value of x must be
  in the domain [-1,1].

  The acosd(), acosdf(), and acosdl() functions compute the principal value
  of the arc cosine of x in the interval [0,180] degrees. The value of x
must
  be in the domain [-1,1].

  The atan(), atanf(), and atanl() functions compute the principal value of
  the arc tangent of x in the interval [-pi/2,pi/2] radians.

  The atand(), atandf(), and atandl() functions compute the principal value
  of the arc tangent of x in the interval [-90,90] degrees.

  The atan2(), atan2f(), and atan2l() functions compute the principal value
  of the arc tangent of y/x, in the interval [-pi,pi] radians. The sign of
  atan2 and atan2f is determined by the sign of y. The value of atan2(y,x)
is
  computed as follows where f is the number of fraction bits associated with
  the data type.

  ________________________________________________________________
  Value of Input Arguments         Angle Returned
  ________________________________________________________________
  x = 0 or y/x > 2**(f+1)         pi/2 * (sign y)
  x > 0 and y/x <= 2**(f+1)         atan(y/x)

  x < 0 and y/x <= 2**(f+1)         pi * (sign y) + atan(y/x)
  ________________________________________________________________

  The atand2(), atand2f(), and atand2l() functions compute the principal
  value of the arc tangent of y/x in the interval [-180,180] degrees. The
  sign of atand2() and atand2f() is determined by the sign of y.

  The following table describes function behavior in response to exceptional
  arguments:

  __________________________________________________________________________
  Function             Exceptional Argument        Routine Behavior
  __________________________________________________________________________
  sin(), sinf(), sinl()         |x| = infinity            Invalid argument
  sind(), sindf(), sindl()   |x| = infinity            Invalid argument
  sind(), sindf(), sindl()   |x| < (180/pi) * min_float        Underflow
  cos(), cosf(), cosl()         |x| = infinity            Invalid argument
  cosd(), cosdf(), cosdl()   |x| = infinity            Invalid argument
  tan(), tanf(), tanl()         |x| = infinity            Invalid argument
  tand(), tandf(), tandl()   |x| = infinity            Invalid argument
  tand(), tandf(), tandl()   |x| < (180/pi) * min_float        Underflow
  tand(), tandf(), tandl()   x = (2n+1) * 90            Overflow
  cot(), cotf(), cotl()         x = 0                Overflow
  cotd(), cotdf(), cotdl()   |x| = multiples of 180        Overflow
                 degrees
  asin(), asinf(), asinl()   |x| > 1                Invalid argument
  asind(), asindf(),         |x| > 1                Invalid argument
  asindl()
  acos(), acosf(), acosl()   |x| > 1                Invalid argument
  acosd(), acosdf(),         |x| > 1                Invalid argument
  acosdl()
  atan2(), atan2f(),         x = y = 0                Invalid argument
  atan2l()
  atan2(), atan2f(),         |x| = |y| = infinity        Invalid argument
  atan2l()
  atand2(), atand2f(),         x = y = 0                Invalid argument
  atand2l()
  atand2(), atand2f(),         |x| = |y| = infinity        Invalid argument
  atand2l()
  __________________________________________________________________________

  The following table lists boundary values used by these functions:

  ___________________________________________________________________
  Value Name   Data Type   Hexadecimal Value   Decimal Value
  ___________________________________________________________________
  (180/pi)     S_FLOAT       00000039           8.028849e-44
    *
  min_float
           T_FLOAT       0000000000000039    2.830787630910868e-322
  ___________________________________________________________________


-- 
Didier Godefroy
mailto:address@hidden






reply via email to

[Prev in Thread] Current Thread [Next in Thread]