root
root copied to clipboard
Removed skipping of 0 (zero) in TRandom3.Rndm()
This Pull request: Removes skipping of 0 (zero) in TRandom3.Rndm()
Changes or fixes:
- Removes skipping of 0 (zero) in TRandom3.Rndm()
- Updates documentation, adds warnings
Checklist:
- [x] tested changes locally
- [x] updated the docs (if necessary)
This PR fixes #14581
Can one of the admins verify this patch?
@phsft-bot build
Starting build on ROOT-performance-centos8-multicore
/soversion
, ROOT-ubuntu2204
/nortcxxmod
, ROOT-ubuntu2004
/python3
, mac12arm
/cxx20
, windows10
/default
How to customize builds
Hello: for me this PR is good to go @lmoneta ?
The PR looks good. The doubt I have is that there is a change in functionality. In ROOT, all random generators of TRandom::Random()
return a value in (0,1], excluding the zero. Should we add a maybe +1 to the generated integer numbers in [0,int_max], before converting to float ?
@phsft-bot build
Starting build on ROOT-performance-centos8-multicore
/soversion
, ROOT-ubuntu2204
/nortcxxmod
, ROOT-ubuntu2004
/python3
, mac12arm
/cxx20
, windows10
/default
How to customize builds
Build failed on ROOT-ubuntu2004/python3. See console output.
The PR looks good. The doubt I have is that there is a change in functionality. In ROOT, all random generators of
TRandom::Random()
return a value in (0,1], excluding the zero. Should we add a maybe +1 to the generated integer numbers in [0,int_max], before converting to float ?
Adding +1 to the generated int which is equal to int_max will result again in 0 (zero), no?
@phsft-bot build
Starting build on ROOT-performance-centos8-multicore
/soversion
, ROOT-ubuntu2204
/nortcxxmod
, ROOT-ubuntu2004
/python3
, mac12arm
/cxx20
, windows10
/default
How to customize builds
Build failed on ROOT-ubuntu2004/python3. Running on root-ubuntu-2004-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.
Failing tests:
- projectroot.roottest.root.collection.roottest_root_collection_runtbits_auto
- projectroot.roottest.root.roofitstats.roottest_root_roofitstats_RooDataSet_ASCII_in
- projectroot.roottest.root.roofitstats.roottest_root_roofitstats_RooDataSet_ASCII_out
- projectroot.roottest.root.io.complex.roottest_root_io_complex_readcomplex
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simple_lzma_compr_level9
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simplek_default_compr_deflevel
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simplek_lzma_compr_level9
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simple_lz4_compr_level1
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simplef_default_compr_level9
- projectroot.roottest.root.roofitstats.vectorisedPDFs.gtesttest_root_roofitstats_vectorisedPDFs_testPoisson
Build failed on ROOT-ubuntu2204/nortcxxmod. Running on root-ubuntu-2204-2.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.
Failing tests:
- projectroot.roottest.root.collection.roottest_root_collection_runtbits_auto
- projectroot.roottest.root.roofitstats.roottest_root_roofitstats_RooDataSet_ASCII_in
- projectroot.roottest.root.roofitstats.roottest_root_roofitstats_RooDataSet_ASCII_out
- projectroot.roottest.root.io.complex.roottest_root_io_complex_readcomplex
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simple_lzma_compr_level9
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simplek_default_compr_deflevel
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simplek_lzma_compr_level9
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simplef_default_compr_level9
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simple_lz4_compr_level1
- projectroot.roottest.root.roofitstats.vectorisedPDFs.gtesttest_root_roofitstats_vectorisedPDFs_testPoisson
Build failed on windows10/default. Running on null:C:\build\workspace\root-pullrequests-build See console output.
Failing tests:
- projectroot.math.mathcore.test.gtest_math_mathcore_test_testTRandom3vsStdMt19937
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simplex2_default_compr_level9
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simplek_lz4_compr_level4
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simplex2_zlib_compr_level9
- projectroot.roottest.root.collection.roottest_root_collection_runtbits_auto
- projectroot.roottest.root.roofitstats.roottest_root_roofitstats_RooDataSet_ASCII_in
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simple_lzma_compr_level9
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simplek_default_compr_deflevel
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simplek_lzma_compr_level9
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simple_lz4_compr_level1
And 1 more
Build failed on ROOT-performance-centos8-multicore/soversion. Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build See console output.
Failing tests:
- projectroot.math.mathmore.test.mathmore_testRandom
- projectroot.roofit.roostats.test.test_stressroostats_cpu_minuit2
- projectroot.roofit.roostats.test.test_stressroostats_cpu
- projectroot.roottest.root.collection.roottest_root_collection_runtbits_auto
- projectroot.roottest.root.roofitstats.roottest_root_roofitstats_RooDataSet_ASCII_in
- projectroot.roottest.root.roofitstats.roottest_root_roofitstats_RooDataSet_ASCII_out
- projectroot.roottest.root.io.complex.roottest_root_io_complex_readcomplex
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simple_lzma_compr_level9
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simplek_default_compr_deflevel
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simplek_lzma_compr_level9
And 3 more
Build failed on mac12arm/cxx20. Running on 194.12.161.128:/Users/sftnight/build/workspace/root-pullrequests-build See console output.
Failing tests:
- projectroot.math.mathcore.test.gtest_math_mathcore_test_testTRandom3vsStdMt19937
- projectroot.math.mathmore.test.mathmore_testRandom
- projectroot.roofit.roostats.test.test_stressroostats_cpu_minuit2
- projectroot.roofit.roostats.test.test_stressroostats_cpu
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simplex2_default_compr_level9
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simplek_lz4_compr_level4
- projectroot.roottest.root.io.filemerger.roottest_root_io_filemerger_simplex2_zlib_compr_level9
- projectroot.roottest.root.collection.roottest_root_collection_runtbits_auto
- projectroot.roottest.root.roofitstats.roottest_root_roofitstats_RooDataSet_ASCII_in
- projectroot.roottest.root.roofitstats.roottest_root_roofitstats_RooDataSet_ASCII_out
And 5 more
Test Results
12 files 12 suites 2d 3h 59m 38s :stopwatch: 2 561 tests 2 542 :white_check_mark: 0 :zzz: 19 :x: 28 812 runs 28 659 :white_check_mark: 0 :zzz: 153 :x:
For more details on these failures, see this check.
Results for commit f501b84e.
:recycle: This comment has been updated with latest results.
@lmoneta @kjvbrt it seems to me we are very near to the fix: what is missing to make these tests succeed?