Opened 12 years ago
Closed 9 years ago
#5493 closed Patches (wontfix)
Replaces literal pi by boost::math::constants::pi<>()
| Reported by: | Owned by: | Steven Watanabe | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | random |
| Version: | Boost 1.47.0 | Severity: | Cosmetic |
| Keywords: | Cc: | blelbach@… |
Description
This patch replaces the literal pi in gamma, normal and Cauchy distributions by the math::constants defined in Boost.
Attachments (3)
Change History (9)
by , 12 years ago
| Attachment: | cauchy_dist.patch added |
|---|
by , 12 years ago
| Attachment: | gamma_dist.patch added |
|---|
by , 12 years ago
| Attachment: | normal_dist.patch added |
|---|
comment:1 by , 12 years ago
| Cc: | added |
|---|---|
| Owner: | changed from to |
comment:2 by , 12 years ago
| Owner: | changed from to |
|---|
follow-up: 5 comment:3 by , 11 years ago
comment:4 by , 11 years ago
Hi John,
This is the reason i tagged the patch as "cosmetic". Use literal values, it's not good practice as we know.
Regards, Júlio.
comment:5 by , 11 years ago
Replying to johnmaddock:
I wonder if this really makes any difference? The precision of the value of pi in a random number generator is presumably not so important?
The Random library only works with float, double, and long double anyway. I had to make some adjustments to test with NTL and I didn't keep those changes.
comment:6 by , 9 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |

I wonder if this really makes any difference? The precision of the value of pi in a random number generator is presumably not so important?