Bug 90053 - glxgears should use sincos(3)
Summary: glxgears should use sincos(3)
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: XFree86   
(Show other bugs)
Version: 1.0
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: X/OpenGL Maintenance List
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords: Triaged
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-05-01 18:15 UTC by Mike A. Harris
Modified: 2005-10-31 22:00 UTC (History)
0 users

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


Attachments (Terms of Use)

Description Mike A. Harris 2003-05-01 18:15:54 UTC
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 18:58:54 UTC
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 09:21:04 UTC
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.