Bugzilla – Attachment 131568 Details for
Bug 104117
Crash in Calc when selecting "Uniform Integer" with an max value "100000000000000" in "Random Number Generator
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
minimal test cpp file.
rng.cpp (text/x-c++src), 808 bytes, created by
Kohei Yoshida
on 2017-03-02 03:25:55 UTC
(
hide
)
Description:
minimal test cpp file.
Filename:
MIME Type:
Creator:
Kohei Yoshida
Created:
2017-03-02 03:25:55 UTC
Size:
808 bytes
patch
obsolete
> >#include <limits> >#include <stdint.h> >#include <random> >#include <iostream> > >int main() >{ > std::random_device rd; > std::mt19937 seed(rd()); > int64_t lower = 0; > int64_t upper = std::numeric_limits<int64_t>::max(); > > std::cout << __FILE__ << ":" << __LINE__ << " (:main): lower=" << lower << std::endl; > std::cout << __FILE__ << ":" << __LINE__ << " (:main): upper=" << upper << std::endl; > > std::uniform_int_distribution<> distro(lower, upper); > > std::cout << __FILE__ << ":" << __LINE__ << " (:main): possible lower = " << distro.min() << std::endl; > std::cout << __FILE__ << ":" << __LINE__ << " (:main): possible upper = " << distro.max() << std::endl; > > std::cout << __FILE__ << ":" << __LINE__ << " (:main): n = " << distro(seed) << std::endl; > > return EXIT_SUCCESS; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 104117
:
128949
|
128950
| 131568