I wrote an assembler that supports floating point values. One of the operators I implemented was factorial because a lot of Taylor series seem to use it to define various constants. So right now, I have <pre><code>.float -((2*3.14159265)**11)/11! </code></pre> I found a bug in the parsing such that <code>(2+3)!</code> doesn’t parse (the parsing of the factorial operator is in the wrong location). In fixing the bug, I found an issue that I don’t know how best to resolve, since I personally have never used a programming language that defined a factorial operator. So my question: what should <code>-3!</code> produce? Should it error out as factorial isn’t defined for negative numbers? Or should it parse as <code>-(3!)</code> and return -6? I ask because of <code>-(2+3)!</code>. What binds tighter? The minus, or the factorial?
If you wanted to be strict about this (and not accidentally produce garbage values by accident) you should throw an exception on a factorial of a negative number. Force it to use -(x!) to produce the result of the factorial with the sign changed, instead of the more ambiguous -x!.

