text:
Is this number an integer power of -2?
There are clever ways of determining whether a number is a power of 2.  That's no longer an interesting problem, so let's determine whether a given integer is an integer power of -2.  For example:
-2 => yes: (-2)¹
-1 => no
0 => no
1 => yes: (-2)⁰
2 => no
3 => no
4 => yes: (-2)²

Rules

You may write a program or a function and use any of the standard methods of receiving input and providing output.
Your input is a single integer, and output must be a truthy value if the integer is an integer power of -2, and a falsy value otherwise.  No other output (e.g. warning messages) is permitted.
The usual integer overflow rules apply: your solution must be able to work for arbitrarily large integers in a hypothetical (or perhaps real) version of your language in which all integers are unbounded by default, but if your program fails in practice due to the implementation not supporting integers that large, that doesn't invalidate the solution.
You may use any programming language, but note that these loopholes are forbidden by default.

Winning condition
This is a code-golf contest: the answer which has the fewest bytes (in your chosen encoding) is the winner.

2 => no shouldn't this be yes?

@KritixiLithos I don't see why it should. There is no integer i such that (-2)^i = 2

Are the exponents positive or -0.5 should be valid since it's   2^(-1).

@Mr.Xcoder, Since inputs are always integer values, a negative exponent won't be required (or possible).

@Fatalize But literally (-2)^i might be 2...

@SIGSEGV maybe whereas i is not natural

@Mr.Xcoder, I think SIGSEGV was being facetious, as Fatalize clearly wrote "integer i".  It's just a play on i being the standard imaginary number.  Don't get too serious about that!

@Fatalize silly me, I thought the challenge asked for a power of 2 instead

How many bits is the input integer?

@Jason, as many as supported/natural in your language - see the third rule.  And it's [tag:code-golf] because it needs an objective winning criterion to be on-topic here - "a pleasing solution" doesn't cut it (though I do like the Mathematica answer - that surprised me).

One thing you could have done, which is reminiscent of some of the challenge contests we used to have in college, is limit the solution to a set of operations, e.g. bit shifts, bitwise operators, addition/subtraction/multiplication/division or something. And limit it to a certain language (most popular languages are similar in this regard). Then make it code-golf. Now that would have been proper treatment of this otherwise really great challenge.

@TobySpeight I've proposed an alternate version of this challenge here.

Mathematica, 22 bytes
EvenQ@Log2@Max[#,-2#]&

Try it online! (Using Mathics instead, where this solution also works.)
I tried to find a solution with bitwise operators for a while, and while one definitely exists, I ended up finding something which is probably simpler:

Max[#,-2#] multiplies the input by -2 if it's negative. Multiplying by another factor of -2 doesn't change whether the value is a power of -2 or not. But now all odd powers of -2 have been turned into even powers of -2.
But even powers of -2 are also even powers of 2, so we can use a simple Log2@... and check if the result is an integer (to check whether it's a power of 2). This already saves two bytes over Log[4,...] (another way to look at even powers of -2).
As an added bonus, checking whether a value is an even integer is shorter than just checking whether it's an integer: we can save three more bytes by using EvenQ instead of IntegerQ.

Does it help to consider that even powers of -2 are integer powers of 4?  I like the idea of multiplying by -2 to get everything positive - though disappointed to see no bit-twiddling so far.

@TobySpeight Treating them as powers of 2 actually saves 5 bytes. I used powers of 4 at first, but Log[4,...] is longer than Log2@... and IntegerQ is longer than EvenQ.

Jelly, 5 bytes
æḟ-2=

Try it online!
How it works
æḟ-2=  Main link. Argument: n

æḟ-2   Round n towards 0 to the nearest power of -2.
    =  Test if the result is equal to n.

Jelly, 6 bytes
b-2S⁼1

Try it online!
This is based on how Jelly converts an integer N to any arbitrary base B, doing so by converting N to an array, in which each integer is a digit d of (N)B, which can have a value 0≤Vd<B. Here, we will 0-index digits from the right, so every digit adds VdBd to form N. Vd<B⇔VdBd<BBd=Bd+1, therefore every possible N has only one unique representation, if we ignore leading 0s in (N)B.
Here, d=input, B=-2. N=Bd=1Bd=VdBd⇔1=Vd⇔Vd=1, and, since we're not adding any other multiples of powers of B, every other V would be 0. Right now, the array should be a 1 concatenated with d 0s. Since Jelly 1-indexes from the left, we should check whether the array's 1st element is 1, and all other elements are 0.
Hmm... all good, right? No? What's going on? Oh yeah, I have a better idea! First, let's take the sum of all of the integers in the array, treating it as if it was an integer array and not a number in base -2. If it is 1, it means that there is only one 1, and all other integers are 0. Since there can't be leading zeroes, except in the case of 0-2 (where the sum would be 0≠1 anyways), the 1st integer must be non-zero. The only non-zero integer in the array is the 1, so it must be the first one. Therefore, this is the only case that the sum of all of the integers in the array would be 1, because the smallest possible sum of a pair of positive integers is Σ{1,1}=2, since the smallest positive integer is 1. Every integer in a base representation is non-negative, so the only way the sum is 1 is to only have one 1, and all other integers are 0. Therefore, we can just check if the sum of all of the integers in the array is 1.
Here is what the code does:
b-2S⁼1 Main link. Arguments: d
b-2    Convert d to base -2.
   S   Take the sum.
    ⁼1 Check if the sum is equal to 1.

Phew, that explanation took time to write...

I'd hate to see what an explanation for a long program would look like then...

@boboquack Here I am explaining why I use the base conversion stuff. I don't think explanation for long programs would be this long. A post can contain up to 30000 markdown characters, and explanations for longer programs would be more terse anyways. Also, I have read much longer explanations, and they are not that boring.

Python, 46 bytes
-2 bytes thanks to @ovs.
def g(x):
 while x%-2==0!=x:x/=-2
 return x==1

Function with usage:
g(4) # put your number between the brackets

Try it online!

print g(8) prints False

@FelipeNardiBatista shouldn't it?

sorry, my example was a bad one, print g(4) does the same

Wait, there is a small error, fixing it shortly

I've put a ; instead of a newline... sorry for that. Fixed @FelipeNardiBatista

Can you not use x%2<1:x/=-2?

Oh yes, @Neil. Golfing skills are quite hard to get

@Neil It actually does not work (do not know why?) using my python 3.6 interpreter... strange... It seems like there is an infinite loop, because when I end the program, it throws KeyboardInterrupt on the line with the while

it's because -9%-2 returns -1 in both versions of python

but i think you could do x%-2+1

This doesn't work for 0. You'd need while x and ...

@mbomb007 fixed

46 bytes

@ovs I'm surprised someone golfed it down after 2 months, but thanks :))

Python 2, 98 50 bytes
lambda x:x*(x&-x==abs(x))*((x<0)^x.bit_length()&1)

Try it online!

JavaScript (ES6), 37 28 24 bytes
f=x=>!x|x%2?x==1:f(x/-2)

Saved 4 bytes thanks to Arnauld.

f=x=>!x|x%2?x==1:f(x/-2)

console.log(f(-2));
console.log(f(-1));
console.log(f(0));
console.log(f(1));
console.log(f(2));
console.log(f(3));
console.log(f(4));

Why do I see some errors (before the true/false values) when I click on "Run code snippet"?

@numbermaniac I'm not sure, maybe you're using a browser that doesn't fully support ES6?

Welp, refreshed and tried again, no errors. Not sure what happened the first time.

Python 2, 35 34 32 bytes
f=lambda n:n==1or n!=n%2<f(n/-2)

Try it online!

05AB1E, 8 bytes
Y(IÄÝm¹å

Try it online!
or as a Test suite
Explanation
Y(         # push -2
  IÄÝ      # push range [0 ... abs(input)]
     m     # element-wise power
      ¹å   # check if input is in the resulting list

Why the downvote?

@KritixiLithos: Seems like someone has downvoted all golfing languages.

Noticed that too. Although I haven't been around PPCG for long, I've learned that creative and interesting solutions in standard languages are far more appreciated than 3-byte solutions in golfing languages. However, there are some people who (unfortunately) downvote very creative solutions in golfing languages, simply because they think everything is built-in, and don't understand how good the algorithms (although written in golfing languges) are. +1 for the incredible solution @Emigna

ÄLY(småO for 8. Y(sÄLm¢Z for 8... Nevermind, all 8.

Excel, 40 36 bytes
Saved 4 bytes by CallumDA
Excel can certainly do it but correcting errors adds 11 bytes
=IFERROR(-2^IMREAL(IMLOG2(A1)),1)=A1

Input is in cell A1. Output is TRUE or FALSE
If it was allowed to return either FALSE or #NUM! error for false values, it would be only 25 bytes:
=-2^IMREAL(IMLOG2(A1))=A1

Heres a small improvement: =IFERROR(-2^IMREAL(IMLOG2(A1)),1)=A1

@CallumDA Thanks! I tried to figure a way to use the complex number functions but everything I came up with was longer.

C (gcc), 34 29 bytes
f(n){n=n%2?n==1:f(n?n/-2:2);}

Try it online!

MATL, 9 8 bytes
2_y|:q^m

Try it online! Or verify all test cases.
How it works
Consider input -8 as an example
2_    % Push -2
      % STACK: -2
y     % Implicit input. Duplicate from below
      % STACK: -8, -2, -8
|     % Absolute value
      % STACK: -8, -2, 8
:     % Range
      % STACK: -8, -2, [1 2 3 4 5 6 7 8]
q     % Subtract 1, element-wise
      % STACK: -8, -2, [0 1 2 3 4 5 6 7]
^     % Power, element-wise
      % STACK: -8, [1 -2 4 -8 16 -32 64 -128]
m     % Ismember. Implicit display
      % STACK: 1

If I understand your explanation correctly, then given input n, this creates an array of size n as an intermediate step.  Good job that efficiency is not a criterion here!

@Toby Of course! This is code golf, who cares about efficiency? :-D

Octave, 28 bytes
@(n)any((-2).^(0:abs(n))==n)

This defines an anonymous function. The approach is similar to that in my MATL answer.
Try it online!

Regex (ECMAScript / Java), 38 37 34 33 bytes
\b(?=(^|x))((x*)\3\3(?=\3$))*x\1$

Try it online! - ECMAScript
Try it online! - Java
Takes its input in unary, as an optional - sign followed by a string of x characters, the count of which represents the absolute value of the number. (As such, it is not bijective unary, as zero can be represented in two ways. The regex works with both.)
Sets a flag for whether a negative sign is present. Operating on the absolute value, repeatedly divides by 4 (requiring that there is no remainder), and then asserts that the remaining number is 1 if there was no negative sign, or 2 if there was.
\b                    # Anchor on the border between {start or "-"} and "x"; in the
                      # domain of this problem, it is actually equivalent to
                      # (?<=^(?=x)|-|x$) - so it can anchor on the end instead of the
                      # beginning, but that would result in a non-match.
(?=(^|x))             # \1 = 1 if negative sign is present, 0 if not
(                     # loop the following:
    (x*)\3\3(?=\3$)   # assert tail is divisible by 4; tail = tail / 4
)*                    # iterate as many times as possible (minimum 0)
x                     # tail -= 1
\1                    # tail -= \1
$                     # assert tail==0

Regex (ECMAScript), 36 bytes
^(-(x*)(?=\2$))?((x*)\4\4(?=\4$))*x$

Try it online!
This was the original version I posted; I'm keeping it here, as it's sufficiently different, yet close enough in length, to be interesting.
If it sees a negative sign, it strips it and divides the number by 2 (requiring that there is no remainder). It then asserts that the remaining number is a power of 4.
^
(
    -                 # eat a leading negative sign
    (x*)(?=\2$)       # assert tail is even; tail = tail / 2
)?                    # do the above optionally
# Assert that tail is a power of 4
(                     # loop the following:
    (x*)\4\4(?=\4$)   # assert tail is divisible by 4; tail = tail / 4
)*                    # iterate as many times as possible (minimum 0)
x$                    # assert tail == 1; if this fails to match, the regex engine will
                      # try backtracking the loops, but that cannot result in a match

Regex (Perl / PCRE / Boost / Python / Ruby / .NET), 32 bytes
^(-)?((x*)\3\3(?=\3$))*x(?(1)x)$

Try it online! - Perl
Try it online! - PCRE2
Try it online! - Boost
Try it online! - Python
Try it online! - Ruby
Try it online! - .NET
Uses essentially the same algorithm as the 33 byte ECMAScript version, but in a more straightforward way, which never matches strings outside the problem's domain.
^
(-)?                  # \1 = negative sign if it is present; unset otherwise
(                     # loop the following:
    (x*)\3\3(?=\3$)   # assert tail is divisible by 4; tail = tail / 4
)*                    # iterate as many times as possible (minimum 0)
x                     # tail = tail - 1
(?(1)x)               # if \1 is set, then tail = tail - 1, else do nothing
$                     # assert tail == 0

Regex (ECMAScript or better), 26 bytes
^((.*)\2\2(?=\2$))*(x|oo)$

Try it online! - ECMAScript
Try it online! - Perl
Try it online! - Java
Try it online! - Boost
Try it online! - Python
Try it online! - Ruby
Try it online! - PCRE2
Try it online! - .NET
Takes its input in bijective signed unary. A nonnegative number is a string of x characters, and a nonpositive number is a string of o characters. The the length of the string is the absolute value of the number.
^                     # tail = N = input number
(                     # Loop the following:
    (.*)\2\2(?=\2$)   # Assert tail is divisible by 4; tail = tail / 4;
                      # use "." so that either "x" or "o" can be matched, as
                      # long as all characters are identical.
)*                    # Iterate as many times as possible (minimum 0).
(x|oo)$               # Assert tail == 1 or tail == -2

HP 28s 36 bytes
WHILE DUP ABS 1 > REPEAT 2 NEG / END 1 ==

Welcome to Code Golf! Nice first answer!

@RedwolfPrograms Thanks!

JavaScript (ES6), 21 bytes
A recursive function that returns 0 or true.
f=n=>n==1||n&&f(n/-2)

How it works
This doesn't include any explicit test -- like n being odd or abs(n) being less than one -- to stop the recursion early when the input is not an exact power of -2.
We exit only when n is exactly equal to either 1 or 0.
This does work however because any IEEE-754 float will eventually be rounded to 0 when divided by 2 (or -2) enough times, because of arithmetic underflow.
Test cases

f=n=>n==1||n&&f(n/-2)

console.log(f(-2));
console.log(f(-1));
console.log(f(0));
console.log(f(1));
console.log(f(2));
console.log(f(3));
console.log(f(4));

PHP, 41 Bytes
for(;$argn%-2==0;)$argn/=-2;echo$argn==1;

PHP, 52 Bytes
echo($l=log(abs($argn),2))==($i=$l^0)&&$argn>0^$i%2;

PHP, 64 Bytes
Working with a Regex
echo preg_match("#^".($argn>0?1:"1+0")."(00)*$#",decbin($argn));

C (gcc), 33 bytes
f(n){return n%2?n==1:n&&f(n/-2);}

Try it online!

Python, 24 bytes
lambda n:n*n&n*n-1<n%3%2

Try it online!
The bit trick k&k-1==0 checks whether k is a power of 2 (or k==0). Checking this for k=n*n as n*n&n*n-1==0 tells us whether abs(n) is a power of 2.
To further see if n is a power of -2, we need only check that n%3==1. This works because mod 3, the value -2 is equal to 1, so its powers are 1. In contrast, their negations are 2 mod 3, and of course 0 gives 0 mod 3.
We combine the checks n*n&n*n-1==0 and n%3==1 into a single expression. The first can be written with <1 for ==0, since it's never negative. The n%3==1 is equivalent to n%3%2, giving 0 or 1. So, we can combine them as n*n&n*n-1<n%3%2.

05AB1E, 5 4 bytes
Ties emanresu A's Vyxal answer for #1.
2(вO

Try it online!
2(вO  # full program
   O  # push sum of...
  в   # list of base-10 values of base...
 (    # negative...
2     # literal....
  в   # digits of...
      # implicit input
      # implicit output

I took the liberty of adding a line to clarify only 1 is considered truthy in 05AB1E, and also added a test suite for the test cases. Feel free to change my edits if you'd want.

Python 3, 34 bytes
lambda n:n==(-2)**~-n.bit_length()

Java 7, 55 bytes
boolean c(int n){return n==0?0>1:n%-2==0?c(n/-2):n==1;}

Explanation:
boolean c(int n){  // Method with integer parameter and boolean return-type
  return n==0 ?    //  If n is zero:
    0>1//false     //   Return false
   : n%-2==0 ?     //  Else-if n mod -2 is zero:
    c(n/-2)        //   Recursive call for the input divided by -2
   :               //  Else:
    n==1;          //   Return if n is one
}                  // End of method

Test code:
Try it here.
class M{
  static boolean c(int n){return n==0?0>1:n%-2==0?c(n/-2):n==1;}

  public static void main(String[] a){
    for(int i = -2; i <= 4; i++){
      System.out.println(i + ": " + c(i));
    }
  }
}

Output:
-2: true
-1: false
0: false
1: true
2: false
3: false
4: true

The non-recursive way is shorter by 5 bytes: boolean c(int n){while(0==n%-2)n/=-2;return 1==n;}.

@OlivierGrégoire Unfortunately that one doesn't work for n=0 in Java, because 0%-2==0 will be true and 0/-2 is still 0, causing an infinite loop, which is why I added the n==0?0>1 part to my recursive method.

Nicely spotted!

Perl 6, 21 bytes
{$_==(-2)**(.lsb//0)}

Try it
Expanded:
{  # bare block lambda with implicit parameter ｢$_｣

  $_                  # is the input
  ==                  # equal to
  (-2)**( .lsb // 0 ) # -2 to the power of the least significant bit of the input
}

Note that 0.lsb returns Nil which produces a warning when used as a number, so the defined or operator // is used.
(Think of // as || with a different slant)
A method call with no invocant where a term is expected is implicitly called on $_. (.lsb)
Also works with .msb.

I like this one!

Haskell, 24 23 bytes
f 0=0
f 1=1
f n=f(-n/2)

Defines a function f which returns 1 for powers of -2 and 0 otherwise.
A golfed version of my first submission to the other challenge.

R, 22 bytes
Takes input from stdin, returns TRUE or FALSE accordingly.
scan()%in%(-2)^(0:1e4)

I'm not 100% sure that this is a valid answer, as it only works for integers up to R's size limit, and if the integers were unbounded it wouldn't work. However, the rules state:

The usual integer overflow rules apply: your solution must be able to work for arbitrarily large integers in a hypothetical (or perhaps real) version of your language in which all integers are unbounded by default, but if your program fails in practice due to the implementation not supporting integers that large, that doesn't invalidate the solution.

In a hypothetical version of R which does allow unbounded integers, then we could use the following code, for the same byte count:
scan()%in%(-2)^(0:Inf)

Of course, in real R, the above code just gives Error in 0:Inf : result would be too long a vector.

Julia 0.5, 20 bytes
!n=n∈(-2).^(0:n^2)

Try it online!

-1 byte

Pyth, 7 bytes
!tsjQ_2

Test suite
Explanation:
     _2   # -2
   jQ     # Cast input to that base
          # Iff input is a power of -2, then jQ_2 returns something of the form [1]+[0]*n
          # where n is the power of -2
          # This is also the only situation in which the sum of that is 1
!ts       # so we check for that: is the (s)um equal to 1 (or, equivalently, "!(sum - 1)" )

Risky, 14 bytes
__-+_-2{[?+_0:__0+_0+__?+_0

Try it online!
Explanation:

__-+_-: -2, written as -1 + -1 with padding
2: Power
{[?+_0: log_2(abs(input)), with +_0 as padding
:: Equals
__0+_0+__?+_0: Input (?), with padding

So basically, -2 ** log_2(abs(input)) == input

Do you think you could add and explanation for this, please?  Thanks!

x86-32 machine code, 20 18 16 bytes
-2 bytes thanks to @xiver77
-2 bytes by removing an unnecessary jump
(This submission was originally 19 bytes, but I adjusted it to 20 since I forgot to add ret).
00000000: f8a9 ffff 7f00 7507 c1f8 1730 e0d1 f8c3  ......u....0....

Try it online!
Expects a single precision float in eax. Output is in the carry flag.
It takes advantage of some fundamental properties of floats, for some power of -2 n:

abs(n) is a power of 2, therefore n's mantissa must be 0.
n is positive for odd numbered exponents, and negative for even exponents. In other words, sign ^ exponent[0] = 1 where exponent[0] is the least significant bit of the exponent.

NASM source:
[BITS 32]

isnegpow2:
    ; Clear carry
    clc
    ; Check if mantissa is non-zero
    test eax, 0x7fffff
    ; If it is, then abs(eax) is not a
    ; power of 2, so eax cannot be a power
    ; of -2
    jnz .end

    ; Shift away the mantissa
    sar eax, 23
    ; Now ah contains the sign,
    ; and al contains the exponent.
    ; For powers of -2, sign ^ exponent[0] = 1
    xor al, ah
    ; Check lsb by shifting it to the carry flag
    ; If it's 1, then eax is a power of -2, so the
    ; carry will be set
    sar eax, 1
.end:
    ret

I hadn't even considered floating-point input!

Nice observation! Clever, really.

How about this? It fits in 17 bytes. BTW, is it acceptable not to have a ret?

It should have a ret, you're right. I'll update the post with your improvement tomorrow when I have time to figure out how it works.

Thanks @xiver77, didn't think to set the carry flag using sar. Neat stuff. Managed to rearrange it slightly to golf off another 2 bytes also.

Javascript(ES7), 45 bytes
x=>-1**Math.log2(Math.abs(x))*Math.abs(x)==x

Math.abs(x) is longer than x>0?x:-x, 11 bytes to 8 bytes. You should also be able to do -2**... instead of -1... to remove the second Math.abs(x)

What's ES7 specific in this?

@DobbyTheFree-Elf, ** is.

What interpreter are you using. This code is syntax error on my Firefox.

Prolog (SWI), 44 bytes
p(X):-X=1;X\=0,X mod 2=:=0,Z is X/(-2),p(Z).

Online interpreter

bc 88 bytes
bc -l <<< "n=$1;q=l(sqrt(n*n));p=4*a(1);((n<1)*c(q/l(2)*p/2)+(n>1)*(s(q/l(4)*p)))^2==0"

I have this in a file neg2.sh and it prints 1 for powers of -2 and 0 otherwise
I know it's really long, but it was fun
Test
$ for i in {-129..257}; do echo -n "$i: "; ./neg2.sh $i; done | grep ': 1'
-128: 1
-32: 1
-8: 1
-2: 1
1: 1
4: 1
16: 1
64: 1
256: 1

Explanation
The main body has two halves, both are trying to equal zero for powers of -2.
q=l(sqrt(n*n))               % ln of the absolute value of the input
p=4*a(1)                     % pi: arctan(1) == pi/4
q/l(2) -> l(sqrt(n*n))/l(2)  % change of base formula -- this gives
                             % the power to which 2 is raised to equal
                             % sqrt(n*n). It will be an integer for
                             % numbers of interest
n<1                          % 1 if true, 0 if false. for negative
                             % numbers check for powers of 2
n>1                          % for positive numbers, check for powers
                             % of 4
c(q/l(2)*p/2)                % cos(n*pi/2) == 0 for integer n (2^n)
s(q/l(4)*p)                  % sin(n*pi) == 0 for integer n (4^n)
(....)^2==0                  % square the result because numbers are
                             % not exactly zero and compare to 0

I never expected trigonometry!  Good answer!

Casio BASIC, 76 bytes
Note that 76 bytes is what it says on my calculator.
?→X
0→O
While Abs(X)≥1
X÷-2→X
If X=1
Then 1→O
IfEnd
WhileEnd
O

This is my first venture into Casio BASIC... I never realised I could write such decent programs on a calculator :D

APL (Dyalog Extended), 10 bytes
-3 thanks to @rak1507
⊢∊¯2*⍳∘|

Try it online!

Currently fails for 1, can be fixed with ⎕IO←0 and can be golfed to ⊢∊¯2*⍳∘|

K (ngn/k), 14 bytes
{|/x=*\1,x#-2}

Try it online!

*\1,x#-2 return list of -2 raised from 0 to x, i.e. (1 -2 4 -8)
|/x= are any items in that list equal to x?

Vyxal r, 6 bytes
ȧʀudec

Try it Online!
Very rude, I know, but it gets the job done.
Explained
ȧʀudec
ȧʀ     # range(0, abs(input) + 1)
  ud   # -2 (-1 * 2). 2N would have worked just the same, but that wouldn't be as funny now would it.
    e  # -2 ** the range (vectorises)
     c # is input in ^

r is for rude

Brachylog, 10 bytes
1|¬0&~×₂ṅ↰

Try it online!
Explanation
A recursive solution:
1|          Either the input is 1 (base case), or...
  ¬0        The input is not 0
    &       and
     ~×₂    some integer times 2 equals the input
        ṅ   Negate that integer
         ↰  and call the predicate recursively

Brachylog, 7 bytes
ḃb-₂ᵐ×?

Try it online! Or, verify all inputs from -8 to +16.
Explanation
ḃ        Convert to binary, ignoring the sign (so -2 and 2 both become [1,0])
 b       Behead: remove the first element
  -₂ᵐ    Subtract 2 from each element
     ×   Product of that list
      ?  Assert that the result equals the original input number

Some examples to show how this works:
         -8          1    2      0    6
ḃ        [1,0,0,0]   [1]  [1,0]  [0]  [1,1,0]
 b       [0,0,0]     []   [0]    []   [1,0]
  -₂ᵐ    [-2,-2,-2]  []   [-2]   []   [-1,-2]
     ×   -8          1    -2     1    2

If the number is \$(-2)^n\$ for some integer \$n\$, ḃb produces a list of \$n\$ zeros; subtracting 2 from each turns it into a list of \$n\$ copies of \$-2\$, and taking the product gives us \$(-2)^n\$ again.
If the number is \$-(-2)^n\$, we get \$(-2)^n\$ instead, which doesn't match the input.
For any other number, ḃb gives a list containing some amount of \$-2\$ mixed with \$-1\$. The product of this list is \$\pm2^m\$ for some \$m\$; but since our input is not of the form \$\pm2^m\$, it doesn't match.

TI-Basic, 14 bytes
max(Ans=(-2)^randIntNoRep(0,abs(Ans

Takes input in Ans. randIntNoRep(0, can be replaced with cumSum(1 or rand( for greater compatibility and +4 bytes. - represents the negative sign.
Faster but larger answer that works for larger numbers:
20 19 bytes
Ans=(-2)^int(log(abs(Ans)+not(Ans),2

Retina, 27 bytes
+`(1+)\1
$1_
^(1|-1_)(__)*$

Try it online!
Takes input in unary, which is fairly standard for Retina. The first two lines do partial unary to binary conversion based on the first two lines of code from the Tutorial entry (any extraneous 1s will cause the match to fail anyway), while the last line checks for a power of four or a negative odd power of two.
+`(1+)\1\1\1
$1_
^(-1)?1_*$

Try it online!
This time I do partial unary to base four conversion. Powers of four end up as ^1_*$ while negative odd powers of two end up as ^-11_*$.
+`\b(1111)*$
$#1$*
^(-1)?1$

Try it online!
This time I just keep dividing by four as much as I can and check for 1 or -11 at the end.
+`\b(1+)\1\1\1$
$1
^(-1)?1$

Try it online!
Another way of dividing by four. And still annoyingly 27 bytes...

Fourier, 53 bytes
I~X1~N~G0(0-2*G~GX*X~PG*G>P{1}{0~O~N}G{X}{1~O0~N}N)Oo

I'll work on golfing this later, but the outline of this is:
X = User input
G = N = 1
Loop until N = 0
    G = -2 * G
    P = X*X
    If G*G > P then
        N = O = 0
    End if
    If G = X then
        O = 1
        N = 0
    End if
End loop
Print O

Where the output is 0 for falsey and 1 for truthy.
Try it online!

In the algo description not would be better not use P variable and write
If G*G > X*X then...?

@RosLuP That would be better, but Fourier would simply treat that as (G*G > X)*X

Javascript ES6, 51 50 chars
Not very short, but I hope interesting :)
x=>eval(`for(w=q=1;w<=(x<0?-x:x);w*=2,q*=-2)q==x`)

Test:

f=x=>eval(`for(w=q=1;w<=(x<0?-x:x);w*=2,q*=-2)q==x`)
for(x=-2049; x<2049; ++x) if(f(x)) console.log(x)

w<=(x<0?-x:x)=>w<=x|w<=-x

Alice, 12 bytes, non-competing
/o|\ntzR2
@i

Try it online!
Explanation
Alice has a fairly weird built-in, which was added because I needed something that goes well thematically with the string operation "discard everything up to this substring". That operation is "drop small factors" and what it does for positive x and y is that it divides x by all of its prime factors less than or equal to y. But if y is negative, then Alice tries negative prime factors greater than or equal to y instead, which means that every time a prime factor is removed, the sign of x changes. So if we use -2 as the second argument, we'll end up with 1 if and only if the input is a power of -2 (if the input is not a power of two, other factors will remain in the end, and if it has the wrong sign, we'll end up with -1 instead of 1).
The rest of the program is just a bit of weird control flow.
/   Reflect southeast. Switch to Ordinal.
i   Read all input as a string.
    Reflect off boundary, move northeast.
|   Reflect northwest.
    Reflect off boundary, move southwest.
i   Read all input as a string, but there's no input left, so this pushes "".
    Reflect off boundary, move northwest.
/   Reflect west. Switch to Cardinal.
    Wrap around to the end of line 1.
2R  Push -2. (Really: push 2, negate.)
z   Drop small factors. When trying to find a second integer argument,
    this discards the empty string and then implicitly converts the input
    string to an integer. Turns only valid inputs to 1.
tn  Decrement, logical NOT. Effectively an "equals 1?" check.
\   Reflect southwest. Switch to Ordinal.
    Reflect off boundary, move northwest.
o   Implicitly convert result to a string and print it.
    Reflect off boundary, move southwest.
@   Terminate the program.

Clojure, 57 bytes
(defn i[n](if(= n 1)true(if(=(int n)0)false(i(/ n -2)))))

Try it online!
Full function, with annotations:
;; Define function `is-pow?` with 1 argument, `n`
(defn is-pow? [n]
  ;; If n = 1, that means it's a power of -2,
  ;; so we return true
  (if (= n 1) true
    ;; When we recursively call the function,
    ;; -1 > n > 1. `int` rounds up when the number
    ;; is negative (`(int -1/2)` = 0), and rounds down
    ;; when the number is positive. It also catches
    ;; the edgecase of 0.
    (if (= (int n) 0) false
      ;; If n made it to here, n < -1 or n > 1 - we have
      ;; to call the function recursively.
      (is-pow? (/ n -2)))))

Excel, 28 bytes
=(-2)^INT(LOG(ABS(B2),2))=B2

Or using approach from @Martin Ender's Mathematica approach:
29 bytes
=ISEVEN(LOG(MAX(B1,-2*B1),2))

Common Lisp, 51 bytes
(defun f(n)(or(= 1 n)(and(< 1(abs n))(f(/ n -2)))))

Recursive version. Try it online.

Try it online!

@Deadcode , added, thanks.

Perl 5 -p, 32 bytes
$.*=-2while(abs)>abs$.;$_=$.==$_

Try it online!

Rust, 41 bytes
|x|(|mut e|{while e*e<x*x{e*=-2}e==x})(1)

Try it online!

Python 3.8 (pre-release), 39 bytes
lambda n:len(x:=bin(n))&1==x.count('1')

Try it online!

PowerShell, 102 bytes
$a=$n-replace'-';$p=[convert]::ToString($a,2).length-1;if([math]::pow(-2,$p)-eq$n){return !0}return !1

Try it online!
Ungolfed:
-2..4 | %{                                  # for loop from -2 to 4
    $n=$_                                   # setting n to current number in loop
    $a = $n-replace'-'                      # getting absolute value of num
    $p=[convert]::ToString($a,2).length-1   # converting to binary and counting 0s (2^p)

    if([math]::pow(-2,$p) -eq $n){          # seeing if -2^p is equal to the original num
        return !0                           # returns not 0 or True
    }

    return !1                               # returns not 1 or False
}

Python 2.7, 40 bytes
a=input()
while a%-2==0:a/=-2
print a==1

Credits to Mr. Xcoder for the original code of length 43 bytes.
Had to post as a separate answer since I don't have enough reputation to comment.

It's kind of the same thing, since I've made my answer version-universal, so it works in both Python 2 and 3. If you were to do this in Python 3, you should have added int(input()) which would have gone over the limit of the def-like function. Additionally, In python 3, you must use print() which would of wasted 1 byte. That's why I chose that way, because in Python 3 it gets longer...

Cjam, 12 bytes
li_z2mLi-2#=

Explanation comes later.

I think you'll have to use 2b, instead of 2mL, because CJam does have arbitrary-precision integers, so your answer should work for arbitrarily large inputs (but mL won't be able to handle inputs correctly that can't be represented exactly as a 64-bit float). That should save bytes anyway, because you need neither the z, nor the i (although you will need to decrement the result before doing the exponentiation).

Scheme, 60 bytes
(define(f n)(cond((= 1 n)#t)((<(abs n)1)#f)(#t(f(/ n -2)))))

Recursive solution.

Axiom, 50 bytes
g(n:INT):INT==(n=0 or n=1=>n;n rem 2=0=>g(n/-2);0)

It would return 0 if n is not power of (-2), else return 1; exercises
(70) -> n:=-10000;repeat(if g(n)=1 then output n; n>10000=>break;n:=n+1)
   - 8192
   - 2048
   - 512
   - 128
   - 32
   - 8
   - 2
   1
   4
   16
   64
   256
   1024
   4096

Jelly, 6 bytes
AḶ-2*i

Try it online!
Explanation:
        Argument: -8
A       Get the absolute value of n             8
 Ḷ      Create a range from 0 to that number-1  0, 1, 2, 3, 4, 5, 6, 7
  -2*   converts that range into the list       -2^0, -2^1, ..., -2^7
     i  Returns >0 if n is in this range, 0 otherwise.

Dennis pointed out a flaw in my approach, which I fixed by taking the absolute value of the input for the range generation.

C#, 104 107 bytes
+3 bytes, for using system, and finding another method to count bits
using System;b=>Enumerable.Range(0,1+(int)Math.Log(int.MaxValue,2)).Select(x=>Math.Pow(-2,x)).Any(x=>b==x);

It uses Linq to calculate all of -2-s integer powers, and then to test if the input is one them. It would be a bit shorter, if it didn't have to work in a theoretical version, where int can be of any size. Ungolfed:
bool IsPowerOfMinus2(int number)
{
    return Enumerable.Range(0, 2 + (int)Math.Log(int.MaxValue, 2))
        // We generate an IEnumerable, with values from 0 to the length of
        // maximum number in binary. We need to add one, because we need to
        // know, how many integers to
        .Select(x => Math.Pow(-2, x))
        //Replace every number with -2 raised to the number
        .Any(x => number == x);
        //Determine, if the input is one of them
}

Pxem, 53 bytes (filename).
Been a while since my last post of Pxem.
Backslash followed by three digits of octet: a character whose codepoint is so:
._.c\001.y\001.r.-\002.!XX.a.c\003.x.c\004.%.w.d.a\004.$.c\003.a\001.z.d.aY.o

Try it online!
Through this problem I noticed a bug in my interpreter.
Maybe I need to redesign the interpreter; shortening the code makes maintainance difficult.
Usage

As a string of decimal integer from stdin for input.
Outputs a letter Y for truthy; nothing for falsey.

How it works: with comments
XX.z
# push an integer of input
.a._XX.z
# NOTE Pxem does not have negative constants
# So negative inputs must be changed to positive
# and then get multiplied by two
.a.c\001.y\001.r.-\002.!XX.aXX.z
# Pxem does not have log() nor something similar
# Just keep dividing by four
# And exit if it seemed not to be 4^n
.a.c\003.xXX.z
  .a.c\004.%.w.d.aXX.z
  .a\004.$XX.z
.a.c\003.aXX.z
# final check for <4
.a\001.z.d.aY.o

x86_(32/64) machine code, 23 bytes
\x0f\xbc\xc1\xf3\x0f\xb8\xc9\xa8\x01\x74\x06\x01\xc8\x3c\x20\xf5\xc3\x83\xf9\x01\x74\xf9\xc3

Try it online!
This is a kind of problem for which the CPU usually has a built-in instruction to solve it easily but most high level languages don't support it straightforwardly.
Two x86 instructions does the main job.

bsf - count trailing zeros (bit-scan forward)
popcnt - count bits set

The bsf type of instruction is very common on many architectures with varying names. popcnt is a less popular one, but ARM and RISC-V also supports it as an extension.
algorithm
When you look at the binary representation of an integer power of -2, you can see a pattern.
16 -> 10000
4 -> 100
1 -> 1
-2 -> ..110
-8 -> ..11000
-32 -> ..1100000

When the trailing-zero count is even, there is one bit set. When the trailing-zero count is odd, the sum of this and the set-bit count equals the word size.
assembly
; out: carry flag, in: eax = 1, ecx = arg
entry:
    bsf eax, ecx
    ; if ecx == 0 then eax == 1
    ; relies on an undocumented behaviour (for Intel)
    popcnt ecx, ecx
    test al, 1
    jz even
    add eax, ecx
    cmp al, 32
flip:
    cmc
    ret
even:
    cmp ecx, 1
    je flip
    ret

J, 21 17 bytes
+/@(=_2:^i.@>:@|)

Try it online!

Vyxal, 4 bytes
2Nτ∑

Try it Online!
Port of Makonede's 05AB1E answer, outputting 1 for truthy and anything else for falsy.
   ∑ # Is exactly one of
  τ  # Digits in base...
2N   # -2
     # Truthy?

The challenge asks specifically for a truthy/falsey result, though (or implicitly with the [decision-problem] tag). Unlike 05AB1E, I don't think only 1 is truthy in Vyxal, or is it as well? EDIT: doesn't seem like it, -8 is considered truthy.

@KevinCruijssen No, but it seems unfair that an output method is considered valid in one language and not in another...

Pyt, 9 bytes
ĐÅř⁻2~⇹^∈

Try it online!
Đ            implicit input; Đuplicate
 Å           Åbsolute value
  ř          řangify [1,2,...,n]
   ⁻         decrement
    2~       push 2; negate
      ⇹^     swap top two items; element-wise exponentiation
        ∈    is the input in the resultant list?; implicit print

Thunno, \$ 10 \log_{256}(96) \approx \$ 8.23 bytes
DZAR2n@sAq

Attempt This Online!
Port of Emigna's 05AB1E answer.
Explanation
DZAR2n@sAq  # Implicit input
DZA         # Duplicate and push abs(input)
   R        # Push range(0, abs(input))
    2n@     # Push 2 ** each of the above
       sAq  # Is the input in this list?
            # Implicit output

Go, 55 bytes
func f(n int)bool{for;n%2==0&&n!=0;n/=-2{}
return n==1}

Attempt This Online!
Repeatedly divides the input until it's not even or zero. Then it returns whether it's equal to 1 (if it's a 1, then it's a power of -2).

Thunno 2, 7 bytes
AĖuḌ@$Ƈ

Attempt This Online!
Explanation
AĖuḌ@$Ƈ  # Implicit input       ->  -8
A        # Absolute value       ->  8
 Ė       # Push [0..n]          ->  [0,1,2,3,4,5,6,7,8]
  uḌ     # Push -2              ->  [0,1,2,3,4,5,6,7,8]  2
    @    # Exponentiate         ->  [1,-2,4,-8,16,-32,64,-128,256]
     $Ƈ  # Contains the input?  ->  1
         # Implicit output

Japt -!, 7 6 bytes
ì´J Åx

Try it


text:
Tips for writing quines
A quine is a program that produces output that's identical to the program's source code. On this website, we generally only care about proper quines (at the time of writing, the current definition is "some part of the output is encoded by a different part of the program").
What advice do you have for writing proper quines, or programs with quine-like properties? As usual, each tip should be in a different answer.

Take advantage of string formatting
One of the easiest ways to create a quine is to define a string, then put the string inside itself with string formatting.
s='s=%r;print s%%s';print s%s

So in this example Python quine, we declare a string with the first part equal to whatever is before the string s=, then we allow for the string to be inserted with formatting with %r, and finally we put what comes after the string to print and format it. The trailing newline is because print prints a trailing newline.
So the template is really this, in Python:
<A>'<A>%r<B>'<B>

To expand the existing quine with more code:
<more A>s='<more A>s=%r;print s%%s<more B>';print s%s<more B>

Use eval to reduce the need to copy code
The majority of quines require two copies of the code; one to be executed, one as data. This can end up doubling the length of the source code, making it harder to maintain, and worsening the score if you're writing the quine for a code-golf competition.
Merging the two copies means that one piece of information needs to be used for two purposes. Trying to treat your code as data is often not possible, and is typically considered cheating when it is. Treating data as code, however, can be done in many languages via use of a builtin, typically called eval. As such, your quine basically consists of storing the main body of your quine in a variable (so that you can refer to it more than once), then evaluating that variable.
Here's an example of how this works (the example is written in Python, but something similar works in many other languages):
d='print("d="+repr(d)+"\\neval(d)")'
eval(d)

@QPaysTaxes: I aim to make my code here as readable and maintainable as the victory condition allows. Unfortunately, that's still typically indistinguishable from ASCII line noise (or just regular line noise if I'm using Jelly) from people who aren't used to the language.

Stringified functions
In several languages, function objects (or equivalent constructs) implicitly store their source code, and will return it when converted into a string.  This allows compact quines without using string eval.  A notable example of such a language is JavaScript:

function f(){console.log(f+"f()")}f()

This code defines and calls a function f that, when called, prints its own source code followed by a call to itself.  The only part of the program that needs to be duplicated is the function call f().  Of course, the function body can include an arbitrary "payload" of code that will also be executed when the function is called.

A more compact version of the same trick works in the golfing languages GolfScript:
{".~"}.~

and CJam:
{"_~"}_~

Each of these quines first defines an anonymous code block (enclosed in braces), which behaves much like a function object in JavaScript: it can be executed, and if stringified, it returns its source code.  The rest of the code (.~ in GolfScript, or _~ in CJam) then executes the block, while leaving a copy of it on the stack.  The code inside the block then pushes a string onto the stack that repeats the code outside the block.  When the interpreter exits, it automatically stringifies and prints everything left on the stack.  As with the JavaScript example, these code blocks could also be made to carry and execute an arbitrary payload of additional code without having to duplicate it.

Use string delimiters that nest without escaping
Often, one of the hardest parts about writing a quine is the escaping step. This is needed in almost every quine; the issue is that you're storing data somehow, and you need to replicate the code that stores the data in the quine's output. That code will contain an escaped form of the data, so the program will see an unescaped form, and you'll need to re-escape it.
The easiest way to handle the unescaping step is if the escaped and unescaped forms of the data differ only in the presence or absence of string delimiters. Escaping is thus a simple matter of adding a new pair of string delimiters around the string. Unfortunately, this can clearly only work if the string delimiters themselves can be expressed in the data without escaping.
Perl is a good example of a language where this trick works. Although its usual string delimiters are "…" or '…', the less commonly used q(…) nests, allowing this sort of quine to be written:
$_=q($_=q(0);s/\d/$_/;print);s/\d/$_/;print

This is a code+data quine. s/// is a regex string-replace operation; we use 0 as the marker, and match it within the regex as \d ("any digit"), to avoid using the marker more than once (although as another optimization, we could actually just have used 0 again, because Perl's s/// only replaces the first occurrence by default). Note that there's no explicit escaping step needed here, as the q(…) delimiters can just be included literally in the data string.

Code + data quines
The most general structure for a quine looks something like this pseudocode:

data = "an escaped version of the entire program,
        with this string replaced with a marker"
program = data.replace(
  an expression that evaluates to the marker but doesn't mention it,
  escaped(data))
print program;

This structure can be used to write a (fairly naive) quine in most languages. However, it tends to score fairly badly on most scoring systems, because you have to write the entirety of the program twice. However, most quine structures can be considered optimizations of this one.
There are some subtleties to this. In some languages, the hardest part of
performing this operation is to write the escaping code; in many languages, producing the marker without mentioning its name is difficult; and in some esoteric languages, you'll have to invent your own sort of string literal. All three operations tend not to cause too much trouble, though.
For example, we can write a Python quine escaping a string using repr, and using the 2-character-sequence x" string (which is representable as "x\"", i.e. not using the sequence x" in the string representation of the string itself) as the marker:
d='d=x"\nprint(str.replace(d,"x\\"",repr(d)))'
print(str.replace(d,"x\"",repr(d)))

It may be worth noting (possibly in another answer) that inserting the string into the position of a marker is often expensive in esolangs, and it might worth structuring the code such that the string itself is the first or the last thing (maybe separated from the end by one or two characters which you can hardcode) so that you know where it has to go.

@MartinEnder: I agree that that's worth mentioning, but it's probably another answer (rather than a comment or an edit in this answer). Most quine tips are modifications to this general structure, so I wanted to get it out there as a tip on its own first, as many people don't have any idea where to start for writing a quine.

An alternative to a marker is to use two strings, I did that for Glass.

Remember the Structure of a Quine
I like to think of quines as three parts, rather than 2:

Part 1: Generate a data representation of parts 2 and 3.
Part 2: Use the data to algorithmically print back part 1.
Part 3: Decode the representation to print parts 2 and 3.

This can make it easier to think about quines. Here is a Python quine, with each line corresponding to a part:
s = "print(\"s = \" + repr(s))\nprint(s)"
print("s = " + repr(s))
print(s)

Sometimes, you use an eval or similar to remove duplication, but generally I have found that this helps in writing simple quines.
Let's take a look at two different Underload quines. This is the first:
(:aSS):aSS

The first part is (:aSS), which generates the data representation. The second is :aS, which prints (:aSS). The third part is S, which prints :aSS.
Here is the second quine:
(:aS(:^)S):^

At first, this doesn't seem to fit. But if you expand the quine, you get:
(:aS(:^)S):aS(:^)S

Now (:aS(:^)S) is part 1, :aS is part 2, and (:^)S is part 3.

Exploit wrapping source code
In quite a few languages (mostly 2D languages), the source code can wrap around; under certain circumstances (e.g. in Befunge-98, if your program is a one-liner) going past the end of the program will take you back to the start of the program. This kind of nonlinear behaviour means that you can write code that's inside and outside a string literal at the same time; an unmatched " (or whatever the string delimiter is) will effectively give you a string containing the whole of the rest of the program (except for the " itself).
One problem with using this trick is that you'll get the string as seen from the point of view of the ", rather than from the start of the program (like you'd want). As such, it's likely easiest to rearrange the program so that the " appears at the start or end. This often means chopping your program up into multiple pieces and making use of whatever interesting/unusual flow control commands your language has (most languages which let string literals wrap around the program have a good selection of these).
A good example is @Justin's Befunge-98 quine:
<@,+1!',k9"

The unmatched " at the end of the program wraps the whole program in a string literal, so (running right to left due to the < at the start) all we have to do is output the program (9k), then output the double quote ('!1+,) and exit (@). This saves needing two copies of the program (one as code, one as data); the two copies are the same piece of code, just interpreted in different ways.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Is this number an exact power of -2: (Very) Hard Mode
This is a version of the recent challenge Is this number an integer power of -2? with a different set of criteria designed to highlight the interesting nature of the problem and make the challenge more difficult. I put some consideration into it here.
The challenge as wonderfully stated by Toby in the linked question, is:

There are clever ways of determining whether an integer is an exact power of 2.  That's no longer an interesting problem, so let's determine whether a given integer is an exact power of -2.  For example:
-2 => yes: (-2)¹
-1 => no
0 => no
1 => yes: (-2)⁰
2 => no
3 => no
4 => yes: (-2)²

Rules:

An integer is 64 bits, signed, two's complement. This is the only data type you may work with.
You may only use the following operations. Each of these counts as one operation.

n << k, n >> k: Left/right shift n by k bits. Sign bit is extended in right shift.
n >>> k: Right shift but do not extend sign bit. 0's are shifted in.
a & b, a | b, a ^ b: Bitwise AND, OR, XOR.
a + b, a - b, a * b: Add, subtract, multiply.
~b: Bitwise invert.
-b: Two's complement negation.
a / b, a % b: Divide (integer quotient, rounds towards 0), and modulo.

Modulo of negative numbers uses the rules specified in C99: (a/b) * b + a%b shall equal a. So 5 % -3 is 2, and -5 % 3 is -2:
5 / 3 is 1, 5 % 3 is 2, as 1 * 3 + 2 = 5.
-5 / 3 is -1, -5 % 3 is -2, as -1 * 3 + -2 = -5.
5 / -3 is -1, 5 % -3 is 2, as -1 * -3 + 2 = 5.
-5 / -3 is 1, -5 % -3 is -2, as 1 * -3 + -2 = -5.
Note that Python's // floor division operator does not satisfy the "round towards 0" property of division here, and Python's % operator does not meet the requirements, either.

Assignments do not count as an operation. As in C, assignments evaluate to the value of the left-hand side after the assignment: a = (b = a + 5) sets b to a + 5, then sets a to b, and counts as one operation.
Compound assignments may be used a += b means a = a + b and count as one operation.

You may use integer constants, they do not count as anything.
Parentheses to specify order of operations are acceptable.
You may declare functions. Function declarations can be in any style that is convenient for you but note that 64 bit integers are the only valid data type. Function declarations do not count as operations, but a function call counts as one. Also, to be clear: Functions may contain multiple return statements and returns from any point are allowed. The return itself does not count as an operation.
You may declare variables at no cost.
You may use while loops, but you may not use if or for. Operators used in the while condition count towards your score. while loops execute as long as their condition evaluates to a non-zero value (a "truthy" 0 in languages that have this concept is not a valid outcome). Since early-return is allowed, you are allowed to use break as well
Overflow/underflow is allowed and no value clamping will be done. It is treated as if the operation actually happened correctly and was then truncated to 64 bits.

Scoring / Winning Criteria:
Your code must produce a value that is non-zero if the input is a power of -2, and zero otherwise.
This is atomic-code-golf. Your score is the total number of operations present in your code (as defined above), not the total number of operations that are executed at run-time. The following code:
function example (a, b) {
    return a + ~b;
}

function ispowerofnegtwo (input) {
    y = example(input, 9);
    y = example(y, 42);
    y = example(y, 98);
    return y;
}

Contains 5 operations: two in the function, and three function calls.
It doesn't matter how you present your result, use whatever is convenient in your language, be it ultimately storing the result in a variable, returning it from a function, or whatever.
The winner is the post that is demonstrably correct (supply a casual or formal proof if necessary) and has the lowest score as described above.
Bonus Very Hard Mode Challenge!
For a chance at winning absolutely nothing except the potential ability to impress people at parties, submit an answer without using while loops! If enough of these are submitted I may even consider dividing the winning groups into two categories (with and without loops).

Note: If you'd like to provide a solution in a language that only supports 32-bit integers, you may do so, provided that you sufficiently justify that it will still be correct for 64-bit integers in an explanation.
Also: Certain language-specific features may be permitted at no-cost if they do not evade the rules but are necessary to coerce your language into behaving according to the rules above. For example (contrived), I will permit a free not equals 0 comparison in while loops, when applied to the condition as a whole, as a workaround for a language that has "truthy" 0's. Clear attempts to take advantage of these types of things are not allowed -- e.g. the concept of "truthy" 0 or "undefined" values does not exist in the above ruleset, and so they may not be relied on.

Comments are not for extended discussion; this conversation has been moved to chat.

@hvd If you read this: You should totally undelete your answer! Assuming it is correct, even without m ^= s it's still impressive, and I think it'd be totally OK to make the substitution to improve it even more.

How does it make sense to allow while and break but not if? if (x) { ... } is equivalent to while (x) { ... break; }.

@R.. It doesn't make 100% sense (break and early returns are the regrettable part) and is a long story and a lesson learned in rules for future challenges. There's always the "bonus" version! :)

@JasonC: See how I did it in my C answer just now. I might try the bonus version later.

Why if and for are disallowed? int x=condition; while (x) { ... x=0; } is free, just more code. Same thing with c-style for.

@Qwertiy The more dubious part is break. Note by the way that in your example if you wanted to set x=0 conditionally based on something, you'd still have to come up with clever logic since you can't use if. As for for loops, those aren't there simply because you can already accomplish what you need with while, so there was no real need for me to clutter up the rule list with specifics about a redundant for; while was easier to specify. Anyways, there's always the "bonus" version! :)

C++, 15 operations
I have no idea why while loops are allowed as they destroy the whole challenge. Here is an answer without any:
int64_t is_negpow2(int64_t n) {
    int64_t neg = uint64_t(n) >> 63; // n >>> 63
    n = (n ^ -neg) + neg; // if (n < 0) n = -n;
    int64_t evenbits = n & int64_t(0xaaaaaaaaaaaaaaaaull >> neg);
    int64_t n1 = n - 1;
    int64_t pot = n & n1;
    int64_t r = pot | (n1 >> 63) | evenbits;
    return ~((r | -r) >> 63); // !r
}

Why do while loops destroy the whole challenge?

@Mr.Xcoder Because the challenge is about doing it with simple bitwise operations and while goes against that in every way.

I mean, unless you make the while loops multiply the number of operations times the number times executed in the loop for a static n or something.

I made a comment about this here.

@JasonC That's because I should've used a right shift without sign bit. I edited the code (it uses uint64_t because that's the only way to get the right shift without sign extension.)

c'mmon mate, constexpr :)

Python 2, 3 operations
def f(n):
 while n>>1:
  while n&1:return 0
  n=n/-2
 return n

Try it online!
The operations are >>, &, /.
The idea is to repeatedly divide by -2. Powers of -2 chain down to 1: -8 -> 4 -> -2 -> 1. If we hit a 1, accept. If we hit an odd number before hitting 1, reject. We also need to reject 0, which forever goes to itself.
The while n>>1: loops until n is 0 or 1. When the loop breaks, n itself is returned, and 1 is a Truthy output and 0 a Falsey one. Inside the loop, we reject repeatedly apply n -> n/-2 and reject any odd n.
Since the / is only ever used on even values, its rounding behavior never comes into play. So, it doesn't matter that Python rounds differently from the spec.

Nice. Clever logic in the algorithm and good work combining conditionals into bit operations. Also, can confirm, implementation works in C.

Why while n&1 instead of if n&1?

@MarkRansom The challenge doesn't allow if.

Aha, missed that. Very clever substitution.

This is not three operations. The loop generates more operations for every division by -2 you have to do. So it is only 3 operations in the best case, +3 for every step away from -2 it is.

@EvSunWoodard The scoring is the number of operators in the code, not the number of calls to them during execution, which depends on the input: "This is atomic-code-golf. Your score is the total number of operations present in your code."

Rust, 14 12 operations (no loops)
Requires optimization (-O) or -C overflow-checks=no to enable the overflowing subtraction instead of panic.
fn is_power_of_negative_2(input: i64) -> i64 {
    let sign = input >> 63;
    // 1 op
    let abs_input = (input ^ sign) - sign;
    // 2 ops
    let bad_power_of_two = sign ^ -0x5555_5555_5555_5556; // == 0xaaaa_aaaa_aaaa_aaaa
    // 1 op
    let is_not_power_of_n2 = abs_input & ((abs_input - 1) | bad_power_of_two);
    // 3 ops
    let is_not_power_of_n2 = (is_not_power_of_n2 | -is_not_power_of_n2) >> 63;
    // 3 ops
    input & !is_not_power_of_n2
    // 2 ops
}

(To clarify: !x is bitwise-NOT here, not logical-NOT)
Test cases:
#[test]
fn test_is_power_of_negative_2() {
    let mut value = 1;
    for _ in 0 .. 64 {
        assert_ne!(0, is_power_of_negative_2(value), "wrong: {} should return nonzero", value);
        value *= -2;
    }
}

#[test]
fn test_not_power_of_negative_2() {
    for i in &[0, -1, 2, 3, -3, -4, 5, -5, 6, -6, 7, -7, 8, 1<<61, -1<<62, 2554790084739629493, -4676986601000636537] {
        assert_eq!(0, is_power_of_negative_2(*i), "wrong: {} should return zero", i);
    }
}

Try it online!

The idea is to check if |x| is a power of 2 (using (y & (y - 1)) == 0 as usual). If x is a power of 2, then we further check (1) when x >= 0, it should also be an even power of 2, or (2) when x < 0, it should be an odd power of 2. We check this by &-ing the "bad_power_of_two" mask 0x…aaaa when x >= 0 (produces 0 only when it is an even power), or 0x…5555 when x < 0.

I stole your ~((r | -r) >> 63) trick to finish up fixing my answer.

C, 5 operations
long long f(long long x){
    x=x ^ ((x & 0xaaaaaaaaaaaaaaaa) * 6);
    while(x){
        while(x&(x-1))
            return 0;
        return 1;
    }
    return 0;
}

C, 10 operations, without loops
long long f(long long x){
    x = x ^ ((x & 0xaaaaaaaaaaaaaaaa) * 6);
    long long t = x & (x-1);
    return (((t-1) & ~t) >> 63) * x;
}

C, 1 operation
long long f(long long x){
    long long a0=1, a1=-2, a2=4, a3=-8, a4=16, a5=-32, a6=64, a7=-128, a8=256, a9=-512, a10=1024, a11=-2048, a12=4096, a13=-8192, a14=16384, a15=-32768, a16=65536, a17=-131072, a18=262144, a19=-524288, a20=1048576, a21=-2097152, a22=4194304, a23=-8388608, a24=16777216, a25=-33554432, a26=67108864, a27=-134217728, a28=268435456, a29=-536870912, a30=1073741824, a31=-2147483648, a32=4294967296, a33=-8589934592, a34=17179869184, a35=-34359738368, a36=68719476736, a37=-137438953472, a38=274877906944, a39=-549755813888, a40=1099511627776, a41=-2199023255552, a42=4398046511104, a43=-8796093022208, a44=17592186044416, a45=-35184372088832, a46=70368744177664, a47=-140737488355328, a48=281474976710656, a49=-562949953421312, a50=1125899906842624, a51=-2251799813685248, a52=4503599627370496, a53=-9007199254740992, a54=18014398509481984, a55=-36028797018963968, a56=72057594037927936, a57=-144115188075855872, a58=288230376151711744, a59=-576460752303423488, a60=1152921504606846976, a61=-2305843009213693952, a62=4611686018427387904, a63=-9223372036854775807-1, a64=0;
    while(a0){
        long long t = x ^ a0;
        long long f = 1;
        while(t){
            f = 0;
            t = 0;
        }
        while(f)
            return 1;
        a0=a1; a1=a2; a2=a3; a3=a4; a4=a5; a5=a6; a6=a7; a7=a8; a8=a9; a9=a10; a10=a11; a11=a12; a12=a13; a13=a14; a14=a15; a15=a16; a16=a17; a17=a18; a18=a19; a19=a20; a20=a21; a21=a22; a22=a23; a23=a24; a24=a25; a25=a26; a26=a27; a27=a28; a28=a29; a29=a30; a30=a31; a31=a32; a32=a33; a33=a34; a34=a35; a35=a36; a36=a37; a37=a38; a38=a39; a39=a40; a40=a41; a41=a42; a42=a43; a43=a44; a44=a45; a45=a46; a46=a47; a47=a48; a48=a49; a49=a50; a50=a51; a51=a52; a52=a53; a53=a54; a54=a55; a55=a56; a56=a57; a57=a58; a58=a59; a59=a60; a60=a61; a61=a62; a62=a63; a63=a64;
    }
    return 0;
}

Oh man, that last one is just evil. Nice.

Haskell, 2 3 operations
import Data.Bits (.&.)

f 0 = False
f 1 = True
f n | n .&. 1 == 0 = f (n `div` -2)
f n | otherwise    = False

Defines a recursive function f(n). Operations used are function call (f), division (div), and bitwise and (.&.).
Contains no loops because of the fact that Haskell has no loop statements :-)

Why am I not surprised that the Haskell solution using no loops is provided by someone named "Opportunist?" =)

I'm very hesitant about the f 0, f 1, f n ... here because they are essentially if's in disguise, although then again, I did allow while + break and early returns, so it seems fair. While it does seem to take advantage of my rule set being inadvertently left open to interpretation, it is a nice solution.

In particular the |s are especially up in the air. That said, this does violate one particular rule in a less-debatable way: The comparison == is not allowed. Note, however, that if my interpretation of this code is correct, the usage of booleans here does appear acceptable as substituting arbitrary integer values in their place does not appear to change the results, and they are more of a final presentation form.

@JasonC I'm only using == because there is no other way to cast from Int to Bool or "Truthy" in Haskell.  Whether the pattern matching and guards are in violation of the "no ifs" rule is your call ;-)

With pattern matching, you could just hardcode the results for all 64-bit integers using 0 operations.

Python 3, 10 or 11 9 operations
def g(x):
 while x:
  while 1 - (1 + ~int(x - -2 * int(float(x) / -2))) & 1: x /= -2
  break
 while int(1-x):
     return 0
 return 5  # or any other value

Returns 5 for powers of -2, 0 otherwise

Comments are not for extended discussion; this conversation has been moved to chat.

C, 31 operations
Live Demo
My idea is simple, if it's a power of two, then if its log is even then it has to be positive, otherwise its log has to be odd.
int isPositive(int x) // 6
{
    return ((~x & (~x + 1)) >> 31) & 1;
}

int isPowerOfTwo(int x) // 5
{
    return isPositive(x) & ~(x & (x-1));
}

int log2(int x) // 3
{
    int i = (-1);

    while(isPositive(x))
    {
        i  += 1;
        x >>= 1;
    }

    return i;
}

int isPowerOfNegativeTwo(int x) // 17
{
    return (  isPositive(x) &  isPowerOfTwo(x) & ~(log2(x) % 2) )
         | ( ~isPositive(x) & isPowerOfTwo(-x) & (log2(-x) % 2) );
}

You actually did better than you think. A function call only counts as 1, not as the number of operators in the function. So, if I've counted correctly (double check) you've got something like 6 for isPositive + 5 for isPowerOfTwo + 3 for log2 + 17 for isPowerOfNegativeTwo = 31.

Assembly, 1 operation
.data

    .space 1         , 1 # (-2)^31
    .space 1610612735, 0
    .space 1         , 1 # (-2)^29
    .space 402653183 , 0
    .space 1         , 1 # (-2)^27
    .space 100663295 , 0
    .space 1         , 1 # (-2)^25
    .space 25165823  , 0
    .space 1         , 1 # (-2)^23
    .space 6291455   , 0
    .space 1         , 1 # (-2)^21
    .space 1572863   , 0
    .space 1         , 1 # (-2)^19
    .space 393215    , 0
    .space 1         , 1 # (-2)^17
    .space 98303     , 0
    .space 1         , 1 # (-2)^15
    .space 24575     , 0
    .space 1         , 1 # (-2)^13
    .space 6143      , 0
    .space 1         , 1 # (-2)^11
    .space 1535      , 0
    .space 1         , 1 # (-2)^9
    .space 383       , 0
    .space 1         , 1 # (-2)^7
    .space 95        , 0
    .space 1         , 1 # (-2)^5 = -32
    .space 23        , 0
    .space 1         , 1 # (-2)^3 = -8
    .space 5         , 0
    .space 1         , 1 # (-2)^1 = -2
    .space 1         , 0
dataZero:
    .space 1         , 0
    .space 1         , 1 # (-2)^0 = 1
    .space 2         , 0
    .space 1         , 1 # (-2)^2 = 4
    .space 11        , 0
    .space 1         , 1 # (-2)^4 = 16
    .space 47        , 0
    .space 1         , 1 # (-2)^6 = 64
    .space 191       , 0
    .space 1         , 1 # (-2)^8
    .space 767       , 0
    .space 1         , 1 # (-2)^10
    .space 3071      , 0
    .space 1         , 1 # (-2)^12
    .space 12287     , 0
    .space 1         , 1 # (-2)^14
    .space 49151     , 0
    .space 1         , 1 # (-2)^16
    .space 196607    , 0
    .space 1         , 1 # (-2)^18
    .space 786431    , 0
    .space 1         , 1 # (-2)^20
    .space 3145727   , 0
    .space 1         , 1 # (-2)^22
    .space 12582911  , 0
    .space 1         , 1 # (-2)^24
    .space 50331647  , 0
    .space 1         , 1 # (-2)^26
    .space 201326591 , 0
    .space 1         , 1 # (-2)^28
    .space 805306367 , 0
    .space 1         , 1 # (-2)^30
    .space 3221225471, 0
    .space 1         , 1 # (-2)^32

.globl isPowNeg2
isPowNeg2:
    movl dataZero(%edi), %eax
    ret

Uses a huge lookup table to find whether the number is a power of 2. You can expand this to 64 bits, but finding a computer to store that much data is left as an exercise to the reader :-P

Indexing a table is not one of the allowed operations.

Also this is clearly not extensible to 64 bits. :-)

Indeed, indexing a table was not intended to be permitted under the current rules. I specified "you may declare variables" and "you may specify integer literals" with the intent of scalars, and semantically this is an array (and pedantically speaking I did not allow array types nor did I allow indexing of any sort as one of the operations although you could call it "addition" in the context of assembler), but being the Opportunist that you are... :)

PHP, 3 operations
ternary and if are disallowed; so let´s abuse while:
function f($n)
{
    while ($n>>1)               # 1. ">>1"
    {
        while ($n&1)            # 2. "&1"
            return 0;
        return f($n/-2|0);      # 3. "/-2" ("|0" to turn it into integer division)
    }
    return $n;
}

$n>>1: if number is 0 or 1, return number
$n&1: if number is odd, return 0
else test $n/-2 (+cast to int)

C, 7 operations
int64_t is_power_of_neg2(int64_t n)
{
    int64_t x = n&-n;
    while (x^n) {
        while (x^-n)
            return 0;
        return x & 0xaaaaaaaaaaaaaaaa;
    }
    return x & 0x5555555555555555;
}

or:
C, 13 operations without loops-as-conditionals
int64_t is_power_of_neg2(int64_t n)
{
    int64_t s = ~(n>>63);
    int64_t a = ((n/2)^s)-s;
    int64_t x = n&-(uint64_t)n; // Cast to define - on INT64_MIN.
    return ~(a/x >> 63) & x & (0xaaaaaaaaaaaaaaaa^s);
}

Explanation:

n&-n yields the lowest set bit of n.
a is the negated absolute value of n/2, necessarily negative because /2 precludes overflow of negation.
a/x is zero only if a is an exact power of two; otherwise at least one other bit is set, and it's higher than x, the lowest bit, yielding a negative result.
~(a/x >> 63) then yields a bitmask that's all-ones if n or -n is a power of two, otherwise all-zeros.
^s is applied to the mask to check the sign of n to see if it's a power of -2.

JavaScript ES6, 7 operations
x=>{
  while(x&1^1&x/x){
    x/=-2;x=x|0
  }
  while(x&0xfffffffe)x-=x
  return x
}

Try it online!
Explanation
while(x&1^1&x/x)

While x!=0 and x%2==0 4 ops
x/x is equal to 1 so long as x is not 0 (0/0 gives NaN which is evaluated as false)
&   bitwise and
x&1^1 is equal to 1 if x is even (x and 1) xor 1
x/=-2;x=x|0

This is the form of division defined by the question 1 op
while(x&0xfffffffe)

While x!=1 and x!=0  1 op
The condition needed to exit when x==0 or x==1 as those two are the return values and entering an infinite loop would not be productive. This could theoretically be extended for greater values by increasing the hexadecimal number. Currently works for up to ±2^32-1
x-=x

Set x to 0 1 op
While I could have used return 0 for 0 ops, I felt that any while loop which is broken by another statement feels too much like cheating.
return x

returns x (1 if power of -2, 0 otherwise)

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Make me a loaf of bread before I'm fired!
Backstory
Not really real, sshh!
It all started one day when a coworker brought in a homemade loaf of bread for my boss's birthday.
My boss really liked this loaf of bread, and he wanted another. Unfortunately, my coworker has quit, so my boss needs me to give him another loaf.
The problem is, I have no idea how to make bread. So I told my boss that i'm not a chef and to look harder for someone who is.
He said, "Sure...but you lose your job if you can't make me a loaf."
Then I had an idea.
I would make him an ascii-art loaf with my coding skilz! He said yes, under 1 condition: "You must make it in under 351 bytes." Unfortunately for me, my best code golfing got me to 375 bytes. Uh oh.
Then my boss added 2 things: "You must give me that loaf in a week (4/13), and if you do so you get an increased salary. The lower the amount of bytes you use, the better salary. But remember, if you go over 349 you lose your job."
So I need your help in your language of choice to help me keep my job!
Rules
I was about to do a curl ... | sh on a TinyURL, but my boss told me that I can't use a list of loopholes. I probably could skirt the rules, but my job is at stake, so it's not a good idea.
What counts as a loaf
Your program or function must take 3 positive integers as input. If your language has a list or array, you can take a list or array of those numbers. You can also take them as arguments to a function or program, or a space-separated string of numbers to STDIN, a command-line or function argument, etc.
The first number is the width of your loaf
The second number is the height of your loaf.
The third number is the depth of your loaf.
Here's a loaf with a width of 3, a height of 2, and a depth of 1:

 /---\
/---\|
|   ||
|___|/

Looks wierd? Here's a 3x2x2:

  /---\
 /    |
/---\ |
|   | /
|___|/

How about a 3x3x3:

   /---\
  /    |
 /     |
/---\  |
|   |  /
|   | /
|___|/

A 4x1x2:

  /----\
 /     |
/----\ /
|____|/

I hope you understand! See my JS (ES6) answer below for an example.
Also see complete test cases
Notes:

Don't worry about valid input. All sizes will be positive integers.
You must accept any positive integers that your language can support.
If the numbers are so high your languages crashes from StackOverflow, maximum string length overflow, etc. that's OK.

Shortest answer in bytes wins!

I guess if you had used Charcoal you could have asked for a 10% raise... :)

What about 350 bytes?

"You must make it in under 351 bytes". "Remember, if you go over 349 bytes, you lose your job". What do you actually mean? Please be consistent with yourself.

Charcoal, 35 33 30 bytes
Saved 2 bytes thanks to @ASCII-only
Saved 3 bytes thanks to @Neil by rearranging the order in which the lines where drawn
ＮωＮηＮδ↓η↗→×_ω↑η←\←ω↗δ→/ω↓\↓η↙δ

Try it online!
This is my first try at Charcoal. I heard it was good at ascii-art, so I tried it out.
Explanation (outdated)
ＮωＮηＮδ                  # Take the width, height and depth as input
↗¹                        # Write 1 /
↗δ                        # Write depth times /
¶ω                        # Move the cursor down and write - width times
\                         # Write \
↙↓η                       # Move the cursor one down and one left, and then write | height times
↙δ                        # Write / depth times

Now the back part of the loaf is complete. Now comes the front face.
↑↑η                       # Go up and write | height times
←\                        # Write a \ and move 1 to the left
←ω                        # Write - width times
↓↓η                       # Go down and write | height times
↗Ｐ×_ω                    # Go northeast and write _ width times

That's just plain cool!

hahaha I knew it soon as I saw the ascii loaf...!

You can replace ↓→ with ¶ (newline), and \←←←ω with ←\←ω

@ASCII-only Thanks for the tips :)

Your explanation has ←\← but the second ← belongs before the ω on the next line. ↗δ→/ is a byte shorter than ↗¹↗δ¶, but I also saved a couple more bytes by rearranging the order in which the lines were drawn: Try it online!

@Neil Thanks again for your tips!

When you update the explanation, don't forget to put the new byte count in!

JS (ES6), 375 bytes
s=(s,t)=>s.repeat(t);(d,c,e)=>{z=" ",y=`
`,x="\\",w="/",v="|",u="-";a=s(z,e--);a=a+w+s(u,d);a+=x+y;for(b=0;b<e;b++)a+=s(z,e-b),b<c?(a+=w,a+=s(z,d+b+1),a+=v):(a+=w,a+=s(z,d+c+1),a+=w),a+=y;a=a+w+s(u,d);a+=x;f=0;b<c?(a+=s(z,e),a+=v):(a+=s(z,c-f),a+=w);b++;f++;a+=y;for(g=0;g<c;g++)a+=v,a+=s((g==c-1?"_":z),d),a+=v,b<c?(a+=s(z,e),a+=v):(a+=s(z,c-f),a+=w),b++,f++,a+=y;return a}

Ungolfed:
var proc = function(width, height, depth){
    var str = "";

    //Back of loaf (depth)
    str += " ".repeat(depth);//initial padding before start of back of loaf
    str += "/";//top left corner of back of loaf
    str += "-".repeat(width);//top edge of back of loaf
    str += "\\";//top left corner of back of loaf
    str += "\n";//end line

    //Depth lines
    for(var i = 0; i < depth - 1; i++){
        console.log(i)
        str += " ".repeat(depth - i - 1);//space padding before start of left middle edge
        if(i < height){
            //str += " ".repeat(depth - i - 2);
            str += "/";//left middle edge
            str += " ".repeat(width + i + 1);//middle of loaf
            str += "|";//end that edge
            str += "\n";//end line
        }else{
            str += "/";//left middle edge
            str += " ".repeat(width + height + 1);//between two /s
            str += "/";//right middle edge
            str += "\n";//end line
        }
    }

    //front top edge of loaf
    str += "/";//top left corner
    str += "-".repeat(width);//top edge
    str += "\\";//top right corner

    var i3 = 0;

    if(i < height){
        str += " ".repeat(depth - 1);//space for the incoming far right edge
        str += "|";//far right edge
        i++;
        i3++;
    }else{
        str += " ".repeat(height - i3);//space for the incoming far right edge
        str += "/";//far right edge
        i++;
        i3++;
    }

    str += "\n";//newline

    for(var i2 = 0; i2 < height; i2++){
        str += "|";//left edge
        str += (i2 === height - 1 ? "_" : " ").repeat(width);//if we are at the bottom, use underscores to mark that, otherwise spaces.
        str += "|";
        if(i < height){
            str += " ".repeat(depth - 1);//space for the incoming far right edge
            str += "|";//far right edge
            i++;
            i3++;
        }else{
            str += " ".repeat(height - i3);//space for the incoming far right edge
            str += "/";//far right edge
            i++;
            i3++;
        }
        str += "\n";//newline
    }

    return str;
};

s=(s,t)=>s.repeat(t);
var bakeBread = (d,c,e)=>{z=" ",y=`
`,x="\\",w="/",v="|",u="-";a=s(z,e--);a=a+w+s(u,d);a+=x+y;for(b=0;b<e;b++)a+=s(z,e-b),b<c?(a+=w,a+=s(z,d+b+1),a+=v):(a+=w,a+=s(z,d+c+1),a+=w),a+=y;a=a+w+s(u,d);a+=x;f=0;b<c?(a+=s(z,e),a+=v):(a+=s(z,c-f),a+=w);b++;f++;a+=y;for(g=0;g<c;g++)a+=v,a+=s((g==c-1?"_":z),d),a+=v,b<c?(a+=s(z,e),a+=v):(a+=s(z,c-f),a+=w),b++,f++,a+=y;return a}
<input type = "number" id = "a1">

<input type = "number" id = "a2">

<input type = "number" id = "a3">

<button onclick = "document.getElementById('textarea').innerText = bakeBread(+(document.getElementById('a1').value), +(document.getElementById('a2').value), +(document.getElementById('a3').value))">Bake Bread!</button>

<textarea id = "textarea"></textarea>

"in under 351 bytes" Someone just got fired :(

@shadow, actually, I need a < 351 bytes program to send to my boss. Any of the answers below will work!

C, 270 290 320 328 bytes
#define P printf(
p(n,s)char*s;{P s,--n&&p(n,s));}i,j,k;f(w,h,d){P "%*c",d+1,47);p(w,"-");P "\\\n");for(i=d,j=h,k=0;--i;)P "%*c%*c\n",i+1,47,w+d+1-i-k+!!k,j-->0?124:(++k>0)*47);P "/");p(w,"-");P "\\%*c\n",d-k,j-->0?124:47);for(k&&k++;++i<h;)P "|%*c%*c\n",w+1,124,d-k>!k?d+1-k-!k:0,j-->0?124:(++k>0)*47);P "|");p(w,"_");P "|/");}

Finally (after two three incorrect versions) it works correctly with large sizes also.
Try it online!

Python 2, 234 216 210 bytes
w,h,d=input()
f,g='|','/';z,s=g+'-'*w+'\\',' '
print'\n'.join([s*d+z]+[s*(d-c)+g+s*(w+c)+(f,g)[c>h]for c in range(1,d)]+[z+s*(d-1)+(f,g)[d>h]]+[f+s*w+f+s*(h-e-1)+(f,s+g)[d>=h]for e in range(1,h)]+[f+'_'*w+f+g])

Try it online!
Sure it can be golfed a lot more but it's a start. 210 will do for me for now.

PHP, 420 bytes
<?php $a=$_GET["a"];$b=$_GET["b"];$c=$_GET["c"];$w="
";$s=" ";$u="&#95";$p="|";$k="/";$t=str_repeat;$l='';$r=$t($s,$c).$k.$t("-",$a)."\\".$w;for($i=0;$i<$c+$b-1;$i++){$i<=$b-1?($i<$c-1?$l=$t($s,$a+$i+1).$p:$l=$t($s,$c-1).$p):($i<$c-1?$l=$t($s,$a+$b+1).$k:$l=$t($s,$c+$b-$i-1).$k);$i<$c-1?$r.=$t($s,$c-$i-1).$k.$l.$w:($i==$c-1?$r.=$k.$t("-",$a)."\\".$l.$w:$r.=$p.$t($s,$a).$p.$l.$w);};echo$r.=$p.$t($u,$a).$p.$k?>

Sounds like someone's fired - maybe try convincing your boss that it's much cooler on backend.
Input is attached to the URL string: ?a=[width]&b=[height]&c=[depth].
Ungolfed for transparency:
<?php
$a=$_GET["a"];$b=$_GET["b"];$c=$_GET["c"];
$w="
";$s=" ";$u="&#95"; $p="|";$k="/";$t=str_repeat;$f=$v=$m=$l='';
//first line
$r=$t($s,$c).$k.$t("-",$a)."\\".$w;

for($i=0;$i<$c+$b-1;$i++){

    //right side of the loaf
    $i <= $b-1
    ? ($i < $c-1 ? $l=$t($s,$a+$i+1).$p : $l=$t($s,$c-1).$p)
    : ($i < $c-1 ? $l=$t($s,$a+$b+1).$k : $l=$t($s,$c+$b-$i-1).$k) ;

    //left side, with the right side attached
    $i<$c-1
        ? $r.=$t($s,$c-$i-1).$k.$f.$l.$w
        : ($i==$c-1
            ? $r.=$k.$t("-",$a)."\\".$f.$l.$w
            : $r.=$p.$t($s,$a).$p.$f.$l.$w);

};
    //final line
    echo $r.=$p.$t($u,$a).$p.$k;

?>

JavaScript (ES6), 204 bytes
(w,h,d)=>[...Array(h-~d)].map((_,y)=>[...Array(w-~d)].map((_,x)=>x+y==d|x+y==h+w-~d?`/`:x==w+d&y<=h&&y||!x|x==w&&y>d?`|`:y==h+d&x<w?`_`:!y|y==d?x+y==w+d?`\\`:x+y>d&x+y<w+d?`-`:` `:` `).join``,++w).join`\n`

Where \n represents the literal newline character.
Rather than fiddle around with repeating characters, this just creates a suitably sized array and computes which character appears in each cell.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Programming in two time dimensions
It's a funny accident that this world happens to have just 1 time dimension, but it doesn't have to be like that. It's easy to imagine worlds with 2 or more time dimensions, and in those worlds you could build computers and run software on them, just like in this one.
The System
Here is a system for running Brainf*ck programs in two time dimensions:
The two time dimensions are x and y. Each Brainf*ck program consists of an x half-program, and a y half-program, e.g., a program could be
x: +>+
y: [-]

The two half-programs each have their own program pointer, but they share a single tape pointer (that is, they both operate on the same cell of the tape).
Time is 2-dimensional, so it consists of a grid of moments:

Moving along the x dimension, the x half-program executes one time step. Moving along the y dimension, the y half-program executes one time step.
So, for example, let's say the tape starts out as [0] 0 0 ([] represents the tape pointer) and the x/y programs are + and ->-. The execution of this program would look like this:
x y  tape         x-action  y-action
0 0  [ 0]  0   0   + at 0    - at 0
1 0  [ 1]  0   0   (done)    - at 0
0 1  [-1]  0   0   + at 0    move >
1 1  [ 0]  0   0   (done)    move >

Notice that, as time moves in the y direction, the x half-program keeps doing the same thing over and over, because its time does not progress.
The tape at each moment includes the cumulative effect of all actions that feed into it (each action counts once). So, for example, the tape at time (2, 1) contains the cumulative effect of:

the x-action from (0, 0)
the x-action from (1, 0)
the x-action from (0, 1)
the x-action from (1, 1)
the y-action from (0, 0)
the y-action from (1, 0)
the y-action from (2, 0)

Cumulative means:

All the increments and decrements to a cell sum together.
All the left (-1) and right (+1) movements to the tape pointer sum together.

Instruction pointers do not accumulate. Each half-program gets its instruction pointer from the previous moment in its dimension. That is, x program pointers progress only in the x dimension, and y program pointers progress only in the y dimension. So, for example, in the program ([], +) starting from [0] 0 0, the execution would be
x y  tape   x-action  y-action  x-prog-ptr        y-prog-ptr
0 0  0 0 0            + at 0    0                 0
1 0  0 0 0            + at 0    2 (from jump)     0
0 1  1 0 0                      0                 1
1 1  2 0 0                      1 (from NO jump)  1

Some more moments from the above (+, ->-) simulation are:
x y   tape          x-action  y-action  x-prog-ptr y-prog-ptr
0 0   [ 0]  0   0   + at 0    - at 0    0          0
1 0   [ 1]  0   0             - at 0    1          0
2 0   [ 1]  0   0             - at 0    1          0
0 1   [-1]  0   0   + at 0         >    0          1
1 1   [ 0]  0   0                  >    1          1
2 1   [-1]  0   0                  >    1          1
0 2    -1 [ 0]  0   + at 1    - at 1    0          2
1 2     0   1 [ 0]            - at 2    1          2
2 2   [-1]  1   0             - at 0    1          2

The Brainf*ck operators allowed are the following (they have their standard meaning):

+, -: increment, decrement;
[, ]: loop until zero (processing a [ or ] takes one time-step, as in standard Brainf*ck);
<, >: move left/right on the tape.

Complex Example
For the program (>, +) starting with [0] 0 0:
x y   tape          x-action  y-action  x-prog-ptr y-prog-ptr
0 0   [ 0]  0   0        >    + at 0    0          0
1 0     0 [ 0]  0             + at 1    1          0
0 1   [ 1]  0   0        >              0          1
1 1     1   1 [ 0]                      1          1

For (+, -) starting with [0] 0 0:
x y   tape          x-action  y-action  x-prog-ptr y-prog-ptr
0 0   [ 0]  0   0   + at 0    - at 0    0          0
1 0   [ 1]  0   0             - at 0    1          0
0 1   [-1]  0   0   + at 0              0          1
1 1   [ 0]  0   0                       1          1

Note that the tape ends as [0] 0 0 because each + and - happens twice, summing to 0.
For the program (>+, [-]) starting with [0] 0 0:
x y   tape          x-action  y-action  x-prog-ptr y-prog-ptr
0 0   [ 0]  0   0        >              0          0
1 0     0 [ 0]  0   + at 1              1          0
2 0     0 [ 1]  0                       2          0
0 1   [ 0]  0   0        >              0          3
1 1     0   0 [ 0]  + at 2              1          3
2 1     0   1 [ 1]            - at 2    2          1
0 2   [ 0]  0   0        >              0          3
1 2   [ 0]  0   0   + at 0              1          3
2 2   [ 1]  1   0                       2          2

Diagram with Arrows
The below diagram shows how to calculate the actions and the tape:

The Puzzle
Write a 2D Brainf*ck program (with an x half-program and a y half-program) to run on a 3-cell tape, that satisfies both the following conditions:

If the tape starts as [0] 0 0, at time (5, 5) it has a 0 in the zeroth cell.
If the tape starts as [1] 0 0, at time (5, 5) it has a 0 in the zeroth cell.

Shortest program meeting the requirements wins.

Just to verify: What's the result of running + and >? If it's 1 1 [0] (pretty crazy but it's what the spec seems to suggest), How do instruction pointers combine? If the two threads are + and [], then at 1 2 the data tape would be [3], but is the second instruction pointer inside the loop ([]+ path), or outside ([+] path) or even illegal(+[])?

@JanDvorak Ah, I think I see what you're asking. I forgot to add the each program gets its instruction pointer from the adjacent moment in its dimension. I'll edit that in, and try running (+, >) to see if I get the same result as you.

This is a nice challenge but it needs an objective winning criterion to be able to rank answers.

Please provide an example with two complex programs and with the tape and IPs in each cell

@JanDvorak That's a good idea. I'll add a full example.

@MartinEnder OK, I added one.

The challenge still isn't really clear to me. How exactly does time progress through the grid. According to your graphic it seems that I can arrive at (1,1) through either (1,0) or (0,1), but it one program starts with > and one starts with +, then surely their relative order matters?

I take it that the X program pointer is defined by what the X program did in the previous X-cycle, and ignores what happened in the previous Y-cycle, and the Y program pointer ignores Y program pointer the -X of it? That's ... still kinda crazy but at least it's well defined.

@MartinEnder That's true, there are two paths to (1, 1), but the tape and program are calculated so that the order does not matter. The tape at (1, 1) includes the sum of the actions leading there, the x-prog-ptr at (1, 1) is the result of running the x-program at (0, 1), not depending on the x-prog-ptr at (1, 0). That is, program pointers move through one time dimension only.

@JanDvorak Yes, that is correct. I agree it's not the most natural, but it's the best I could come up with.

@Owen I don't understand what this has to do with program pointers. If program x starts with > and y starts with + how do I know whether I end up with 0 [1] 0 or 1 [0] 0 at time (1,1)?

@MartinEnder you end up with 1 1 [0].

@MartinEnder With programs (>, +), at (1, 1) you will have 1 1 [0].

Uh what. I think we need a chatroom.

It's less a funny accident that we live in 3+1 and more the fact that literally no other combination makes physics work.

4 bytes total: ([-], >)
I wrote a brute-forcer to find the smallest such program.
Here are the diagrams of this program in action. This grids are arranged in a similar manner to the grid in the spec, with (0,0) the bottom-left corner, x-time along the x-axis, and y-time along the y-axis.  The upper-right corner contains the result.
First, with a tape of 0 0 0:
|  0 ( 0)  0 |  0   0 ( 0)|( 0)  0   0 |  0 ( 0)  0 |  0   0 ( 0)|( 0)  0   0
|([)-]       |[-]         |[-]         |[-]         |[-]         |[-]
|>           |>           |>           |>           |>           |>
+------------+------------+------------+------------+------------+------------
|  0 ( 0)  0 |  0   0 ( 0)|( 0)  0   0 |  0 ( 0)  0 |  0   0 ( 0)|( 0)  0   0
|([)-]       |[-]         |[-]         |[-]         |[-]         |[-]
|>           |>           |>           |>           |>           |>
+------------+------------+------------+------------+------------+------------
|  0 ( 0)  0 |  0   0 ( 0)|( 0)  0   0 |  0 ( 0)  0 |  0   0 ( 0)|( 0)  0   0
|([)-]       |[-]         |[-]         |[-]         |[-]         |[-]
|>           |>           |>           |>           |>           |>
+------------+------------+------------+------------+------------+------------
|  0 ( 0)  0 |  0   0 ( 0)|( 0)  0   0 |  0 ( 0)  0 |  0   0 ( 0)|( 0)  0   0
|([)-]       |[-]         |[-]         |[-]         |[-]         |[-]
|>           |>           |>           |>           |>           |>
+------------+------------+------------+------------+------------+------------
|  0 ( 0)  0 |  0   0 ( 0)|( 0)  0   0 |  0 ( 0)  0 |  0   0 ( 0)|( 0)  0   0
|([)-]       |[-]         |[-]         |[-]         |[-]         |[-]
|>           |>           |>           |>           |>           |>
+------------+------------+------------+------------+------------+------------
|( 0)  0   0 |( 0)  0   0 |( 0)  0   0 |( 0)  0   0 |( 0)  0   0 |( 0)  0   0
|([)-]       |[-]         |[-]         |[-]         |[-]         |[-]
|(>)         |(>)         |(>)         |(>)         |(>)         |(>)
+------------+------------+------------+------------+------------+------------

Now with a tape of 1 0 0:
|  1 ( 0)  0 |  1   0 ( 0)|( 0)  0   0 |  0 ( 0)  0 |  0   0 ( 0)|( 0)  0   0
|([)-]       |[-]         |[-]         |[-]         |[-]         |[-]
|>           |>           |>           |>           |>           |>
+------------+------------+------------+------------+------------+------------
|  1 ( 0)  0 |  1   0 ( 0)|( 0)  0   0 |  0 ( 0)  0 |  0   0 ( 0)|( 0)  0   0
|([)-]       |[-]         |[-]         |[-]         |[-]         |[-]
|>           |>           |>           |>           |>           |>
+------------+------------+------------+------------+------------+------------
|  1 ( 0)  0 |  1   0 ( 0)|( 0)  0   0 |  0 ( 0)  0 |  0   0 ( 0)|( 0)  0   0
|([)-]       |[-]         |[-]         |[-]         |[-]         |[-]
|>           |>           |>           |>           |>           |>
+------------+------------+------------+------------+------------+------------
|  1 ( 0)  0 |  1   0 ( 0)|( 0)  0   0 |  0 ( 0)  0 |  0   0 ( 0)|( 0)  0   0
|([)-]       |[-]         |[-]         |[-]         |[-]         |[-]
|>           |>           |>           |>           |>           |>
+------------+------------+------------+------------+------------+------------
|  1 ( 0)  0 |  1   0 ( 0)|( 0)  0   0 |  0 ( 0)  0 |  0   0 ( 0)|( 0)  0   0
|([)-]       |[-]         |[-]         |[-]         |[-]         |[-]
|>           |>           |>           |>           |>           |>
+------------+------------+------------+------------+------------+------------
|( 1)  0   0 |( 1)  0   0 |( 0)  0   0 |( 0)  0   0 |( 0)  0   0 |( 0)  0   0
|([)-]       |[(-)]       |[-(])       |[-]         |[-]         |[-]
|(>)         |(>)         |(>)         |(>)         |(>)         |(>)
+------------+------------+------------+------------+------------+------------

There were a couple things that weren't clearly explained in the spec, such as the fact that the 3-cell tape wraps around.

As a bonus, here is the visualization of the (>+, [-]) example:
|( 0)  0   0 |( 0)  0   0 |( 1)  1   0
|(>)+        |>(+)        |>+
|[-]         |[-]         |[-(])
+------------+------------+------------
|( 0)  0   0 |  0   0 ( 0)|  0   1 ( 1)
|(>)+        |>(+)        |>+
|[-]         |[-]         |[(-)]
+------------+------------+------------
|( 0)  0   0 |  0 ( 0)  0 |  0 ( 1)  0
|(>)+        |>(+)        |>+
|([)-]       |([)-]       |([)-]
+------------+------------+------------

And one of the (>+, +>) example:
|( 1)  0   0 |  1   1 ( 0)|  1   3 ( 1)
|(>)+        |>(+)        |>+
|+(>)        |+(>)        |+(>)
+------------+------------+------------
|( 0)  0   0 |  0 ( 0)  0 |  0 ( 1)  0
|(>)+        |>(+)        |>+
|(+)>        |(+)>        |(+)>
+------------+------------+------------

Note that the upper-right corner is different than what you have listed, I think this is an error in your example because my code matches every other example I've tried.

This is amazing! You may well be right about the error. I will check it again.