A grating order is accepted by exact spacing-times-sine arithmetic and rejected when the order is impossible. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.
highlighted = computed this step
A grating order starts as spacing times sine
The accepted row multiplies grating spacing by a rational sine marker and compares that product with an integer wavelength count.
d=5msinθ=54
Orders stop when the required sine is impossible
The first two orders fit inside the sine range. The third row would require the endpoint and still fails the exact product test, so it is rejected instead of drawn as valid.
s5m5m5msinθ52541m123accepted110
A grating order can be accepted or rejected exactly
The accepted order reaches the wavelength ledger, while the impossible order is kept as a rejected check instead of drawing an invalid angle.