Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
alexandria
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Momchil Ivanov
alexandria
Commits
70b033c7
Commit
70b033c7
authored
Jan 26, 2013
by
Nikodemus Siivola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
document restrictions on GAUSSIAN-RANDOM
parent
e22dcde8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
numbers.lisp
numbers.lisp
+5
-1
No files found.
numbers.lisp
View file @
70b033c7
...
@@ -13,7 +13,11 @@ MIN and MAX if NUMBER is greater then MAX, otherwise returns NUMBER."
...
@@ -13,7 +13,11 @@ MIN and MAX if NUMBER is greater then MAX, otherwise returns NUMBER."
(
defun
gaussian-random
(
&optional
min
max
)
(
defun
gaussian-random
(
&optional
min
max
)
"Returns two gaussian random double floats as the primary and secondary value,
"Returns two gaussian random double floats as the primary and secondary value,
optionally constrained by MIN and MAX. Gaussian random numbers form a standard
optionally constrained by MIN and MAX. Gaussian random numbers form a standard
normal distribution around 0.0d0."
normal distribution around 0.0d0.
Sufficiently positive MIN or negative MAX will cause the algorithm used to
take a very long time. If MIN is positive it should be close to zero, and
similarly if MAX is negative it should be close to zero."
(
labels
((
gauss
()
(
labels
((
gauss
()
(
loop
(
loop
for
x1
=
(
-
(
random
2.0d0
)
1.0d0
)
for
x1
=
(
-
(
random
2.0d0
)
1.0d0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment