New features in GS-Calc 20.1 and the Monte Carlo simulations:
- A new 128-bit pseudo-random generator replaced the previous combined MLCG generator.
You can also use the hardware random generator, available in newer processors.
https://citadel5.com/upd_screens/gsc20.1/gsc20.1_mt1.png
(Note: the seed1 and seed2 values are 64-bit parts of one 128-bit initial “seed”-generator initializing value.
If omitted, a random start value will be used.)
- You can now specify in your worksheet cells that will contain the number of total
loops already executed and loops not rejected due to the specified conditions.
This will let you automatically calculate in real-time formulas in subsequent loops using these values.
An example of this are the PI calculation workbook (see the link below) and the simulation described
in the help file:
https://citadel5.com/help/gscalc/simulations.htm
https://citadel5.com/upd_screens/gsc20.1/gsc20.1_mt2.png
https://citadel5.com/upd_screens/gsc20.1/gsc20.1_mt3.png
- You can add to the simulation report (containing all intermediate data for not rejected loops)
statistics for each output formula specified in a worksheet.
https://citadel5.com/upd_screens/gsc20.1/gsc20.1_mt4.png
- The specified number of loops means how many times the entire worksheet (all formulas)
will be recalculated after starting a given simulation.
One “loop” is a procedure carried out in the following way:
- Each of the specified “input” worksheet variable receives a value
of a subsequent random number of the specified distribution type. - The entire worksheet if recalculated; if some of
calculated formula values fulfill the “loop rejection” rule
that you specify the step 1. is initiated again. - Obtained values and their running statistics are saved.
The “Save Report” command enables you to save all the specified values from each loop.
GS-Calc 20.1 automatically split long reports (exceeding 12 million rows) into multiple
worksheets.
https://citadel5.com/upd_screens/gsc20.1/gsc20.1_mt5.png
https://citadel5.com/upd_screens/gsc20.1/gsc20.1_mt6.png
The maximum number of loops that can be saved in a report is around 3 billions (256*12M).
You can download a sample GS-Calc workbook demonstrating the PI number calculation
mentioned above. After downloading that workbook
https://citadel5.com/samples/monte_carlo_pi.gsc (7KB)
click the start button in the “Monte Carlo” pane. You can try changing the original number
of loops (0.5 million) e.g. to something much bigger to see how the precision of the estimated
PI value changes.
To save the full data generated for the simulation, click 'Results > Save All Loops (…)".
New features in GS-Calc 20.1 concerning random numbers:
- A new option in the “Settings > Oprions > Calculation” window enables you to specify
which random number generator to use for the built-in functions RAND(), RANDBETWEEN(),
mtxRand(), mtxRand2() when updating formulas.
https://citadel5.com/upd_screens/gsc20.1/gsc20.1_rnd1.png
- The “Insert > Random Data” command now enables you to specify which random number generator
to use for the inserted series. For the software version you can specify its starting state (“seed”) which
causes generating one and the same pseudo-random series of any size.