From ec1bf858a6efae449cf6c1bbf237e6cb1c358a26 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Sat, 23 May 2020 11:34:25 -0300 Subject: tdf#132586 Add RAND.NV() and RANDBETWEEN.NV() Change-Id: I181d4f7ce0ccca38339568c034754c40ef345026 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/94724 Tested-by: Jenkins Reviewed-by: Eike Rathke (cherry picked from commit 7e39048579d0049c19299c1e31a2878e21e218ec) Reviewed-on: https://gerrit.libreoffice.org/c/help/+/94967 Reviewed-by: Adolfo Jayme Barrientos --- source/text/scalc/01/04060106.xhp | 55 +++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 8 deletions(-) diff --git a/source/text/scalc/01/04060106.xhp b/source/text/scalc/01/04060106.xhp index 36bde5f4d1..a226f36372 100644 --- a/source/text/scalc/01/04060106.xhp +++ b/source/text/scalc/01/04060106.xhp @@ -413,14 +413,14 @@

EXP

-Returns e raised to the power of a number. The constant e has a value of approximately 2.71828182845904. +Returns e raised to the power of a number. The constant e has a value of approximately 2.71828182845904. EXP(Number) Number is the power to which e is to be raised. -=EXP(1) returns 2.71828182845904, the mathematical constant e to Calc's accuracy.see also POWER, LN +=EXP(1) returns 2.71828182845904, the mathematical constant e to Calc's accuracy.see also POWER, LN
@@ -1504,8 +1504,8 @@
- random numbers; between limits - RANDBETWEEN function +random numbers; between limits +RANDBETWEEN function mw changed "random numbers;" @@ -1521,12 +1521,27 @@ =RANDBETWEEN(20;30) returns an integer of between 20 and 30.see also RAND + + +random numbers non-volatile; between limits +RANDBETWEEN.NV function + + +

RANDBETWEEN.NV

+Returns an non-volatile integer random number in a specified range. + + +RANDBETWEEN.NV(Bottom; Top) +Returns an non-volatile integer random number between integers Bottom and Top (both inclusive). A non-volatile function is not recalculated at new input events or pressing F9. However, the function is recalculated when pressing F9 with the cursor on the cell containing the function, when opening the file, and when Top or Bottom are recalculated. + +=RANDBETWEEN.NV(20;30) returns a non-volatile integer between 20 and 30. +=RANDBETWEEN.NV(A1;30) returns a non-volatile integer between the value of cell A1 and 30. The function is recalculated when the contents of cell A1 change.
- RAND function - random numbers;between 0 and 1 +RAND function +random numbers;between 0 and 1 mw added one entry @@ -1537,10 +1552,34 @@ RAND() This function produces a new random number each time Calc recalculates. To force Calc to recalculate manually press F9. -To generate random numbers which never recalculate, copy cells each containing =RAND(), and use Edit - Paste Special (with Paste All and Formulas not marked and Numbers marked). - +To generate random numbers which never recalculate, either: + + + Copy cells each containing =RAND(), and use Edit - Paste Special (with Paste All and Formulas not marked and Numbers marked). + + + Use the Fill Cell command with random numbers (Sheet - Fill Cells - Fill Random Numbers). + + + Use the RAND.NV() function for non-volatile random numbers. + + =RAND() returns a random number between 0 and 1.see also RANDBETWEEN + + +random numbers non-volatile;between 0 and 1 +RAND.NV function + + +

RAND.NV

+Returns a non-volatile random number between 0 and 1. + + +RAND.NV() +This function produces a non-volatile random number on input. A non-volatile function is not recalculated at new input events. The function does not recalculate when pressing F9, except when the cursor is on the cell containing the function. The function is recalculated when opening the file. + +=RAND.NV() returns a non-volatile random number between 0 and 1.
-- cgit