Wiki Article
Talk:C mathematical functions
Nguồn dữ liệu từ Wikipedia, hiển thị bởi DefZone.Net
| This article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||
| ||||||||||||||
C99 functions.
[edit source]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)
C++?
[edit source]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)
- 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)
Command_line
[edit source]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)
Single page for C mathematical functions
[edit source]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)
- 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)
- 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)
- Oops, sorry about that. atan2 certainly shouldn't have been in that list.1exec1 (talk) 23:11, 8 October 2011 (UTC)
- 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)
Source Code?
[edit source]Where is the source code for the math library? Cunningham patrick (talk) 14:54, 12 October 2011 (UTC)
- 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)
help
[edit source]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)
- 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)
Move discussion in progress
[edit source]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)
Prototypes
[edit source]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)
External links modified
[edit source]Hello fellow Wikipedians,
I have just modified one external link on C mathematical functions. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
- Added archive https://web.archive.org/web/20110820024510/http://www.cs.utah.edu:80/dept/old/texinfo/glibc-manual-0.02/library_17.html to //www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_17.html
When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{Sourcecheck}}).
An editor has reviewed this edit and fixed any errors that were found.
- If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
- If you found an error with any archives or the URLs themselves, you can fix them with this tool.
Cheers.—InternetArchiveBot (Report bug) 11:43, 12 November 2016 (UTC)
- Checked! Rchard2scout (talk) 19:05, 24 July 2017 (UTC)
India Education Program course assignment
[edit source]
This article was the subject of an educational assignment at College Of Engineering Pune supported by Wikipedia Ambassadors through the India Education Program during the 2011 Q3 term. Further details are available on the course page.
The above message was substituted from {{IEP assignment}} by PrimeBOT (talk) on 20:02, 1 February 2023 (UTC)
History of math.h library
[edit source]This article is quite useful as cheat sheet if you want a quick overview about mathematical functions. But for a deeper understanding it is important how these libraries evolved and how they found their acceptance in the C language. So which is the history of #include <math.h> and who did this work? Mdarge (talk) 08:04, 17 April 2025 (UTC)
Requested move 18 November 2026
[edit source]
It has been proposed in this section that C mathematical functions be renamed and moved to C and C++ mathematics facilities. A bot will list this discussion on the requested moves current discussions subpage within an hour of this tag being placed. The discussion may be closed 7 days after being opened, if consensus has been reached (see the closing instructions). Please base arguments on article title policy, and keep discussion succinct and civil. Please use {{subst:requested move}}. Do not use {{requested move/dated}} directly. |
C mathematical functions → C and C++ mathematics facilities – Right now, the page only discusses C mathematics functions (in <math.h>). This title would suggest that C++ mathematics facilities are outside the scope of the article, but <cmath>'s special mathematical functions are included in a section (and there is really no better place to put them, seeing as this is the first page cmath disambiguates to). Creating a separate page for C++'s mathematics facilities would create tremendous overlap between it and this page (seeing as C++ reuses the <cmath> header), but this page is currently an ill-fit for some of C++'s other mathematics libraries like the facilities in <random> (such as pseudorandom bit generators, random number generator engines and probability distributions, and the C++26 std::linalg and std::simd libraries, neither of which I think are novel or distinct enough to warrant their own page but would fit very well in a page about C++ mathematical facilities, although that by itself still has the problem of overlap with C mathematical functions. Therefore, I propose the joint page approach as mentioned above which would avoid the overlap while still being relevant to each other enough to live in the same page. ~2026-60710-41 (talk) 04:58, 18 November 2026 (UTC)
