# GS-Calc 20.1 has been released.

**URL:** <https://community.citadel5.com/t/gs-calc-20-1-has-been-released/210>\
**Category:** GS-Calc Updates\
**Created:** [October 31, 2023, 2:26pm UTC](https://community.citadel5.com/t/gs-calc-20-1-has-been-released/210 "2023-10-31T14:26:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![citadel\_5](https://community.citadel5.com/letter_avatar_proxy/v4/letter/c/b2d939/32.png) [@citadel\_5](https://community.citadel5.com/u/citadel_5)\
**Post date:** [October 31, 2023, 2:26pm UTC](https://community.citadel5.com/t/gs-calc-20-1-has-been-released/210/1 "2023-10-31T14:26:25Z")

</div>

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://community.citadel5.com/uploads/default/original/1X/40bd64e66a3af1af94e5fccf2f6440a22f1de34f.png)

## ![gsc20.1_mt1](https://community.citadel5.com/uploads/default/original/1X/40bd64e66a3af1af94e5fccf2f6440a22f1de34f.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:

- 

## [Sorting](https://citadel5.com/help/gscalc/simulations.htm)

 ![](https://community.citadel5.com/uploads/default/original/1X/756cafafe41133c46c78df41b199407c90ca86cb.png)

## ![gsc20.1_mt2](https://community.citadel5.com/uploads/default/original/1X/756cafafe41133c46c78df41b199407c90ca86cb.png)

 ![](https://community.citadel5.com/uploads/default/original/1X/058f77ba242982404ef642433463d62f53a644f3.png)

## ![gsc20.1_mt3](https://community.citadel5.com/uploads/default/original/1X/058f77ba242982404ef642433463d62f53a644f3.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://community.citadel5.com/uploads/default/original/1X/947e3143bdb17244b5e9f8000d47d05baa5c3ee9.png)

## ![gsc20.1_mt4](https://community.citadel5.com/uploads/default/original/1X/947e3143bdb17244b5e9f8000d47d05baa5c3ee9.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:

1. Each of the specified “input” worksheet variable receives a value  
of a subsequent random number of the specified distribution type.
2. 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.
3. 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://community.citadel5.com/uploads/default/original/1X/473f4dea8d4f21e673647eb58f973944b7a9d02e.png)

## ![gsc20.1_mt5](https://community.citadel5.com/uploads/default/original/1X/473f4dea8d4f21e673647eb58f973944b7a9d02e.png)

 ![](https://community.citadel5.com/uploads/default/original/1X/be53e5831e90074a45f085629f4f1bf7d2f4078c.png)

## ![gsc20.1_mt6](https://community.citadel5.com/uploads/default/original/1X/be53e5831e90074a45f085629f4f1bf7d2f4078c.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](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://community.citadel5.com/uploads/default/original/1X/5162c76d2b809c1ac73e8dadeabab1800b6e27d0.png)

## ![gsc20.1_rnd1](https://community.citadel5.com/uploads/default/original/1X/5162c76d2b809c1ac73e8dadeabab1800b6e27d0.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.

- 

 ![](https://community.citadel5.com/uploads/default/original/1X/881528134dd32b04bb95325bd17115b144ecfc17.png)

## ![gsc20.1_rnd2](https://community.citadel5.com/uploads/default/original/1X/881528134dd32b04bb95325bd17115b144ecfc17.png)
