Why does Stockfish return something like "#+3"

Sort:
meijiswife

Hi, sorry if this is not the right place.

Long story short, I'm building a chess AI and I use stockfish evaluation for the board positions. However, sometimes (always during the last moves), it returns something like "#+3", "#+2" or even "#+0". What exactly does that mean? I'm guessing it means a checkmate is very near but what is the exact semantic? 

I've searched the web thoroughly and found nothing about this.

IMKeto

+1.00 means white is better by 1 pawn.

-1.00 means black is better by 1 pawn.

+.50 means white is better by 1/2 a pawn.

-.50 means black is better by 1/2 a pawn.

.33 - 1/3 of a pawn.  Which is roughly 1 move/1 tempo.

meijiswife

That surely helps, but why does it add a ‘#’ at the start when the game is about to end? Is it normal behavior or is it just an error on my part?

 

ah, I should probably add, this is when it returns values in Cp

IMKeto

The # sign signifies a mate in so many moves.

meijiswife

Ah, thanks, that's what I wanted to know. So "#+3" means there's a certain mate in 3.