Question about dice notation

I’m trying to adapt GURPS 4th edition’s system creation system into a Python script and I’m trying to understand the dice notation.

In particular:

Roll 1d-4 (minimum 0) to determine the number of major moons orbiting a terrestrial planet. If the planet has no major moons, it will have 1d-2 (minimum 0) moonlets.

Modifiers (for both rolls): Do not roll if the planet is within 0.5 AU of the primary star, -3 if the planet is between 0.5 AU and 0.75 AU of the primary star, -1 if the planet is between 0.75 AU and 1.5 AU of the primary star, -2 if the planet is Tiny, -1 if it is Small, +1 if it is Large.

I’ve not seen the "1d-4" notation before, so my assumption would be that you role 4 sided dice (or in my case, get a random value between 1 and 4 inclusive) and apply modifiers to the result, e.g.: For a Small planet at 0.8AU from it’s primary I would: Get value between 1-4 Apply -1 to that value (between 0.75AU and 1.5AU) Apply -1 to that value as the planet is Small

The catch here, is that, if I’m reading the notation correctly (which I don’t think I am), 1d-2 means pick a value of 1 or 2 then apply modifiers, which will always results in 0 or less.

How do you read 1d-4 and 1d-2 ?