Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #15496

Re: casting constant value from float to unsigned short - compiler bugs?

From James Kuyper <jameskuyper@verizon.net>
Newsgroups comp.lang.c
Subject Re: casting constant value from float to unsigned short - compiler bugs?
Date 2012-01-06 15:24 -0500
Organization A noiseless patient Spider
Message-ID <4F07586E.70506@verizon.net> (permalink)
References (8 earlier) <rubrum-21FF7A.23042704012012@news.albasani.net> <lnehve5t0b.fsf@nuthaus.mib.org> <rubrum-1950AD.16142705012012@news.albasani.net> <ln62gp64nt.fsf@nuthaus.mib.org> <rubrum-F94ABB.11300606012012@news.albasani.net>

Show all headers | View raw


On 01/06/2012 02:30 PM, Michael Press wrote:
> In article <ln62gp64nt.fsf@nuthaus.mib.org>,
>  Keith Thompson <kst-u@mib.org> wrote:
> 
>> Michael Press <rubrum@pacbell.net> writes:
>>> In article <lnehve5t0b.fsf@nuthaus.mib.org>,
>>>  Keith Thompson <kst-u@mib.org> wrote:
...
>>>> Ok.  My point is that "mathematics" is a very large field, and I'm
>>>> skeptical that there's a single definition for a term like "fractional
>>>> part" that all mathematicians would accept.
>>>
>>> Oh ho. You are not interested in this; and are wasting my time,
>>> else you would present cogent arguments.
>>
>> In fact I am interested in this.  You made a specific claim; I asked you
>> to support it.  Someone interested in actual discussion wouldn't have
>> made such a big deal about the fact that my question was literally a
>> yes/no question; it was clearly intended to solicit more useful
>> information.
>>
>> My argument above was certainly intended to be "cogent".  If you didn't
>> find it so, feel free to elaborate.
> 
> You offer a meta-argument about mathematics,
> rather than mathematical arguments. That
> is hand waving. 
> 
> For instance: the definition of prime
> number once included 1 as a prime.
> Eventually this definition made 
> statements and proofs of theorems
> awkward. Changing the definition
> made theorem statements and proofs 
> smoother and easier to follow. 
> 
> frac(x) = x - floor(x) is simpler
> to write than the alternative. 
> The standard definition is periodic
> and that is a neat property to have.
> 
> The definition of equidistributed sequence is easier.
> A sequence {a_n} is equidistributed
> if {frac(a_n)} is equidistributed in [0,1].
> 
> The truncation toward zero definition does not
> make mathematics easier. 
> 
> argumentum ad verecundiam:
> Donald Knuth uses this definition.

Facts like that would be relevant, if the question Keith were discussing
were "what should the mathematical definition of 'fractional part' be?".
The question he was actually discussing was "Is there a definition for
'fractional part' that is so widely accepted by mathematicians, that it
can reasonably be referred to as 'the' mathematical definition?".

The benefits and disadvantages of various possible definitions are very
relevant to the first question, and completely irrelevant to the second
one. Identifying people who use various definitions for 'fractional
part', and assessing their degree of influence in the mathematical
community, should be irrelevant to the first question, but is very
relevant to the second one.

The wording used in the standard is quite reasonable if the answer to
the second question is "No", while the answer to the first question is
quite irrelevant. The behavior defined by the standard was chosen to
match common existing usage, not because of any of the issues you raise
above. The only legitimate issue is about how to correctly describe that
behavior.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

