Jump to content

Talk:C mathematical functions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Manishearth (talk | contribs) at 12:39, 20 November 2011 (Undid revision 461586826 by Manishbot (talk)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
WikiProject iconC/C++ Unassessed
WikiProject iconThis article is within the scope of WikiProject C/C++, a collaborative effort to improve the coverage of C and C++ topics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
???This article has not yet received a rating on Wikipedia's content assessment scale.
???This article has not yet received a rating on the importance scale.

Template:IEP assignment

C99 functions.

Should the C99 math.h functions be included here as well? E.g. fabsf, fabsl, etc. These functions all deal with floats and long doubles -- cmath is not required for that. --204.69.182.1 17:42, 28 July 2006 (UTC)[reply]

Done. Alksentrs (talk) 23:50, 28 September 2008 (UTC)[reply]

C++?

C++'s cmath is different from math.h. In particular, cmath puts the functions in the std namespace and uses overloading so that abs(-1.0) does the Right Thing rather than requiring the user to call fabs(-1.0) for doubles and abs(-1) for integers. The page should reflect that. —Ben FrantzDale (talk) 17:46, 23 November 2008 (UTC)[reply]

You are correct. The C++ cmath does not define all of the functions from C99, plus it has abs, div, labs, and ldiv functions. In addition C++ overloads the math functions so they are type generic. In effect the libraries are similar on the surface but are actually completely different. This may not have obvious consequences to your everyday programmer but I think the article needs to reflect this. Unfortunately I cannot point to a source that gives a good rundown of the differences. 74.194.24.44 (talk) 09:27, 20 September 2009 (UTC)[reply]

Command_line

What is the command line prompt to call the math library while compiling? —Preceding unsigned comment added by 130.127.98.10 (talk) 00:36, 13 February 2010 (UTC)[reply]

Single page for C mathematical functions

Based on Talk:C standard library#Pages for each function and WP:NOTMANUAL

The following pages essentially discuss the same topic of C mathematical functions: math.h, casinh, div (C), complex.h, fenv.h, tgmath.h, ccos, cimag, carg, atan2, frexp, ldexp, log (C), acos (C). I propose to cleanup these pages by removing the material that fails WP:NOTMANUAL and by merging the remains into C mathematical operations.1exec1 (talk) 21:03, 8 October 2011 (UTC)[reply]

Oppose merge of atan2. If you read that article, you will see that it is about atan2 as a mathematical function, and its implementation in multiple programming languages. The C function of that name is mentiond only in passing. Gandalf61 (talk) 22:19, 8 October 2011 (UTC)[reply]
I agree. atan2 is present in some form in many systems, not just C descendants, and mathematically, it is the true Cartesian-to-angle function which tan-1 is not. It deserves to be discussed independently of C, or even programming, as it is now. — Unbitwise (talk) 23:00, 8 October 2011 (UTC)[reply]
Oops, sorry about that. atan2 certainly shouldn't have been in that list.1exec1 (talk) 23:11, 8 October 2011 (UTC)[reply]

Source Code?

Where is the source code for the math library? Cunningham patrick (talk) 14:54, 12 October 2011 (UTC)[reply]

There are many implementations of the C standard library. glibc, uClibc and bionic are several open source implementations. strcat (talk) 15:52, 12 October 2011 (UTC)[reply]

help

please someone help me.actually.someone has shifted the page of carg function that i had created.It,s my college assignment, i am unable to find it
so,please someone help meMadhusudan(talk) 05:40, 19 October 2011 (UTC)[reply]

It has been moved to Wikibooks at b:C Programming/C Reference/complex.h/carg. You can continue editing there.1exec1 (talk) 11:40, 19 October 2011 (UTC)[reply]

Move discussion in progress

There is a move discussion in progress which affects this page. Please participate at Talk:C standard library - Requested move and not in this talk page section. Thank you. —RM bot 09:40, 8 November 2011 (UTC)[reply]

Prototypes

I think that prototypes as in [1] are not useful because we don't completely explain these functions. Also, complete documentation is enabled one click away in an external page. I've asked the same question at Talk:C standard library, but got no user input. 1exec1 (talk) 09:47, 10 November 2011 (UTC)[reply]