Jump to content

Talk:Common operator notation

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by SineBot (talk | contribs) at 14:11, 26 May 2009 (Signing comment by 134.243.209.109 - "add a question about whether an example demonstrating a sometimes confusion thinking of precedence of a prefix minus sign would be beneficial to add"). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Do programming languages actually exist where sin is a prefix operator? As far as I know, it's always a function requiring parentheses around its argument sin(x), thus avoiding the ambiguity mentioned in the article.
Herbee 11:37, 2004 Mar 5 (UTC)

Yes. Haskell has such a function, as well as sin appearing as a postfix operator in the PostScript programming language. Dysprosia 11:55, 5 Mar 2004 (UTC)

Is Common operator notation really a term in Computer Science? There's only 125 Google references, and almost all of those are to copies of this page. There is a commonality of operator notation among the computer languages descendent mostly from Fortran, but this page rambles on for quite a while without really capturing the essence of the idea. (Sorry for being vague, but this article's vague approach to its topic gave me a vague impression of vagueness.) Tom Duff 19:49, 23 August 2006 (UTC)[reply]


The example at the end of -3! hints at how the uniry minus binds later than the !. I wonder if an example such as

-2^2 (or -2**2, depending on what plain ASCII notation one wants to follow), along with some sort of authoratative reference, would be useful to add to the page.

I wonder this because the algebraic result of -4 is not necessarility obvious to people who read the notation (I know that I've seen arguments in web forums/newsgroups/mailing lists over whether this should be -(2*2) or (-2*-2). It seems like specifically noting the correct algebraic interpretation would be worthwhile in the context of operation precendence and notation. —Preceding unsigned comment added by 134.243.209.109 (talk) 14:10, 26 May 2009 (UTC)[reply]