Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
alexandria
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Fedorov
alexandria
Commits
70b033c7
Commit
70b033c7
authored
12 years ago
by
Nikodemus Siivola
Browse files
Options
Downloads
Patches
Plain Diff
document restrictions on GAUSSIAN-RANDOM
parent
e22dcde8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
numbers.lisp
+5
-1
5 additions, 1 deletion
numbers.lisp
with
5 additions
and
1 deletion
numbers.lisp
+
5
−
1
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment