Bug 90053 - glxgears should use sincos(3)
glxgears should use sincos(3)
Status: CLOSED UPSTREAM
Product: Red Hat Raw Hide
Classification: Retired
Component: XFree86 (Show other bugs)
1.0
All Linux
low Severity low
: ---
: ---
Assigned To: X/OpenGL Maintenance List
David Lawrence
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-05-01 14:15 EDT by Mike A. Harris
Modified: 2005-10-31 17:00 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-02-01 04:21:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Mike A. Harris 2003-05-01 14:15:54 EDT
A rather low priority thing to fiddle with sometime when bored perhaps.

<jakub> btw: glxgears should be tought about sincos(3)
<jakub> I saw in ltrace lots of sin calls followed by cos calls with the same
arguments
Comment 1 John Ellson 2003-06-13 14:58:54 EDT
sincos() is not very portable.   Here is the configure test and a sincos
macro that we've used with success in graphviz:

--------------------- configure test -----------------------

AC_MSG_CHECKING(if have working sincos())
AC_TRY_RUN([
        #include <stdio.h>
        #include <assert.h>
        #define PI 3.14159265358979323846
        extern void sincos(double x, double *s, double *c);
        int main () {
                double sinx=0.0, cosx=1.0;
                sincos(PI/2.0,&sinx,&cosx);
                assert(sinx>0.9999999);
                assert(sinx<1.0000001);
                assert(cosx<0.0000001);
                assert(cosx>(-0.0000001));
                return 0;
        }]
        ,
        AC_MSG_RESULT(yes)
        AC_DEFINE_UNQUOTED(HAVE_SINCOS,1,[Define if libm provides a *working*
sincos function])
        ,
        AC_MSG_RESULT(no)
        ,
        AC_MSG_RESULT(no - assumed because cross-compiling)
        )


------------------ macro ---------------------

#ifndef HAVE_SINCOS
void sincos(x,s,c) double x,*s,*c; { *s = sin(x); *c = cos(x); }
#else
extern void sincos(double x, double *s, double *c);
#endif
Comment 3 Mike A. Harris 2005-02-01 04:21:04 EST
Filed bug report upstream to track this low priority enhancement
suggestion, in case some enterprising new X developer wants a simple
task to dip their toes into Imake et al.:

https://bugs.freedesktop.org/show_bug.cgi?id=2442

Setting our bug status to "UPSTREAM" to continue tracking it
in centralized location instead.

Note You need to log in before you can comment on or make changes to this bug.