Comments (7)
Note that the effect is unobservable because the variate generated is never used (opCall
is called from the constructor without its return value being used, and at the end of that opCall
_z
is set to a sane value). However, this should arguably be fixed, since it's technically undefined behaviour.
from mir-random.
Further note: my own benchmarking of this suggests that performance actually improves slightly if _z
is removed entirely, and L153 is replaced by
auto z = data[index];
Happy to submit a patch with that solution if it would be acceptable.
from mir-random.
Further note: my own benchmarking of this suggests that performance actually improves slightly if
_z
is removed entirely
... with a side benefit being that opCall
no longer needs to be called from the constructor.
from mir-random.
Presumably the intention/expectation is that _z should be initialized to data[index] in the constructor?
_z is not data[index]
it is data[previous_index]
from mir-random.
Further note: my own benchmarking of this suggests that performance actually improves slightly if _z is removed entirely, and L153 is replaced by
Please check checksums
from mir-random.
The only reason to init _z is CTFE-able Mt, will init it with zero
from mir-random.
Done 5a5e66e
from mir-random.
Related Issues (20)
- opCall template issues when using NormalVariable HOT 1
- random number generation HOT 11
- multinomial HOT 23
- Multivariate normal distribution gives wrong variance of second component
- What is the current strategy to handle wrong input? HOT 2
- Error: no property randomSlice for type MersenneTwisterEngine HOT 1
- Random generation of integers HOT 2
- Values in flex/transformations unit test seem wrong
- typo in transform template
- Thread local default RNG
- Check that all Saturated RNGs are safe and the trait and mark all other functions as safe HOT 4
- PhobosRandom is missing from the docs tables
- mir-random does not compile with latest ldc on raspberry pi HOT 3
- Add Linux getrandom syscall number for non-x86/x86_64
- ping Nathan Sashihara
- Time for mir-random 3.0? HOT 2
- Make mir.random.algorithm's range work with N-dimensional distributions HOT 2
- Vose's O(1) discrete random sampler HOT 1
- ExponentialVariable seems broken HOT 3
- unsecure `range` API HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mir-random.