473,378 Members | 1,631 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

C99 std documentation

Is there a good online description of the ansi c99 std lib - sinse many of
the functions describet in k&r (eg. ceil is missing) does not seam to be
in c99.

Thanks.
Nov 14 '05 #1
10 5836
"Lars Tackmann" <ro****@diku.dk> wrote:
Is there a good online description of the ansi c99 std lib - sinse
many of the functions describet in k&r (eg. ceil is missing) does
not seam to be in c99.


The Dinkum C99 Library reference is probably the best I've found,
short of paying your US$18 to ANSI to download the PDF of the
actual C99 standard.

www.google.com/search?q=dinkum+c99+library

--
Simon.
Nov 14 '05 #2
Lars Tackmann wrote:

Is there a good online description of the ansi c99 std lib
- sinse many of the functions describet in k&r
(eg. ceil is missing) does not seam to be in c99.


It seems to be in N869.

http://anubis.dkuug.dk/jtc1/sc22/wg14/www/docs/n869/

Committee Draft -- January 18, 1999 WG14/N869

7.12.9.1 The ceil functions
Synopsis
[#1]
#include <math.h>
double ceil(double x);
float ceilf(float x);
long double ceill(long double x);
Description
[#2] The ceil functions compute the smallest integer value
not less than x: |x|.
Returns
[#3] The ceil functions return the smallest integer value
not less than x, expressed as a floating-point number.
--
pete
Nov 14 '05 #3
On Fri, 26 Dec 2003 13:16:26 +0100, Lars Tackmann <ro****@diku.dk>
wrote in comp.lang.c:
Is there a good online description of the ansi c99 std lib - sinse many of
the functions describet in k&r (eg. ceil is missing) does not seam to be
in c99.

Thanks.


What makes you think that they are not in C99? What are you using to
determine that, if you don't have a reference? There were no
functions at all removed from the standard library by C99. ceil() is
still there, along with specialized float and long double versions
added.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Nov 14 '05 #4
On Fri, 26 Dec 2003, Jack Klein wrote:
What makes you think that they are not in C99? What are you using to
determine that, if you don't have a reference? There were no
functions at all removed from the standard library by C99. ceil() is
still there, along with specialized float and long double versions
added.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq


Well when I looked in the math.h header - there is no ceil
function/prototype and my linker (included with gcc 3.2.2) says

gcc -std=c99 test.c

/tmp/ccofZXVf.o(.text+0x19): In function `insert':
: undefined reference to `ceil'
/tmp/ccofZXVf.o(.text+0x6c): In function `insert':
: undefined reference to `ceil'
collect2: ld returned 1 exit status

and yes i have included math.h, the code compiles fine with gcc 2.96. So
is it just the gnu implementation there is buggy or am i suposed to include
som other file in order to get that functionX.
thanks
Nov 14 '05 #5
On Sat, 27 Dec 2003 00:00:44 +0100, Lars Tackmann <ro****@diku.dk>
wrote:

Well when I looked in the math.h header - there is no ceil
function/prototype and my linker (included with gcc 3.2.2) says


Your initial question (Is ceil included in C99?) is answered. The
question of how to persuade gcc to let you use it should be asked in
another newsgroup.

--
Al Balmer
Balmer Consulting
re************************@att.net
Nov 14 '05 #6
begin followup to Lars Tackmann:
gcc -std=c99 test.c

/tmp/ccofZXVf.o(.text+0x19): In function `insert':
: undefined reference to `ceil'


Add -lm to your compiler flags.

--
Für Google, Tux und GPL!
Nov 14 '05 #7
Lars Tackmann <ro****@diku.dk> wrote in
news:Pi******************************@brok.diku.dk on Fri 26 Dec 2003
04:00:44p:
Well when I looked in the math.h header - there is no ceil
function/prototype and my linker (included with gcc 3.2.2) says

gcc -std=c99 test.c

/tmp/ccofZXVf.o(.text+0x19): In function `insert':
: undefined reference to `ceil' /tmp/ccofZXVf.o(.text+0x6c): In function
: `insert': undefined reference to `ceil' collect2: ld returned 1 exit
: status


[OT]
That's the linker talking to you, not the compiler. (See that the file is
now in /tmp and has a name no rational human would give it? That's where
the assembler shoved the object code once it had generated it.) The linker
doesn't like that you didn't tell it to link against libm.a, the GNU
Project's math library, and now it can't find ceil. The best way to link
against libm.a is to add the flag -lm to your gcc command line. The
compiler will pass it along to the linker, and the linker will be happy.

Some people consider this to be a mistake in how the GNU Compiler
Collection was designed. I say, it's the price of using a great build
environment.
[/OT]

In any case, this is all massively off-topic here. Try
comp.linux.programmers or some such.

Nov 14 '05 #8
While we're off-topic,

"August Derleth" <li*****************@onewest.net> wrote:
[OT] .... Some people consider this to be a mistake in how the GNU Compiler
Collection was designed. I say, it's the price of using a great
build environment.
The split of the C library into libc and libm is a historical UNIX
thing. The problem has nothing to do with the design of the GNU
Compiler Collection, and existed long before GCC did.

Other compilers on Unix also require separate linking of the math
section of the C library. GCC on other platforms does not require
separate linking of the math section. Therefore, libm is orthogonal
to GCC.
[/OT]


--
Simon.
Nov 14 '05 #9
In <40***********************@news.optusnet.com.au> "Simon Biber" <ne**@ralminNOSPAM.cc> writes:
While we're off-topic,

"August Derleth" <li*****************@onewest.net> wrote:
[OT]

...
Some people consider this to be a mistake in how the GNU Compiler
Collection was designed. I say, it's the price of using a great
build environment.


The split of the C library into libc and libm is a historical UNIX
thing. The problem has nothing to do with the design of the GNU
Compiler Collection, and existed long before GCC did.

Other compilers on Unix also require separate linking of the math
section of the C library. GCC on other platforms does not require
separate linking of the math section. Therefore, libm is orthogonal
to GCC.


Especially considering that gcc is a compiler only, while the math
library functions are, obviously, a library issue.

Merge libc and libm together on a Unix system and gcc won't need any -lm
option to properly link programs using the <math.h> stuff.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #10
On Fri, 23 Jan 2004 12:25:59 +1100, "Simon Biber"
<ne**@ralminNOSPAM.cc> wrote:
While we're off-topic,

"August Derleth" <li*****************@onewest.net> wrote:
[OT]...
Some people consider this to be a mistake in how the GNU Compiler
Collection was designed. I say, it's the price of using a great
build environment.


The split of the C library into libc and libm is a historical UNIX
thing. The problem has nothing to do with the design of the GNU
Compiler Collection, and existed long before GCC did.

Other compilers on Unix also require separate linking of the math
section of the C library. GCC on other platforms does not require
separate linking of the math section. Therefore, libm is orthogonal
to GCC.


Some implementations had several math libraries, and allowed the
programmer to use linker directives to choose the one he wanted to
use. One for hardware FPP, one for another variety of FPP, one for
proprietary software floating point, one for software emulation of a
hardware FPP, one which would test for the presence of an FPP and use
software emulation if it wasn't present, etc.
[/OT]


--
Al Balmer
Balmer Consulting
re************************@att.net
Nov 14 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Daniel R. Smorey Jr. | last post by:
I'm looking for a good place for Python documentation. I'm really lost on why it's so hard to find anything when it comes to me looking up a particular function in Python. My example would be the...
11
by: Steve | last post by:
posted on: comp.lang.python emailed to: docs@python.org I have a suggestion/request that will, I think, improve the Python documentation. Currently, the Python documentation in HTML format is...
24
by: Christopher J. Bottaro | last post by:
This post is just the culmination of my thoughts and discussions with my coworkers on Python. If you are not interested, please skip over it. At my work, we are developing a product from...
0
by: Jeff Levinson [mcsd] | last post by:
I'm an architect for a very large fortune 100 company and we still struggle with the best balance. However, I use a couple of simple guidelines that have worked very well for me in almost all...
0
by: Almoni | last post by:
Hi, I have a few .xsd files that include each other in the following way: <!-- lets call the main schema file AA.xsd and it includes BB.xsd inside it --> <xs:schema...
1
by: Ole Hanson | last post by:
I would like to be able to generate documentation for a custom configuration file (xml) to enable future support engineers to understand applicable values to the various elements inside the...
97
by: Cameron Laird | last post by:
QOTW: "Python makes it easy to implement algorithms." - casevh "Most of the discussion of immutables here seems to be caused by newcomers wanting to copy an idiom from another language which...
0
by: innovasys | last post by:
TORQUAY, DEVON, UK - Innovasys announced the release of Document! X 5, the fifth version of the documentation solution of choice for developers using Microsoft Visual Studio or the .NET Framework....
34
by: nicolasfr | last post by:
Hi, I am a bit disapointed with the current Python online documentation. I have read many messages of people complaining about the documentation, it's lack of examples and the use of complicated...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.