Opened 11 years ago

Closed 11 years ago

#6189 closed Bugs (fixed)

uniform_int produce invalid output when generating int64_t values

Reported by: spolitov@… Owned by: Steven Watanabe
Milestone: To Be Determined Component: random
Version: Boost 1.48.0 Severity: Problem
Keywords: Cc:

Description

uniform_int could produce 4294967295 when requested interval is -50,50. The problem appears when interval type is int64_t.

I've attached minimal example to reproduce the issue.

Attachments (1)

1.cpp (558 bytes ) - added by spolitov@… 11 years ago.
minimal example to reproduce the issue

Download all attachments as: .zip

Change History (4)

by spolitov@…, 11 years ago

Attachment: 1.cpp added

minimal example to reproduce the issue

comment:1 by Steven Watanabe, 11 years ago

Owner: changed from No-Maintainer to anonymous
Status: newassigned

Bother. I thought I had fixed all the bugs...

comment:2 by anonymous, 11 years ago

Owner: changed from anonymous to Steven Watanabe
Status: assignednew

comment:3 by Steven Watanabe, 11 years ago

Resolution: fixed
Status: newclosed

(In [75764]) Fix off-by-one error. Fixes #6189.

Note: See TracTickets for help on using tickets.