ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
Go to the source code of this file.
Functions | |
function | pnint (in val) |
Generate and return the probabilistically-rounded to the nearest integer value of the input real number. More... | |
function pnint | ( | in | val | ) |
Generate and return the probabilistically-rounded to the nearest integer value of the input real number.
Unlike the intrinsic Fortran nint()
function, the procedures of this generic interface round the input real number to the nearest integer value probabilistically.
The closer the input val
is to its nint(val)
result, the more likely it will be rounded to it.
See below for example usage.
[in] | val | : The input scalar or array of the same rank as other array-like arguments, containing the number to be rounded probabilistically. |
whole
: The output scalar or array of the same rank and shape as the input arguments, of default integer
kind, containing the probabilistically-rounded input value to the nearest integer.
Possible calling interfaces ⛓
Example usage ⛓
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.