Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
RandomTools Flavor: float - describe a flavor of a random floating-point number
Calling Sequence
float
float(opts)
Parameters
opts
-
equation(s) of the form option = value where option is one of range, digits, or method; specify options for the random floating-point number
Description
The flavor float describes a random floating-point number in a particular range.
To describe a flavor of a random floating-point number, use either float or float(opts) (where opts is described following) as the argument to RandomTools[Generate] or as part of a structured flavor.
By default, the flavor float describes a random floating-point number logarithmically distributed in the range epsilon..1.0 - epsilon, inclusive, where epsilon = 10e-Digits.
You can modify the properties of the random floating-point number by using the float(opts) form of this flavor. The opts argument can contain one or more of the following equations.
range = a..b
This option specifies the range from which the random float is chosen. The range endpoints a and b are numeric and either a >= 0.0 or b <= 0.0. All numerics are evaluated by using the setting of the digits option.
If , then is set to the smallest value of the form such that . If , then is set to the smallest value of the form such that .
If , an exception is raised.
digits = posint
This option specifies a positive integer to use as the Digits setting. The default setting is the current setting of the Digits environment variable.
method = uniform or logarithmic
This option specifies whether the floating-point number should be chosen logarithmically or uniformly from the interval.
The logarithmic method is identical to listing all of the unique floating-point numbers that are found between the endpoints, and then choosing one of these randomly.
The uniform method is similar to sampling from a uniform distribution that is bounded by the endpoints, and then converting this result into a floating-point number.
The default value for this option is logarithmic.
Examples
See Also
ceil, Digits, flavor/structured, Float, floor, rand, RandomTools, RandomTools[Generate], round, trunc
Download Help Document