How to resolve the algorithm Random number generator (device) step by step in the EchoLisp programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Random number generator (device) step by step in the EchoLisp programming language

Table of Contents

Problem Statement

If your system has a means to generate random numbers involving not only a software algorithm   (like the /dev/urandom devices in Unix),   then: show how to obtain a random 32-bit number from that mechanism.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Random number generator (device) step by step in the EchoLisp programming language

Source code in the echolisp programming language

(random-seed "simon")
(random (expt 2 32)) → 2275215386
(random-seed "simon")
(random (expt 2 32)) → 2275215386 ;; the same


(random-seed (current-time-milliseconds )) 
(random (expt 2 32)) → 4061857345
(random-seed (current-time-milliseconds ))
(random (expt 2 32)) → 1322611152


  

You may also check:How to resolve the algorithm Accumulator factory step by step in the Rust programming language
You may also check:How to resolve the algorithm Repeat a string step by step in the UNIX Shell programming language
You may also check:How to resolve the algorithm Babbage problem step by step in the EasyLang programming language
You may also check:How to resolve the algorithm Special characters step by step in the Progress programming language
You may also check:How to resolve the algorithm Colorful numbers step by step in the XPL0 programming language