random-float - Generate a random float

  •        9

Returns an float from 0 to max.Returns an float from min to max.




Related Projects

GSL - GNU Scientific Library

  •    C

The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. The library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. There are over 1000 functions in total with an extensive test suite.

SQL floating point compare function


Comparison of floating point values in SQL Server not always gives the expected result. With this function, comparison is only done on the first 15 significant digits. Since SQL Server only garantees a precision of 15 digits for float datatypes, this is expected to be se...

Big Float C++


Floating point arbitrary precision functions. Includes addition, subtraction, multiplication, and division.

0.30000000000000004 - Floating Point Math Examples

  •    HTML

Your language isn't broken, it's doing floating point math. Computers can only natively store integers, so they need some way of representing decimal numbers. This representation comes with some degree of inaccuracy. That's why, more often than not, .1 + .2 != .3. Why does this happen? It's actually pretty simple. When you have a base 10 system (like ours), it can only express fractions that use a prime factor of the base. The prime factors of 10 are 2 and 5. So 1/2, 1/4, 1/5, 1/8, and 1/10 can all be expressed cleanly because the denominators all use prime factors of 10. In contrast, 1/3, 1/6, and 1/7 are all repeating decimals because their denominators use a prime factor of 3 or 7. In binary (or base 2), the only prime factor is 2. So you can only express fractions cleanly which only contain 2 as a prime factor. In binary, 1/2, 1/4, 1/8 would all be expressed cleanly as decimals. While, 1/5 or 1/10 would be repeating decimals. So 0.1 and 0.2 (1/10 and 1/5) while clean decimals in a base 10 system, are repeating decimals in the base 2 system the computer is operating in. When you do math on these repeating decimals, you end up with leftovers which carry over when you convert the computer's base 2 (binary) number into a more human readable base 10 number.

random-js - A mathematically correct random number generator library for JavaScript.

  •    Javascript

This is designed to be a mathematically correct random number generator library for JavaScript. Inspiration was primarily taken from C++11's <random>.

randexp - generate random data from a Regular Expression

  •    Ruby

randexp makes it easy to generate random string from most regular expressions. randexp adds the #generate (or #gen, for short) method to the Regexp class, which generates a ‘random’ string that will match your regular expression.

herbie - Synthesis for floating-point expressions

  •    Racket

Herbie synthesizes floating-point programs from real-number programs, automatically handling simple numerical instabilities. Visit our website for tutorials, documentation, and an online demo.Herbie can improve the accuracy of many real-world programs, and is used by scientists in many disciplines. It has lead to two patches (for complex square roots and trigonometric functions), in math.js an open-source mathematics library. Herbie has semi-regular releases twice a year, maintains backwards compatibility, and uses standardized formats.

Randomize: generate everything


Randomize is a small library to generate random data of any type <h1>hello there</h1>



The idea with PI Random is to use easy string manipulation and simple math to generate a pseudo random number.

Apache Commons RNG - Random Numbers Generators

  •    Java

Commons RNG provides implementations of pseudo-random numbers generators that are either faster or of higher quality (and sometimes both) than java.util.Random.

randexp.js - Create random strings that match a given regular expression.

  •    Javascript

randexp will generate a random string that matches a given RegExp Javascript object. Thanks to String-Random for giving me the idea to make this in the first place and randexp for the sweet .gen() syntax.

Pseudo Random Number Generator Daemon

  •    C

This is the PRNGD quot;Pseudo Random Number Generator Daemonquot;. It offers an EGD compatible interface to obtain random data and is intended to be used as an entropy source to feed other software, especially software based on OpenSSL.

Hardware(webcam) random number generator

  •    C++

Quick and dirty hardware random number generator that converts a digitized chaotic source (such as a lens capped web camera) into the random numbers. May or may not be cryptographically strong. 0.5-5MBiPS. Requires DirectShow enabled webcam. Win32. CLI.

chancejs - Chance - Random generator helper for JavaScript

  •    Javascript

Many more details on http://chancejs.com but this single library can generate random numbers, characters, strings, names, addresses, dice, and pretty much anything else. It includes the basic building blocks for all these items and is built on top of a Mersenne Twister so it can generate these things with repeatability, if desired.

UIFloatLabelTextField - A subclassed UITextField that follows the Float Label UI design pattern.

  •    Objective-C

If you are looking for the UITextView equivalent of this class, please visit my UIFloatLabelTextView repository. In 2013, Matt D. Smith unveiled the Float Label user interface design pattern. In short, it retains a text field's placeholder above said text field as a floating label. This label is brightly colored when the field is active, and dimly colored when a user has finished editing that field.

SkyFloatingLabelTextField - A beautiful and flexible text field control implementation of "Float Label Pattern"

  •    Swift

SkyFloatingLabelTextField is a beautiful, flexible and customizable implementation of the space saving "Float Label Pattern". This design enables adding context to input fields that are visible at the time of typing, while minimizing the additional space used to display this additional context. This component is used in the Skyscanner TravelPro iOS application in several places, like when searching for flights. On top of implementing the space-saving floating title, the component also supports using iconography, RTL text support (e.g. Arabic & Hebrew), various states (error, selected, highlighted states), and is very much customizable and extensible.



RIG stands for Random Identity Generator. It is a free replacement for a shareware program out there called 'fake'. Basically its single purpose in life is to generate random, yet real-looking, personal data.

FPGA coprocessor floating point math lib


libhdlfltp is a VHDL library of floating point operators, all of which are parametrized, synthesizable to FPGAs and cover a number of the core operators in math.h.

markov - Markov chain text generator, as used for KingJamesProgramming

  •    Python

The program presents a REPL, from which you can generate text in a number of different ways, a list of commands can be produced by typing help, and help for specific topics can be found by typing help topic. To avoid infinite loops, the paragraphs and sentences generators may end abruptly. Because they generate blocks of text at a time, and a block would only end when a specific token (such as a paragraph break) occurs, the generators are programmed to end the chunk immediately if they find themselves generating a token from the same state repeatedly (with the threshold set at the number of occurences of that state in the training corpus). This can cause issues with small training sets or, if the training set has many rare words, with a high chance of choosing a random token.