Why does Stockfish give a negative score in a theoretical win for white? 8/3k4/8/3K4/3P4/8/8/8 b - - 0 1


(Black to move)

This is a theoretical win since White has the opposition and the king is in front of the pawn.

I have downloaded the Windows version for Stockfish 9 and followed the UCI protocol.

Stockfish:

Stockfish 9 64 by T. Romstad, M. Costalba, J. Kiiski, G. Linscott


Input:

uci


Stockfish:

id name Stockfish 9 64
id author T. Romstad, M. Costalba, J. Kiiski, G. Linscott

option name Debug Log File type string default
option name Contempt type spin default 20 min -100 max 100
option name Threads type spin default 1 min 1 max 512
option name Hash type spin default 16 min 1 max 131072
option name Clear Hash type button
option name Ponder type check default false
option name MultiPV type spin default 1 min 1 max 500
option name Skill Level type spin default 20 min 0 max 20
option name Move Overhead type spin default 30 min 0 max 5000
option name Minimum Thinking Time type spin default 20 min 0 max 5000
option name Slow Mover type spin default 89 min 10 max 1000
option name nodestime type spin default 0 min 0 max 10000
option name UCI_Chess960 type check default false
option name SyzygyPath type string default &lt;empty&gt;
option name SyzygyProbeDepth type spin default 1 min 1 max 100
option name Syzygy50MoveRule type check default true
option name SyzygyProbeLimit type spin default 6 min 0 max 6
uciok


Input:

position fen 8/3k4/8/3K4/3P4/8/8/8 b - - 0 1
go depth 1


Stockfish:

info depth 1 seldepth 1 multipv 1 score cp -4276 nodes 5 nps 2500 tbhits 0 time 2 pv d7e8
bestmove d7e8


Why is the evaluation -4276?
Because Black is to move, and for Black the position is evaluated as being 42.76 pawns behind.