0
Tara2 Posted 7 years ago
Grammar

(b-a+1)-sided die

Hi

What does "(b-a+1)-sided die" mean?

"You may imagine RANDOM as rolling (b-a+1)-sided die to obtain its output.(In practice, most programming environments offer a pseudorandom-number generator: a deterministic algorithm returning numbers that “look” statistically random.)"

  

Top answer

A "die" normally has six sides, or faces (a cube with the numbers one to six marked on the faces, which, when rolled, produces a "random" number from one to six). This is extended to the idea of a die with b-a +1 sides (even if a physical one could not be made), which will produce a random number from a to b (I imagine). It doesn't matter here, but note how b - a +1 is correctly written, with italics and a proper minus sign rather than a hyphen.

  • A "die" normally has six sides, or faces (a cube with the numbers one to six marked on the faces, which, when rolled, produces a "random" number from one to six).
  • This is extended to the idea of a die with b-a +1 sides (even if a physical one could not be made), which will produce a random number from a to b (I imagine).
  • It doesn't matter here, but note how b - a +1 is correctly written, with italics and a proper minus sign rather than a hyphen.
Free · every Monday

Get the Weekly English Kit 📬

New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.

1 Answers
0

A "die" normally has six sides, or faces (a cube with the numbers one to six marked on the faces, which, when rolled, produces a "random" number from one to six). This is extended to the idea of a die with b-a+1 sides (even if a physical one could not be made), which will produce a random number from a to b (I imagine).

It doesn't matter here, but note how b-

Related Questions