Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: James Kuyper Newsgroups: comp.lang.c Subject: Re: casting constant value from float to unsigned short - compiler bugs? Date: Wed, 04 Jan 2012 19:12:59 -0500 Organization: A noiseless patient Spider Lines: 39 Message-ID: <4F04EB0B.60701@verizon.net> References: <4ed8950a$0$18699$91cee783@newsreader03.highway.telekom.at> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: mx04.eternal-september.org; posting-host="2P71cupDoazVVolqpw1jrw"; logging-data="17521"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+N9GOSeb+ki2VHCKnROZzPZBH9OX88b4E=" User-Agent: Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111220 Thunderbird/9.0 In-Reply-To: Cancel-Lock: sha1:U7tzetJzGc5+csRrlIv4l2UlFjY= Xref: x330-a1.tempe.blueboxinc.net comp.lang.c:15432 On 01/04/2012 06:14 PM, Michael Press wrote: > In article , > Keith Thompson wrote: > >> Michael Press writes: ... >>> The floor function is defined as >>> >>> floor(x) = maximum integer m such that m <= x. >>> >>> Hence floor(x) <= x. >> >> Yes, and that's consistent with the C standard's floor(), floorf(), >> and floorl() functions in . >> >>> The fractional part of x is defined to be >>> >>> frac(x) = x - floor(x). >>> >>> Hence frac(x) >= 0. >> >> Can you cite a source that says that that's what "fractional part" >> means in mathematics? > > Yes. Why? Do you have a source that states otherwise? At the time Keith posted, Ben Pfaff had already given a URL for a Mathematica web site indicating that "Spanier and Oldham (1987) use the same definition as Mathematica", which is (probably not coincidentally) the same as C's definition. ... [snip 116 blank lines] What was the purpose of those blank lines? > Knuth, ACP, 1.2.4. > > Oxford Dictionary of Mathematics >