Re: Trig functions from math.h

2014-11-28 Thread Ian Malone
On 26 November 2014 at 19:06, Les Howell hlhow...@pacbell.net wrote:
 Gentle developers:
 I have some older code that used to compile, which I wish to reuse and
 maybe redesign.  However the code is C and uses the sinf function, which
 seems to have disappeared from math.h.  Can anyone tell me where this
 has gone?  The man pages no longer return the sinf function, Info pages
 say that it should be in either math.h or complex.h, but it is not.  The
 either math.h needs some modification (dated Sep 26 this year), and the
 man pages need updating, or the new function needs to be named,
 supported and the information on the Info pages needs to be updated.
 But in the interim, what is a work around?  Please don't tell me I have
 to code a trig function.

This is part of c99, so if it's not there it's a bug.

Don't have a Fedora box in front of me to test on, but it might not be
available if you don't supply -lm (in theory only applies to linking
the libraries, but I think it can have other effects), and may need to
specify a standard that includes it, possibly --std=c99 or --std=gnu99
to get the right definitions available. Defining _DEFAULT_SOURCE
suggested by Kevin Kofler may have a similar effect if your build
system is forcing c89 or something.

-- 
imalone
http://ibmalone.blogspot.co.uk
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Trig functions from math.h

2014-11-27 Thread Kevin Kofler
Les Howell wrote:
 I have some older code that used to compile, which I wish to reuse and
 maybe redesign.  However the code is C and uses the sinf function, which
 seems to have disappeared from math.h.  Can anyone tell me where this
 has gone?  The man pages no longer return the sinf function, Info pages
 say that it should be in either math.h or complex.h, but it is not.  The
 either math.h needs some modification (dated Sep 26 this year), and the
 man pages need updating, or the new function needs to be named,
 supported and the information on the Info pages needs to be updated.
 But in the interim, what is a work around?  Please don't tell me I have
 to code a trig function.

#define _DEFAULT_SOURCE or pass -D_DEFAULT_SOURCE to gcc.

Kevin Kofler

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Trig functions from math.h

2014-11-26 Thread Les Howell
Gentle developers:
I have some older code that used to compile, which I wish to reuse and
maybe redesign.  However the code is C and uses the sinf function, which
seems to have disappeared from math.h.  Can anyone tell me where this
has gone?  The man pages no longer return the sinf function, Info pages
say that it should be in either math.h or complex.h, but it is not.  The
either math.h needs some modification (dated Sep 26 this year), and the
man pages need updating, or the new function needs to be named,
supported and the information on the Info pages needs to be updated.
But in the interim, what is a work around?  Please don't tell me I have
to code a trig function.

Regards,
Les H

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Trig functions from math.h

2014-11-26 Thread Chris Adams
Once upon a time, Les Howell hlhow...@pacbell.net said:
   I have some older code that used to compile, which I wish to reuse and
 maybe redesign.  However the code is C and uses the sinf function, which
 seems to have disappeared from math.h.

It works for me.  What error are you getting (always helpful to
include)?  Are you linking with -lm (the math library)?

Also, just FYI: this list is intended for developing Fedora, not really
developing _on_ Fedora (so unless you are working on F21 or rawhide, you
should use us...@lists.fedoraproject.org in the future).

-- 
Chris Adams li...@cmadams.net
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct