Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Tiago Peixoto
graph-tool
Commits
a83d1c77
Commit
a83d1c77
authored
Oct 26, 2016
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spence.cc: Include source documentation
parent
cf79d6b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
src/graph/inference/spence.cc
src/graph/inference/spence.cc
+40
-0
No files found.
src/graph/inference/spence.cc
View file @
a83d1c77
...
...
@@ -21,6 +21,46 @@
* Direct inquiries to 30 Frost Street, Cambridge, MA 02140
*/
/*
* Dilogarithm
*
*
*
* SYNOPSIS:
*
* float x, y, spencef();
*
* y = spencef( x );
*
*
*
* DESCRIPTION:
*
* Computes the integral
*
* x
* -
* | | log t
* spence(x) = - | ----- dt
* | | t - 1
* -
* 1
*
* for x >= 0. A rational approximation gives the integral in
* the interval (0.5, 1.5). Transformation formulas for 1/x
* and 1-x are employed outside the basic expansion range.
*
*
*
* ACCURACY:
*
* Relative error:
* arithmetic domain # trials peak rms
* IEEE 0,4 30000 4.4e-7 6.3e-8
*
*
*/
#include <cmath>
#include <limits>
...
...
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