Wikipedia:Reference desk/Archives/Mathematics/2015 January 5

From Wikipedia, the free encyclopedia
Mathematics desk
< January 4 << Dec | January | Feb >> January 6 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


January 5[edit]

Reverse Polish Notation[edit]

Hi all,

I'm trying to understand the following reverse polish notation:

SSP xor DS xor or xor not

If I had the following:

SSP xor DS xor or not

then I know it would be:

NOT((S xor S xor P) or (D xor S))

What would SSP xor DS xor or xor not be?

Letsbefiends (talk) 01:44, 5 January 2015 (UTC)[reply]

Ah, I got it! I wasn't pushing the value back onto the stack again. So it is:
NOT(((D xor P) or (D xor S)) xor S)
I had to reread that algorithm on the wiki a few times. - Letsbefiends (talk) 02:25, 5 January 2015 (UTC)[reply]
Cool, I'll mark this Q resolved then. StuRat (talk) 03:16, 5 January 2015 (UTC)[reply]
Well, RPN is to make it easy for the machine, not for people. :-) Bubba73 You talkin' to me? 04:24, 5 January 2015 (UTC)[reply]
Presumably that first "D" in your answer was a typo, and you meant to state:
not(((S xor P) or (D xor S)) xor S)
-- ToE 06:04, 5 January 2015 (UTC)[reply]
Resolved

Here is how a human might resolve this, looking at the expression (and rewriting if necessary) by iterative replacing operators with their respective arguments:

  1. SSP xor DS xor or xor not
  2. S (S xor P) (D xor S) or xor not
  3. S ((S xor P) or (D xor S)) xor not
  4. (S xor ((S xor P) or (D xor S)) not
  5. not (S xor ((S xor P) or (D xor S))

CiaPan (talk) 05:52, 5 January 2015 (UTC)[reply]

There's even a programming language based on this Forth (programming language) which used to be reasonably popular. It has often been described as a Write-only language ;-) Dmcq (talk) 16:32, 5 January 2015 (UTC)[reply]

Fermat point of spherical triangles[edit]

Where is it? (Defining it analogically as the point where the sides subtend equal angles.) Double sharp (talk) 08:32, 5 January 2015 (UTC)[reply]

The article on Fermat point would say something about it if there was anything so it's unlikely there is anything on Wikipedia. There;s a couple of papers on the web if you Google 'Fermat point sphere'. An opportunity to contribute to Wikipedia by adding to that article? Dmcq (talk) 16:43, 5 January 2015 (UTC)[reply]
Hmm, this looks promising. Double sharp (talk) 21:45, 17 March 2016 (UTC)[reply]