casting constant value from float to unsigned short - compiler bugs? "news.aon.at" <mario_semo@hotmail.com> - 2011-12-02 10:06 +0100
  Re: casting constant value from float to unsigned short - compiler bugs? jacob navia <jacob@spamsink.net> - 2011-12-02 10:34 +0100
    Re: casting constant value from float to unsigned short - compiler bugs? Vincenzo Mercuri <vincenzo.mercuri@hotmail.it> - 2011-12-02 18:10 +0100
    Re: casting constant value from float to unsigned short - compiler bugs? Quentin Pope <qp19433@hotmail.NOSPAM.com> - 2011-12-02 22:36 +0000
      Re: casting constant value from float to unsigned short - compiler bugs? jacob navia <jacob@spamsink.net> - 2011-12-03 00:45 +0100
        Re: casting constant value from float to unsigned short - compiler  bugs? pete <pfiland@mindspring.com> - 2011-12-02 19:43 -0500
          Re: casting constant value from float to unsigned short - compiler   bugs? pete <pfiland@mindspring.com> - 2011-12-02 19:49 -0500
        Re: casting constant value from float to unsigned short - compiler bugs? Vincenzo Mercuri <vincenzo.mercuri@yahoo.it> - 2011-12-03 01:51 +0100
          Re: casting constant value from float to unsigned short - compiler bugs? James Kuyper <jameskuyper@verizon.net> - 2011-12-03 11:51 -0500
            Re: casting constant value from float to unsigned short - compiler bugs? Vincenzo Mercuri <vincenzo.mercuri@hotmail.it> - 2011-12-03 19:08 +0100
              Re: casting constant value from float to unsigned short - compiler bugs? Quentin Pope <qp19433@hotmail.NOSPAM.com> - 2011-12-03 19:06 +0000
                Re: casting constant value from float to unsigned short - compiler bugs? Kaz Kylheku <kaz@kylheku.com> - 2011-12-03 19:14 +0000
                Re: casting constant value from float to unsigned short - compiler bugs? Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-12-04 17:19 +0200
                Re: casting constant value from float to unsigned short - compiler bugs? James Kuyper <jameskuyper@verizon.net> - 2011-12-04 10:39 -0500
      Re: casting constant value from float to unsigned short - compiler bugs? Vincenzo Mercuri <vincenzo.mercuri@yahoo.it> - 2011-12-03 01:41 +0100
        Re: casting constant value from float to unsigned short - compiler bugs? Michael Press <rubrum@pacbell.net> - 2012-01-03 12:31 -0800
          Re: casting constant value from float to unsigned short - compiler bugs? blp@cs.stanford.edu (Ben Pfaff) - 2012-01-03 12:38 -0800
            Re: casting constant value from float to unsigned short - compiler bugs? Michael Press <rubrum@pacbell.net> - 2012-01-06 11:38 -0800
              Re: casting constant value from float to unsigned short - compiler bugs? James Kuyper <jameskuyper@verizon.net> - 2012-01-06 15:10 -0500
          Re: casting constant value from float to unsigned short - compiler bugs? Keith Thompson <kst-u@mib.org> - 2012-01-03 12:49 -0800
            Re: casting constant value from float to unsigned short - compiler bugs? Michael Press <rubrum@pacbell.net> - 2012-01-04 15:14 -0800
              Re: casting constant value from float to unsigned short - compiler bugs? James Kuyper <jameskuyper@verizon.net> - 2012-01-04 19:12 -0500
                Re: casting constant value from float to unsigned short - compiler bugs? Michael Press <rubrum@pacbell.net> - 2012-01-04 23:04 -0800
                Re: casting constant value from float to unsigned short - compiler bugs? Keith Thompson <kst-u@mib.org> - 2012-01-05 02:43 -0800
                Re: casting constant value from float to unsigned short - compiler bugs? James Kuyper <jameskuyper@verizon.net> - 2012-01-05 07:14 -0500
                Re: casting constant value from float to unsigned short - compiler bugs? Michael Press <rubrum@pacbell.net> - 2012-01-06 11:39 -0800
                Re: casting constant value from float to unsigned short - compiler bugs? Michael Press <rubrum@pacbell.net> - 2012-01-05 16:14 -0800
                Re: casting constant value from float to unsigned short - compiler bugs? Keith Thompson <kst-u@mib.org> - 2012-01-05 16:44 -0800
                Re: casting constant value from float to unsigned short - compiler bugs? Michael Press <rubrum@pacbell.net> - 2012-01-06 11:30 -0800
                Re: casting constant value from float to unsigned short - compiler bugs? James Kuyper <jameskuyper@verizon.net> - 2012-01-06 15:24 -0500
                Re: casting constant value from float to unsigned short - compiler bugs? Tim Rentsch <txr@alumni.caltech.edu> - 2012-01-26 09:14 -0800
              Re: casting constant value from float to unsigned short - compiler bugs? gwowen <gwowen@gmail.com> - 2012-01-05 04:09 -0800
              Re: casting constant value from float to unsigned short - compiler bugs? "io_x" <a@b.c.invalid> - 2012-01-05 16:32 +0100
          Re: casting constant value from float to unsigned short - compiler bugs? Nobody <nobody@nowhere.com> - 2012-01-04 09:11 +0000
            Re: casting constant value from float to unsigned short - compiler bugs? Michael Press <rubrum@pacbell.net> - 2012-01-04 23:08 -0800
              Re: casting constant value from float to unsigned short - compiler bugs? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-01-05 11:15 +0000
                Re: casting constant value from float to unsigned short - compiler bugs? James Kuyper <jameskuyper@verizon.net> - 2012-01-05 07:27 -0500
                Re: casting constant value from float to unsigned short - compiler bugs? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-01-05 13:03 +0000
                Re: casting constant value from float to unsigned short - compiler bugs? Michael Press <rubrum@pacbell.net> - 2012-01-05 16:28 -0800
                Re: casting constant value from float to unsigned short - compiler bugs? James Kuyper <jameskuyper@verizon.net> - 2012-01-06 07:17 -0500
                Re: casting constant value from float to unsigned short - compiler bugs? lawrence.jones@siemens.com - 2012-01-06 12:04 -0500
                Re: casting constant value from float to unsigned short - compiler bugs? Tim Rentsch <txr@alumni.caltech.edu> - 2012-01-26 09:08 -0800
                Re: casting constant value from float to unsigned short - compiler bugs? Michael Press <rubrum@pacbell.net> - 2012-01-05 16:17 -0800
      Re: casting constant value from float to unsigned short - compiler bugs? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-12-03 01:50 +0000
  Re: casting constant value from float to unsigned short - compiler bugs? James Kuyper <jameskuyper@verizon.net> - 2011-12-02 06:41 -0500
    Re: casting constant value from float to unsigned short - compiler bugs? Vincenzo Mercuri <vincenzo.mercuri@hotmail.it> - 2011-12-02 16:26 +0100

csiph-web