On Mon, Apr 22, 2013 at 6:56 PM, Paul Sokolovsky <pmis...@gmail.com> wrote:

> Hello,
>
> On Tue, 23 Apr 2013 00:56:40 +0200
> David Brown <david.br...@hesbynett.no> wrote:
>
> > "Shift" does not have a "correct classification" or other "officially
> > correct" mathematical definition.  It is not one of the standard
> > operations defined on integers.
>
> Of course it is - proceed to http://en.wikipedia.org/wiki/Logical_shift
> or open up your Computer Science book. (And of course, whenever we speak
> of integers in Computer Science, we speak of finite subset of math
> integers, and those map directly to bit vectors on which shift is
> defined).
>

I believe David was referring to mathematics, where a shift relative to a
finite set of integral values is essentially an algebraic operation.  The
closest analog to "int" in standard mathematics would probably be a group,
ring, or (probably not) field; in any case, not something where logical or
arithmetic shifts are primitive operations.  If it were well-defined
mathematically, the C language might not be justified in leaving the
operation undefined.

Computer science often defers to mathematics for this sort of thing, but in
practice it takes leave to use a functional definition in certain cases,
which does indeed depend on the computing model you use.


>
> > So it does what you define it to do in the context.
>
> No, that's not how science works - there's one definition for one
> notion, "you" (as a subjective observer) is excluded.
>

I think that's an unrefined position.  I propose that a defensible
definition of "science" is "the consensus interpretation of repeatable
observations", which is both subjective and temporal.  Reference Thomas
Kuhn.  That, though, is a discussion best held at a coffee shop or quiet
bar amongst a group of cross-disciplinary graduate students, and mostly
irrelevant to how a C compiler does or should handle integer operations.

Damn, I miss those days.

Peter
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to