https://github.com/bl33h/mathfunctions
Math program with spread function and pseudorandom number generator.
https://github.com/bl33h/mathfunctions
discrete-mathematics hashing math-functions modular-arithmetic modules pseudorandom python seed spread-function
Last synced: 3 months ago
JSON representation
Math program with spread function and pseudorandom number generator.
- Host: GitHub
- URL: https://github.com/bl33h/mathfunctions
- Owner: bl33h
- Created: 2022-08-16T17:58:46.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-17T06:47:23.000Z (about 2 years ago)
- Last Synced: 2025-01-21T15:15:29.419Z (5 months ago)
- Topics: discrete-mathematics, hashing, math-functions, modular-arithmetic, modules, pseudorandom, python, seed, spread-function
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mathFunctions
A program that provides math functions including a spread function and a pseudorandom number generator. The spread function takes an array and performs a hash operation based on a module value, producing a modified array. The pseudorandom number generator generates a sequence of pseudorandom numbers based on a given seed, module value, multiplier, and increase value.
![]()
Files •
Features •
How To Use## Files
- src: the file that implements de solution.
## Features
The main features of the application include:
- Spread function: It takes an array as input and applies a hash function based on a module value, resulting in a modified array with spread elements.
- Pseudorandom number generator: It generates a sequence of pseudorandom numbers using the linear congruential method. It requires inputs such as the module value, multiplier value, increase value, and seed value.
- Menu-based interface: The code presents a menu where users can choose between the spread function and pseudorandom number generator options.
- User input: The code prompts the user to provide input values such as the module, array length, array elements, and pseudorandom number generator parameters.
- Output display: The code displays the results of the spread function and the generated sequence of pseudorandom numbers.
- Error handling: The code includes error checking to ensure valid user inputs and displays an error message for invalid options.## How To Use
To clone and run this application, you'll need [Git](https://git-scm.com) and [Python](https://www.python.org/downloads/) installed on your computer. From your command line:...
```bash
# Clone this repository
$ git clone https://github.com/bl33h/mathFunctions# Open the folder
$ cd src# Run the app
$ python mathFunctions.py```