math/bits: define Div to panic when y<=hi
Div panics when y<=hi because either the quotient overflows the size of the output or division by zero occurs when y==0. This provides a uniform behavior for all implementations. Fixes #28316 Change-Id: If23aeb10e0709ee1a60b7d614afc9103d674a980 Reviewed-on: https://go-review.googlesource.com/c/149517Reviewed-by: Robert Griesemer <gri@golang.org>
Showing
Please
register
or
sign in
to comment