You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2018/01/21 14:05:36 UTC

[01/16] commons-statistics git commit: New project: use Java 8.

Repository: commons-statistics
Updated Branches:
  refs/heads/master bb864a05b -> 30d7c8f6b


New project: use Java 8.

Initial versions will probably be "beta" (0.x).


Project: http://git-wip-us.apache.org/repos/asf/commons-statistics/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-statistics/commit/585178f8
Tree: http://git-wip-us.apache.org/repos/asf/commons-statistics/tree/585178f8
Diff: http://git-wip-us.apache.org/repos/asf/commons-statistics/diff/585178f8

Branch: refs/heads/master
Commit: 585178f823ac8f0df41a0f727a8301b21084c3f1
Parents: bb864a0
Author: Gilles Sadowski <gi...@harfang.homelinux.org>
Authored: Fri Jan 19 17:10:38 2018 +0100
Committer: Gilles Sadowski <gi...@harfang.homelinux.org>
Committed: Fri Jan 19 17:10:38 2018 +0100

----------------------------------------------------------------------
 pom.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/585178f8/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 76e4db5..3422571 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
   <groupId>org.apache.commons</groupId>
   <artifactId>commons-statistics-parent</artifactId>
   <packaging>pom</packaging>
-  <version>1.1-SNAPSHOT</version>
+  <version>0.1-SNAPSHOT</version>
   <name>Apache Commons Statistics</name>
 
   <inceptionYear>2016</inceptionYear>
@@ -91,8 +91,8 @@
     <commons.jira.id>STATISTICS</commons.jira.id>
     <commons.jira.pid>12320623</commons.jira.pid>
     <commons.encoding>UTF-8</commons.encoding>
-    <maven.compiler.source>1.6</maven.compiler.source>
-    <maven.compiler.target>1.6</maven.compiler.target>
+    <maven.compiler.source>1.8</maven.compiler.source>
+    <maven.compiler.target>1.8</maven.compiler.target>
     <statistics.pmd.version>3.5</statistics.pmd.version>
     <statistics.findbugs.version>3.0.2</statistics.findbugs.version>
     <statistics.checkstyle.version>2.17</statistics.checkstyle.version>


[04/16] commons-statistics git commit: STATISTICS-2: Migrate "o.a.c.math4.distribution" from Commons Math.

Posted by er...@apache.org.
http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-142.csv
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-142.csv b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-142.csv
new file mode 100644
index 0000000..f515d6a
--- /dev/null
+++ b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-142.csv
@@ -0,0 +1,775 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+0.03125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003033557651760714818735665800978035728386346661017724718604534692
+0.0625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008196150775626282628370564518003509754535754260418430834430871299
+0.09375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005356804087131708232170095277918593828134178145383293414681702802
+0.125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002146327166439540246398358002669112346471903105363000225485561847
+0.15625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000960364403129280786219117500792788862113356279461790022439367189
+0.1875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001359627826159167702689424668469409813856858299223455052233895885
+0.21875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003625314429647415686269710229488475280864917160280547545814011269
+0.25, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005280055662820293479921044247452485193033930497996421361452481297
+0.28125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008347808225604055395552772844436397118175498947445178752830031553
+0.3125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002289849450465765697046081509376075699231725359632104839796953108
+0.34375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001522663140190406982028440599957663148888854448024647008119209476
+0.375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003142094319322777893822820759638913126973198807605710066428390617
+0.40625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002427194042808328587609778268791494485130017025071122616439403163
+0.4375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008120320119339370256765480323676918179450838149762092694252517995
+0.46875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001320735781658764038785116231539959464128005951135765103909968427
+0.5, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001146289380649086251192366642512530248229429646573708458469054648
+0.53125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005729317978524440303661585614465927352456618862827214382201429896
+0.5625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001756533872566753164655565637025058413964567217445667196148257264
+0.59375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003482726265787536095327969710487749190390910320826079887842286997
+0.625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004670025940856888878036981654666381856494844505341292287265152492
+0.65625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004399859001778829755200950318799556871602405597605068627971141461
+0.6875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003009847523695871137155966271832221886880635267574938717556381889
+0.71875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001538153489785019351245227806007778554275108904637933195654778731
+0.75, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000601988473101702607517706173135085324335133021669467403457903845
+0.78125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001844049668265386234882586879556672296571377630260000611580488412
+0.8125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004507147312601440301196460014271144816019658317794446256458944693
+0.84375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008940848436174156151597192738970983007662176427051447351997333187
+0.875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001461499607732898443402285654244909285713345943864592573630554624
+0.90625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001995548489369588752189161870328606539521123037000735268097269063
+0.9375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002303932728834128768996762781034540316524950031739503988166609962
+0.96875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002274049986657838699161555446592450941826846834830657157942672607
+1.0, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001938101049577455202727075639432141456632441869307014325930687745
+1.03125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001439207103396520302957830107213680654287582685615092296128515438
+1.0625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009388870987884926321208613344400111314360050974970011913169760016
+1.09375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005421364646458672817983471948627815237573880787153813230932289631
+1.125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002789942621540927035005667059586847893980666306338564415501188888
+1.15625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001287698098202811537673555436181916839533959712310258448088674657
+1.1875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005361500875610972303069979023862418197367833486824615163167283211
+1.21875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002024590275225225473149737015506573501482013601544113684468918953
+1.25, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006968104103428521074887309294576974632141002929326770098973906475
+1.28125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002195876687657882481932874535395007039155900357364652460795053805
+1.3125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006363006899482337496866116378074003296591172546262283006753550852
+1.34375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001702131003319577076536215520640465553566210477367846495969272327
+1.375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004218872760922287869187073534075925700463131926730135780353228175
+1.40625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009722138030276234999967148274402692267623338326043961409992449596
+1.4375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002089680571318010877428987137556677150362282595688332957085240892
+1.46875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004201959906157252500545494007663123961399359264658674199407587469
+1.5, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007926778132820965146879257325156297716926492844457887575744737405
+1.53125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001406558547228359964744980908369959351926478661061992683244431591
+1.5625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002353474185030691766648160034239693486376197232650666777326750706
+1.59375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037218764710631680810291378957895044299024058306993829517533613
+1.625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005575282460741596068502411216802287983793894391140242455944987172
+1.65625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007927227711779173914646595025005765997143334835634195149748159104
+1.6875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001071944134837427734148831528736806590429798098342595807102541858
+1.71875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000138108221760372438606897908219605037463847000728614744695961898
+1.75, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001698323504027615535775493977499106103008870474964119336234801976
+1.78125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001996602265088979037508101711514879118315066110140433192234414829
+1.8125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002247565201838885801098874326029714649340575038762571277061052162
+1.84375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002426203059645715477666388686373013077426157362543234017305566191
+1.875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002515058586358477945242562545957311323172718010330339180458411349
+1.90625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002507014442882676241995203575254093447049547393440111571045348996
+1.9375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002406060902781161902201317113546172367599689929770992516074063544
+1.96875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225994911613670690636440238190995406019476793372244336676352445
+2.0, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001987519157465959491445347553267451003457990490531392275965754195
+2.03125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000171453587137175849954036308161585554228777378871958588259630981
+2.0625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001430495506796013044008857457938321109148650996310424378677368237
+2.09375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001155492324240659068289466063962728357122772450744805947202989304
+2.125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009044922980021883592693068478137647216483263685308937373183116557
+2.15625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006867493750666057678732738145851191379632376782577075388002117646
+2.1875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005062073169861849151639861142509580998525899776359842235080539088
+2.21875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000362543600249358108048615563254247239159695775510296834704211439
+2.25, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000252489526603295926854889138637603480058181758825607503414558784
+2.28125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001711247968940842037651268479869014802821611649688933171242705035
+2.3125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001129510956969341394482584774058228942310010081982015263548709781
+2.34375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007265816104496300499898085992734152379766838403219111427628313591
+2.375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004558175816260007555105632285341725080639224806678437420596463138
+2.40625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002790584050989946527828296128587552010590980237784251322397109482
+2.4375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001668284578618286381690790296779862250618026482768832959903523649
+2.46875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009744943495971065664868805223978856002757562039568746736065311578
+2.5, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005565137725047395574049347236684956078968710486499751433053096287
+2.53125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003108878218450848872116486181048621292547452360719664918176573336
+2.5625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001699798852685296386784022068442245217886560103650873256545999535
+2.59375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009100885870327262722464965223732881717518714282705775083344810535
+2.625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004773976482611128988798211844746120102308059567771123130352965033
+2.65625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002454696275760835444695690036249528912243300297923688668213413605
+2.6875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001237767743712980126635586939279788778464881607957430187558901314
+2.71875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006123510291695639565085664209717987140225049417169316601162655024
+2.75, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002973520270830365285227422297179401263577767138187513753393353772
+2.78125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001417860046058175928579947574510220867900449105752381426257219265
+2.8125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000664147521303038603683361611790803353067898170593358323046435521
+2.84375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000305728087739129723233638886379847283002349977344670616284337749
+2.875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001383601345866491256388259703880761553003600032816461633662975225
+2.90625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006158165603165894766153050137123578901788359210810326725331742519
+2.9375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002696567354490352164922751914759148164548566444834386869162624497
+2.96875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000116209212486453951070292394541201310925330607163600309184486292
+3.0, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004930425131321923963510886764900778982514745751009761362610987774
+3.03125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000206007645643820827303314518317195203657968524336608125987741934
+3.0625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008479568978137889855011902857824122896893352330369105194359940995
+3.09375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003439440813286467374108287315135203469007226896482626091143674007
+3.125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000137516148277974955023133604376843473580630998237473574478686017
+3.15625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005421203379476148213421988636417094025843024411009018713703061847
+3.1875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002107824814208896255395316141764944639324591290668333148079715839
+3.21875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008085134990542965334589253581905327037952765906130980166609647657
+3.25, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003060326271241347797546462262688157278623489089392238281241333858
+3.28125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001143368848839448104018303666454175768464926380076825556040748176
+3.3125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004217455283370294519707512781532810480296863635335952438327502641
+3.34375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001536258982753454534656763557966934144314303438058646444410596781
+3.375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005527510837850865215976637913130799946312868911245521928224185736
+3.40625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001964918701656530953500470511779473718145278225187625311517613506
+3.4375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006902481976642110282867774172652102442911661216152222414590281317
+3.46875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002396652013332100510036731291118144945253806850133789101153921894
+3.5, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008226866792627073576624811506236814537735144444052251936045499752
+3.53125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002792428729171867019261632828016033276093622823994937073116309008
+3.5625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009374193247831870573401525780089781518374219773437712153248195981
+3.59375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003112960794284175181733134745769766048688030004098876592606281174
+3.625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001022781678276829485916565991737738962471395619764099977969733207
+3.65625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003325379860895122886890362143526848537880631351835625263563028836
+3.6875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000107010423716668494467801704623132402504569493415748568703926534
+3.71875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000340888937140304566485574925143235069269037264871300875742666981
+3.75, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010751655516500057121080638788882342542498896812034085084486699
+3.78125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003358034552231975198678840222047938296020431436434536897616135351
+3.8125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001038753185016620960633311422824378609872886112455774706737689662
+3.84375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003182916559403998009440824039914963418731723416236261503014434234
+3.875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009662520894131646017586093285001024077532297070658244747172094388
+3.90625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002906517684554548593909078547902429113847660001930359056667839338
+3.9375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008664356127701868520523335284923019038086901367224834615112611268
+3.96875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002560014264812279949870787664812232664883486562720634675869725085
+4.0, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007498108979417057501969410105785805389350218991421840011138800148
+4.03125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002177326094949818288347202184261203144450142589128935491950993049
+4.0625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006269245805777304062959647748195031272596426976759696928823559811
+4.09375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000179012603033255501316663682511198478183649007217295526070646623
+4.125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005069714673975477993740329273174984319966159049747174542021474877
+4.15625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001424193146376045621300533599430331840038299782840485465768830703
+4.1875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000396910311715937612060249857790569331523050987684370746126621097
+4.21875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001097502372668119018893797764965529385695652097551413500179560685
+4.25, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003011330949110272144045228845675930846008796626607080758466525698
+4.28125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008199751179089182270769437231646418534684430377587720464056545446
+4.3125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002216053214150434174870849707962984102969408145854092717585333108
+4.34375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005944894276971024158504391166744192246344756485153025450007245157
+4.375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001583210377353177777333473799849462340999007461282477147169140736
+4.40625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004186092098624555386556386467552330430779725958036135029494429691
+4.4375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001099002676513170435713162205144203664065949773584055149817112979
+4.46875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000286517908393675782453454434457603529913583440230837720610375309
+4.5, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007418398729678948264093232621092495011052688220031294770631281509
+4.53125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001907723368316186218646756394762922274196828964932301754563956074
+4.5625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004873130564372278413572568167965620835391407327408598502160306408
+4.59375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001236596117972383474418618065923455754211611499889769196290907369
+4.625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003117553014251019176067861307360696368711492217264233091136034538
+4.65625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007809156389985564416087564853726256469214340433469137404030263426
+4.6875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001943730719442780934678679858372061252199405445163249469868772566
+4.71875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004807800490111025108911568884934999392882694780835717333342337857
+4.75, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001181873695171431439695945088987936055967942289494929550288380437
+4.78125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002887654362824212907589350003063923798362181637370243713611837908
+4.8125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007012992901720668411651464264904343421484882878808334647435353143
+4.84375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169308788005483889819778195348947755602057014872872843007673311
+4.875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004063560445223066083464629222389436716502305959187568800096141841
+4.90625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009696558979485849976043909648212915905842791383838858857213633695
+4.9375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002300616401971812940984249955733735418359276617747026432669928184
+4.96875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005427724276350974799311405179138381682201180943921299018806591684
+5.0, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001273412476145461672075056301194182361232686783977419708662262251
+5.03125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002971175901536008750962400943949868693742875555320731900504263877
+5.0625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006894855858850366700795231361900197527813107365021450247944717046
+5.09375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001591434099115486071170393818323723215391351119139507802570548869
+5.125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003653821361594311314574706064471335286211108802524525123637510255
+5.15625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008345054309138438898700485807574718650834969726679686966054554711
+5.1875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001896102209558316042776877472000039957325784928568868193789506405
+5.21875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004286196328211946561257298855380758740733499003062176371400127594
+5.25, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009640213425592401701042226950057700956732688467866826860393039754
+5.28125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002157404466474730346185520290143630707274173815691233592277968574
+5.3125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004804325621241812428345044635656940947080406967322304172469895096
+5.34375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001064668446646429457030972722867941251588495222606268144189274692
+5.375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002348021824397676043128942514749670887689136781433572527614873558
+5.40625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005153709724950940139653493250773597071009075655434957435254299825
+5.4375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001125878998267122968885755227852945047486709659371796425080143082
+5.46875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000244816605759779816004180567288698278511744647569700468628393531
+5.5, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005298957873058011165104349035215339990730653743232994245786124398
+5.53125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001141729334458245387875885567892856386122119556582039777580259951
+5.5625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002448957371460512921600064708569122978658265686211010169637328029
+5.59375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000522957704396828875410780147126183684403517810610254312492269485
+5.625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111835955208705990936833289311490643454681725453507908414697018
+5.65625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002353557693827852724067285371446488225403741799605315565539291925
+5.6875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004960663812563294773691731616946693129609512339452366736803176052
+5.71875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001041132585148871760810214106189583368411494721945393385226352451
+5.75, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002175924032838341373227815023604310808951077720429327540940697089
+5.78125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004528690976979900655760131770976419259657575136030387076338350224
+5.8125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009386688679153395792340988676276694113418700998038816778128957944
+5.84375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000193768018695629477573199431698945622462450783314835325762961207
+5.875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003983828374746924704154681470125385210358063226084027524948888291
+5.90625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000815805370965902701709785138214177903149493320270437986539405164
+5.9375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001664018704096287050872089658514876467239191720773564290055004104
+5.96875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003380909522265722750395407694134506238549942457017003971011108805
+6.0, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006842744296214723537727945847460727928513924870705812601602431164
+6.03125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000137964049001107851622396404413536906611348188838440495038011827
+6.0625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002771134333588750978981033268036938465744063940438358720552228841
+6.09375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005545263126705103213400208522340569424112501012536187143288398533
+6.125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001105544720976625645024856553421425146740527858231014610730818966
+6.15625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002196020753551502100737924736366191791485623926602590372533217668
+6.1875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043462897499030122394382008074978430762827686865137830272479296
+6.21875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008571146534483015484655815001620990693672450265429402676387192147
+6.25, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001684274340253163378160635216915758506105388528091374365453164773
+6.28125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003298039382840138664381860281661933129470534060769098920043400455
+6.3125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006435512385969675609788067687924648245588209433225398451020581766
+6.34375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001251438989830819851415712766107847327820256458172967203317276102
+6.375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002425214970788023674463414661283310349951352977649260085600309237
+6.40625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004684026459773757828447058425930780252713579931047672401814148661
+6.4375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009016361177077845246921244344478962271897618306178298649411697988
+6.46875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001729817295848649781993118854990487772917022923974342759178067018
+6.5, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003307806169793130510982334866615011527785203501023656826483477103
+6.53125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006304700524662892306087761628664560637987386090053119166051807355
+6.5625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001197807355113915996089560628042636793403286547131106024342147946
+6.59375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002268406653574348337711735470759590234535088094244121787599163645
+6.625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004282322826889319671917993066379724135993887413502696970053707701
+6.65625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008058893105101947207141630965449937707349674105508014435223601649
+6.6875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001511895067084289961214791201476762110959758208993661039150779699
+6.71875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000282768321149007555510213646031528189288641392967010836054166041
+6.75, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005272482111955957476310618050738049996113809379794652066147113435
+6.78125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009801374259400904943593879018614884389897663396603615837451065519
+6.8125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001816596176738590046362779282146725551001583891168012131302563529
+6.84375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003356922287444331319401652433515568070270405108200030616560841174
+6.875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006185109438580475878947342997180768947983909247528181139598589571
+6.90625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001136287631742576597039449314550477460342784379234340484514154796
+6.9375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002081495061734270685218089722978990964163724234301594467329788179
+6.96875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003802068828281746104944863142920844263537323177737785614810544341
+7.0, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006925213505823538062301172881109903609207566198325931757484703988
+7.03125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001257841540669633219049140099252106751234250072949226372464184205
+7.0625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002278290487613311599476275804319799159685458131215310791600370262
+7.09375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004115222664386450654500012336196226432901316119342402756067190012
+7.125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007412918050559973389052201727180923494899643443855461521251167266
+7.15625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001331702083895200741102556009045789465363769564812986002183644396
+7.1875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002385927513729377306635589715693263875729456770424272035967029802
+7.21875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000426333862782329846914813032335347195061111785986525367655746213
+7.25, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000759792200996601037634866991529745455282374167976311037875847981
+7.28125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001350523432370193299734786674454067302794900372527980116731210492
+7.3125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002394315910389921980661766500038664334659989560668585521962361671
+7.34375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004233917919772873337347814686927940300936042601972897362127972931
+7.375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007467832533118624234061305065697220217811202399242360850898455582
+7.40625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001313854389561276542360909934343775265258348674100457512300950134
+7.4375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002305736589269961566168466259393035259769880425383845694413065436
+7.46875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004036371002452978610240489246408284502960388746591485972224620475
+7.5, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007048560351059796400285181889261238746243600418448156280920848613
+7.53125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001227853752301304056467276173274525321817246456141707672879709831
+7.5625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002133725460307847159962475075710536091069494892939321418646414774
+7.59375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003699004085178423116735407961688852470509413129667092898909470901
+7.625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006397260632565248001785169365305423189425549546916682595083947319
+7.65625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110376018446916815423378362939326640165821909439302861269920657
+7.6875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001899919619407042009351418149210404736315074320726757613113617913
+7.71875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003262750260101144378275168028338904916508984929088513927203020413
+7.75, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005590217652757415571250389409834998311213531198596359680280312335
+7.78125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009556039994803832389547891888356525093319424715346225573281544967
+7.8125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001629819608107800248060806390015987297777206533074410563849997079
+7.84375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002773456393471583471518744399637437082532322777386734798381406521
+7.875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004709026785312308977827119718000547507531262567832787268101609912
+7.90625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007977681503393607598068353520411929856003813625865845993101966936
+7.9375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001348545328252375845159875313726742833901141054670926931598580225
+7.96875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002274601095950038423180020783608654526026382291647209487491285674
+8.0, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003828275722695871275414181078782527688315736455273579921024831237
+8.03125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006429345840110526376142521388953854103573762761281252949576150915
+8.0625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001077465159826240628298029795145612318598303260662362358338104024
+8.09375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001801854538890822622748496992109498149622261052398408032264386404
+8.125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030069302487529963435785157079405622170924625468049237221815639
+8.15625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005007501893831298136412933794408212829115159222015750154726021779
+8.1875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008321851487003577695743100367223665786551248204349928487854160355
+8.21875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001380151365539535767693074815644042022613863149759156280615873753
+8.25, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002284273852255941193239444404409641306288350657752316942091569727
+8.28125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003773036463723727157848267425911718960641614230519360366549595771
+8.3125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006219591189824386545510741542567717223257195419914415745836399268
+8.34375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001023215769088043283659624059235168874307462589254182958107715019
+8.375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001680016811650055606154274855341760151251427454287938101988517824
+8.40625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002753007834960247696597686243471489399857595617566623329616699859
+8.4375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004502513367815061239172107376162164313914160658954401389694257338
+8.46875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007349580908200911558373754378522773430810367489994549209151062199
+8.5, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001197391933743656087544768372834023274300731430443491754699533209
+8.53125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001947073695274732297730985287830338109400089171412829138014952089
+8.5625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000316014355698547785202114865486022226037526605774202205571229937
+8.59375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005119358950649590935192355402711251083310134773745651134553027059
+8.625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008277794112694305657297770538658544845048334957887062987220807851
+8.65625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001336010233239469759228932084856054863680676324724024014281868365
+8.6875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000215232013458648021542833076445898075446955282743018182448198709
+8.71875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003461079723115436449220480161062973977989465476899259580318390616
+8.75, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000555558322814136613274167213447235151617395957165429181900439667
+8.78125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008901570646822747634490153362547626792598012833875666181002721963
+8.8125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001423731542313538141610151244797424802431159831058817867828383807
+8.84375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002273105224407963949072728556104209309678511636048321339419708845
+8.875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003622816818881237146362386147225631171220424625505080482182970732
+8.90625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005763867481567535513061612144128817652051154847423128202476238446
+8.9375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009154353833237467973924845433855110224377681703744499120333767948
+8.96875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001451418854588386565041250108535516904058561990822755292626998915
+9.0, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002297282437541898165579971054830991233322340086502987219280284537
+9.03125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003629925774042841802352704266926980766945049378066084285369481028
+9.0625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000572595482129406500152196841229693657743241575769776866769500755
+9.09375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009017163776855774490705170052064929593227984800420245030894961418
+9.125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001417649478303937731879614418029258600981192764283064062593273312
+9.15625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225100214225162980209891891187862813134526212714269583454891916
+9.1875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003486719343917734532381336588009862051832982400239241870784037603
+9.21875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005454763846860128433842617543369300271318096581495170515681195684
+9.25, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008519836435887393037372799476007298426558838297528378940404312109
+9.28125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001328579812390231318118850576077916191697062955498112113421709686
+9.3125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002068472862796926932639844971783418116047020311149100671259371944
+9.34375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003215306985111608652552172352741451550612250523658895101256849161
+9.375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004990109816465268217512555533852438987099199856809497634809568338
+9.40625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007732454334456354163202093766639503150744678325880996813584052309
+9.4375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001196323791021696680706877225232016259317830535095585447138309103
+9.46875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001848028645907580214223694398680119009434938885168119099780117975
+9.5, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002850372808107008276052485040475492594517080453760521443420164284
+9.53125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004389671516792773240388877798247170881712713825597262232514888273
+9.5625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006750005182056601588246241693947369947696297617816730786118533444
+9.59375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001036387609295907794542130597361103274676836333515686403148029195
+9.625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001588878153852958335228027060547120418967220085875475351786587983
+9.65625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002432279411006132241593225730323880308088219849178226834259296345
+9.6875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003717876785972433039389193297183964200294903289152366578534999947
+9.71875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005674653031011688138036878104312988658698388308229352748513813643
+9.75, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008648693641664818698549634186727001733495646440494843973812055027
+9.78125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001316232616424745500339742780691143898273059895876079464874194895
+9.8125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000275106571635568703860263065097793311620029505305735746124515
+9.84375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003035468522478563963078085343743427325836661614206596654053281748
+9.875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004599859810613497642733108717675389730477678541886362246291390064
+9.90625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006960656732544005387764238730276305022587461367413392192245820811
+9.9375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001051832194155633424802898252941972192065789946527134540959847077
+9.96875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001587220083671825146295304840066497683504745765758149295889789254
+10.0, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002391806708285417552455993203077117652240144682639512679358245999
+11.0, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006036708497667833244105575688653964676515743656790548503830105057
+12.0, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004728167010820066449834388048750264123567631360777777646311571828
+13.0, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001386293890164672688980958434875665373468422710579518263196611968
+14.0, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000001760358747269139460262117949098140092671629862308120788864014115
+15.0, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000108672885069415685211010859188615827844919102581796787985945063
+16.0, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000003579948200070280886257331795725912128843516256489402882147989447
+17.0, 0.000000000000000000000000000000000000000000000000000000000000000000000000000006791451766317429483849925394400382425911703898856439825416123004
+18.0, 0.000000000000000000000000000000000000000000000000000000000000000000000000007903026604836526637508534299622724873220518890175830923055850538
+19.0, 0.00000000000000000000000000000000000000000000000000000000000000000000000594748666317073772831846021032273347343403750572404089816755731
+20.0, 0.000000000000000000000000000000000000000000000000000000000000000000003026987651043487209321374217401707921122011443022829816141146971
+21.0, 0.000000000000000000000000000000000000000000000000000000000000000001082448732327653872536572536914008068281167750926264132028543561
+22.0, 0.0000000000000000000000000000000000000000000000000000000000000002810543378739649666251415485583921935287490527039287571301684864
+23.0, 0.00000000000000000000000000000000000000000000000000000000000005451583813115210731306583761223194360672966759995473090084283673
+24.0, 0.000000000000000000000000000000000000000000000000000000000008098198434366083739258477828573935799585126093108173453536184563
+25.0, 0.0000000000000000000000000000000000000000000000000000000009415644956074781102749570400390382426136793627788644597005981355
+26.0, 0.0000000000000000000000000000000000000000000000000000000873486974322276167680545194693103728073942329927962400629049062
+27.0, 0.000000000000000000000000000000000000000000000000000006576739402696529361648349255994167876121321261342297286341115102
+28.0, 0.000000000000000000000000000000000000000000000000000408044778296693854754388370383237798398041154398292495763582155
+29.0, 0.00000000000000000000000000000000000000000000000002114699327644525053523794254087880550785807522557967427701874882
+30.0, 0.0000000000000000000000000000000000000000000000009266876112108050086331645076337785406907702702592002909839913886
+31.0, 0.00000000000000000000000000000000000000000000003471688815303758910565593355968383839840509352765376118505649967
+32.0, 0.000000000000000000000000000000000000000000001123037920379460648137242805879442425300315247375983914263884276
+33.0, 0.00000000000000000000000000000000000000000003165326536102020776606163889509630563738807028464123004633844247
+34.0, 0.0000000000000000000000000000000000000000007837649120755275998724703651167789449999790138823415012865041409
+35.0, 0.00000000000000000000000000000000000000001717743387639083029476212001814176006056705829558162996963861198
+36.0, 0.0000000000000000000000000000000000000003355228934144175810153517012304713090917074487184197523934644415
+37.0, 0.000000000000000000000000000000000000005877845436105469675821273206862313830251073819487847885947475163
+38.0, 0.00000000000000000000000000000000000009288973187486104761161501637024182125270628021724255051023650176
+39.0, 0.000000000000000000000000000000000001331360583964939210878965399472927740779921742679174756222519968
+40.0, 0.00000000000000000000000000000000001739203496141217478485612057064067038042185068420595666660780217
+41.0, 0.0000000000000000000000000000000002080275901423715352304226576902628316112411794681767497205392998
+42.0, 0.000000000000000000000000000000002287982007165186973815812754191466158728434416552857336639883994
+43.0, 0.00000000000000000000000000000002323059928459473302436633264709179897150340164603525217916122061
+44.0, 0.0000000000000000000000000000002185451029385693942768145373245655580563926118128173538409653609
+45.0, 0.00000000000000000000000000000191154116652465096958359638188034519139043719607673993045979308
+46.0, 0.00000000000000000000000000001559477087138098014192863241431740245745100185232212061482938749
+47.0, 0.0000000000000000000000000001190222670490762488805552185498036788459088966345087544651554457
+48.0, 0.0000000000000000000000000008522170863510455654902673616845534562103728661396104062521052204
+49.0, 0.000000000000000000000000005739691752098853486904128595345661475142038269914137934828993852
+50.0, 0.00000000000000000000000003645166873669795540175992826706727436000871906834179454825214546
+51.0, 0.0000000000000000000000002187999162320647316195079590597485016398702575852008187692179468
+52.0, 0.000000000000000000000001244025527450833483775019847592652425843922246664095197754886549
+53.0, 0.000000000000000000000006713685166943204001317699309021447086144067516164450553138331492
+54.0, 0.00000000000000000000003445791623396263253984751256209484564162723867384725026474877629
+55.0, 0.0000000000000000000001685053183769823577718922837934220281648047738583508331667585085
+56.0, 0.0000000000000000000007864873105082683194620805860769329094944669868914845704780012798
+57.0, 0.00000000000000000000350945824802570640834354618845355466309315485195550031695136544
+58.0, 0.00000000000000000001499470895656341965385207931794417061222539453741003214890039999
+59.0, 0.00000000000000000006143701516179819076510710218792767547866866542600126178906338309
+60.0, 0.0000000000000000002417287401307223497382034100059345201116342479591610179127038565
+61.0, 0.0000000000000000009145642881416924018479368806021767685845590937700431075393731512
+62.0, 0.000000000000000003331510910537906535043201591774626808384363789546127939280261359
+63.0, 0.00000000000000001169865710453245426775707351335730338966824816835238953069138433
+64.0, 0.00000000000000003964609237788430735132968480113880752412757306097572126965057723
+65.0, 0.0000000000000001298114083162922295047488290760870057169259904081713636847626519
+66.0, 0.0000000000000004110834611391812946688258749239832831017573173420636890685323303
+67.0, 0.000000000000001260340209129797618262692556398468779035454971387829506705556718
+68.0, 0.000000000000003744577477357618415676321842846021096113553971516082131667427823
+69.0, 0.00000000000001079129192714836394846901601742822049430355640566497827901631967
+70.0, 0.00000000000003019123005256020398228417864229260577320405965196689294414042757
+71.0, 0.00000000000008207102414327064510845257872058034151392719682501776774232860994
+72.0, 0.0000000000002169452763246801559037310022871668337838788635571301430982802483
+73.0, 0.0000000000005580806910598620894503152874318378203535160450611145490651192924
+74.0, 0.000000000001398143409486399230207385500713236024605373215655577557006886836
+75.0, 0.000000000003413680679285354936745428670083108512382270999232961401622765235
+76.0, 0.000000000008128432162553662423179382588130228698479840263279920071637462011
+77.0, 0.00000000001888808991165962698827240312458207081255796763867630811124225987
+78.0, 0.00000000004285882787399796705098567844111603800643498367658991826368890515
+79.0, 0.00000000009502255424288748117278702170272823349938826599406827929049439662
+80.0, 0.0000000002059683605999324820156139057231272116156875013125239944350260166
+81.0, 0.000000000436722458738719369832448089713588150242998064949989825968784123
+82.0, 0.0000000009063095758844884811201511931708382096049312730485117322359355714
+83.0, 0.000000001841789215718945263321521049540067409731512165820129058676562527
+84.0, 0.000000003667024009729579500710808459591189094854498796374400367155242818
+85.0, 0.000000007156628318382350160395996758757792601328234643400620306676300276
+86.0, 0.00000001369705123598815762008841733420422185950504302102714193613917828
+87.0, 0.00000002571968186100625219711150274755962453676135865671267534031490965
+88.0, 0.00000004740381170098611526390735189007414926772105441361024634599746331
+89.0, 0.00000008579321566851634393413523824162020863452259923802470170876706208
+90.0, 0.0000001525321382154419379679097082931664892918752727735688125040598904
+91.0, 0.0000002665074554266794212144843131788788164802750512506709386968075376
+92.0, 0.0000004577856967521044725575655741686740965734429715832679986970445493
+93.0, 0.0000007733566560961179024471297133235772580817772630830281690004543555
+94.0, 0.000001285336845744877019322945401828252993728960425483723132737819618
+95.0, 0.000002102439288040642838862000087587925857692677563108102690997726634
+96.0, 0.000003385668980319961813404981405276920239982611908895745235060838514
+97.0, 0.000005369337281658565731454465322565419619160672005104486289749844035
+98.0, 0.000008388577954806452696511134426792857066258272262842532242941546939
+99.0, 0.00001291456042118368999814533615777000204891119630418956411499422793
+100.0, 0.00001959849436183591156264808893490049433826998729405420134263002904
+101.0, 0.00002932526394874698717645770150186423367476026760725122534742853813
+102.0, 0.00004327708126212291843300096180290663748560083145617320107245492488
+103.0, 0.00006300687585992641494111922008932653435477375186737401862573427768
+104.0, 0.00009052022438663507408749148640982945558006437874127592801574467594
+105.0, 0.0001283634756071794630869250248866843984385926485103073347556906969
+106.0, 0.0001797143759825711566110007986813361066202367975875381148031272864
+107.0, 0.0002484700163784397363640742582291833195872742473055124931316268405
+108.0, 0.000339325405501144837206221648870787420998546544154760512747085273
+109.0, 0.0004578345686303526705032325915785107126079257265510557927942095465
+110.0, 0.0006104449377465844681621183995100067314317049712976243208291469309
+111.0, 0.0008044951241799450348135198495329401248634139757487423304387145332
+112.0, 0.00104816612998882389586460249871677034249242972770893750010929153
+113.0, 0.00135037682097395772141082609175547406356842846013786963777212924
+114.0, 0.001720616170494761678716971007955900874156682895421681585314356281
+115.0, 0.002168707441332401689243591383238770792242471239078885969789383474
+116.0, 0.002704503070629297828645618822326347783062811540171184916885403712
+117.0, 0.003337513431683449963430128085016128631691925331499951161838765151
+118.0, 0.004076477637389240164509869204741105708241434267978443299145841491
+119.0, 0.004928889802156858152239567009623800883314835886378656556608669449
+120.0, 0.005900499297214603620530219708707575730249716197954455091699499713
+121.0, 0.006994808078944280950055599495070637300980722739415188013434361533
+122.0, 0.008212591695435863044555343892382916433584283963

<TRUNCATED>

[08/16] commons-statistics git commit: STATISTICS-2: Migrate "o.a.c.math4.distribution" from Commons Math.

Posted by er...@apache.org.
http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/NormalDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/NormalDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/NormalDistributionTest.java
new file mode 100644
index 0000000..3b2889e
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/NormalDistributionTest.java
@@ -0,0 +1,213 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for {@link NormalDistribution}. Extends
+ * {@link ContinuousDistributionAbstractTest}. See class javadoc of that class
+ * for details.
+ *
+ */
+public class NormalDistributionTest extends ContinuousDistributionAbstractTest {
+
+    //-------------- Implementations for abstract methods -----------------------
+
+    /** Creates the default real distribution instance to use in tests. */
+    @Override
+    public NormalDistribution makeDistribution() {
+        return new NormalDistribution(2.1, 1.4);
+    }
+
+    /** Creates the default cumulative probability distribution test input values */
+    @Override
+    public double[] makeCumulativeTestPoints() {
+        // quantiles computed using R
+        return new double[] {-2.226325228634938d, -1.156887023657177d, -0.643949578356075d, -0.2027950777320613d, 0.305827808237559d,
+                6.42632522863494d, 5.35688702365718d, 4.843949578356074d, 4.40279507773206d, 3.89417219176244d};
+    }
+
+    /** Creates the default cumulative probability density test expected values */
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] {0.001d, 0.01d, 0.025d, 0.05d, 0.1d, 0.999d,
+                0.990d, 0.975d, 0.950d, 0.900d};
+    }
+
+    /** Creates the default probability density test expected values */
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] {0.00240506434076, 0.0190372444310, 0.0417464784322, 0.0736683145538, 0.125355951380,
+                0.00240506434076, 0.0190372444310, 0.0417464784322, 0.0736683145538, 0.125355951380};
+    }
+
+    // --------------------- Override tolerance  --------------
+    private double defaultTolerance = 1e-7;
+    @Override
+    public void setUp() {
+        super.setUp();
+        setTolerance(defaultTolerance);
+    }
+
+    //---------------------------- Additional test cases -------------------------
+
+    private void verifyQuantiles() {
+        NormalDistribution distribution = (NormalDistribution) getDistribution();
+        double mu = distribution.getMean();
+        double sigma = distribution.getStandardDeviation();
+        setCumulativeTestPoints( new double[] {mu - 2 *sigma, mu - sigma,
+                                               mu, mu + sigma, mu + 2 * sigma,  mu + 3 * sigma, mu + 4 * sigma,
+                                               mu + 5 * sigma});
+        // Quantiles computed using R (same as Mathematica)
+        setCumulativeTestValues(new double[] {0.02275013194817921, 0.158655253931457, 0.5, 0.841344746068543,
+                                              0.977249868051821, 0.99865010196837, 0.999968328758167,  0.999999713348428});
+        verifyCumulativeProbabilities();
+    }
+
+    @Test
+    public void testQuantiles() {
+        setDensityTestValues(new double[] {0.0385649760808, 0.172836231799, 0.284958771715, 0.172836231799, 0.0385649760808,
+                                           0.00316560600853, 9.55930184035e-05, 1.06194251052e-06});
+        verifyQuantiles();
+        verifyDensities();
+
+        setDistribution(new NormalDistribution(0, 1));
+        setDensityTestValues(new double[] {0.0539909665132, 0.241970724519, 0.398942280401, 0.241970724519, 0.0539909665132,
+                                           0.00443184841194, 0.000133830225765, 1.48671951473e-06});
+        verifyQuantiles();
+        verifyDensities();
+
+        setDistribution(new NormalDistribution(0, 0.1));
+        setDensityTestValues(new double[] {0.539909665132, 2.41970724519, 3.98942280401, 2.41970724519,
+                                           0.539909665132, 0.0443184841194, 0.00133830225765, 1.48671951473e-05});
+        verifyQuantiles();
+        verifyDensities();
+    }
+
+    @Test
+    public void testInverseCumulativeProbabilityExtremes() {
+        setInverseCumulativeTestPoints(new double[] {0, 1});
+        setInverseCumulativeTestValues(new double[] {Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY});
+        verifyInverseCumulativeProbabilities();
+    }
+
+    // MATH-1257
+    @Test
+    public void testCumulativeProbability() {
+        final ContinuousDistribution dist = new NormalDistribution(0, 1);
+        double x = -10;
+        double expected = 7.61985e-24;
+        double v = dist.cumulativeProbability(x);
+        double tol = 1e-5;
+        Assert.assertEquals(1, v / expected, 1e-5);
+    }
+
+    @Test
+    public void testGetMean() {
+        NormalDistribution distribution = (NormalDistribution) getDistribution();
+        Assert.assertEquals(2.1, distribution.getMean(), 0);
+    }
+
+    @Test
+    public void testGetStandardDeviation() {
+        NormalDistribution distribution = (NormalDistribution) getDistribution();
+        Assert.assertEquals(1.4, distribution.getStandardDeviation(), 0);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition1() {
+        new NormalDistribution(1, 0);
+    }
+
+    @Test
+    public void testDensity() {
+        double [] x = new double[]{-2, -1, 0, 1, 2};
+        // R 2.5: print(dnorm(c(-2,-1,0,1,2)), digits=10)
+        checkDensity(0, 1, x, new double[]{0.05399096651, 0.24197072452, 0.39894228040, 0.24197072452, 0.05399096651});
+        // R 2.5: print(dnorm(c(-2,-1,0,1,2), mean=1.1), digits=10)
+        checkDensity(1.1, 1, x, new double[]{0.003266819056,0.043983595980,0.217852177033,0.396952547477,0.266085249899});
+    }
+
+    private void checkDensity(double mean, double sd, double[] x, double[] expected) {
+        NormalDistribution d = new NormalDistribution(mean, sd);
+        for (int i = 0; i < x.length; i++) {
+            Assert.assertEquals(expected[i], d.density(x[i]), 1e-9);
+        }
+    }
+
+    /**
+     * Check to make sure top-coding of extreme values works correctly.
+     * Verifies fixes for JIRA MATH-167, MATH-414
+     */
+    @Test
+    public void testExtremeValues() {
+        NormalDistribution distribution = new NormalDistribution(0, 1);
+        for (int i = 0; i < 100; i++) { // make sure no convergence exception
+            double lowerTail = distribution.cumulativeProbability(-i);
+            double upperTail = distribution.cumulativeProbability(i);
+            if (i < 9) { // make sure not top-coded
+                // For i = 10, due to bad tail precision in erf (MATH-364), 1 is returned
+                // TODO: once MATH-364 is resolved, replace 9 with 30
+                Assert.assertTrue(lowerTail > 0.0d);
+                Assert.assertTrue(upperTail < 1.0d);
+            }
+            else { // make sure top coding not reversed
+                Assert.assertTrue(lowerTail < 0.00001);
+                Assert.assertTrue(upperTail > 0.99999);
+            }
+        }
+
+        Assert.assertEquals(distribution.cumulativeProbability(Double.MAX_VALUE), 1, 0);
+        Assert.assertEquals(distribution.cumulativeProbability(-Double.MAX_VALUE), 0, 0);
+        Assert.assertEquals(distribution.cumulativeProbability(Double.POSITIVE_INFINITY), 1, 0);
+        Assert.assertEquals(distribution.cumulativeProbability(Double.NEGATIVE_INFINITY), 0, 0);
+    }
+
+    @Test
+    public void testMath280() {
+        NormalDistribution normal = new NormalDistribution(0,1);
+        double result = normal.inverseCumulativeProbability(0.9986501019683698);
+        Assert.assertEquals(3.0, result, defaultTolerance);
+        result = normal.inverseCumulativeProbability(0.841344746068543);
+        Assert.assertEquals(1.0, result, defaultTolerance);
+        result = normal.inverseCumulativeProbability(0.9999683287581673);
+        Assert.assertEquals(4.0, result, defaultTolerance);
+        result = normal.inverseCumulativeProbability(0.9772498680518209);
+        Assert.assertEquals(2.0, result, defaultTolerance);
+    }
+
+    @Test
+    public void testMoments() {
+        final double tol = 1e-9;
+        NormalDistribution dist;
+
+        dist = new NormalDistribution(0, 1);
+        Assert.assertEquals(dist.getNumericalMean(), 0, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), 1, tol);
+
+        dist = new NormalDistribution(2.2, 1.4);
+        Assert.assertEquals(dist.getNumericalMean(), 2.2, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), 1.4 * 1.4, tol);
+
+        dist = new NormalDistribution(-2000.9, 10.4);
+        Assert.assertEquals(dist.getNumericalMean(), -2000.9, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), 10.4 * 10.4, tol);
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ParetoDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ParetoDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ParetoDistributionTest.java
new file mode 100644
index 0000000..6223dbc
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ParetoDistributionTest.java
@@ -0,0 +1,201 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for {@link ParetoDistribution}.
+ * Extends {@link ContinuousDistributionAbstractTest}. See class javadoc of that class for details.
+ */
+public class ParetoDistributionTest extends ContinuousDistributionAbstractTest {
+
+    //-------------- Implementations for abstract methods -----------------------
+
+    /** Creates the default real distribution instance to use in tests. */
+    @Override
+    public ParetoDistribution makeDistribution() {
+        return new ParetoDistribution(2.1, 1.4);
+    }
+
+    /** Creates the default cumulative probability distribution test input values */
+    @Override
+    public double[] makeCumulativeTestPoints() {
+        // quantiles computed using R
+        return new double[] { -2.226325228634938, -1.156887023657177, -0.643949578356075, -0.2027950777320613, 0.305827808237559,
+                              +6.42632522863494, 5.35688702365718, 4.843949578356074, 4.40279507773206, 3.89417219176244 };
+    }
+
+    /** Creates the default cumulative probability density test expected values */
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] { 0, 0, 0, 0, 0, 0.791089998892, 0.730456085931, 0.689667290488, 0.645278794701, 0.578763688757 };
+    }
+
+    /** Creates the default probability density test expected values */
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] { 0, 0, 0, 0, 0, 0.0455118580441, 0.070444173646, 0.0896924681582, 0.112794186114, 0.151439332084 };
+    }
+
+    /**
+     * Creates the default inverse cumulative probability distribution test input values.
+     */
+    @Override
+    public double[] makeInverseCumulativeTestPoints() {
+        // Exclude the test points less than zero, as they have cumulative
+        // probability of zero, meaning the inverse returns zero, and not the
+        // points less than zero.
+        double[] points = makeCumulativeTestValues();
+        double[] points2 = new double[points.length - 5];
+        System.arraycopy(points, 5, points2, 0, points.length - 5);
+        return points2;
+    }
+
+    /**
+     * Creates the default inverse cumulative probability test expected values.
+     */
+    @Override
+    public double[] makeInverseCumulativeTestValues() {
+        // Exclude the test points less than zero, as they have cumulative
+        // probability of zero, meaning the inverse returns zero, and not the
+        // points less than zero.
+        double[] points = makeCumulativeTestPoints();
+        double[] points2 = new double[points.length - 5];
+        System.arraycopy(points, 5, points2, 0, points.length - 5);
+        return points2;
+    }
+
+    // --------------------- Override tolerance  --------------
+    @Override
+    public void setUp() {
+        super.setUp();
+        setTolerance(1e-7);
+    }
+
+    //---------------------------- Additional test cases -------------------------
+
+    private void verifyQuantiles() {
+        ParetoDistribution distribution = (ParetoDistribution)getDistribution();
+        double mu = distribution.getScale();
+        double sigma = distribution.getShape();
+        setCumulativeTestPoints( new double[] { mu - 2 *sigma,  mu - sigma,
+                                                mu,             mu + sigma,
+                                                mu + 2 * sigma, mu + 3 * sigma,
+                                                mu + 4 * sigma, mu + 5 * sigma });
+        verifyCumulativeProbabilities();
+    }
+
+    @Test
+    public void testQuantiles() {
+        setCumulativeTestValues(new double[] {0, 0, 0, 0.510884134236, 0.694625688662, 0.785201995008, 0.837811522357, 0.871634279326});
+        setDensityTestValues(new double[] {0, 0, 0.666666666, 0.195646346305, 0.0872498032394, 0.0477328899983, 0.0294888141169, 0.0197485724114});
+        verifyQuantiles();
+        verifyDensities();
+
+        setDistribution(new ParetoDistribution(1, 1));
+        setCumulativeTestValues(new double[] {0, 0, 0, 0.5, 0.666666666667, 0.75, 0.8, 0.833333333333});
+        setDensityTestValues(new double[] {0, 0, 1.0, 0.25, 0.111111111111, 0.0625, 0.04, 0.0277777777778});
+        verifyQuantiles();
+        verifyDensities();
+
+        setDistribution(new ParetoDistribution(0.1, 0.1));
+        setCumulativeTestValues(new double[] {0, 0, 0, 0.0669670084632, 0.104041540159, 0.129449436704, 0.148660077479, 0.164041197922});
+        setDensityTestValues(new double[] {0, 0, 1.0, 0.466516495768, 0.298652819947, 0.217637640824, 0.170267984504, 0.139326467013});
+        verifyQuantiles();
+        verifyDensities();
+    }
+
+    @Test
+    public void testInverseCumulativeProbabilityExtremes() {
+        setInverseCumulativeTestPoints(new double[] {0, 1});
+        setInverseCumulativeTestValues(new double[] {2.1, Double.POSITIVE_INFINITY});
+        verifyInverseCumulativeProbabilities();
+    }
+
+    @Test
+    public void testGetScale() {
+        ParetoDistribution distribution = (ParetoDistribution)getDistribution();
+        Assert.assertEquals(2.1, distribution.getScale(), 0);
+    }
+
+    @Test
+    public void testGetShape() {
+        ParetoDistribution distribution = (ParetoDistribution)getDistribution();
+        Assert.assertEquals(1.4, distribution.getShape(), 0);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition1() {
+        new ParetoDistribution(1, 0);
+    }
+
+    @Test
+    public void testDensity() {
+        double [] x = new double[]{-2, -1, 0, 1, 2};
+        // R 2.14: print(dpareto(c(-2,-1,0,1,2), scale=1, shape=1), digits=10)
+        checkDensity(1, 1, x, new double[] { 0.00, 0.00, 0.00, 1.00, 0.25 });
+        // R 2.14: print(dpareto(c(-2,-1,0,1,2), scale=1.1, shape=1), digits=10)
+        checkDensity(1.1, 1, x, new double[] { 0.000, 0.000, 0.000, 0.000, 0.275 });
+    }
+
+    private void checkDensity(double scale, double shape, double[] x,
+        double[] expected) {
+        ParetoDistribution d = new ParetoDistribution(scale, shape);
+        for (int i = 0; i < x.length; i++) {
+            Assert.assertEquals(expected[i], d.density(x[i]), 1e-9);
+        }
+    }
+
+    /**
+     * Check to make sure top-coding of extreme values works correctly.
+     */
+    @Test
+    public void testExtremeValues() {
+        ParetoDistribution d = new ParetoDistribution(1, 1);
+        for (int i = 0; i < 1e5; i++) { // make sure no convergence exception
+            double upperTail = d.cumulativeProbability(i);
+            if (i <= 1000) { // make sure not top-coded
+                Assert.assertTrue(upperTail < 1.0d);
+            }
+            else { // make sure top coding not reversed
+                Assert.assertTrue(upperTail > 0.999);
+            }
+        }
+
+        Assert.assertEquals(d.cumulativeProbability(Double.MAX_VALUE), 1, 0);
+        Assert.assertEquals(d.cumulativeProbability(-Double.MAX_VALUE), 0, 0);
+        Assert.assertEquals(d.cumulativeProbability(Double.POSITIVE_INFINITY), 1, 0);
+        Assert.assertEquals(d.cumulativeProbability(Double.NEGATIVE_INFINITY), 0, 0);
+    }
+
+    @Test
+    public void testMeanVariance() {
+        final double tol = 1e-9;
+        ParetoDistribution dist;
+
+        dist = new ParetoDistribution(1, 1);
+        Assert.assertEquals(dist.getNumericalMean(), Double.POSITIVE_INFINITY, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), Double.POSITIVE_INFINITY, tol);
+
+        dist = new ParetoDistribution(2.2, 2.4);
+        Assert.assertEquals(dist.getNumericalMean(), 3.771428571428, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), 14.816326530, tol);
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/PascalDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/PascalDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/PascalDistributionTest.java
new file mode 100644
index 0000000..b0d7ac1
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/PascalDistributionTest.java
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for PascalDistribution.
+ * Extends DiscreteDistributionAbstractTest.  See class javadoc for
+ * DiscreteDistributionAbstractTest for details.
+ *
+ */
+public class PascalDistributionTest extends DiscreteDistributionAbstractTest {
+
+    // --------------------- Override tolerance  --------------
+    protected double defaultTolerance = 1e-7;
+    @Override
+    public void setUp() {
+        super.setUp();
+        setTolerance(defaultTolerance);
+    }
+
+    //-------------- Implementations for abstract methods -----------------------
+
+    /** Creates the default discrete distribution instance to use in tests. */
+    @Override
+    public DiscreteDistribution makeDistribution() {
+        return new PascalDistribution(10,0.70);
+    }
+
+    /** Creates the default probability density test input values */
+    @Override
+    public int[] makeDensityTestPoints() {
+      return new int[] {-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
+    }
+
+    /** Creates the default probability density test expected values */
+    @Override
+    public double[] makeDensityTestValues() {
+      return new double[] {0, 0.0282475249, 0.0847425747, 0.139825248255, 0.167790297906, 0.163595540458,
+                           0.137420253985, 0.103065190489, 0.070673273478, 0.0450542118422, 0.0270325271053,
+                           0.0154085404500, 0.0084046584273};
+    }
+
+    /** Creates the default cumulative probability density test input values */
+    @Override
+    public int[] makeCumulativeTestPoints() {
+      return makeDensityTestPoints();
+    }
+
+    /** Creates the default cumulative probability density test expected values */
+    @Override
+    public double[] makeCumulativeTestValues() {
+      return new double[] {0, 0.0282475249, 0.1129900996, 0.252815347855, 0.420605645761, 0.584201186219,
+                           0.721621440204, 0.824686630693, 0.895359904171, 0.940414116013, 0.967446643119,
+                           0.982855183569, 0.991259841996};
+        }
+
+    /** Creates the default inverse cumulative probability test input values */
+    @Override
+    public double[] makeInverseCumulativeTestPoints() {
+      return new double[] {0.0, 0.001, 0.010, 0.025, 0.050, 0.100, 0.999,
+                           0.990, 0.975, 0.950, 0.900, 1.0};
+        }
+
+    /** Creates the default inverse cumulative probability density test expected values */
+    @Override
+    public int[] makeInverseCumulativeTestValues() {
+      return new int[] {0, 0, 0, 0, 1, 1, 14, 11, 10, 9, 8, Integer.MAX_VALUE};
+    }
+
+    //----------------- Additional test cases ---------------------------------
+
+    /** Test degenerate case p = 0   */
+    @Test
+    public void testDegenerate0() {
+        setDistribution(new PascalDistribution(5, 0.0d));
+        setCumulativeTestPoints(new int[] {-1, 0, 1, 5, 10 });
+        setCumulativeTestValues(new double[] {0d, 0d, 0d, 0d, 0d});
+        setDensityTestPoints(new int[] {-1, 0, 1, 10, 11});
+        setDensityTestValues(new double[] {0d, 0d, 0d, 0d, 0d});
+        setInverseCumulativeTestPoints(new double[] {0.1d, 0.5d});
+        setInverseCumulativeTestValues(new int[] {Integer.MAX_VALUE, Integer.MAX_VALUE});
+        verifyDensities();
+        verifyCumulativeProbabilities();
+        verifyInverseCumulativeProbabilities();
+    }
+
+    /** Test degenerate case p = 1   */
+    @Test
+    public void testDegenerate1() {
+        setDistribution(new PascalDistribution(5, 1.0d));
+        setCumulativeTestPoints(new int[] {-1, 0, 1, 2, 5, 10 });
+        setCumulativeTestValues(new double[] {0d, 1d, 1d, 1d, 1d, 1d});
+        setDensityTestPoints(new int[] {-1, 0, 1, 2, 5, 10});
+        setDensityTestValues(new double[] {0d, 1d, 0d, 0d, 0d, 0d});
+        setInverseCumulativeTestPoints(new double[] {0.1d, 0.5d});
+        setInverseCumulativeTestValues(new int[] {0, 0});
+        verifyDensities();
+        verifyCumulativeProbabilities();
+        verifyInverseCumulativeProbabilities();
+    }
+
+    @Test
+    public void testMoments() {
+        final double tol = 1e-9;
+        PascalDistribution dist;
+
+        dist = new PascalDistribution(10, 0.5);
+        Assert.assertEquals(dist.getNumericalMean(), ( 10d * 0.5d ) / 0.5d, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), ( 10d * 0.5d ) / (0.5d * 0.5d), tol);
+
+        dist = new PascalDistribution(25, 0.7);
+        Assert.assertEquals(dist.getNumericalMean(), ( 25d * 0.3d ) / 0.7d, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), ( 25d * 0.3d ) / (0.7d * 0.7d), tol);
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/PoissonDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/PoissonDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/PoissonDistributionTest.java
new file mode 100644
index 0000000..150e120
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/PoissonDistributionTest.java
@@ -0,0 +1,244 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * <code>PoissonDistributionTest</code>
+ *
+ */
+public class PoissonDistributionTest extends DiscreteDistributionAbstractTest {
+
+    /**
+     * Poisson parameter value for the test distribution.
+     */
+    private static final double DEFAULT_TEST_POISSON_PARAMETER = 4.0;
+
+    /**
+     * Constructor.
+     */
+    public PoissonDistributionTest() {
+        setTolerance(1e-12);
+    }
+
+    /**
+     * Creates the default discrete distribution instance to use in tests.
+     */
+    @Override
+    public DiscreteDistribution makeDistribution() {
+        return new PoissonDistribution(DEFAULT_TEST_POISSON_PARAMETER);
+    }
+
+    /**
+     * Creates the default probability density test input values.
+     */
+    @Override
+    public int[] makeDensityTestPoints() {
+        return new int[] { -1, 0, 1, 2, 3, 4, 5, 10, 20};
+    }
+
+    /**
+     * Creates the default probability density test expected values.
+     * These and all other test values are generated by R, version 1.8.1
+     */
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] { 0d, 0.0183156388887d,  0.073262555555d,
+                              0.14652511111d, 0.195366814813d, 0.195366814813,
+                              0.156293451851d, 0.00529247667642d, 8.27746364655e-09};
+    }
+
+    /**
+     * Creates the default logarithmic probability density test expected values.
+     * Reference values are from R, version 2.14.1.
+     */
+    @Override
+    public double[] makeLogDensityTestValues() {
+        return new double[] { Double.NEGATIVE_INFINITY, -4.000000000000d,
+                              -2.613705638880d, -1.920558458320d, -1.632876385868d,
+                              -1.632876385868d, -1.856019937183d, -5.241468961877d,
+                              -18.609729238356d};
+    }
+
+    /**
+     * Creates the default cumulative probability density test input values.
+     */
+    @Override
+    public int[] makeCumulativeTestPoints() {
+        return new int[] { -1, 0, 1, 2, 3, 4, 5, 10, 20 };
+    }
+
+    /**
+     * Creates the default cumulative probability density test expected values.
+     */
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] { 0d,  0.0183156388887d, 0.0915781944437d,
+                              0.238103305554d, 0.433470120367d, 0.62883693518,
+                              0.78513038703d,  0.99716023388d, 0.999999998077 };
+    }
+
+    /**
+     * Creates the default inverse cumulative probability test input values.
+     */
+    @Override
+    public double[] makeInverseCumulativeTestPoints() {
+        DiscreteDistribution dist = getDistribution();
+        return new double[] { 0d, 0.018315638886d, 0.018315638890d,
+                              0.091578194441d, 0.091578194445d, 0.238103305552d,
+                              0.238103305556d, dist.cumulativeProbability(3),
+                              dist.cumulativeProbability(4), dist.cumulativeProbability(5),
+                              dist.cumulativeProbability(10), dist.cumulativeProbability(20)};
+    }
+
+    /**
+     * Creates the default inverse cumulative probability density test expected values.
+     */
+    @Override
+    public int[] makeInverseCumulativeTestValues() {
+        return new int[] { 0, 0, 1, 1, 2, 2, 3, 3, 4, 5, 10, 20};
+    }
+
+    /**
+     * Test the normal approximation of the Poisson distribution by
+     * calculating P(90 &le; X &le; 110) for X = Po(100) and
+     * P(9900 &le; X &le; 10200) for X  = Po(10000)
+     */
+    @Test
+    public void testNormalApproximateProbability() {
+        PoissonDistribution dist = new PoissonDistribution(100);
+        double result = dist.normalApproximateProbability(110)
+            - dist.normalApproximateProbability(89);
+        Assert.assertEquals(0.706281887248, result, 1e-10);
+
+        dist = new PoissonDistribution(10000);
+        result = dist.normalApproximateProbability(10200)
+            - dist.normalApproximateProbability(9899);
+        Assert.assertEquals(0.820070051552, result, 1E-10);
+    }
+
+    /**
+     * Test the degenerate cases of a 0.0 and 1.0 inverse cumulative probability.
+     */
+    @Test
+    public void testDegenerateInverseCumulativeProbability() {
+        PoissonDistribution dist = new PoissonDistribution(DEFAULT_TEST_POISSON_PARAMETER);
+        Assert.assertEquals(Integer.MAX_VALUE, dist.inverseCumulativeProbability(1.0d));
+        Assert.assertEquals(0, dist.inverseCumulativeProbability(0d));
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testNegativeMean() {
+        new PoissonDistribution(-1);
+    }
+
+    @Test
+    public void testMean() {
+        PoissonDistribution dist = new PoissonDistribution(10.0);
+        Assert.assertEquals(10.0, dist.getMean(), 0.0);
+    }
+
+    @Test
+    public void testLargeMeanCumulativeProbability() {
+        double mean = 1.0;
+        while (mean <= 10000000.0) {
+            PoissonDistribution dist = new PoissonDistribution(mean);
+
+            double x = mean * 2.0;
+            double dx = x / 10.0;
+            double p = Double.NaN;
+            double sigma = Math.sqrt(mean);
+            while (x >= 0) {
+                try {
+                    p = dist.cumulativeProbability((int) x);
+                    Assert.assertFalse("NaN cumulative probability returned for mean = " +
+                            mean + " x = " + x,Double.isNaN(p));
+                    if (x > mean - 2 * sigma) {
+                        Assert.assertTrue("Zero cum probaility returned for mean = " +
+                                mean + " x = " + x, p > 0);
+                    }
+                } catch (Exception ex) {
+                    Assert.fail("mean of " + mean + " and x of " + x + " caused " + ex.getMessage());
+                }
+                x -= dx;
+            }
+
+            mean *= 10.0;
+        }
+    }
+
+    /**
+     * JIRA: MATH-282
+     */
+    @Test
+    public void testCumulativeProbabilitySpecial() {
+        PoissonDistribution dist;
+        dist = new PoissonDistribution(9120);
+        checkProbability(dist, 9075);
+        checkProbability(dist, 9102);
+        dist = new PoissonDistribution(5058);
+        checkProbability(dist, 5044);
+        dist = new PoissonDistribution(6986);
+        checkProbability(dist, 6950);
+    }
+
+    private void checkProbability(PoissonDistribution dist, int x) {
+        double p = dist.cumulativeProbability(x);
+        Assert.assertFalse("NaN cumulative probability returned for mean = " +
+                dist.getMean() + " x = " + x, Double.isNaN(p));
+        Assert.assertTrue("Zero cum probability returned for mean = " +
+                dist.getMean() + " x = " + x, p > 0);
+    }
+
+    @Test
+    public void testLargeMeanInverseCumulativeProbability() {
+        double mean = 1.0;
+        while (mean <= 100000.0) { // Extended test value: 1E7.  Reduced to limit run time.
+            PoissonDistribution dist = new PoissonDistribution(mean);
+            double p = 0.1;
+            double dp = p;
+            while (p < .99) {
+                try {
+                    int ret = dist.inverseCumulativeProbability(p);
+                    // Verify that returned value satisties definition
+                    Assert.assertTrue(p <= dist.cumulativeProbability(ret));
+                    Assert.assertTrue(p > dist.cumulativeProbability(ret - 1));
+                } catch (Exception ex) {
+                    Assert.fail("mean of " + mean + " and p of " + p + " caused " + ex.getMessage());
+                }
+                p += dp;
+            }
+            mean *= 10.0;
+        }
+    }
+
+    @Test
+    public void testMoments() {
+        final double tol = 1e-9;
+        PoissonDistribution dist;
+
+        dist = new PoissonDistribution(1);
+        Assert.assertEquals(dist.getNumericalMean(), 1, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), 1, tol);
+
+        dist = new PoissonDistribution(11.23);
+        Assert.assertEquals(dist.getNumericalMean(), 11.23, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), 11.23, tol);
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/TDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/TDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/TDistributionTest.java
new file mode 100644
index 0000000..46e2a08
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/TDistributionTest.java
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.junit.Assert;
+import org.junit.Test;
+/**
+ * Test cases for TDistribution.
+ * Extends ContinuousDistributionAbstractTest.  See class javadoc for
+ * ContinuousDistributionAbstractTest for details.
+ *
+ */
+public class TDistributionTest extends ContinuousDistributionAbstractTest {
+
+    //-------------- Implementations for abstract methods -----------------------
+
+    /** Creates the default continuous distribution instance to use in tests. */
+    @Override
+    public TDistribution makeDistribution() {
+        return new TDistribution(5.0);
+    }
+
+    /** Creates the default cumulative probability distribution test input values */
+    @Override
+    public double[] makeCumulativeTestPoints() {
+        // quantiles computed using R version 2.9.2
+        return new double[] {-5.89342953136, -3.36492999891, -2.57058183564, -2.01504837333, -1.47588404882,
+                             5.89342953136, 3.36492999891, 2.57058183564, 2.01504837333, 1.47588404882};
+    }
+
+    /** Creates the default cumulative probability density test expected values */
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] {0.001, 0.01, 0.025, 0.05, 0.1, 0.999,
+                             0.990, 0.975, 0.950, 0.900};
+    }
+
+    /** Creates the default probability density test expected values */
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] {0.000756494565517, 0.0109109752919, 0.0303377878006, 0.0637967988952, 0.128289492005,
+                             0.000756494565517, 0.0109109752919, 0.0303377878006, 0.0637967988952, 0.128289492005};
+    }
+
+    // --------------------- Override tolerance  --------------
+    @Override
+    public void setUp() {
+        super.setUp();
+        setTolerance(1e-9);
+    }
+
+    //---------------------------- Additional test cases -------------------------
+    /**
+     * @see <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=27243">
+     *      Bug report that prompted this unit test.</a>
+     */
+    @Test
+    public void testCumulativeProbabilityAgainstStackOverflow() {
+        TDistribution td = new TDistribution(5.);
+        td.cumulativeProbability(.1);
+        td.cumulativeProbability(.01);
+    }
+
+    @Test
+    public void testSmallDf() {
+        setDistribution(new TDistribution(1d));
+        // quantiles computed using R version 2.9.2
+        setCumulativeTestPoints(new double[] {-318.308838986, -31.8205159538, -12.7062047362,
+                                              -6.31375151468, -3.07768353718, 318.308838986, 31.8205159538, 12.7062047362,
+                                              6.31375151468, 3.07768353718});
+        setDensityTestValues(new double[] {3.14158231817e-06, 0.000314055924703, 0.00195946145194,
+                                           0.00778959736375, 0.0303958893917, 3.14158231817e-06, 0.000314055924703,
+                                           0.00195946145194, 0.00778959736375, 0.0303958893917});
+        setInverseCumulativeTestValues(getCumulativeTestPoints());
+        verifyCumulativeProbabilities();
+        verifyInverseCumulativeProbabilities();
+        verifyDensities();
+    }
+
+    @Test
+    public void testInverseCumulativeProbabilityExtremes() {
+        setInverseCumulativeTestPoints(new double[] {0, 1});
+        setInverseCumulativeTestValues(new double[] {Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY});
+        verifyInverseCumulativeProbabilities();
+    }
+
+    @Test
+    public void testCumulativeProbablilityExtremes() {
+        TDistribution dist;
+        for (int i = 1; i < 11; i++) {
+            dist = new TDistribution(i * 5);
+            Assert.assertEquals(1,
+                                dist.cumulativeProbability(Double.POSITIVE_INFINITY), Double.MIN_VALUE);
+            Assert.assertEquals(0,
+                                dist.cumulativeProbability(Double.NEGATIVE_INFINITY), Double.MIN_VALUE);
+        }
+    }
+
+    @Test
+    public void testDfAccessors() {
+        TDistribution dist = (TDistribution) getDistribution();
+        Assert.assertEquals(5d, dist.getDegreesOfFreedom(), Double.MIN_VALUE);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testPreconditions() {
+        new TDistribution(0);
+    }
+
+    @Test
+    public void testMoments() {
+        final double tol = 1e-9;
+        TDistribution dist;
+
+        dist = new TDistribution(1);
+        Assert.assertTrue(Double.isNaN(dist.getNumericalMean()));
+        Assert.assertTrue(Double.isNaN(dist.getNumericalVariance()));
+
+        dist = new TDistribution(1.5);
+        Assert.assertEquals(dist.getNumericalMean(), 0, tol);
+        Assert.assertTrue(Double.isInfinite(dist.getNumericalVariance()));
+
+        dist = new TDistribution(5);
+        Assert.assertEquals(dist.getNumericalMean(), 0, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), 5d / (5d - 2d), tol);
+    }
+
+    /*
+     * Adding this test to benchmark against tables published by NIST
+     * http://itl.nist.gov/div898/handbook/eda/section3/eda3672.htm
+     * Have chosen tabulated results for degrees of freedom 2,10,30,100
+     * Have chosen problevels from 0.10 to 0.001
+     */
+    @Test
+    public void nistData(){
+        double[] prob = new double[]{ 0.10,0.05,0.025,0.01,0.005,0.001};
+        double[] args2 = new double[]{1.886,2.920,4.303,6.965,9.925,22.327};
+        double[] args10 = new double[]{1.372,1.812,2.228,2.764,3.169,4.143};
+        double[] args30 = new double[]{1.310,1.697,2.042,2.457,2.750,3.385};
+        double[] args100= new double[]{1.290,1.660,1.984,2.364,2.626,3.174};
+        TestUtils.assertEquals(prob, makeNistResults(args2, 2), 1.0e-4);
+        TestUtils.assertEquals(prob, makeNistResults(args10, 10), 1.0e-4);
+        TestUtils.assertEquals(prob, makeNistResults(args30, 30), 1.0e-4);
+        TestUtils.assertEquals(prob, makeNistResults(args100, 100), 1.0e-4);
+        return;
+    }
+    private double[] makeNistResults(double[] args, int df){
+        TDistribution td =  new TDistribution(df);
+        double[] res  = new double[ args.length ];
+        for( int i = 0 ; i < res.length ; i++){
+            res[i] = 1.0 - td.cumulativeProbability(args[i]);
+        }
+        return res;
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/TestUtils.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/TestUtils.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/TestUtils.java
new file mode 100644
index 0000000..8a074d0
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/TestUtils.java
@@ -0,0 +1,281 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import java.text.DecimalFormat;
+import org.apache.commons.math3.stat.inference.ChiSquareTest;
+import org.apache.commons.numbers.core.Precision;
+import org.junit.Assert;
+
+/**
+ *
+ */
+public class TestUtils {
+    /**
+     * Collection of static methods used in math unit tests.
+     */
+    private TestUtils() {}
+
+    /**
+     * Verifies that expected and actual are within delta, or are both NaN or
+     * infinities of the same sign.
+     */
+    public static void assertEquals(double expected,
+                                    double actual,
+                                    double delta) {
+        Assert.assertEquals(null, expected, actual, delta);
+    }
+
+    /**
+     * Verifies that expected and actual are within delta, or are both NaN or
+     * infinities of the same sign.
+     */
+    public static void assertEquals(String msg,
+                                    double expected,
+                                    double actual,
+                                    double delta) {
+        // check for NaN
+        if(Double.isNaN(expected)){
+            Assert.assertTrue("" + actual + " is not NaN.",
+                Double.isNaN(actual));
+        } else {
+            Assert.assertEquals(msg, expected, actual, delta);
+        }
+    }
+
+    /**
+     * Verifies that two double arrays have equal entries, up to tolerance
+     */
+    public static void assertEquals(double expected[],
+                                    double observed[],
+                                    double tolerance) {
+        assertEquals("Array comparison failure", expected, observed, tolerance);
+    }
+
+    /**
+     * Verifies that the relative error in actual vs. expected is less than or
+     * equal to relativeError.  If expected is infinite or NaN, actual must be
+     * the same (NaN or infinity of the same sign).
+     *
+     * @param expected expected value
+     * @param actual  observed value
+     * @param relativeError  maximum allowable relative error
+     */
+    public static void assertRelativelyEquals(double expected,
+                                              double actual,
+                                              double relativeError) {
+        assertRelativelyEquals(null, expected, actual, relativeError);
+    }
+
+    /**
+     * Verifies that the relative error in actual vs. expected is less than or
+     * equal to relativeError.  If expected is infinite or NaN, actual must be
+     * the same (NaN or infinity of the same sign).
+     *
+     * @param msg  message to return with failure
+     * @param expected expected value
+     * @param actual  observed value
+     * @param relativeError  maximum allowable relative error
+     */
+    public static void assertRelativelyEquals(String msg,
+                                              double expected,
+                                              double actual,
+                                              double relativeError) {
+        if (Double.isNaN(expected)) {
+            Assert.assertTrue(msg, Double.isNaN(actual));
+        } else if (Double.isNaN(actual)) {
+            Assert.assertTrue(msg, Double.isNaN(expected));
+        } else if (Double.isInfinite(actual) || Double.isInfinite(expected)) {
+            Assert.assertEquals(expected, actual, relativeError);
+        } else if (expected == 0.0) {
+            Assert.assertEquals(msg, actual, expected, relativeError);
+        } else {
+            double absError = Math.abs(expected) * relativeError;
+            Assert.assertEquals(msg, expected, actual, absError);
+        }
+    }
+
+    /** verifies that two arrays are close (sup norm) */
+    public static void assertEquals(String msg,
+                                    double[] expected,
+                                    double[] observed,
+                                    double tolerance) {
+        StringBuilder out = new StringBuilder(msg);
+        if (expected.length != observed.length) {
+            out.append("\n Arrays not same length. \n");
+            out.append("expected has length ");
+            out.append(expected.length);
+            out.append(" observed length = ");
+            out.append(observed.length);
+            Assert.fail(out.toString());
+        }
+        boolean failure = false;
+        for (int i=0; i < expected.length; i++) {
+            if (!Precision.equalsIncludingNaN(expected[i], observed[i], tolerance)) {
+                failure = true;
+                out.append("\n Elements at index ");
+                out.append(i);
+                out.append(" differ. ");
+                out.append(" expected = ");
+                out.append(expected[i]);
+                out.append(" observed = ");
+                out.append(observed[i]);
+            }
+        }
+        if (failure) {
+            Assert.fail(out.toString());
+        }
+    }
+    
+    /**
+     * Asserts the null hypothesis for a ChiSquare test.  Fails and dumps arguments and test
+     * statistics if the null hypothesis can be rejected with confidence 100 * (1 - alpha)%
+     *
+     * @param valueLabels labels for the values of the discrete distribution under test
+     * @param expected expected counts
+     * @param observed observed counts
+     * @param alpha significance level of the test
+     */
+    public static void assertChiSquareAccept(String[] valueLabels,
+                                             double[] expected,
+                                             long[] observed,
+                                             double alpha) {
+        ChiSquareTest chiSquareTest = new ChiSquareTest();
+
+        // Fail if we can reject null hypothesis that distributions are the same
+        if (chiSquareTest.chiSquareTest(expected, observed, alpha)) {
+            StringBuilder msgBuffer = new StringBuilder();
+            DecimalFormat df = new DecimalFormat("#.##");
+            msgBuffer.append("Chisquare test failed");
+            msgBuffer.append(" p-value = ");
+            msgBuffer.append(chiSquareTest.chiSquareTest(expected, observed));
+            msgBuffer.append(" chisquare statistic = ");
+            msgBuffer.append(chiSquareTest.chiSquare(expected, observed));
+            msgBuffer.append(". \n");
+            msgBuffer.append("value\texpected\tobserved\n");
+            for (int i = 0; i < expected.length; i++) {
+                msgBuffer.append(valueLabels[i]);
+                msgBuffer.append("\t");
+                msgBuffer.append(df.format(expected[i]));
+                msgBuffer.append("\t\t");
+                msgBuffer.append(observed[i]);
+                msgBuffer.append("\n");
+            }
+            msgBuffer.append("This test can fail randomly due to sampling error with probability ");
+            msgBuffer.append(alpha);
+            msgBuffer.append(".");
+            Assert.fail(msgBuffer.toString());
+        }
+    }
+
+    /**
+     * Asserts the null hypothesis for a ChiSquare test.  Fails and dumps arguments and test
+     * statistics if the null hypothesis can be rejected with confidence 100 * (1 - alpha)%
+     *
+     * @param values integer values whose observed and expected counts are being compared
+     * @param expected expected counts
+     * @param observed observed counts
+     * @param alpha significance level of the test
+     */
+    public static void assertChiSquareAccept(int[] values,
+                                             double[] expected,
+                                             long[] observed,
+                                             double alpha) {
+        String[] labels = new String[values.length];
+        for (int i = 0; i < values.length; i++) {
+            labels[i] = Integer.toString(values[i]);
+        }
+        assertChiSquareAccept(labels, expected, observed, alpha);
+    }
+
+    /**
+     * Asserts the null hypothesis for a ChiSquare test.  Fails and dumps arguments and test
+     * statistics if the null hypothesis can be rejected with confidence 100 * (1 - alpha)%
+     *
+     * @param expected expected counts
+     * @param observed observed counts
+     * @param alpha significance level of the test
+     */
+    public static void assertChiSquareAccept(double[] expected,
+                                             long[] observed,
+                                             double alpha) {
+        String[] labels = new String[expected.length];
+        for (int i = 0; i < labels.length; i++) {
+            labels[i] = Integer.toString(i + 1);
+        }
+        assertChiSquareAccept(labels, expected, observed, alpha);
+    }
+
+    /**
+     * Computes the 25th, 50th and 75th percentiles of the given distribution and returns
+     * these values in an array.
+     */
+    public static double[] getDistributionQuartiles(ContinuousDistribution distribution) {
+        double[] quantiles = new double[3];
+        quantiles[0] = distribution.inverseCumulativeProbability(0.25d);
+        quantiles[1] = distribution.inverseCumulativeProbability(0.5d);
+        quantiles[2] = distribution.inverseCumulativeProbability(0.75d);
+        return quantiles;
+    }
+
+    /**
+     * Updates observed counts of values in quartiles.
+     * counts[0] <-> 1st quartile ... counts[3] <-> top quartile
+     */
+    public static void updateCounts(double value, long[] counts, double[] quartiles) {
+        if (value < quartiles[0]) {
+            counts[0]++;
+        } else if (value > quartiles[2]) {
+            counts[3]++;
+        } else if (value > quartiles[1]) {
+            counts[2]++;
+        } else {
+            counts[1]++;
+        }
+    }
+
+    /**
+     * Eliminates points with zero mass from densityPoints and densityValues parallel
+     * arrays.  Returns the number of positive mass points and collapses the arrays so
+     * that the first <returned value> elements of the input arrays represent the positive
+     * mass points.
+     */
+    public static int eliminateZeroMassPoints(int[] densityPoints, double[] densityValues) {
+        int positiveMassCount = 0;
+        for (int i = 0; i < densityValues.length; i++) {
+            if (densityValues[i] > 0) {
+                positiveMassCount++;
+            }
+        }
+        if (positiveMassCount < densityValues.length) {
+            int[] newPoints = new int[positiveMassCount];
+            double[] newValues = new double[positiveMassCount];
+            int j = 0;
+            for (int i = 0; i < densityValues.length; i++) {
+                if (densityValues[i] > 0) {
+                    newPoints[j] = densityPoints[i];
+                    newValues[j] = densityValues[i];
+                    j++;
+                }
+            }
+            System.arraycopy(newPoints,0,densityPoints,0,positiveMassCount);
+            System.arraycopy(newValues,0,densityValues,0,positiveMassCount);
+        }
+        return positiveMassCount;
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/TriangularDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/TriangularDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/TriangularDistributionTest.java
new file mode 100644
index 0000000..cddb70d
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/TriangularDistributionTest.java
@@ -0,0 +1,192 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for {@link TriangularDistribution}. See class javadoc for
+ * {@link ContinuousDistributionAbstractTest} for further details.
+ */
+public class TriangularDistributionTest extends ContinuousDistributionAbstractTest {
+
+    // --- Override tolerance -------------------------------------------------
+
+    @Override
+    public void setUp() {
+        super.setUp();
+        setTolerance(1e-4);
+    }
+
+    //--- Implementations for abstract methods --------------------------------
+
+    /**
+     * Creates the default triangular distribution instance to use in tests.
+     */
+    @Override
+    public TriangularDistribution makeDistribution() {
+        // Left side 5 wide, right side 10 wide.
+        return new TriangularDistribution(-3, 2, 12);
+    }
+
+    /**
+     * Creates the default cumulative probability distribution test input
+     * values.
+     */
+    @Override
+    public double[] makeCumulativeTestPoints() {
+        return new double[] {
+            -3.0001,                 // below lower limit
+            -3.0,                    // at lower limit
+            -2.0, -1.0, 0.0, 1.0,    // on lower side
+            2.0,                     // at mode
+            3.0, 4.0, 10.0, 11.0,    // on upper side
+            12.0,                    // at upper limit
+            12.0001                  // above upper limit
+        };
+    }
+
+    /**
+     * Creates the default cumulative probability density test expected values.
+     */
+    @Override
+    public double[] makeCumulativeTestValues() {
+        // Top at 2 / (b - a) = 2 / (12 - -3) = 2 / 15 = 7.5
+        // Area left  = 7.5 * 5  * 0.5 = 18.75 (1/3 of the total area)
+        // Area right = 7.5 * 10 * 0.5 = 37.5  (2/3 of the total area)
+        // Area total = 18.75 + 37.5 = 56.25
+        // Derivative left side = 7.5 / 5 = 1.5
+        // Derivative right side = -7.5 / 10 = -0.75
+        double third = 1 / 3.0;
+        double left = 18.75;
+        double area = 56.25;
+        return new double[] { 0.0,
+                              0.0,
+                              0.75 / area, 3 / area, 6.75 / area, 12 / area,
+                              third,
+                              (left + 7.125) / area, (left + 13.5) / area,
+                              (left + 36) / area, (left + 37.125) / area,
+                              1.0,
+                              1.0
+                            };
+    }
+
+    /**
+     * Creates the default inverse cumulative probability distribution test
+     * input values.
+     */
+    @Override
+    public double[] makeInverseCumulativeTestPoints() {
+        // Exclude the points outside the limits, as they have cumulative
+        // probability of zero and one, meaning the inverse returns the
+        // limits and not the points outside the limits.
+        double[] points = makeCumulativeTestValues();
+        double[] points2 = new double[points.length-2];
+        System.arraycopy(points, 1, points2, 0, points2.length);
+        return points2;
+        //return Arrays.copyOfRange(points, 1, points.length - 1);
+    }
+
+    /**
+     * Creates the default inverse cumulative probability density test expected
+     * values.
+     */
+    @Override
+    public double[] makeInverseCumulativeTestValues() {
+        // Exclude the points outside the limits, as they have cumulative
+        // probability of zero and one, meaning the inverse returns the
+        // limits and not the points outside the limits.
+        double[] points = makeCumulativeTestPoints();
+        double[] points2 = new double[points.length-2];
+        System.arraycopy(points, 1, points2, 0, points2.length);
+        return points2;
+        //return Arrays.copyOfRange(points, 1, points.length - 1);
+    }
+
+    /** Creates the default probability density test expected values. */
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] { 0,
+                              0,
+                              2 / 75.0, 4 / 75.0, 6 / 75.0, 8 / 75.0,
+                              10 / 75.0,
+                              9 / 75.0, 8 / 75.0, 2 / 75.0, 1 / 75.0,
+                              0,
+                              0
+                            };
+    }
+
+    //--- Additional test cases -----------------------------------------------
+
+    /** Test lower bound getter. */
+    @Test
+    public void testGetLowerBound() {
+        TriangularDistribution distribution = makeDistribution();
+        Assert.assertEquals(-3.0, distribution.getSupportLowerBound(), 0);
+    }
+
+    /** Test upper bound getter. */
+    @Test
+    public void testGetUpperBound() {
+        TriangularDistribution distribution = makeDistribution();
+        Assert.assertEquals(12.0, distribution.getSupportUpperBound(), 0);
+    }
+
+    /** Test pre-condition for equal lower/upper limit. */
+    @Test(expected=IllegalArgumentException.class)
+    public void testPreconditions1() {
+        new TriangularDistribution(0, 0, 0);
+    }
+
+    /** Test pre-condition for lower limit larger than upper limit. */
+    @Test(expected=IllegalArgumentException.class)
+    public void testPreconditions2() {
+        new TriangularDistribution(1, 1, 0);
+    }
+
+    /** Test pre-condition for mode larger than upper limit. */
+    @Test(expected=IllegalArgumentException.class)
+    public void testPreconditions3() {
+        new TriangularDistribution(0, 2, 1);
+    }
+
+    /** Test pre-condition for mode smaller than lower limit. */
+    @Test(expected=IllegalArgumentException.class)
+    public void testPreconditions4() {
+        new TriangularDistribution(2, 1, 3);
+    }
+
+    /** Test mean/variance. */
+    @Test
+    public void testMeanVariance() {
+        TriangularDistribution dist;
+
+        dist = new TriangularDistribution(0, 0.5, 1.0);
+        Assert.assertEquals(dist.getNumericalMean(), 0.5, 0);
+        Assert.assertEquals(dist.getNumericalVariance(), 1 / 24.0, 0);
+
+        dist = new TriangularDistribution(0, 1, 1);
+        Assert.assertEquals(dist.getNumericalMean(), 2 / 3.0, 0);
+        Assert.assertEquals(dist.getNumericalVariance(), 1 / 18.0, 0);
+
+        dist = new TriangularDistribution(-3, 2, 12);
+        Assert.assertEquals(dist.getNumericalMean(), 3 + (2 / 3.0), 0);
+        Assert.assertEquals(dist.getNumericalVariance(), 175 / 18.0, 0);
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/UniformContinuousDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/UniformContinuousDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/UniformContinuousDistributionTest.java
new file mode 100644
index 0000000..7f76f08
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/UniformContinuousDistributionTest.java
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for UniformContinuousDistribution. See class javadoc for
+ * {@link ContinuousDistributionAbstractTest} for further details.
+ */
+public class UniformContinuousDistributionTest extends ContinuousDistributionAbstractTest {
+
+    // --- Override tolerance -------------------------------------------------
+
+    @Override
+    public void setUp() {
+        super.setUp();
+        setTolerance(1e-4);
+    }
+
+    //--- Implementations for abstract methods --------------------------------
+
+    /** Creates the default uniform real distribution instance to use in tests. */
+    @Override
+    public UniformContinuousDistribution makeDistribution() {
+        return new UniformContinuousDistribution(-0.5, 1.25);
+    }
+
+    /** Creates the default cumulative probability distribution test input values */
+    @Override
+    public double[] makeCumulativeTestPoints() {
+        return new double[] {-0.5001, -0.5, -0.4999, -0.25, -0.0001, 0.0,
+                             0.0001, 0.25, 1.0, 1.2499, 1.25, 1.2501};
+    }
+
+    /** Creates the default cumulative probability density test expected values */
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] {0.0, 0.0, 0.0001, 0.25/1.75, 0.4999/1.75,
+                             0.5/1.75, 0.5001/1.75, 0.75/1.75, 1.5/1.75,
+                             1.7499/1.75, 1.0, 1.0};
+    }
+
+    /** Creates the default probability density test expected values */
+    @Override
+    public double[] makeDensityTestValues() {
+        double d = 1 / 1.75;
+        return new double[] {0, d, d, d, d, d, d, d, d, d, d, 0};
+    }
+
+    //--- Additional test cases -----------------------------------------------
+
+    /** Test lower bound getter. */
+    @Test
+    public void testGetLowerBound() {
+        UniformContinuousDistribution distribution = makeDistribution();
+        Assert.assertEquals(-0.5, distribution.getSupportLowerBound(), 0);
+    }
+
+    /** Test upper bound getter. */
+    @Test
+    public void testGetUpperBound() {
+        UniformContinuousDistribution distribution = makeDistribution();
+        Assert.assertEquals(1.25, distribution.getSupportUpperBound(), 0);
+    }
+
+    /** Test pre-condition for equal lower/upper bound. */
+    @Test(expected=IllegalArgumentException.class)
+    public void testPreconditions1() {
+        new UniformContinuousDistribution(0, 0);
+    }
+
+    /** Test pre-condition for lower bound larger than upper bound. */
+    @Test(expected=IllegalArgumentException.class)
+    public void testPreconditions2() {
+        new UniformContinuousDistribution(1, 0);
+    }
+
+    /** Test mean/variance. */
+    @Test
+    public void testMeanVariance() {
+        UniformContinuousDistribution dist;
+
+        dist = new UniformContinuousDistribution(0, 1);
+        Assert.assertEquals(dist.getNumericalMean(), 0.5, 0);
+        Assert.assertEquals(dist.getNumericalVariance(), 1/12.0, 0);
+
+        dist = new UniformContinuousDistribution(-1.5, 0.6);
+        Assert.assertEquals(dist.getNumericalMean(), -0.45, 0);
+        Assert.assertEquals(dist.getNumericalVariance(), 0.3675, 0);
+
+        dist = new UniformContinuousDistribution(-0.5, 1.25);
+        Assert.assertEquals(dist.getNumericalMean(), 0.375, 0);
+        Assert.assertEquals(dist.getNumericalVariance(), 0.2552083333333333, 0);
+    }
+
+    /**
+     * Check accuracy of analytical inverse CDF. Fails if a solver is used
+     * with the default accuracy.
+     */
+    @Test
+    public void testInverseCumulativeDistribution() {
+        UniformContinuousDistribution dist = new UniformContinuousDistribution(0, 1e-9);
+
+        Assert.assertEquals(2.5e-10, dist.inverseCumulativeProbability(0.25), 0);
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/UniformDiscreteDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/UniformDiscreteDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/UniformDiscreteDistributionTest.java
new file mode 100644
index 0000000..98305db
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/UniformDiscreteDistributionTest.java
@@ -0,0 +1,139 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.apache.commons.numbers.core.Precision;
+
+/**
+ * Test cases for UniformDiscreteDistribution. See class javadoc for
+ * {@link DiscreteDistributionAbstractTest} for further details.
+ */
+public class UniformDiscreteDistributionTest extends DiscreteDistributionAbstractTest {
+
+    // --- Override tolerance -------------------------------------------------
+
+    @Override
+    public void setUp() {
+        super.setUp();
+        setTolerance(1e-9);
+    }
+
+    //--- Implementations for abstract methods --------------------------------
+
+    /** Creates the default discrete distribution instance to use in tests. */
+    @Override
+    public DiscreteDistribution makeDistribution() {
+        return new UniformDiscreteDistribution(-3, 5);
+    }
+
+    /** Creates the default probability density test input values. */
+    @Override
+    public int[] makeDensityTestPoints() {
+        return new int[] {-4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6};
+    }
+
+    /** Creates the default probability density test expected values. */
+    @Override
+    public double[] makeDensityTestValues() {
+        double d = 1.0 / (5 - -3 + 1);
+        return new double[] {0, d, d, d, d, d, d, d, d, d, 0};
+    }
+
+    /** Creates the default cumulative probability density test input values. */
+    @Override
+    public int[] makeCumulativeTestPoints() {
+        return makeDensityTestPoints();
+    }
+
+    /** Creates the default cumulative probability density test expected values. */
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] {0, 1 / 9.0, 2 / 9.0, 3 / 9.0, 4 / 9.0, 5 / 9.0,
+                             6 / 9.0, 7 / 9.0, 8 / 9.0, 1, 1};
+    }
+
+    /** Creates the default inverse cumulative probability test input values */
+    @Override
+    public double[] makeInverseCumulativeTestPoints() {
+        return new double[] {0, 0.001, 0.010, 0.025, 0.050, 0.100, 0.200,
+                             0.5, 0.999, 0.990, 0.975, 0.950, 0.900, 1};
+    }
+
+    /** Creates the default inverse cumulative probability density test expected values */
+    @Override
+    public int[] makeInverseCumulativeTestValues() {
+        return new int[] {-3, -3, -3, -3, -3, -3, -2, 1, 5, 5, 5, 5, 5, 5};
+    }
+
+    //--- Additional test cases -----------------------------------------------
+
+    /** Test mean/variance. */
+    @Test
+    public void testMoments() {
+        UniformDiscreteDistribution dist;
+
+        dist = new UniformDiscreteDistribution(0, 5);
+        Assert.assertEquals(dist.getNumericalMean(), 2.5, 0);
+        Assert.assertEquals(dist.getNumericalVariance(), 35 / 12.0, 0);
+
+        dist = new UniformDiscreteDistribution(0, 1);
+        Assert.assertEquals(dist.getNumericalMean(), 0.5, 0);
+        Assert.assertEquals(dist.getNumericalVariance(), 3 / 12.0, 0);
+    }
+
+    // MATH-1141
+    @Test(expected=IllegalArgumentException.class)
+    public void testPreconditionUpperBoundInclusive1() {
+        new UniformDiscreteDistribution(1, 0);
+    }
+
+    // MATH-1141
+    @Test
+    public void testPreconditionUpperBoundInclusive2() {
+        // Degenerate case is allowed.
+        new UniformDiscreteDistribution(0, 0);
+    }
+
+    // MATH-1396
+    @Test
+    public void testLargeRangeSubtractionOverflow() {
+        final int hi = Integer.MAX_VALUE / 2 + 10;
+        UniformDiscreteDistribution dist = new UniformDiscreteDistribution(-hi, hi - 1);
+
+        final double tol = Math.ulp(1d);
+        Assert.assertEquals(0.5 / hi, dist.probability(123456), tol);
+        Assert.assertEquals(0.5, dist.cumulativeProbability(-1), tol);
+
+        Assert.assertTrue(Precision.equals((Math.pow(2d * hi, 2) - 1) / 12, dist.getNumericalVariance(), 1));
+    }
+
+    // MATH-1396
+    @Test
+    public void testLargeRangeAdditionOverflow() {
+        final int hi = Integer.MAX_VALUE / 2 + 10;
+        UniformDiscreteDistribution dist = new UniformDiscreteDistribution(hi - 1, hi + 1);
+
+        final double tol = Math.ulp(1d);
+        Assert.assertEquals(1d / 3d, dist.probability(hi), tol);
+        Assert.assertEquals(2d / 3d, dist.cumulativeProbability(hi), tol);
+
+        Assert.assertTrue(Precision.equals(hi, dist.getNumericalMean(), 1));
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/WeibullDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/WeibullDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/WeibullDistributionTest.java
new file mode 100644
index 0000000..c993fba
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/WeibullDistributionTest.java
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.gamma.LogGamma;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for WeibullDistribution.
+ * Extends ContinuousDistributionAbstractTest.  See class javadoc for
+ * ContinuousDistributionAbstractTest for details.
+ *
+ */
+public class WeibullDistributionTest extends ContinuousDistributionAbstractTest {
+
+    //-------------- Implementations for abstract methods -----------------------
+
+    /** Creates the default continuous distribution instance to use in tests. */
+    @Override
+    public WeibullDistribution makeDistribution() {
+        return new WeibullDistribution(1.2, 2.1);
+    }
+
+    /** Creates the default cumulative probability distribution test input values */
+    @Override
+    public double[] makeCumulativeTestPoints() {
+        // quantiles computed using R version 2.9.2
+        return new double[] {0.00664355180993, 0.0454328283309, 0.0981162737374, 0.176713524579, 0.321946865392,
+                             10.5115496887, 7.4976304671, 6.23205600701, 5.23968436955, 4.2079028257};
+    }
+
+    /** Creates the default cumulative probability density test expected values */
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] {0.001, 0.01, 0.025, 0.05, 0.1, 0.999, 0.990, 0.975, 0.950, 0.900};
+    }
+
+    /** Creates the default probability density test expected values */
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] {0.180535929306, 0.262801138133, 0.301905425199, 0.330899152971,
+                             0.353441418887, 0.000788590320203, 0.00737060094841, 0.0177576041516, 0.0343043442574, 0.065664589369};
+    }
+
+    //---------------------------- Additional test cases -------------------------
+
+    @Test
+    public void testInverseCumulativeProbabilitySmallPAccuracy() {
+        WeibullDistribution dist = new WeibullDistribution(2, 3);
+        double t = dist.inverseCumulativeProbability(1e-17);
+        // Analytically, answer is solution to 1e-17 = 1-exp(-(x/3)^2)
+        // x = sqrt(-9*log(1-1e-17))
+        // If we're not careful, answer will be 0. Answer below is computed with care in Octave:
+        Assert.assertEquals(9.48683298050514e-9, t, 1e-17);
+    }
+
+    @Test
+    public void testInverseCumulativeProbabilityExtremes() {
+        setInverseCumulativeTestPoints(new double[] {0.0, 1.0});
+        setInverseCumulativeTestValues(new double[] {0.0, Double.POSITIVE_INFINITY});
+        verifyInverseCumulativeProbabilities();
+    }
+
+    @Test
+    public void testAlpha() {
+        WeibullDistribution dist = new WeibullDistribution(1, 2);
+        Assert.assertEquals(1, dist.getShape(), 0);
+    }
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition1() {
+        new WeibullDistribution(0, 2);
+    }
+
+    @Test
+    public void testBeta() {
+        WeibullDistribution dist = new WeibullDistribution(1, 2);
+        Assert.assertEquals(2, dist.getScale(), 0);
+    }
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition2() {
+        new WeibullDistribution(1, 0);
+    }
+
+    @Test
+    public void testMoments() {
+        final double tol = 1e-9;
+        WeibullDistribution dist;
+
+        dist = new WeibullDistribution(2.5, 3.5);
+        // In R: 3.5*gamma(1+(1/2.5)) (or emperically: mean(rweibull(10000, 2.5, 3.5)))
+        Assert.assertEquals(dist.getNumericalMean(), 3.5 * Math.exp(LogGamma.value(1 + (1 / 2.5))), tol);
+        Assert.assertEquals(dist.getNumericalVariance(), (3.5 * 3.5) *
+                            Math.exp(LogGamma.value(1 + (2 / 2.5))) -
+                            (dist.getNumericalMean() * dist.getNumericalMean()), tol);
+
+        dist = new WeibullDistribution(10.4, 2.222);
+        Assert.assertEquals(dist.getNumericalMean(), 2.222 * Math.exp(LogGamma.value(1 + (1 / 10.4))), tol);
+        Assert.assertEquals(dist.getNumericalVariance(), (2.222 * 2.222) *
+                            Math.exp(LogGamma.value(1 + (2 / 10.4))) -
+                            (dist.getNumericalMean() * dist.getNumericalMean()), tol);
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ZipfDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ZipfDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ZipfDistributionTest.java
new file mode 100644
index 0000000..489a4bb
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ZipfDistributionTest.java
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.rng.simple.RandomSource;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * Test cases for {@link ZipfDistribution}.
+ * Extends DiscreteDistributionAbstractTest.
+ * See class javadoc for DiscreteDistributionAbstractTest for details.
+ */
+public class ZipfDistributionTest extends DiscreteDistributionAbstractTest {
+
+    /**
+     * Constructor to override default tolerance.
+     */
+    public ZipfDistributionTest() {
+        setTolerance(1e-12);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testPreconditions1() {
+        new ZipfDistribution(0, 1);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testPreconditions2() {
+        new ZipfDistribution(1, 0);
+    }
+
+    //-------------- Implementations for abstract methods -----------------------
+
+    /** Creates the default discrete distribution instance to use in tests. */
+    @Override
+    public DiscreteDistribution makeDistribution() {
+        return new ZipfDistribution(10, 1);
+    }
+
+    /** Creates the default probability density test input values */
+    @Override
+    public int[] makeDensityTestPoints() {
+        return new int[] {-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
+    }
+
+    /**
+     * Creates the default probability density test expected values.
+     * Reference values are from R, version 2.15.3 (VGAM package 0.9-0).
+     */
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] {0d, 0d, 0.341417152147, 0.170708576074, 0.113805717382, 0.0853542880369, 0.0682834304295,
+                             0.0569028586912, 0.0487738788782, 0.0426771440184, 0.0379352391275, 0.0341417152147, 0};
+    }
+
+    /**
+     * Creates the default logarithmic probability density test expected values.
+     * Reference values are from R, version 2.14.1.
+     */
+    @Override
+    public double[] makeLogDensityTestValues() {
+        return new double[] {Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY,
+                             -1.07465022926458, -1.76779740982453, -2.17326251793269, -2.46094459038447,
+                             -2.68408814169868, -2.86640969849264, -3.0205603783199, -3.15409177094442,
+                             -3.2718748066008, -3.37723532225863, Double.NEGATIVE_INFINITY};
+    }
+
+    /** Creates the default cumulative probability density test input values */
+    @Override
+    public int[] makeCumulativeTestPoints() {
+        return makeDensityTestPoints();
+    }
+
+    /** Creates the default cumulative probability density test expected values */
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] {0, 0, 0.341417152147, 0.512125728221, 0.625931445604, 0.71128573364,
+                             0.77956916407, 0.836472022761, 0.885245901639, 0.927923045658, 0.965858284785, 1d, 1d};
+        }
+
+    /** Creates the default inverse cumulative probability test input values */
+    @Override
+    public double[] makeInverseCumulativeTestPoints() {
+        return new double[] {0d, 0.001d, 0.010d, 0.025d, 0.050d, 0.3413d, 0.3415d, 0.999d,
+                             0.990d, 0.975d, 0.950d, 0.900d, 1d};
+        }
+
+    /** Creates the default inverse cumulative probability density test expected values */
+    @Override
+    public int[] makeInverseCumulativeTestValues() {
+        return new int[] {1, 1, 1, 1, 1, 1, 2, 10, 10, 10, 9, 8, 10};
+    }
+
+    @Test
+    public void testMoments() {
+        final double tol = 1e-9;
+        ZipfDistribution dist;
+
+        dist = new ZipfDistribution(2, 0.5);
+        Assert.assertEquals(dist.getNumericalMean(), Math.sqrt(2), tol);
+        Assert.assertEquals(dist.getNumericalVariance(), 0.24264068711928521, tol);
+    }
+
+
+    /**
+     * Test sampling for various number of points and exponents.
+     */
+    @Test
+    public void testSamplingExtended() {
+        int sampleSize = 1000;
+
+        int[] numPointsValues = {
+            2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 35, 40, 45, 50, 60, 70, 80, 90, 100
+        };
+        double[] exponentValues = {
+            1e-10, 1e-9, 1e-8, 1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 1e-2, 1e-1, 2e-1, 5e-1,
+            1. - 1e-9, 1.0, 1. + 1e-9, 1.1, 1.2, 1.3, 1.5, 1.6, 1.7, 1.8, 2.0,
+            2.5, 3.0, 4., 5., 6., 7., 8., 9., 10., 20., 30., 100., 150.
+        };
+
+        for (int numPoints : numPointsValues) {
+            for (double exponent : exponentValues) {
+                double weightSum = 0.;
+                double[] weights = new double[numPoints];
+                for (int i = numPoints; i>=1; i-=1) {
+                    weights[i-1] = Math.pow(i, -exponent);
+                    weightSum += weights[i-1];
+                }
+
+                // Use fixed seed, the test is expected to fail for more than 50% of all
+                // seeds because each test case can fail with probability 0.001, the chance
+                // that all test cases do not fail is 0.999^(32*22) = 0.49442874426
+                DiscreteDistribution.Sampler distribution =
+                    new ZipfDistribution(numPoints, exponent).createSampler(RandomSource.create(RandomSource.WELL_19937_C, 6));
+
+                double[] expectedCounts = new double[numPoints];
+                long[] observedCounts = new long[numPoints];
+                for (int i = 0; i < numPoints; i++) {
+                    expectedCounts[i] = sampleSize * (weights[i]/weightSum);
+                }
+                int[] sample = AbstractDiscreteDistribution.sample(sampleSize, distribution);
+                for (int s : sample) {
+                    observedCounts[s-1]++;
+                }
+                TestUtils.assertChiSquareAccept(expectedCounts, observedCounts, 0.001);
+            }
+        }
+    }
+}


[10/16] commons-statistics git commit: STATISTICS-2: Migrate "o.a.c.math4.distribution" from Commons Math.

Posted by er...@apache.org.
http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/AbstractDiscreteDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/AbstractDiscreteDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/AbstractDiscreteDistributionTest.java
new file mode 100644
index 0000000..bcf8e7c
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/AbstractDiscreteDistributionTest.java
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for AbstractDiscreteDistribution default implementations.
+ *
+ */
+public class AbstractDiscreteDistributionTest {
+    protected final DiceDistribution diceDistribution = new DiceDistribution();
+    protected final double p = diceDistribution.probability(1);
+
+    @Test
+    public void testInverseCumulativeProbabilityMethod()
+    {
+        double precision = 0.000000000000001;
+        Assert.assertEquals(1, diceDistribution.inverseCumulativeProbability(0));
+        Assert.assertEquals(1, diceDistribution.inverseCumulativeProbability((1d-Double.MIN_VALUE)/6d));
+        Assert.assertEquals(2, diceDistribution.inverseCumulativeProbability((1d+precision)/6d));
+        Assert.assertEquals(2, diceDistribution.inverseCumulativeProbability((2d-Double.MIN_VALUE)/6d));
+        Assert.assertEquals(3, diceDistribution.inverseCumulativeProbability((2d+precision)/6d));
+        Assert.assertEquals(3, diceDistribution.inverseCumulativeProbability((3d-Double.MIN_VALUE)/6d));
+        Assert.assertEquals(4, diceDistribution.inverseCumulativeProbability((3d+precision)/6d));
+        Assert.assertEquals(4, diceDistribution.inverseCumulativeProbability((4d-Double.MIN_VALUE)/6d));
+        Assert.assertEquals(5, diceDistribution.inverseCumulativeProbability((4d+precision)/6d));
+        Assert.assertEquals(5, diceDistribution.inverseCumulativeProbability((5d-precision)/6d));//Can't use Double.MIN
+        Assert.assertEquals(6, diceDistribution.inverseCumulativeProbability((5d+precision)/6d));
+        Assert.assertEquals(6, diceDistribution.inverseCumulativeProbability((6d-precision)/6d));//Can't use Double.MIN
+        Assert.assertEquals(6, diceDistribution.inverseCumulativeProbability((6d)/6d));
+    }
+
+    @Test
+    public void testCumulativeProbabilitiesSingleArguments() {
+        for (int i = 1; i < 7; i++) {
+            Assert.assertEquals(p * i,
+                    diceDistribution.cumulativeProbability(i), Double.MIN_VALUE);
+        }
+        Assert.assertEquals(0.0,
+                diceDistribution.cumulativeProbability(0), Double.MIN_VALUE);
+        Assert.assertEquals(1.0,
+                diceDistribution.cumulativeProbability(7), Double.MIN_VALUE);
+    }
+
+    @Test
+    public void testProbabilitiesRangeArguments() {
+        int lower = 0;
+        int upper = 6;
+        for (int i = 0; i < 2; i++) {
+            // cum(0,6) = p(0 < X <= 6) = 1, cum(1,5) = 4/6, cum(2,4) = 2/6
+            Assert.assertEquals(1 - p * 2 * i,
+                    diceDistribution.probability(lower, upper), 1E-12);
+            lower++;
+            upper--;
+        }
+        for (int i = 0; i < 6; i++) {
+            Assert.assertEquals(p, diceDistribution.probability(i, i+1), 1E-12);
+        }
+    }
+
+    /**
+     * Simple distribution modeling a 6-sided die
+     */
+    class DiceDistribution extends AbstractDiscreteDistribution {
+        public static final long serialVersionUID = 23734213;
+
+        private final double p = 1d/6d;
+
+        @Override
+        public double probability(int x) {
+            if (x < 1 || x > 6) {
+                return 0;
+            } else {
+                return p;
+            }
+        }
+
+        @Override
+        public double cumulativeProbability(int x) {
+            if (x < 1) {
+                return 0;
+            } else if (x >= 6) {
+                return 1;
+            } else {
+                return p * x;
+            }
+        }
+
+        @Override
+        public double getNumericalMean() {
+            return 3.5;
+        }
+
+        @Override
+        public double getNumericalVariance() {
+            return 70/24;  // E(X^2) - E(X)^2
+        }
+
+        @Override
+        public int getSupportLowerBound() {
+            return 1;
+        }
+
+        @Override
+        public int getSupportUpperBound() {
+            return 6;
+        }
+
+        @Override
+        public final boolean isSupportConnected() {
+            return true;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/BetaDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/BetaDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/BetaDistributionTest.java
new file mode 100644
index 0000000..f37961c
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/BetaDistributionTest.java
@@ -0,0 +1,381 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import java.util.Arrays;
+
+import org.apache.commons.rng.simple.RandomSource;
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.math3.stat.StatUtils;
+import org.apache.commons.math3.stat.inference.GTest;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class BetaDistributionTest {
+
+    static final double[] alphaBetas = {0.1, 1, 10, 100, 1000};
+    static final double epsilon = StatUtils.min(alphaBetas);
+
+    @Test
+    public void testCumulative() {
+        double[] x = new double[]{-0.1, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1};
+        // all test data computed using R 2.5
+        checkCumulative(0.1, 0.1,
+                        x, new double[]{
+                            0.0000000000, 0.0000000000, 0.4063850939, 0.4397091902, 0.4628041861,
+                            0.4821200456, 0.5000000000, 0.5178799544, 0.5371958139, 0.5602908098,
+                            0.5936149061, 1.0000000000, 1.0000000000});
+        checkCumulative(0.1, 0.5,
+                        x, new double[]{
+                            0.0000000000, 0.0000000000, 0.7048336221, 0.7593042194, 0.7951765304,
+                            0.8234948385, 0.8480017124, 0.8706034370, 0.8926585878, 0.9156406404,
+                            0.9423662883, 1.0000000000, 1.0000000000});
+        checkCumulative(0.1, 1.0,
+                        x, new double[]{
+                            0.0000000000, 0.0000000000, 0.7943282347, 0.8513399225, 0.8865681506,
+                            0.9124435366, 0.9330329915, 0.9502002165, 0.9649610951, 0.9779327685,
+                            0.9895192582, 1.0000000000, 1.0000000000});
+        checkCumulative(0.1, 2.0,
+                        x, new double[]{
+                            0.0000000000, 0.0000000000, 0.8658177758, 0.9194471163, 0.9486279211,
+                            0.9671901487, 0.9796846411, 0.9882082252, 0.9939099280, 0.9974914239,
+                            0.9994144508, 1.0000000000, 1.0000000000});
+        checkCumulative(0.1, 4.0,
+                        x, new double[]{
+                            0.0000000000, 0.0000000000, 0.9234991121, 0.9661958941, 0.9842285085,
+                            0.9928444112, 0.9970040660, 0.9989112804, 0.9996895625, 0.9999440793,
+                            0.9999967829, 1.0000000000, 1.0000000000});
+        checkCumulative(0.5, 0.1,
+                        x, new double[]{
+                            0.00000000000, 0.00000000000, 0.05763371168, 0.08435935962,
+                            0.10734141216, 0.12939656302, 0.15199828760, 0.17650516146,
+                            0.20482346963, 0.24069578055, 0.29516637795, 1.00000000000, 1.00000000000});
+
+        checkCumulative(0.5, 0.5,
+                        x, new double[]{
+                            0.0000000000, 0.0000000000, 0.2048327647, 0.2951672353, 0.3690101196,
+                            0.4359057832, 0.5000000000, 0.5640942168, 0.6309898804, 0.7048327647,
+                            0.7951672353, 1.0000000000, 1.0000000000});
+        checkCumulative(0.5, 1.0,
+                        x, new double[]{
+                            0.0000000000, 0.0000000000, 0.3162277660, 0.4472135955, 0.5477225575,
+                            0.6324555320, 0.7071067812, 0.7745966692, 0.8366600265, 0.8944271910,
+                            0.9486832981, 1.0000000000, 1.0000000000});
+        checkCumulative(0.5, 2.0,
+                        x, new double[]{
+                            0.0000000000, 0.0000000000, 0.4585302607, 0.6260990337, 0.7394254526,
+                            0.8221921916, 0.8838834765, 0.9295160031, 0.9621590305, 0.9838699101,
+                            0.9961174630, 1.0000000000, 1.0000000000});
+        checkCumulative(0.5, 4.0,
+                        x, new double[]{
+                            0.0000000000, 0.0000000000, 0.6266250826, 0.8049844719, 0.8987784842,
+                            0.9502644369, 0.9777960959, 0.9914837366, 0.9974556254, 0.9995223859,
+                            0.9999714889, 1.0000000000, 1.0000000000});
+        checkCumulative(1.0, 0.1,
+                        x, new double[]{
+                            0.00000000000, 0.00000000000, 0.01048074179, 0.02206723146,
+                            0.03503890488, 0.04979978349, 0.06696700846, 0.08755646344,
+                            0.11343184943, 0.14866007748, 0.20567176528, 1.00000000000, 1.00000000000});
+        checkCumulative(1.0, 0.5,
+                        x, new double[]{
+                            0.00000000000, 0.00000000000, 0.05131670195, 0.10557280900,
+                            0.16333997347, 0.22540333076, 0.29289321881, 0.36754446797,
+                            0.45227744249, 0.55278640450, 0.68377223398, 1.00000000000, 1.00000000000});
+        checkCumulative(1, 1,
+                        x, new double[]{
+                            0.0, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.0});
+        checkCumulative(1, 2,
+                        x, new double[]{
+                            0.00, 0.00, 0.19, 0.36, 0.51, 0.64, 0.75, 0.84, 0.91, 0.96, 0.99, 1.00, 1.00});
+        checkCumulative(1, 4,
+                        x, new double[]{
+                            0.0000, 0.0000, 0.3439, 0.5904, 0.7599, 0.8704, 0.9375, 0.9744, 0.9919,
+                            0.9984, 0.9999, 1.0000, 1.0000});
+        checkCumulative(2.0, 0.1,
+                        x, new double[]{
+                            0.0000000000000, 0.0000000000000, 0.0005855492117, 0.0025085760862,
+                            0.0060900720266, 0.0117917748341, 0.0203153588864, 0.0328098512512,
+                            0.0513720788952, 0.0805528836776, 0.1341822241505, 1.0000000000000, 1.0000000000000});
+        checkCumulative(2, 1,
+                        x, new double[]{
+                            0.00, 0.00, 0.01, 0.04, 0.09, 0.16, 0.25, 0.36, 0.49, 0.64, 0.81, 1.00, 1.00});
+        checkCumulative(2.0, 0.5,
+                        x, new double[]{
+                            0.000000000000, 0.000000000000, 0.003882537047, 0.016130089900,
+                            0.037840969486, 0.070483996910, 0.116116523517, 0.177807808356,
+                            0.260574547368, 0.373900966300, 0.541469739276, 1.000000000000, 1.000000000000});
+        checkCumulative(2, 2,
+                        x, new double[]{
+                            0.000, 0.000, 0.028, 0.104, 0.216, 0.352, 0.500, 0.648, 0.784, 0.896, 0.972, 1.000, 1.000});
+        checkCumulative(2, 4,
+                        x, new double[]{
+                            0.00000, 0.00000, 0.08146, 0.26272, 0.47178, 0.66304, 0.81250, 0.91296,
+                            0.96922, 0.99328, 0.99954, 1.00000, 1.00000});
+        checkCumulative(4.0, 0.1,
+                        x, new double[]{
+                            0.000000000e+00, 0.000000000e+00, 3.217128269e-06, 5.592070271e-05,
+                            3.104375474e-04, 1.088719595e-03, 2.995933981e-03, 7.155588777e-03,
+                            1.577149153e-02, 3.380410585e-02, 7.650088789e-02, 1.000000000e+00, 1.000000000e+00});
+        checkCumulative(4.0, 0.5,
+                        x, new double[]{
+                            0.000000000e+00, 0.000000000e+00, 2.851114863e-05, 4.776140576e-04,
+                            2.544374616e-03, 8.516263371e-03, 2.220390414e-02, 4.973556312e-02,
+                            1.012215158e-01, 1.950155281e-01, 3.733749174e-01, 1.000000000e+00, 1.000000000e+00});
+        checkCumulative(4, 1,
+                        x, new double[]{
+                            0.0000, 0.0000, 0.0001, 0.0016, 0.0081, 0.0256, 0.0625, 0.1296, 0.2401,
+                            0.4096, 0.6561, 1.0000, 1.0000});
+        checkCumulative(4, 2,
+                        x, new double[]{
+                            0.00000, 0.00000, 0.00046, 0.00672, 0.03078, 0.08704, 0.18750, 0.33696,
+                            0.52822, 0.73728, 0.91854, 1.00000, 1.00000});
+        checkCumulative(4, 4,
+                        x, new double[]{
+                            0.000000, 0.000000, 0.002728, 0.033344, 0.126036, 0.289792, 0.500000,
+                            0.710208, 0.873964, 0.966656, 0.997272, 1.000000, 1.000000});
+    }
+
+    private void checkCumulative(double alpha, double beta, double[] x, double[] cumes) {
+        BetaDistribution d = new BetaDistribution(alpha, beta);
+        for (int i = 0; i < x.length; i++) {
+            Assert.assertEquals(cumes[i], d.cumulativeProbability(x[i]), 1e-8);
+        }
+
+        for (int i = 1; i < x.length - 1; i++) {
+            Assert.assertEquals(x[i], d.inverseCumulativeProbability(cumes[i]), 1e-5);
+        }
+    }
+
+    @Test
+    public void testDensity() {
+        double[] x = new double[]{1e-6, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9};
+        checkDensity(0.1, 0.1,
+                     x, new double[]{
+                         12741.2357380649, 0.4429889586665234, 2.639378715e-01, 2.066393611e-01,
+                         1.832401831e-01, 1.766302780e-01, 1.832404579e-01, 2.066400696e-01,
+                         2.639396531e-01, 4.429925026e-01});
+        checkDensity(0.1, 0.5,
+                     x, new double[]{
+                         2.218377102e+04, 7.394524202e-01, 4.203020268e-01, 3.119435533e-01,
+                         2.600787829e-01, 2.330648626e-01, 2.211408259e-01, 2.222728708e-01,
+                         2.414013907e-01, 3.070567405e-01});
+        checkDensity(0.1, 1.0,
+                     x, new double[]{
+                         2.511886432e+04, 7.943210858e-01, 4.256680458e-01, 2.955218303e-01,
+                         2.281103709e-01, 1.866062624e-01, 1.583664652e-01, 1.378514078e-01,
+                         1.222414585e-01, 1.099464743e-01});
+        checkDensity(0.1, 2.0,
+                     x, new double[]{
+                         2.763072312e+04, 7.863770012e-01, 3.745874120e-01, 2.275514842e-01,
+                         1.505525939e-01, 1.026332391e-01, 6.968107049e-02, 4.549081293e-02,
+                         2.689298641e-02, 1.209399123e-02});
+        checkDensity(0.1, 4.0,
+                     x, new double[]{
+                         2.997927462e+04, 6.911058917e-01, 2.601128486e-01, 1.209774010e-01,
+                         5.880564714e-02, 2.783915474e-02, 1.209657335e-02, 4.442148268e-03,
+                         1.167143939e-03, 1.312171805e-04});
+        checkDensity(0.5, 0.1,
+                     x, new double[]{
+                         88.3152184726, 0.3070542841, 0.2414007269, 0.2222727015,
+                         0.2211409364, 0.2330652355, 0.2600795198, 0.3119449793,
+                         0.4203052841, 0.7394649088});
+        checkDensity(0.5, 0.5,
+                     x, new double[]{
+                         318.3100453389, 1.0610282383, 0.7957732234, 0.6946084565,
+                         0.6497470636, 0.6366197724, 0.6497476051, 0.6946097796,
+                         0.7957762075, 1.0610376697});
+        checkDensity(0.5, 1.0,
+                     x, new double[]{
+                         500.0000000000, 1.5811309244, 1.1180311937, 0.9128694077,
+                         0.7905684268, 0.7071060741, 0.6454966865, 0.5976138778,
+                         0.5590166450, 0.5270459839});
+        checkDensity(0.5, 2.0,
+                     x, new double[]{
+                         749.99925000000, 2.134537420613655, 1.34163575536, 0.95851150881,
+                         0.71151039830, 0.53032849490, 0.38729704363, 0.26892534859,
+                         0.16770415497, 0.07905610701});
+        checkDensity(0.5, 4.0,
+                     x, new double[]{
+                         1.093746719e+03, 2.52142232809988, 1.252190241e+00, 6.849343920e-01,
+                         3.735417140e-01, 1.933481570e-01, 9.036885833e-02, 3.529621669e-02,
+                         9.782644546e-03, 1.152878503e-03});
+        checkDensity(1.0, 0.1,
+                     x, new double[]{
+                         0.1000000900, 0.1099466942, 0.1222417336, 0.1378517623, 0.1583669403,
+                         0.1866069342, 0.2281113974, 0.2955236034, 0.4256718768,
+                         0.7943353837});
+        checkDensity(1.0, 0.5,
+                     x, new double[]{
+                         0.5000002500, 0.5270465695, 0.5590173438, 0.5976147315, 0.6454977623,
+                         0.7071074883, 0.7905704033, 0.9128724506,
+                         1.1180367838, 1.5811467358});
+        checkDensity(1, 1,
+                     x, new double[]{
+                         1, 1, 1,
+                         1, 1, 1, 1,
+                         1, 1, 1});
+        checkDensity(1, 2,
+                     x, new double[]{
+                         1.999998, 1.799998, 1.599998, 1.399998, 1.199998, 0.999998, 0.799998,
+                         0.599998, 0.399998,
+                         0.199998});
+        checkDensity(1, 4,
+                     x, new double[]{
+                         3.999988000012, 2.915990280011, 2.047992320010, 1.371994120008,
+                         0.863995680007, 0.499997000006, 0.255998080005, 0.107998920004,
+                         0.031999520002, 0.003999880001});
+        checkDensity(2.0, 0.1,
+                     x, new double[]{
+                         1.100000990e-07, 1.209425730e-02, 2.689331586e-02, 4.549123318e-02,
+                         6.968162794e-02, 1.026340191e-01, 1.505537732e-01, 2.275534997e-01,
+                         3.745917198e-01, 7.863929037e-01});
+        checkDensity(2.0, 0.5,
+                     x, new double[]{
+                         7.500003750e-07, 7.905777599e-02, 1.677060417e-01, 2.689275256e-01,
+                         3.872996256e-01, 5.303316769e-01, 7.115145488e-01, 9.585174425e-01,
+                         1.341645818e+00, 2.134537420613655});
+        checkDensity(2, 1,
+                     x, new double[]{
+                         0.000002, 0.200002, 0.400002, 0.600002, 0.800002, 1.000002, 1.200002,
+                         1.400002, 1.600002,
+                         1.800002});
+        checkDensity(2, 2,
+                     x, new double[]{
+                         5.9999940e-06, 5.4000480e-01, 9.6000360e-01, 1.2600024e+00,
+                         1.4400012e+00, 1.5000000e+00, 1.4399988e+00, 1.2599976e+00,
+                         9.5999640e-01, 5.3999520e-01});
+        checkDensity(2, 4,
+                     x, new double[]{
+                         0.00001999994, 1.45800971996, 2.04800255997, 2.05799803998,
+                         1.72799567999, 1.24999500000, 0.76799552000, 0.37799676001,
+                         0.12799824001, 0.01799948000});
+        checkDensity(4.0, 0.1,
+                     x, new double[]{
+                         1.193501074e-19, 1.312253162e-04, 1.167181580e-03, 4.442248535e-03,
+                         1.209679109e-02, 2.783958903e-02, 5.880649983e-02, 1.209791638e-01,
+                         2.601171405e-01, 6.911229392e-01});
+        checkDensity(4.0, 0.5,
+                     x, new double[]{
+                         1.093750547e-18, 1.152948959e-03, 9.782950259e-03, 3.529697305e-02,
+                         9.037036449e-02, 1.933508639e-01, 3.735463833e-01, 6.849425461e-01,
+                         1.252205894e+00, 2.52142232809988});
+        checkDensity(4, 1,
+                     x, new double[]{
+                         4.000000000e-18, 4.000120001e-03, 3.200048000e-02, 1.080010800e-01,
+                         2.560019200e-01, 5.000030000e-01, 8.640043200e-01, 1.372005880e+00,
+                         2.048007680e+00, 2.916009720e+00});
+        checkDensity(4, 2,
+                     x, new double[]{
+                         1.999998000e-17, 1.800052000e-02, 1.280017600e-01, 3.780032400e-01,
+                         7.680044800e-01, 1.250005000e+00, 1.728004320e+00, 2.058001960e+00,
+                         2.047997440e+00, 1.457990280e+00});
+        checkDensity(4, 4,
+                     x, new double[]{
+                         1.399995800e-16, 1.020627216e-01, 5.734464512e-01, 1.296547409e+00,
+                         1.935364838e+00, 2.187500000e+00, 1.935355162e+00, 1.296532591e+00,
+                         5.734335488e-01, 1.020572784e-01});
+    }
+
+    @SuppressWarnings("boxing")
+    private void checkDensity(double alpha, double beta, double[] x, double[] expected) {
+        BetaDistribution d = new BetaDistribution(alpha, beta);
+        for (int i = 0; i < x.length; i++) {
+            Assert.assertEquals(String.format("density at x=%.1f for alpha=%.1f, beta=%.1f", x[i], alpha, beta), expected[i], d.density(x[i]), 1e-5);
+        }
+    }
+
+    @Test
+    public void testMoments() {
+        final double tol = 1e-9;
+        BetaDistribution dist;
+
+        dist = new BetaDistribution(1, 1);
+        Assert.assertEquals(dist.getNumericalMean(), 0.5, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), 1.0 / 12.0, tol);
+
+        dist = new BetaDistribution(2, 5);
+        Assert.assertEquals(dist.getNumericalMean(), 2.0 / 7.0, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), 10.0 / (49.0 * 8.0), tol);
+    }
+
+    @Test
+    public void testMomentsSampling() {
+        final UniformRandomProvider rng = RandomSource.create(RandomSource.WELL_1024_A,
+                                                              123456789L);
+        final int numSamples = 1000;
+        for (final double alpha : alphaBetas) {
+            for (final double beta : alphaBetas) {
+                final BetaDistribution betaDistribution = new BetaDistribution(alpha, beta);
+                final double[] observed = AbstractContinuousDistribution.sample(numSamples,
+                        betaDistribution.createSampler(rng));
+                Arrays.sort(observed);
+
+                final String distribution = String.format("Beta(%.2f, %.2f)", alpha, beta);
+                Assert.assertEquals(String.format("E[%s]", distribution),
+                                    betaDistribution.getNumericalMean(),
+                                    StatUtils.mean(observed), epsilon);
+                Assert.assertEquals(String.format("Var[%s]", distribution),
+                                    betaDistribution.getNumericalVariance(),
+                                    StatUtils.variance(observed), epsilon);
+            }
+        }
+    }
+
+    @Test
+    public void testGoodnessOfFit() {
+        final UniformRandomProvider rng = RandomSource.create(RandomSource.WELL_19937_A,
+                                                              123456789L);
+
+        final int numSamples = 1000;
+        final double level = 0.01;
+        for (final double alpha : alphaBetas) {
+            for (final double beta : alphaBetas) {
+                final BetaDistribution betaDistribution = new BetaDistribution(alpha, beta);
+
+                final ContinuousDistribution.Sampler sampler = betaDistribution.createSampler(rng);
+                final double[] observed = AbstractContinuousDistribution.sample(numSamples, sampler);
+
+                final double gT = gTest(betaDistribution, observed);
+                Assert.assertFalse("G goodness-of-fit (" + gT + ") test rejected null at alpha = " + level,
+                                   gT < level);
+            }
+        }
+    }
+
+    private double gTest(final ContinuousDistribution expectedDistribution, final double[] values) {
+        final int numBins = values.length / 30;
+        final double[] breaks = new double[numBins];
+        for (int b = 0; b < breaks.length; b++) {
+            breaks[b] = expectedDistribution.inverseCumulativeProbability((double) b / numBins);
+        }
+
+        final long[] observed = new long[numBins];
+        for (final double value : values) {
+            int b = 0;
+            do {
+                b++;
+            } while (b < numBins && value >= breaks[b]);
+
+            observed[b - 1]++;
+        }
+
+        final double[] expected = new double[numBins];
+        Arrays.fill(expected, (double) values.length / numBins);
+
+        return new GTest().gTest(expected, observed);
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/BinomialDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/BinomialDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/BinomialDistributionTest.java
new file mode 100644
index 0000000..9d5a97e
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/BinomialDistributionTest.java
@@ -0,0 +1,173 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
+ * or agreed to in writing, software distributed under the License is
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for BinomialDistribution. Extends DiscreteDistributionAbstractTest.
+ * See class javadoc for DiscreteDistributionAbstractTest for details.
+ *
+ */
+public class BinomialDistributionTest extends DiscreteDistributionAbstractTest {
+
+    /**
+     * Constructor to override default tolerance.
+     */
+    public BinomialDistributionTest() {
+        setTolerance(1e-12);
+    }
+
+    // -------------- Implementations for abstract methods
+    // -----------------------
+
+    /** Creates the default discrete distribution instance to use in tests. */
+    @Override
+    public DiscreteDistribution makeDistribution() {
+        return new BinomialDistribution(10, 0.70);
+    }
+
+    /** Creates the default probability density test input values. */
+    @Override
+    public int[] makeDensityTestPoints() {
+        return new int[] { -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
+    }
+
+    /**
+     * Creates the default probability density test expected values.
+     * Reference values are from R, version 2.15.3.
+     */
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] { 0d, 0.0000059049d, 0.000137781d, 0.0014467005,
+                              0.009001692, 0.036756909, 0.1029193452, 0.200120949, 0.266827932,
+                              0.2334744405, 0.121060821, 0.0282475249, 0d };
+    }
+
+    /** Creates the default cumulative probability density test input values */
+    @Override
+    public int[] makeCumulativeTestPoints() {
+        return makeDensityTestPoints();
+    }
+
+    /**
+     * Creates the default cumulative probability density test expected values.
+     * Reference values are from R, version 2.15.3.
+     */
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] { 0d, 5.9049e-06, 0.0001436859, 0.0015903864, 0.0105920784,  0.0473489874,
+                              0.1502683326, 0.3503892816, 0.6172172136, 0.8506916541, 0.9717524751, 1d, 1d };
+    }
+
+    /** Creates the default inverse cumulative probability test input values */
+    @Override
+    public double[] makeInverseCumulativeTestPoints() {
+        return new double[] { 0, 0.001d, 0.010d, 0.025d, 0.050d, 0.100d,
+                              0.999d, 0.990d, 0.975d, 0.950d, 0.900d, 1 };
+    }
+
+    /**
+     * Creates the default inverse cumulative probability density test expected
+     * values
+     */
+    @Override
+    public int[] makeInverseCumulativeTestValues() {
+        return new int[] { 0, 2, 3, 4, 5, 5, 10, 10, 10, 9, 9, 10 };
+    }
+
+    // ----------------- Additional test cases ---------------------------------
+
+    /** Test degenerate case p = 0 */
+    @Test
+    public void testDegenerate0() {
+        BinomialDistribution dist = new BinomialDistribution(5, 0.0d);
+        setDistribution(dist);
+        setCumulativeTestPoints(new int[] { -1, 0, 1, 5, 10 });
+        setCumulativeTestValues(new double[] { 0d, 1d, 1d, 1d, 1d });
+        setDensityTestPoints(new int[] { -1, 0, 1, 10, 11 });
+        setDensityTestValues(new double[] { 0d, 1d, 0d, 0d, 0d });
+        setInverseCumulativeTestPoints(new double[] { 0.1d, 0.5d });
+        setInverseCumulativeTestValues(new int[] { 0, 0 });
+        verifyDensities();
+        verifyCumulativeProbabilities();
+        verifyInverseCumulativeProbabilities();
+        Assert.assertEquals(dist.getSupportLowerBound(), 0);
+        Assert.assertEquals(dist.getSupportUpperBound(), 0);
+    }
+
+    /** Test degenerate case p = 1 */
+    @Test
+    public void testDegenerate1() {
+        BinomialDistribution dist = new BinomialDistribution(5, 1.0d);
+        setDistribution(dist);
+        setCumulativeTestPoints(new int[] { -1, 0, 1, 2, 5, 10 });
+        setCumulativeTestValues(new double[] { 0d, 0d, 0d, 0d, 1d, 1d });
+        setDensityTestPoints(new int[] { -1, 0, 1, 2, 5, 10 });
+        setDensityTestValues(new double[] { 0d, 0d, 0d, 0d, 1d, 0d });
+        setInverseCumulativeTestPoints(new double[] { 0.1d, 0.5d });
+        setInverseCumulativeTestValues(new int[] { 5, 5 });
+        verifyDensities();
+        verifyCumulativeProbabilities();
+        verifyInverseCumulativeProbabilities();
+        Assert.assertEquals(dist.getSupportLowerBound(), 5);
+        Assert.assertEquals(dist.getSupportUpperBound(), 5);
+    }
+
+    /** Test degenerate case n = 0 */
+    @Test
+    public void testDegenerate2() {
+        BinomialDistribution dist = new BinomialDistribution(0, 0.01d);
+        setDistribution(dist);
+        setCumulativeTestPoints(new int[] { -1, 0, 1, 2, 5, 10 });
+        setCumulativeTestValues(new double[] { 0d, 1d, 1d, 1d, 1d, 1d });
+        setDensityTestPoints(new int[] { -1, 0, 1, 2, 5, 10 });
+        setDensityTestValues(new double[] { 0d, 1d, 0d, 0d, 0d, 0d });
+        setInverseCumulativeTestPoints(new double[] { 0.1d, 0.5d });
+        setInverseCumulativeTestValues(new int[] { 0, 0 });
+        verifyDensities();
+        verifyCumulativeProbabilities();
+        verifyInverseCumulativeProbabilities();
+        Assert.assertEquals(dist.getSupportLowerBound(), 0);
+        Assert.assertEquals(dist.getSupportUpperBound(), 0);
+    }
+
+    @Test
+    public void testMoments() {
+        final double tol = 1e-9;
+        BinomialDistribution dist;
+
+        dist = new BinomialDistribution(10, 0.5);
+        Assert.assertEquals(dist.getNumericalMean(), 10d * 0.5d, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), 10d * 0.5d * 0.5d, tol);
+
+        dist = new BinomialDistribution(30, 0.3);
+        Assert.assertEquals(dist.getNumericalMean(), 30d * 0.3d, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), 30d * 0.3d * (1d - 0.3d), tol);
+    }
+
+    @Test
+    public void testMath718() {
+        // for large trials the evaluation of ContinuedFraction was inaccurate
+        // do a sweep over several large trials to test if the current implementation is
+        // numerically stable.
+
+        for (int trials = 500000; trials < 20000000; trials += 100000) {
+            BinomialDistribution dist = new BinomialDistribution(trials, 0.5);
+            int p = dist.inverseCumulativeProbability(0.5);
+            Assert.assertEquals(trials / 2, p);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/CauchyDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/CauchyDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/CauchyDistributionTest.java
new file mode 100644
index 0000000..4407976
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/CauchyDistributionTest.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for CauchyDistribution.
+ * Extends ContinuousDistributionAbstractTest.  See class javadoc for
+ * ContinuousDistributionAbstractTest for details.
+ *
+ */
+public class CauchyDistributionTest extends ContinuousDistributionAbstractTest {
+
+    // --------------------- Override tolerance  --------------
+    protected double defaultTolerance = 1e-7;
+    @Override
+    public void setUp() {
+        super.setUp();
+        setTolerance(defaultTolerance);
+    }
+
+    //-------------- Implementations for abstract methods -----------------------
+
+    /** Creates the default continuous distribution instance to use in tests. */
+    @Override
+    public CauchyDistribution makeDistribution() {
+        return new CauchyDistribution(1.2, 2.1);
+    }
+
+    /** Creates the default cumulative probability distribution test input values */
+    @Override
+    public double[] makeCumulativeTestPoints() {
+        // quantiles computed using R 2.9.2
+        return new double[] {-667.24856187, -65.6230835029, -25.4830299460, -12.0588781808,
+                             -5.26313542807, 669.64856187, 68.0230835029, 27.8830299460, 14.4588781808, 7.66313542807};
+    }
+
+    /** Creates the default cumulative probability density test expected values */
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] {0.001, 0.01, 0.025, 0.05, 0.1, 0.999,
+                             0.990, 0.975, 0.950, 0.900};
+    }
+
+    /** Creates the default probability density test expected values */
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] {1.49599158008e-06, 0.000149550440335, 0.000933076881878, 0.00370933207799, 0.0144742330437,
+                             1.49599158008e-06, 0.000149550440335, 0.000933076881878, 0.00370933207799, 0.0144742330437};
+    }
+
+    //---------------------------- Additional test cases -------------------------
+
+    @Test
+    public void testInverseCumulativeProbabilityExtremes() {
+        setInverseCumulativeTestPoints(new double[] {0.0, 1.0});
+        setInverseCumulativeTestValues(new double[] {Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY});
+        verifyInverseCumulativeProbabilities();
+    }
+
+    @Test
+    public void testMedian() {
+        CauchyDistribution distribution = (CauchyDistribution) getDistribution();
+        Assert.assertEquals(1.2, distribution.getMedian(), 0.0);
+    }
+
+    @Test
+    public void testScale() {
+        CauchyDistribution distribution = (CauchyDistribution) getDistribution();
+        Assert.assertEquals(2.1, distribution.getScale(), 0.0);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition1() {
+        new CauchyDistribution(0, 0);
+    }
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition2() {
+        new CauchyDistribution(0, -1);
+    }
+
+    @Test
+    public void testMoments() {
+        CauchyDistribution dist;
+
+        dist = new CauchyDistribution(10.2, 0.15);
+        Assert.assertTrue(Double.isNaN(dist.getNumericalMean()));
+        Assert.assertTrue(Double.isNaN(dist.getNumericalVariance()));
+
+        dist = new CauchyDistribution(23.12, 2.12);
+        Assert.assertTrue(Double.isNaN(dist.getNumericalMean()));
+        Assert.assertTrue(Double.isNaN(dist.getNumericalVariance()));
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ChiSquaredDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ChiSquaredDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ChiSquaredDistributionTest.java
new file mode 100644
index 0000000..dc97f47
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ChiSquaredDistributionTest.java
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for {@link ChiSquaredDistribution}.
+ *
+ * @see ContinuousDistributionAbstractTest
+ */
+public class ChiSquaredDistributionTest extends ContinuousDistributionAbstractTest {
+
+    //-------------- Implementations for abstract methods -----------------------
+
+    /** Creates the default continuous distribution instance to use in tests. */
+    @Override
+    public ChiSquaredDistribution makeDistribution() {
+        return new ChiSquaredDistribution(5.0);
+    }
+
+    /** Creates the default cumulative probability distribution test input values */
+    @Override
+    public double[] makeCumulativeTestPoints() {
+        // quantiles computed using R version 2.9.2
+        return new double[] {0.210212602629, 0.554298076728, 0.831211613487, 1.14547622606, 1.61030798696,
+                             20.5150056524, 15.0862724694, 12.8325019940, 11.0704976935, 9.23635689978};
+    }
+
+    /** Creates the default cumulative probability density test expected values */
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] {0.001, 0.01, 0.025, 0.05, 0.1, 0.999, 0.990, 0.975, 0.950, 0.900};
+    }
+
+    /** Creates the default inverse cumulative probability test input values */
+    @Override
+    public double[] makeInverseCumulativeTestPoints() {
+        return new double[] {0, 0.001d, 0.01d, 0.025d, 0.05d, 0.1d, 0.999d,
+                             0.990d, 0.975d, 0.950d, 0.900d, 1};
+    }
+
+    /** Creates the default inverse cumulative probability density test expected values */
+    @Override
+    public double[] makeInverseCumulativeTestValues() {
+        return new double[] {0, 0.210212602629, 0.554298076728, 0.831211613487, 1.14547622606, 1.61030798696,
+                             20.5150056524, 15.0862724694, 12.8325019940, 11.0704976935, 9.23635689978,
+                             Double.POSITIVE_INFINITY};
+    }
+
+    /** Creates the default probability density test expected values */
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] {0.0115379817652, 0.0415948507811, 0.0665060119842, 0.0919455953114, 0.121472591024,
+                             0.000433630076361, 0.00412780610309, 0.00999340341045, 0.0193246438937, 0.0368460089216};
+    }
+
+    // --------------------- Override tolerance  --------------
+    @Override
+    public void setUp() {
+        super.setUp();
+        setTolerance(1e-9);
+    }
+
+    //---------------------------- Additional test cases -------------------------
+
+    @Test
+    public void testSmallDf() {
+        setDistribution(new ChiSquaredDistribution(0.1d));
+        setTolerance(1E-4);
+        // quantiles computed using R version 1.8.1 (linux version)
+        setCumulativeTestPoints(new double[] {1.168926E-60, 1.168926E-40, 1.063132E-32,
+                                              1.144775E-26, 1.168926E-20, 5.472917, 2.175255, 1.13438,
+                                              0.5318646, 0.1526342});
+        setInverseCumulativeTestValues(getCumulativeTestPoints());
+        setInverseCumulativeTestPoints(getCumulativeTestValues());
+        verifyCumulativeProbabilities();
+        verifyInverseCumulativeProbabilities();
+    }
+
+    @Test
+    public void testDfAccessors() {
+        ChiSquaredDistribution distribution = (ChiSquaredDistribution) getDistribution();
+        Assert.assertEquals(5d, distribution.getDegreesOfFreedom(), Double.MIN_VALUE);
+    }
+
+    @Test
+    public void testDensity() {
+        double[] x = new double[]{-0.1, 1e-6, 0.5, 1, 2, 5};
+        //R 2.5: print(dchisq(x, df=1), digits=10)
+        checkDensity(1, x, new double[]{0.00000000000, 398.94208093034, 0.43939128947, 0.24197072452, 0.10377687436, 0.01464498256});
+        //R 2.5: print(dchisq(x, df=0.1), digits=10)
+        checkDensity(0.1, x, new double[]{0.000000000e+00, 2.486453997e+04, 7.464238732e-02, 3.009077718e-02, 9.447299159e-03, 8.827199396e-04});
+        //R 2.5: print(dchisq(x, df=2), digits=10)
+        checkDensity(2, x, new double[]{0.00000000000, 0.49999975000, 0.38940039154, 0.30326532986, 0.18393972059, 0.04104249931});
+        //R 2.5: print(dchisq(x, df=10), digits=10)
+        checkDensity(10, x, new double[]{0.000000000e+00, 1.302082682e-27, 6.337896998e-05, 7.897534632e-04, 7.664155024e-03, 6.680094289e-02});
+    }
+
+    private void checkDensity(double df, double[] x, double[] expected) {
+        ChiSquaredDistribution d = new ChiSquaredDistribution(df);
+        for (int i = 0; i < x.length; i++) {
+            Assert.assertEquals(expected[i], d.density(x[i]), 1e-5);
+        }
+    }
+
+    @Test
+    public void testMoments() {
+        final double tol = 1e-9;
+        ChiSquaredDistribution dist;
+
+        dist = new ChiSquaredDistribution(1500);
+        Assert.assertEquals(dist.getNumericalMean(), 1500, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), 3000, tol);
+
+        dist = new ChiSquaredDistribution(1.12);
+        Assert.assertEquals(dist.getNumericalMean(), 1.12, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), 2.24, tol);
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ConstantContinuousDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ConstantContinuousDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ConstantContinuousDistributionTest.java
new file mode 100644
index 0000000..152a6c2
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ConstantContinuousDistributionTest.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for ConstantContinuousDistribution.
+ */
+public class ConstantContinuousDistributionTest extends ContinuousDistributionAbstractTest {
+
+    // --- Override tolerance -------------------------------------------------
+
+    @Override
+    public void setUp() {
+        super.setUp();
+        setTolerance(0);
+    }
+
+    //--- Implementations for abstract methods --------------------------------
+
+    /** Creates the default uniform real distribution instance to use in tests. */
+    @Override
+    public ConstantContinuousDistribution makeDistribution() {
+        return new ConstantContinuousDistribution(1);
+    }
+
+    /** Creates the default cumulative probability distribution test input values */
+    @Override
+    public double[] makeCumulativeTestPoints() {
+        return new double[] {0, 0.5, 1};
+    }
+
+    /** Creates the default cumulative probability distribution test expected values */
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] {0, 0, 1};
+    }
+
+    /** Creates the default probability density test expected values */
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] {0, 0, 1};
+    }
+
+    /** Override default test, verifying that inverse cum is constant */
+    @Override
+    @Test
+    public void testInverseCumulativeProbabilities() {
+        ContinuousDistribution dist = getDistribution();
+        for (double x : getCumulativeTestValues()) {
+            Assert.assertEquals(1,dist.inverseCumulativeProbability(x), 0);
+        }
+    }
+
+    //--- Additional test cases -----------------------------------------------
+
+    @Test
+    public void testMeanVariance() {
+        ConstantContinuousDistribution dist;
+
+        dist = new ConstantContinuousDistribution(-1);
+        Assert.assertEquals(dist.getNumericalMean(), -1, 0d);
+        Assert.assertEquals(dist.getNumericalVariance(), 0, 0d);
+    }
+
+    @Test
+    @Override
+    public void testSampler() {
+        final double value = 12.345;
+        final ContinuousDistribution.Sampler sampler = new ConstantContinuousDistribution(value).createSampler(null);
+        for (int i = 0; i < 10; i++) {
+            Assert.assertEquals(value, sampler.sample(), 0);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ContinuousDistributionAbstractTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ContinuousDistributionAbstractTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ContinuousDistributionAbstractTest.java
new file mode 100644
index 0000000..a6176f3
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ContinuousDistributionAbstractTest.java
@@ -0,0 +1,456 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+
+import java.util.ArrayList;
+import java.util.Collections;
+
+import org.apache.commons.math3.analysis.UnivariateFunction;
+import org.apache.commons.math3.analysis.integration.BaseAbstractUnivariateIntegrator;
+import org.apache.commons.math3.analysis.integration.IterativeLegendreGaussIntegrator;
+import org.apache.commons.rng.simple.RandomSource;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Abstract base class for {@link ContinuousDistribution} tests.
+ * <p>
+ * To create a concrete test class for a continuous distribution
+ * implementation, first implement makeDistribution() to return a distribution
+ * instance to use in tests. Then implement each of the test data generation
+ * methods below.  In each case, the test points and test values arrays
+ * returned represent parallel arrays of inputs and expected values for the
+ * distribution returned by makeDistribution().  Default implementations
+ * are provided for the makeInverseXxx methods that just invert the mapping
+ * defined by the arrays returned by the makeCumulativeXxx methods.
+ * <p>
+ * makeCumulativeTestPoints() -- arguments used to test cumulative probabilities
+ * makeCumulativeTestValues() -- expected cumulative probabilities
+ * makeDensityTestValues() -- expected density values at cumulativeTestPoints
+ * makeInverseCumulativeTestPoints() -- arguments used to test inverse cdf
+ * makeInverseCumulativeTestValues() -- expected inverse cdf values
+ * <p>
+ * To implement additional test cases with different distribution instances and
+ * test data, use the setXxx methods for the instance data in test cases and
+ * call the verifyXxx methods to verify results.
+ * <p>
+ * Error tolerance can be overridden by implementing getTolerance().
+ * <p>
+ * Test data should be validated against reference tables or other packages
+ * where possible, and the source of the reference data and/or validation
+ * should be documented in the test cases.  A framework for validating
+ * distribution data against R is included in the /src/test/R source tree.
+ * <p>
+ * See {@link NormalDistributionTest} and {@link ChiSquaredDistributionTest}
+ * for examples.
+ *
+ */
+public abstract class ContinuousDistributionAbstractTest {
+
+//-------------------- Private test instance data -------------------------
+    /**  Distribution instance used to perform tests */
+    private ContinuousDistribution distribution;
+
+    /** Tolerance used in comparing expected and returned values */
+    private double tolerance = 1e-4;
+
+    /** Arguments used to test cumulative probability density calculations */
+    private double[] cumulativeTestPoints;
+
+    /** Values used to test cumulative probability density calculations */
+    private double[] cumulativeTestValues;
+
+    /** Arguments used to test inverse cumulative probability density calculations */
+    private double[] inverseCumulativeTestPoints;
+
+    /** Values used to test inverse cumulative probability density calculations */
+    private double[] inverseCumulativeTestValues;
+
+    /** Values used to test density calculations */
+    private double[] densityTestValues;
+
+    /** Values used to test logarithmic density calculations */
+    private double[] logDensityTestValues;
+
+    //-------------------- Abstract methods -----------------------------------
+
+    /** Creates the default continuous distribution instance to use in tests. */
+    public abstract ContinuousDistribution makeDistribution();
+
+    /** Creates the default cumulative probability test input values */
+    public abstract double[] makeCumulativeTestPoints();
+
+    /** Creates the default cumulative probability test expected values */
+    public abstract double[] makeCumulativeTestValues();
+
+    /** Creates the default density test expected values */
+    public abstract double[] makeDensityTestValues();
+
+    /** Creates the default logarithmic density test expected values.
+     * The default implementation simply computes the logarithm
+     * of each value returned by {@link #makeDensityTestValues()}.*/
+    public double[] makeLogDensityTestValues() {
+        final double[] densityTestValues = makeDensityTestValues();
+        final double[] logDensityTestValues = new double[densityTestValues.length];
+        for (int i = 0; i < densityTestValues.length; i++) {
+            logDensityTestValues[i] = Math.log(densityTestValues[i]);
+        }
+        return logDensityTestValues;
+    }
+
+    //---- Default implementations of inverse test data generation methods ----
+
+    /** Creates the default inverse cumulative probability test input values */
+    public double[] makeInverseCumulativeTestPoints() {
+        return makeCumulativeTestValues();
+    }
+
+    /** Creates the default inverse cumulative probability density test expected values */
+    public double[] makeInverseCumulativeTestValues() {
+        return makeCumulativeTestPoints();
+    }
+
+    //-------------------- Setup / tear down ----------------------------------
+
+    /**
+     * Setup sets all test instance data to default values
+     */
+    @Before
+    public void setUp() {
+        distribution = makeDistribution();
+        cumulativeTestPoints = makeCumulativeTestPoints();
+        cumulativeTestValues = makeCumulativeTestValues();
+        inverseCumulativeTestPoints = makeInverseCumulativeTestPoints();
+        inverseCumulativeTestValues = makeInverseCumulativeTestValues();
+        densityTestValues = makeDensityTestValues();
+        logDensityTestValues = makeLogDensityTestValues();
+    }
+
+    /**
+     * Cleans up test instance data
+     */
+    @After
+    public void tearDown() {
+        distribution = null;
+        cumulativeTestPoints = null;
+        cumulativeTestValues = null;
+        inverseCumulativeTestPoints = null;
+        inverseCumulativeTestValues = null;
+        densityTestValues = null;
+        logDensityTestValues = null;
+    }
+
+    //-------------------- Verification methods -------------------------------
+
+    /**
+     * Verifies that cumulative probability density calculations match expected values
+     * using current test instance data
+     */
+    protected void verifyCumulativeProbabilities() {
+        // verify cumulativeProbability(double)
+        for (int i = 0; i < cumulativeTestPoints.length; i++) {
+            TestUtils.assertEquals("Incorrect cumulative probability value returned for "
+                                   + cumulativeTestPoints[i], cumulativeTestValues[i],
+                                   distribution.cumulativeProbability(cumulativeTestPoints[i]),
+                                   getTolerance());
+        }
+        // verify probability(double, double)
+        for (int i = 0; i < cumulativeTestPoints.length; i++) {
+            for (int j = 0; j < cumulativeTestPoints.length; j++) {
+                if (cumulativeTestPoints[i] <= cumulativeTestPoints[j]) {
+                    TestUtils.assertEquals(cumulativeTestValues[j] - cumulativeTestValues[i],
+                                           distribution.probability(cumulativeTestPoints[i], cumulativeTestPoints[j]),
+                                           getTolerance());
+                } else {
+                    try {
+                        distribution.probability(cumulativeTestPoints[i], cumulativeTestPoints[j]);
+                    } catch (IllegalArgumentException e) {
+                        continue;
+                    }
+                    Assert.fail("distribution.probability(double, double) should have thrown an exception that second argument is too large");
+                }
+            }
+        }
+    }
+
+    /**
+     * Verifies that inverse cumulative probability density calculations match expected values
+     * using current test instance data
+     */
+    protected void verifyInverseCumulativeProbabilities() {
+        for (int i = 0; i < inverseCumulativeTestPoints.length; i++) {
+            TestUtils.assertEquals("Incorrect inverse cumulative probability value returned for "
+                                   + inverseCumulativeTestPoints[i], inverseCumulativeTestValues[i],
+                                   distribution.inverseCumulativeProbability(inverseCumulativeTestPoints[i]),
+                                   getTolerance());
+        }
+    }
+
+    /**
+     * Verifies that density calculations match expected values
+     */
+    protected void verifyDensities() {
+        for (int i = 0; i < cumulativeTestPoints.length; i++) {
+            TestUtils.assertEquals("Incorrect probability density value returned for "
+                                   + cumulativeTestPoints[i], densityTestValues[i],
+                                   distribution.density(cumulativeTestPoints[i]),
+                                   getTolerance());
+        }
+    }
+
+    /**
+     * Verifies that logarithmic density calculations match expected values
+     */
+    protected void verifyLogDensities() {
+        for (int i = 0; i < cumulativeTestPoints.length; i++) {
+            TestUtils.assertEquals("Incorrect probability density value returned for "
+                                   + cumulativeTestPoints[i], logDensityTestValues[i],
+                                   distribution.logDensity(cumulativeTestPoints[i]),
+                                   getTolerance());
+        }
+    }
+
+    //------------------------ Default test cases -----------------------------
+
+    /**
+     * Verifies that cumulative probability density calculations match expected values
+     * using default test instance data
+     */
+    @Test
+    public void testCumulativeProbabilities() {
+        verifyCumulativeProbabilities();
+    }
+
+    /**
+     * Verifies that inverse cumulative probability density calculations match expected values
+     * using default test instance data
+     */
+    @Test
+    public void testInverseCumulativeProbabilities() {
+        verifyInverseCumulativeProbabilities();
+    }
+
+    /**
+     * Verifies that density calculations return expected values
+     * for default test instance data
+     */
+    @Test
+    public void testDensities() {
+        verifyDensities();
+    }
+
+    /**
+     * Verifies that logarithmic density calculations return expected values
+     * for default test instance data
+     */
+    @Test
+    public void testLogDensities() {
+        verifyLogDensities();
+    }
+
+    /**
+     * Verifies that probability computations are consistent
+     */
+    @Test
+    public void testConsistency() {
+        for (int i = 1; i < cumulativeTestPoints.length; i++) {
+
+            // check that cdf(x, x) = 0
+            TestUtils.assertEquals(0d,
+                                   distribution.probability
+                                   (cumulativeTestPoints[i], cumulativeTestPoints[i]),
+                                   tolerance);
+
+            // check that P(a < X <= b) = P(X <= b) - P(X <= a)
+            double upper = Math.max(cumulativeTestPoints[i], cumulativeTestPoints[i -1]);
+            double lower = Math.min(cumulativeTestPoints[i], cumulativeTestPoints[i -1]);
+            double diff = distribution.cumulativeProbability(upper) -
+                distribution.cumulativeProbability(lower);
+            double direct = distribution.probability(lower, upper);
+            TestUtils.assertEquals("Inconsistent probability for ("
+                                   + lower + "," + upper + ")", diff, direct, tolerance);
+        }
+    }
+
+    /**
+     * Verifies that illegal arguments are correctly handled
+     */
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition1() {
+        distribution.probability(1, 0);
+    }
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition2() {
+        distribution.inverseCumulativeProbability(-1);
+    }
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition3() {
+        distribution.inverseCumulativeProbability(2);
+    }
+
+    /**
+     * Test sampling
+     */
+    @Test
+    public void testSampler() {
+        final int sampleSize = 1000;
+        final ContinuousDistribution.Sampler sampler =
+            distribution.createSampler(RandomSource.create(RandomSource.WELL_19937_C, 123456789L));
+        final double[] sample = AbstractContinuousDistribution.sample(sampleSize, sampler);
+        final double[] quartiles = TestUtils.getDistributionQuartiles(distribution);
+        final double[] expected = {250, 250, 250, 250};
+        final long[] counts = new long[4];
+
+        for (int i = 0; i < sampleSize; i++) {
+            TestUtils.updateCounts(sample[i], counts, quartiles);
+        }
+        TestUtils.assertChiSquareAccept(expected, counts, 0.001);
+    }
+
+    /**
+     * Verify that density integrals match the distribution.
+     * The (filtered, sorted) cumulativeTestPoints array is used to source
+     * integration limits. The integral of the density (estimated using a
+     * Legendre-Gauss integrator) is compared with the cdf over the same
+     * interval. Test points outside of the domain of the density function
+     * are discarded.
+     */
+    @Test
+    public void testDensityIntegrals() {
+        final double tol = 1e-9;
+        final BaseAbstractUnivariateIntegrator integrator =
+            new IterativeLegendreGaussIntegrator(5, 1e-12, 1e-10);
+        final UnivariateFunction d = new UnivariateFunction() {
+                @Override
+                public double value(double x) {
+                    return distribution.density(x);
+                }
+            };
+        final ArrayList<Double> integrationTestPoints = new ArrayList<>();
+        for (int i = 0; i < cumulativeTestPoints.length; i++) {
+            if (Double.isNaN(cumulativeTestValues[i]) ||
+                cumulativeTestValues[i] < 1e-5 ||
+                cumulativeTestValues[i] > 1 - 1e-5) {
+                continue; // exclude integrals outside domain.
+            }
+            integrationTestPoints.add(cumulativeTestPoints[i]);
+        }
+        Collections.sort(integrationTestPoints);
+        for (int i = 1; i < integrationTestPoints.size(); i++) {
+            Assert.assertEquals(distribution.probability(integrationTestPoints.get(0), integrationTestPoints.get(i)),
+                                integrator.integrate(1000000, // Triangle integrals are very slow to converge
+                                                     d, integrationTestPoints.get(0),
+                                                     integrationTestPoints.get(i)), tol);
+        }
+    }
+
+    //------------------ Getters / Setters for test instance data -----------
+    /**
+     * @return Returns the cumulativeTestPoints.
+     */
+    protected double[] getCumulativeTestPoints() {
+        return cumulativeTestPoints;
+    }
+
+    /**
+     * @param cumulativeTestPoints The cumulativeTestPoints to set.
+     */
+    protected void setCumulativeTestPoints(double[] cumulativeTestPoints) {
+        this.cumulativeTestPoints = cumulativeTestPoints;
+    }
+
+    /**
+     * @return Returns the cumulativeTestValues.
+     */
+    protected double[] getCumulativeTestValues() {
+        return cumulativeTestValues;
+    }
+
+    /**
+     * @param cumulativeTestValues The cumulativeTestValues to set.
+     */
+    protected void setCumulativeTestValues(double[] cumulativeTestValues) {
+        this.cumulativeTestValues = cumulativeTestValues;
+    }
+
+    protected double[] getDensityTestValues() {
+        return densityTestValues;
+    }
+
+    protected void setDensityTestValues(double[] densityTestValues) {
+        this.densityTestValues = densityTestValues;
+    }
+
+    /**
+     * @return Returns the distribution.
+     */
+    protected ContinuousDistribution getDistribution() {
+        return distribution;
+    }
+
+    /**
+     * @param distribution The distribution to set.
+     */
+    protected void setDistribution(ContinuousDistribution distribution) {
+        this.distribution = distribution;
+    }
+
+    /**
+     * @return Returns the inverseCumulativeTestPoints.
+     */
+    protected double[] getInverseCumulativeTestPoints() {
+        return inverseCumulativeTestPoints;
+    }
+
+    /**
+     * @param inverseCumulativeTestPoints The inverseCumulativeTestPoints to set.
+     */
+    protected void setInverseCumulativeTestPoints(double[] inverseCumulativeTestPoints) {
+        this.inverseCumulativeTestPoints = inverseCumulativeTestPoints;
+    }
+
+    /**
+     * @return Returns the inverseCumulativeTestValues.
+     */
+    protected double[] getInverseCumulativeTestValues() {
+        return inverseCumulativeTestValues;
+    }
+
+    /**
+     * @param inverseCumulativeTestValues The inverseCumulativeTestValues to set.
+     */
+    protected void setInverseCumulativeTestValues(double[] inverseCumulativeTestValues) {
+        this.inverseCumulativeTestValues = inverseCumulativeTestValues;
+    }
+
+    /**
+     * @return Returns the tolerance.
+     */
+    protected double getTolerance() {
+        return tolerance;
+    }
+
+    /**
+     * @param tolerance The tolerance to set.
+     */
+    protected void setTolerance(double tolerance) {
+        this.tolerance = tolerance;
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/DiscreteDistributionAbstractTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/DiscreteDistributionAbstractTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/DiscreteDistributionAbstractTest.java
new file mode 100644
index 0000000..ab0e0a1
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/DiscreteDistributionAbstractTest.java
@@ -0,0 +1,411 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.rng.simple.RandomSource;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Abstract base class for {@link DiscreteDistribution} tests.
+ * <p>
+ * To create a concrete test class for an integer distribution implementation,
+ *  implement makeDistribution() to return a distribution instance to use in
+ *  tests and each of the test data generation methods below.  In each case, the
+ *  test points and test values arrays returned represent parallel arrays of
+ *  inputs and expected values for the distribution returned by makeDistribution().
+ *  <p>
+ *  makeDensityTestPoints() -- arguments used to test probability density calculation
+ *  makeDensityTestValues() -- expected probability densities
+ *  makeCumulativeTestPoints() -- arguments used to test cumulative probabilities
+ *  makeCumulativeTestValues() -- expected cumulative probabilites
+ *  makeInverseCumulativeTestPoints() -- arguments used to test inverse cdf evaluation
+ *  makeInverseCumulativeTestValues() -- expected inverse cdf values
+ * <p>
+ *  To implement additional test cases with different distribution instances and test data,
+ *  use the setXxx methods for the instance data in test cases and call the verifyXxx methods
+ *  to verify results.
+ *
+ */
+public abstract class DiscreteDistributionAbstractTest {
+
+//-------------------- Private test instance data -------------------------
+    /** Discrete distribution instance used to perform tests */
+    private DiscreteDistribution distribution;
+
+    /** Tolerance used in comparing expected and returned values */
+    private double tolerance = 1e-12;
+
+    /** Arguments used to test probability density calculations */
+    private int[] densityTestPoints;
+
+    /** Values used to test probability density calculations */
+    private double[] densityTestValues;
+
+    /** Values used to test logarithmic probability density calculations */
+    private double[] logDensityTestValues;
+
+    /** Arguments used to test cumulative probability density calculations */
+    private int[] cumulativeTestPoints;
+
+    /** Values used to test cumulative probability density calculations */
+    private double[] cumulativeTestValues;
+
+    /** Arguments used to test inverse cumulative probability density calculations */
+    private double[] inverseCumulativeTestPoints;
+
+    /** Values used to test inverse cumulative probability density calculations */
+    private int[] inverseCumulativeTestValues;
+
+    //-------------------- Abstract methods -----------------------------------
+
+    /** Creates the default discrete distribution instance to use in tests. */
+    public abstract DiscreteDistribution makeDistribution();
+
+    /** Creates the default probability density test input values */
+    public abstract int[] makeDensityTestPoints();
+
+    /** Creates the default probability density test expected values */
+    public abstract double[] makeDensityTestValues();
+
+    /** Creates the default logarithmic probability density test expected values.
+     *
+     * The default implementation simply computes the logarithm of all the values in
+     * {@link #makeDensityTestValues()}.
+     *
+     * @return double[] the default logarithmic probability density test expected values.
+     */
+    public double[] makeLogDensityTestValues() {
+        final double[] densityTestValues = makeDensityTestValues();
+        final double[] logDensityTestValues = new double[densityTestValues.length];
+        for (int i = 0; i < densityTestValues.length; i++) {
+            logDensityTestValues[i] = Math.log(densityTestValues[i]);
+        }
+        return logDensityTestValues;
+    }
+
+    /** Creates the default cumulative probability density test input values */
+    public abstract int[] makeCumulativeTestPoints();
+
+    /** Creates the default cumulative probability density test expected values */
+    public abstract double[] makeCumulativeTestValues();
+
+    /** Creates the default inverse cumulative probability test input values */
+    public abstract double[] makeInverseCumulativeTestPoints();
+
+    /** Creates the default inverse cumulative probability density test expected values */
+    public abstract int[] makeInverseCumulativeTestValues();
+
+    //-------------------- Setup / tear down ----------------------------------
+
+    /**
+     * Setup sets all test instance data to default values
+     */
+    @Before
+    public void setUp() {
+        distribution = makeDistribution();
+        densityTestPoints = makeDensityTestPoints();
+        densityTestValues = makeDensityTestValues();
+        logDensityTestValues = makeLogDensityTestValues();
+        cumulativeTestPoints = makeCumulativeTestPoints();
+        cumulativeTestValues = makeCumulativeTestValues();
+        inverseCumulativeTestPoints = makeInverseCumulativeTestPoints();
+        inverseCumulativeTestValues = makeInverseCumulativeTestValues();
+    }
+
+    /**
+     * Cleans up test instance data
+     */
+    @After
+    public void tearDown() {
+        distribution = null;
+        densityTestPoints = null;
+        densityTestValues = null;
+        logDensityTestValues = null;
+        cumulativeTestPoints = null;
+        cumulativeTestValues = null;
+        inverseCumulativeTestPoints = null;
+        inverseCumulativeTestValues = null;
+    }
+
+    //-------------------- Verification methods -------------------------------
+
+    /**
+     * Verifies that probability density calculations match expected values
+     * using current test instance data
+     */
+    protected void verifyDensities() {
+        for (int i = 0; i < densityTestPoints.length; i++) {
+            Assert.assertEquals("Incorrect density value returned for " + densityTestPoints[i],
+                                densityTestValues[i],
+                                distribution.probability(densityTestPoints[i]), getTolerance());
+        }
+    }
+
+    /**
+     * Verifies that logarithmic probability density calculations match expected values
+     * using current test instance data.
+     */
+    protected void verifyLogDensities() {
+        for (int i = 0; i < densityTestPoints.length; i++) {
+            // FIXME: when logProbability methods are added to DiscreteDistribution in 4.0, remove cast below
+            Assert.assertEquals("Incorrect log density value returned for " + densityTestPoints[i],
+                                logDensityTestValues[i],
+                                ((AbstractDiscreteDistribution) distribution).logProbability(densityTestPoints[i]), tolerance);
+        }
+    }
+
+    /**
+     * Verifies that cumulative probability density calculations match expected values
+     * using current test instance data
+     */
+    protected void verifyCumulativeProbabilities() {
+        for (int i = 0; i < cumulativeTestPoints.length; i++) {
+            Assert.assertEquals("Incorrect cumulative probability value returned for " + cumulativeTestPoints[i],
+                                cumulativeTestValues[i],
+                                distribution.cumulativeProbability(cumulativeTestPoints[i]), getTolerance());
+        }
+    }
+
+
+    /**
+     * Verifies that inverse cumulative probability density calculations match expected values
+     * using current test instance data
+     */
+    protected void verifyInverseCumulativeProbabilities() {
+        for (int i = 0; i < inverseCumulativeTestPoints.length; i++) {
+            Assert.assertEquals("Incorrect inverse cumulative probability value returned for "
+                                + inverseCumulativeTestPoints[i], inverseCumulativeTestValues[i],
+                                distribution.inverseCumulativeProbability(inverseCumulativeTestPoints[i]));
+        }
+    }
+
+    //------------------------ Default test cases -----------------------------
+
+    /**
+     * Verifies that probability density calculations match expected values
+     * using default test instance data
+     */
+    @Test
+    public void testDensities() {
+        verifyDensities();
+    }
+
+    /**
+     * Verifies that logarithmic probability density calculations match expected values
+     * using default test instance data
+     */
+    @Test
+    public void testLogDensities() {
+        verifyLogDensities();
+    }
+
+    /**
+     * Verifies that cumulative probability density calculations match expected values
+     * using default test instance data
+     */
+    @Test
+    public void testCumulativeProbabilities() {
+        verifyCumulativeProbabilities();
+    }
+
+    /**
+     * Verifies that inverse cumulative probability density calculations match expected values
+     * using default test instance data
+     */
+    @Test
+    public void testInverseCumulativeProbabilities() {
+        verifyInverseCumulativeProbabilities();
+    }
+
+    @Test
+    public void testConsistencyAtSupportBounds() {
+        final int lower = distribution.getSupportLowerBound();
+        Assert.assertEquals("Cumulative probability mmust be 0 below support lower bound.",
+                            0.0, distribution.cumulativeProbability(lower - 1), 0.0);
+        Assert.assertEquals("Cumulative probability of support lower bound must be equal to probability mass at this point.",
+                            distribution.probability(lower), distribution.cumulativeProbability(lower), getTolerance());
+        Assert.assertEquals("Inverse cumulative probability of 0 must be equal to support lower bound.",
+                            lower, distribution.inverseCumulativeProbability(0.0));
+
+        final int upper = distribution.getSupportUpperBound();
+        if (upper != Integer.MAX_VALUE) {
+            Assert.assertEquals("Cumulative probability of support upper bound must be equal to 1.",
+                                1.0, distribution.cumulativeProbability(upper), 0.0);
+        }
+        Assert.assertEquals("Inverse cumulative probability of 1 must be equal to support upper bound.",
+                            upper, distribution.inverseCumulativeProbability(1.0));
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition1() {
+        distribution.probability(1, 0);
+    }
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition2() {
+        distribution.inverseCumulativeProbability(-1);
+    }
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition3() {
+        distribution.inverseCumulativeProbability(2);
+    }
+
+    /**
+     * Test sampling
+     */
+    @Test
+    public void testSampling() {
+        int[] densityPoints = makeDensityTestPoints();
+        double[] densityValues = makeDensityTestValues();
+        int sampleSize = 1000;
+        int length = TestUtils.eliminateZeroMassPoints(densityPoints, densityValues);
+        AbstractDiscreteDistribution distribution = (AbstractDiscreteDistribution) makeDistribution();
+        double[] expectedCounts = new double[length];
+        long[] observedCounts = new long[length];
+        for (int i = 0; i < length; i++) {
+            expectedCounts[i] = sampleSize * densityValues[i];
+        }
+        // Use fixed seed.
+        final DiscreteDistribution.Sampler sampler =
+            distribution.createSampler(RandomSource.create(RandomSource.WELL_512_A,
+                                                           1000));
+        int[] sample = AbstractDiscreteDistribution.sample(sampleSize, sampler);
+        for (int i = 0; i < sampleSize; i++) {
+          for (int j = 0; j < length; j++) {
+              if (sample[i] == densityPoints[j]) {
+                  observedCounts[j]++;
+              }
+          }
+        }
+        TestUtils.assertChiSquareAccept(densityPoints, expectedCounts, observedCounts, .001);
+    }
+
+    //------------------ Getters / Setters for test instance data -----------
+    /**
+     * @return Returns the cumulativeTestPoints.
+     */
+    protected int[] getCumulativeTestPoints() {
+        return cumulativeTestPoints;
+    }
+
+    /**
+     * @param cumulativeTestPoints The cumulativeTestPoints to set.
+     */
+    protected void setCumulativeTestPoints(int[] cumulativeTestPoints) {
+        this.cumulativeTestPoints = cumulativeTestPoints;
+    }
+
+    /**
+     * @return Returns the cumulativeTestValues.
+     */
+    protected double[] getCumulativeTestValues() {
+        return cumulativeTestValues;
+    }
+
+    /**
+     * @param cumulativeTestValues The cumulativeTestValues to set.
+     */
+    protected void setCumulativeTestValues(double[] cumulativeTestValues) {
+        this.cumulativeTestValues = cumulativeTestValues;
+    }
+
+    /**
+     * @return Returns the densityTestPoints.
+     */
+    protected int[] getDensityTestPoints() {
+        return densityTestPoints;
+    }
+
+    /**
+     * @param densityTestPoints The densityTestPoints to set.
+     */
+    protected void setDensityTestPoints(int[] densityTestPoints) {
+        this.densityTestPoints = densityTestPoints;
+    }
+
+    /**
+     * @return Returns the densityTestValues.
+     */
+    protected double[] getDensityTestValues() {
+        return densityTestValues;
+    }
+
+    /**
+     * @param densityTestValues The densityTestValues to set.
+     */
+    protected void setDensityTestValues(double[] densityTestValues) {
+        this.densityTestValues = densityTestValues;
+    }
+
+    /**
+     * @return Returns the distribution.
+     */
+    protected DiscreteDistribution getDistribution() {
+        return distribution;
+    }
+
+    /**
+     * @param distribution The distribution to set.
+     */
+    protected void setDistribution(DiscreteDistribution distribution) {
+        this.distribution = distribution;
+    }
+
+    /**
+     * @return Returns the inverseCumulativeTestPoints.
+     */
+    protected double[] getInverseCumulativeTestPoints() {
+        return inverseCumulativeTestPoints;
+    }
+
+    /**
+     * @param inverseCumulativeTestPoints The inverseCumulativeTestPoints to set.
+     */
+    protected void setInverseCumulativeTestPoints(double[] inverseCumulativeTestPoints) {
+        this.inverseCumulativeTestPoints = inverseCumulativeTestPoints;
+    }
+
+    /**
+     * @return Returns the inverseCumulativeTestValues.
+     */
+    protected int[] getInverseCumulativeTestValues() {
+        return inverseCumulativeTestValues;
+    }
+
+    /**
+     * @param inverseCumulativeTestValues The inverseCumulativeTestValues to set.
+     */
+    protected void setInverseCumulativeTestValues(int[] inverseCumulativeTestValues) {
+        this.inverseCumulativeTestValues = inverseCumulativeTestValues;
+    }
+
+    /**
+     * @return Returns the tolerance.
+     */
+    protected double getTolerance() {
+        return tolerance;
+    }
+
+    /**
+     * @param tolerance The tolerance to set.
+     */
+    protected void setTolerance(double tolerance) {
+        this.tolerance = tolerance;
+    }
+}


[12/16] commons-statistics git commit: STATISTICS-2: Migrate "o.a.c.math4.distribution" from Commons Math.

Posted by er...@apache.org.
http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/DiscreteDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/DiscreteDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/DiscreteDistribution.java
new file mode 100644
index 0000000..1cd4a35
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/DiscreteDistribution.java
@@ -0,0 +1,163 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.rng.UniformRandomProvider;
+
+/**
+ * Interface for distributions on the integers.
+ */
+public interface DiscreteDistribution {
+
+    /**
+     * For a random variable {@code X} whose values are distributed according to
+     * this distribution, this method returns {@code log(P(X = x))}, where
+     * {@code log} is the natural logarithm. In other words, this method
+     * represents the logarithm of the probability mass function (PMF) for the
+     * distribution. Note that due to the floating point precision and
+     * under/overflow issues, this method will for some distributions be more
+     * precise and faster than computing the logarithm of
+     * {@link #probability(int)}.
+     *
+     * @param x the point at which the PMF is evaluated
+     * @return the logarithm of the value of the probability mass function at {@code x}
+     */
+    double logProbability(int x);
+
+    /**
+     * For a random variable {@code X} whose values are distributed according
+     * to this distribution, this method returns {@code P(X = x)}. In other
+     * words, this method represents the probability mass function (PMF)
+     * for the distribution.
+     *
+     * @param x the point at which the PMF is evaluated
+     * @return the value of the probability mass function at {@code x}
+     */
+    double probability(int x);
+
+    /**
+     * For a random variable {@code X} whose values are distributed according
+     * to this distribution, this method returns {@code P(x0 < X <= x1)}.
+     *
+     * @param x0 the exclusive lower bound
+     * @param x1 the inclusive upper bound
+     * @return the probability that a random variable with this distribution
+     * will take a value between {@code x0} and {@code x1},
+     * excluding the lower and including the upper endpoint
+     * @throws IllegalArgumentException if {@code x0 > x1}
+     */
+    double probability(int x0, int x1);
+
+    /**
+     * For a random variable {@code X} whose values are distributed according
+     * to this distribution, this method returns {@code P(X <= x)}.  In other
+     * words, this method represents the (cumulative) distribution function
+     * (CDF) for this distribution.
+     *
+     * @param x the point at which the CDF is evaluated
+     * @return the probability that a random variable with this
+     * distribution takes a value less than or equal to {@code x}
+     */
+    double cumulativeProbability(int x);
+
+    /**
+     * Computes the quantile function of this distribution.
+     * For a random variable {@code X} distributed according to this distribution,
+     * the returned value is
+     * <ul>
+     * <li>{@code inf{x in Z | P(X<=x) >= p}} for {@code 0 < p <= 1},</li>
+     * <li>{@code inf{x in Z | P(X<=x) > 0}} for {@code p = 0}.</li>
+     * </ul>
+     * If the result exceeds the range of the data type {@code int},
+     * then {@code Integer.MIN_VALUE} or {@code Integer.MAX_VALUE} is returned.
+     *
+     * @param p the cumulative probability
+     * @return the smallest {@code p}-quantile of this distribution
+     * (largest 0-quantile for {@code p = 0})
+     * @throws IllegalArgumentException if {@code p < 0} or {@code p > 1}
+     */
+    int inverseCumulativeProbability(double p);
+
+    /**
+     * Use this method to get the numerical value of the mean of this
+     * distribution.
+     *
+     * @return the mean or {@code Double.NaN} if it is not defined
+     */
+    double getNumericalMean();
+
+    /**
+     * Use this method to get the numerical value of the variance of this
+     * distribution.
+     *
+     * @return the variance (possibly {@code Double.POSITIVE_INFINITY} or
+     * {@code Double.NaN} if it is not defined)
+     */
+    double getNumericalVariance();
+
+    /**
+     * Access the lower bound of the support. This method must return the same
+     * value as {@code inverseCumulativeProbability(0)}. In other words, this
+     * method must return
+     * <p>{@code inf {x in Z | P(X <= x) > 0}}.</p>
+     *
+     * @return lower bound of the support ({@code Integer.MIN_VALUE}
+     * for negative infinity)
+     */
+    int getSupportLowerBound();
+
+    /**
+     * Access the upper bound of the support. This method must return the same
+     * value as {@code inverseCumulativeProbability(1)}. In other words, this
+     * method must return
+     * <p>{@code inf {x in R | P(X <= x) = 1}}.</p>
+     *
+     * @return upper bound of the support ({@code Integer.MAX_VALUE}
+     * for positive infinity)
+     */
+    int getSupportUpperBound();
+
+    /**
+     * Use this method to get information about whether the support is
+     * connected, i.e. whether all integers between the lower and upper bound of
+     * the support are included in the support.
+     *
+     * @return whether the support is connected or not
+     */
+    boolean isSupportConnected();
+
+    /**
+     * Creates a sampler.
+     *
+     * @param rng Generator of uniformly distributed numbers.
+     * @return a sampler that produces random numbers according this
+     * distribution.
+     */
+    Sampler createSampler(UniformRandomProvider rng);
+
+    /**
+     * Sampling functionality.
+     */
+    interface Sampler {
+        /**
+         * Generates a random value sampled from this distribution.
+         *
+         * @return a random value.
+         */
+        int sample();
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/DistributionException.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/DistributionException.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/DistributionException.java
new file mode 100644
index 0000000..31d7adc
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/DistributionException.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import java.text.MessageFormat;
+
+/**
+ * Package private exception class with constants for frequently used messages.
+ */
+class DistributionException extends IllegalArgumentException {
+    /** Error message for "too large" condition. */
+    static final String TOO_LARGE = "{0} > {1}";
+    /** Error message for "too small" condition. */
+    static final String TOO_SMALL = "{0} < {1}";
+    /** Error message for "out of range" condition. */
+    static final String OUT_OF_RANGE = "Number {0} is out of range [{1}, {2}]";
+    /** Error message for "out of range" condition. */
+    static final String NEGATIVE = "Number {0} is negative";
+    /** Error message for "mismatch" condition. */
+    static final String MISMATCH = "Expected {1} but was {0}";
+    /** Error message for "failed bracketing" condition. */
+    static final String BRACKETING = "No bracketing: f({0})={1}, f({2})={3}";
+
+    /** Serializable version identifier. */
+    private static final long serialVersionUID = 20180119L;
+
+    /** Arguments for formatting the message. */
+    private Object[] formatArguments;
+
+    /**
+     * Create an exception where the message is constructed by applying
+     * the {@code format()} method from {@code java.text.MessageFormat}.
+     *
+     * @param message  the exception message with replaceable parameters
+     * @param formatArguments the arguments for formatting the message
+     */
+    DistributionException(String message, Object... formatArguments) {
+        super(message);
+        this.formatArguments = formatArguments;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public String getMessage() {
+        return MessageFormat.format(super.getMessage(), formatArguments);
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ExponentialDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ExponentialDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ExponentialDistribution.java
new file mode 100644
index 0000000..091c6a4
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ExponentialDistribution.java
@@ -0,0 +1,197 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.sampling.distribution.ContinuousSampler;
+import org.apache.commons.rng.sampling.distribution.AhrensDieterExponentialSampler;
+
+/**
+ * Implementation of the <a href="http://en.wikipedia.org/wiki/Exponential_distribution">exponential distribution</a>.
+ */
+public class ExponentialDistribution extends AbstractContinuousDistribution {
+    /** The mean of this distribution. */
+    private final double mean;
+    /** The logarithm of the mean, stored to reduce computing time. */
+    private final double logMean;
+
+    /**
+     * Creates a distribution.
+     *
+     * @param mean Mean of this distribution.
+     * @throws IllegalArgumentException if {@code mean <= 0}.
+     */
+    public ExponentialDistribution(double mean) {
+        if (mean <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE, mean);
+        }
+        this.mean = mean;
+        logMean = Math.log(mean);
+    }
+
+    /**
+     * Access the mean.
+     *
+     * @return the mean.
+     */
+    public double getMean() {
+        return mean;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double density(double x) {
+        final double logDensity = logDensity(x);
+        return logDensity == Double.NEGATIVE_INFINITY ? 0 : Math.exp(logDensity);
+    }
+
+    /** {@inheritDoc} **/
+    @Override
+    public double logDensity(double x) {
+        if (x < 0) {
+            return Double.NEGATIVE_INFINITY;
+        }
+        return -x / mean - logMean;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The implementation of this method is based on:
+     * <ul>
+     * <li>
+     * <a href="http://mathworld.wolfram.com/ExponentialDistribution.html">
+     * Exponential Distribution</a>, equation (1).</li>
+     * </ul>
+     */
+    @Override
+    public double cumulativeProbability(double x)  {
+        double ret;
+        if (x <= 0) {
+            ret = 0;
+        } else {
+            ret = 1 - Math.exp(-x / mean);
+        }
+        return ret;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * Returns {@code 0} when {@code p= = 0} and
+     * {@code Double.POSITIVE_INFINITY} when {@code p == 1}.
+     */
+    @Override
+    public double inverseCumulativeProbability(double p) {
+        double ret;
+
+        if (p < 0 ||
+            p > 1) {
+            throw new DistributionException(DistributionException.OUT_OF_RANGE, p, 0, 1);
+        } else if (p == 1) {
+            ret = Double.POSITIVE_INFINITY;
+        } else {
+            ret = -mean * Math.log(1 - p);
+        }
+
+        return ret;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For mean parameter {@code k}, the mean is {@code k}.
+     */
+    @Override
+    public double getNumericalMean() {
+        return getMean();
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For mean parameter {@code k}, the variance is {@code k^2}.
+     */
+    @Override
+    public double getNumericalVariance() {
+        final double m = getMean();
+        return m * m;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The lower bound of the support is always 0 no matter the mean parameter.
+     *
+     * @return lower bound of the support (always 0)
+     */
+    @Override
+    public double getSupportLowerBound() {
+        return 0;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The upper bound of the support is always positive infinity
+     * no matter the mean parameter.
+     *
+     * @return upper bound of the support (always Double.POSITIVE_INFINITY)
+     */
+    @Override
+    public double getSupportUpperBound() {
+        return Double.POSITIVE_INFINITY;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * <p>Sampling algorithm uses the
+     *  <a href="http://www.jesus.ox.ac.uk/~clifford/a5/chap1/node5.html">
+     *   inversion method</a> to generate exponentially distributed
+     *  random values from uniform deviates.
+     * </p>
+     */
+    @Override
+    public ContinuousDistribution.Sampler createSampler(final UniformRandomProvider rng) {
+        return new ContinuousDistribution.Sampler() {
+            /**
+             * Exponential distribution sampler.
+             */
+            private final ContinuousSampler sampler =
+                new AhrensDieterExponentialSampler(rng, mean);
+
+            /**{@inheritDoc} */
+            @Override
+            public double sample() {
+                return sampler.sample();
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/FDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/FDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/FDistribution.java
new file mode 100644
index 0000000..a8b9890
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/FDistribution.java
@@ -0,0 +1,209 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.gamma.LogBeta;
+import org.apache.commons.numbers.gamma.RegularizedBeta;
+
+/**
+ * Implementation of the F-distribution.
+ *
+ * @see <a href="http://en.wikipedia.org/wiki/F-distribution">F-distribution (Wikipedia)</a>
+ * @see <a href="http://mathworld.wolfram.com/F-Distribution.html">F-distribution (MathWorld)</a>
+ */
+public class FDistribution extends AbstractContinuousDistribution {
+    /** The numerator degrees of freedom. */
+    private final double numeratorDegreesOfFreedom;
+    /** The numerator degrees of freedom. */
+    private final double denominatorDegreesOfFreedom;
+
+    /**
+     * Creates a distribution.
+     *
+     * @param numeratorDegreesOfFreedom Numerator degrees of freedom.
+     * @param denominatorDegreesOfFreedom Denominator degrees of freedom.
+     * @throws IllegalArgumentException if {@code numeratorDegreesOfFreedom <= 0} or
+     * {@code denominatorDegreesOfFreedom <= 0}.
+     */
+    public FDistribution(double numeratorDegreesOfFreedom,
+                         double denominatorDegreesOfFreedom) {
+        if (numeratorDegreesOfFreedom <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE,
+                                            numeratorDegreesOfFreedom);
+        }
+        if (denominatorDegreesOfFreedom <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE,
+                                            denominatorDegreesOfFreedom);
+        }
+        this.numeratorDegreesOfFreedom = numeratorDegreesOfFreedom;
+        this.denominatorDegreesOfFreedom = denominatorDegreesOfFreedom;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public double density(double x) {
+        return Math.exp(logDensity(x));
+    }
+
+    /** {@inheritDoc} **/
+    @Override
+    public double logDensity(double x) {
+        final double nhalf = numeratorDegreesOfFreedom / 2;
+        final double mhalf = denominatorDegreesOfFreedom / 2;
+        final double logx = Math.log(x);
+        final double logn = Math.log(numeratorDegreesOfFreedom);
+        final double logm = Math.log(denominatorDegreesOfFreedom);
+        final double lognxm = Math.log(numeratorDegreesOfFreedom * x +
+                denominatorDegreesOfFreedom);
+        return nhalf * logn + nhalf * logx - logx +
+               mhalf * logm - nhalf * lognxm - mhalf * lognxm -
+               LogBeta.value(nhalf, mhalf);
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The implementation of this method is based on
+     * <ul>
+     *  <li>
+     *   <a href="http://mathworld.wolfram.com/F-Distribution.html">
+     *   F-Distribution</a>, equation (4).
+     *  </li>
+     * </ul>
+     */
+    @Override
+    public double cumulativeProbability(double x)  {
+        double ret;
+        if (x <= 0) {
+            ret = 0;
+        } else {
+            double n = numeratorDegreesOfFreedom;
+            double m = denominatorDegreesOfFreedom;
+
+            ret = RegularizedBeta.value((n * x) / (m + n * x),
+                0.5 * n,
+                0.5 * m);
+        }
+        return ret;
+    }
+
+    /**
+     * Access the numerator degrees of freedom.
+     *
+     * @return the numerator degrees of freedom.
+     */
+    public double getNumeratorDegreesOfFreedom() {
+        return numeratorDegreesOfFreedom;
+    }
+
+    /**
+     * Access the denominator degrees of freedom.
+     *
+     * @return the denominator degrees of freedom.
+     */
+    public double getDenominatorDegreesOfFreedom() {
+        return denominatorDegreesOfFreedom;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For denominator degrees of freedom parameter {@code b}, the mean is
+     * <ul>
+     *  <li>if {@code b > 2} then {@code b / (b - 2)},</li>
+     *  <li>else undefined ({@code Double.NaN}).
+     * </ul>
+     */
+    @Override
+    public double getNumericalMean() {
+        final double denominatorDF = getDenominatorDegreesOfFreedom();
+
+        if (denominatorDF > 2) {
+            return denominatorDF / (denominatorDF - 2);
+        }
+
+        return Double.NaN;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For numerator degrees of freedom parameter {@code a} and denominator
+     * degrees of freedom parameter {@code b}, the variance is
+     * <ul>
+     *  <li>
+     *    if {@code b > 4} then
+     *    {@code [2 * b^2 * (a + b - 2)] / [a * (b - 2)^2 * (b - 4)]},
+     *  </li>
+     *  <li>else undefined ({@code Double.NaN}).
+     * </ul>
+     */
+    @Override
+    public double getNumericalVariance() {
+        final double denominatorDF = getDenominatorDegreesOfFreedom();
+
+        if (denominatorDF > 4) {
+            final double numeratorDF = getNumeratorDegreesOfFreedom();
+            final double denomDFMinusTwo = denominatorDF - 2;
+
+            return (2 * (denominatorDF * denominatorDF) * (numeratorDF + denominatorDF - 2)) /
+                   ((numeratorDF * (denomDFMinusTwo * denomDFMinusTwo) * (denominatorDF - 4)));
+        }
+
+        return Double.NaN;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The lower bound of the support is always 0 no matter the parameters.
+     *
+     * @return lower bound of the support (always 0)
+     */
+    @Override
+    public double getSupportLowerBound() {
+        return 0;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The upper bound of the support is always positive infinity
+     * no matter the parameters.
+     *
+     * @return upper bound of the support (always Double.POSITIVE_INFINITY)
+     */
+    @Override
+    public double getSupportUpperBound() {
+        return Double.POSITIVE_INFINITY;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/GammaDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/GammaDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/GammaDistribution.java
new file mode 100644
index 0000000..c13db5b
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/GammaDistribution.java
@@ -0,0 +1,354 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.gamma.LanczosApproximation;
+import org.apache.commons.numbers.gamma.RegularizedGamma;
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.sampling.distribution.ContinuousSampler;
+import org.apache.commons.rng.sampling.distribution.AhrensDieterMarsagliaTsangGammaSampler;
+
+/**
+ * Implementation of the <a href="http://en.wikipedia.org/wiki/Gamma_distribution">Gamma distribution</a>.
+ */
+public class GammaDistribution extends AbstractContinuousDistribution {
+    /** Lanczos constant. */
+    private static final double LANCZOS_G = LanczosApproximation.g();
+    /** The shape parameter. */
+    private final double shape;
+    /** The scale parameter. */
+    private final double scale;
+    /**
+     * The constant value of {@code shape + g + 0.5}, where {@code g} is the
+     * Lanczos constant {@link LanczosApproximation#g()}.
+     */
+    private final double shiftedShape;
+    /**
+     * The constant value of
+     * {@code shape / scale * sqrt(e / (2 * pi * (shape + g + 0.5))) / L(shape)},
+     * where {@code L(shape)} is the Lanczos approximation returned by
+     * {@link LanczosApproximation#value(double)}. This prefactor is used in
+     * {@link #density(double)}, when no overflow occurs with the natural
+     * calculation.
+     */
+    private final double densityPrefactor1;
+    /**
+     * The constant value of
+     * {@code log(shape / scale * sqrt(e / (2 * pi * (shape + g + 0.5))) / L(shape))},
+     * where {@code L(shape)} is the Lanczos approximation returned by
+     * {@link LanczosApproximation#value(double)}. This prefactor is used in
+     * {@link #logDensity(double)}, when no overflow occurs with the natural
+     * calculation.
+     */
+    private final double logDensityPrefactor1;
+    /**
+     * The constant value of
+     * {@code shape * sqrt(e / (2 * pi * (shape + g + 0.5))) / L(shape)},
+     * where {@code L(shape)} is the Lanczos approximation returned by
+     * {@link LanczosApproximation#value(double)}. This prefactor is used in
+     * {@link #density(double)}, when overflow occurs with the natural
+     * calculation.
+     */
+    private final double densityPrefactor2;
+    /**
+     * The constant value of
+     * {@code log(shape * sqrt(e / (2 * pi * (shape + g + 0.5))) / L(shape))},
+     * where {@code L(shape)} is the Lanczos approximation returned by
+     * {@link LanczosApproximation#value(double)}. This prefactor is used in
+     * {@link #logDensity(double)}, when overflow occurs with the natural
+     * calculation.
+     */
+    private final double logDensityPrefactor2;
+    /**
+     * Lower bound on {@code y = x / scale} for the selection of the computation
+     * method in {@link #density(double)}. For {@code y <= minY}, the natural
+     * calculation overflows.
+     */
+    private final double minY;
+    /**
+     * Upper bound on {@code log(y)} ({@code y = x / scale}) for the selection
+     * of the computation method in {@link #density(double)}. For
+     * {@code log(y) >= maxLogY}, the natural calculation overflows.
+     */
+    private final double maxLogY;
+
+    /**
+     * Creates a distribution.
+     *
+     * @param shape the shape parameter
+     * @param scale the scale parameter
+     * @throws IllegalArgumentException if {@code shape <= 0} or
+     * {@code scale <= 0}.
+     */
+    public GammaDistribution(double shape,
+                             double scale) {
+        if (shape <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE, shape);
+        }
+        if (scale <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE, scale);
+        }
+
+        this.shape = shape;
+        this.scale = scale;
+        this.shiftedShape = shape + LANCZOS_G + 0.5;
+        final double aux = Math.E / (2.0 * Math.PI * shiftedShape);
+        this.densityPrefactor2 = shape * Math.sqrt(aux) / LanczosApproximation.value(shape);
+        this.logDensityPrefactor2 = Math.log(shape) + 0.5 * Math.log(aux) -
+            Math.log(LanczosApproximation.value(shape));
+        this.densityPrefactor1 = this.densityPrefactor2 / scale *
+            Math.pow(shiftedShape, -shape) *  // XXX FastMath vs Math
+            Math.exp(shape + LANCZOS_G);
+        this.logDensityPrefactor1 = this.logDensityPrefactor2 - Math.log(scale) -
+            Math.log(shiftedShape) * shape +
+            shape + LANCZOS_G;
+        this.minY = shape + LANCZOS_G - Math.log(Double.MAX_VALUE);
+        this.maxLogY = Math.log(Double.MAX_VALUE) / (shape - 1.0);
+    }
+
+    /**
+     * Returns the shape parameter of {@code this} distribution.
+     *
+     * @return the shape parameter
+     */
+    public double getShape() {
+        return shape;
+    }
+
+    /**
+     * Returns the scale parameter of {@code this} distribution.
+     *
+     * @return the scale parameter
+     */
+    public double getScale() {
+        return scale;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double density(double x) {
+       /* The present method must return the value of
+        *
+        *     1       x a     - x
+        * ---------- (-)  exp(---)
+        * x Gamma(a)  b        b
+        *
+        * where a is the shape parameter, and b the scale parameter.
+        * Substituting the Lanczos approximation of Gamma(a) leads to the
+        * following expression of the density
+        *
+        * a              e            1         y      a
+        * - sqrt(------------------) ---- (-----------)  exp(a - y + g),
+        * x      2 pi (a + g + 0.5)  L(a)  a + g + 0.5
+        *
+        * where y = x / b. The above formula is the "natural" computation, which
+        * is implemented when no overflow is likely to occur. If overflow occurs
+        * with the natural computation, the following identity is used. It is
+        * based on the BOOST library
+        * http://www.boost.org/doc/libs/1_35_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma.html
+        * Formula (15) needs adaptations, which are detailed below.
+        *
+        *       y      a
+        * (-----------)  exp(a - y + g)
+        *  a + g + 0.5
+        *                              y - a - g - 0.5    y (g + 0.5)
+        *               = exp(a log1pm(---------------) - ----------- + g),
+        *                                a + g + 0.5      a + g + 0.5
+        *
+        *  where log1pm(z) = log(1 + z) - z. Therefore, the value to be
+        *  returned is
+        *
+        * a              e            1
+        * - sqrt(------------------) ----
+        * x      2 pi (a + g + 0.5)  L(a)
+        *                              y - a - g - 0.5    y (g + 0.5)
+        *               * exp(a log1pm(---------------) - ----------- + g).
+        *                                a + g + 0.5      a + g + 0.5
+        */
+        if (x < 0) {
+            return 0;
+        }
+        final double y = x / scale;
+        if ((y <= minY) || (Math.log(y) >= maxLogY)) {
+            /*
+             * Overflow.
+             */
+            final double aux1 = (y - shiftedShape) / shiftedShape;
+            final double aux2 = shape * (Math.log1p(aux1) - aux1); // XXX FastMath vs Math
+            final double aux3 = -y * (LANCZOS_G + 0.5) / shiftedShape + LANCZOS_G + aux2;
+            return densityPrefactor2 / x * Math.exp(aux3);
+        }
+        /*
+         * Natural calculation.
+         */
+        return densityPrefactor1 * Math.exp(-y) * Math.pow(y, shape - 1);
+    }
+
+    /** {@inheritDoc} **/
+    @Override
+    public double logDensity(double x) {
+        /*
+         * see the comment in {@link #density(double)} for computation details
+         */
+        if (x < 0) {
+            return Double.NEGATIVE_INFINITY;
+        }
+        final double y = x / scale;
+        if ((y <= minY) || (Math.log(y) >= maxLogY)) {
+            /*
+             * Overflow.
+             */
+            final double aux1 = (y - shiftedShape) / shiftedShape;
+            final double aux2 = shape * (Math.log1p(aux1) - aux1);
+            final double aux3 = -y * (LANCZOS_G + 0.5) / shiftedShape + LANCZOS_G + aux2;
+            return logDensityPrefactor2 - Math.log(x) + aux3;
+        }
+        /*
+         * Natural calculation.
+         */
+        return logDensityPrefactor1 - y + Math.log(y) * (shape - 1);
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The implementation of this method is based on:
+     * <ul>
+     *  <li>
+     *   <a href="http://mathworld.wolfram.com/Chi-SquaredDistribution.html">
+     *    Chi-Squared Distribution</a>, equation (9).
+     *  </li>
+     *  <li>Casella, G., &amp; Berger, R. (1990). <i>Statistical Inference</i>.
+     *    Belmont, CA: Duxbury Press.
+     *  </li>
+     * </ul>
+     */
+    @Override
+    public double cumulativeProbability(double x) {
+        double ret;
+
+        if (x <= 0) {
+            ret = 0;
+        } else {
+            ret = RegularizedGamma.P.value(shape, x / scale);
+        }
+
+        return ret;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For shape parameter {@code alpha} and scale parameter {@code beta}, the
+     * mean is {@code alpha * beta}.
+     */
+    @Override
+    public double getNumericalMean() {
+        return shape * scale;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For shape parameter {@code alpha} and scale parameter {@code beta}, the
+     * variance is {@code alpha * beta^2}.
+     *
+     * @return {@inheritDoc}
+     */
+    @Override
+    public double getNumericalVariance() {
+        return shape * scale * scale;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The lower bound of the support is always 0 no matter the parameters.
+     *
+     * @return lower bound of the support (always 0)
+     */
+    @Override
+    public double getSupportLowerBound() {
+        return 0;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The upper bound of the support is always positive infinity
+     * no matter the parameters.
+     *
+     * @return upper bound of the support (always Double.POSITIVE_INFINITY)
+     */
+    @Override
+    public double getSupportUpperBound() {
+        return Double.POSITIVE_INFINITY;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * <p>
+     * Sampling algorithms:
+     * <ul>
+     *  <li>
+     *   For {@code 0 < shape < 1}:
+     *   <blockquote>
+     *    Ahrens, J. H. and Dieter, U.,
+     *    <i>Computer methods for sampling from gamma, beta, Poisson and binomial distributions,</i>
+     *    Computing, 12, 223-246, 1974.
+     *   </blockquote>
+     *  </li>
+     *  <li>
+     *  For {@code shape >= 1}:
+     *   <blockquote>
+     *   Marsaglia and Tsang, <i>A Simple Method for Generating
+     *   Gamma Variables.</i> ACM Transactions on Mathematical Software,
+     *   Volume 26 Issue 3, September, 2000.
+     *   </blockquote>
+     *  </li>
+     * </ul>
+     */
+    @Override
+    public ContinuousDistribution.Sampler createSampler(final UniformRandomProvider rng) {
+        return new ContinuousDistribution.Sampler() {
+            /**
+             * Gamma distribution sampler.
+             */
+            private final ContinuousSampler sampler =
+                new AhrensDieterMarsagliaTsangGammaSampler(rng, scale, shape);
+
+            /**{@inheritDoc} */
+            @Override
+            public double sample() {
+                return sampler.sample();
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/GeometricDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/GeometricDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/GeometricDistribution.java
new file mode 100644
index 0000000..fba2580
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/GeometricDistribution.java
@@ -0,0 +1,160 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+/**
+ * Implementation of the <a href="http://en.wikipedia.org/wiki/Geometric_distribution">geometric distribution</a>.
+ */
+public class GeometricDistribution extends AbstractDiscreteDistribution {
+    /** The probability of success. */
+    private final double probabilityOfSuccess;
+    /** {@code log(p)} where p is the probability of success. */
+    private final double logProbabilityOfSuccess;
+    /** {@code log(1 - p)} where p is the probability of success. */
+    private final double log1mProbabilityOfSuccess;
+
+    /**
+     * Creates a geometric distribution.
+     *
+     * @param p Probability of success.
+     * @throws IllegalArgumentException if {@code p <= 0} or {@code p > 1}.
+     */
+    public GeometricDistribution(double p) {
+        if (p <= 0 || p > 1) {
+            throw new DistributionException(DistributionException.OUT_OF_RANGE, p, 0, 1);
+        }
+
+        probabilityOfSuccess = p;
+        logProbabilityOfSuccess = Math.log(p);
+        log1mProbabilityOfSuccess = Math.log1p(-p);
+    }
+
+    /**
+     * Access the probability of success for this distribution.
+     *
+     * @return the probability of success.
+     */
+    public double getProbabilityOfSuccess() {
+        return probabilityOfSuccess;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double probability(int x) {
+        if (x < 0) {
+            return 0.0;
+        } else {
+            return Math.exp(log1mProbabilityOfSuccess * x) * probabilityOfSuccess;
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double logProbability(int x) {
+        if (x < 0) {
+            return Double.NEGATIVE_INFINITY;
+        } else {
+            return x * log1mProbabilityOfSuccess + logProbabilityOfSuccess;
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double cumulativeProbability(int x) {
+        if (x < 0) {
+            return 0.0;
+        } else {
+            return -Math.expm1(log1mProbabilityOfSuccess * (x + 1));
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For probability parameter {@code p}, the mean is {@code (1 - p) / p}.
+     */
+    @Override
+    public double getNumericalMean() {
+        return (1 - probabilityOfSuccess) / probabilityOfSuccess;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For probability parameter {@code p}, the variance is
+     * {@code (1 - p) / (p * p)}.
+     */
+    @Override
+    public double getNumericalVariance() {
+        return (1 - probabilityOfSuccess) / (probabilityOfSuccess * probabilityOfSuccess);
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The lower bound of the support is always 0.
+     *
+     * @return lower bound of the support (always 0)
+     */
+    @Override
+    public int getSupportLowerBound() {
+        return 0;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The upper bound of the support is infinite (which we approximate as
+     * {@code Integer.MAX_VALUE}).
+     *
+     * @return upper bound of the support (always Integer.MAX_VALUE)
+     */
+    @Override
+    public int getSupportUpperBound() {
+        return Integer.MAX_VALUE;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public int inverseCumulativeProbability(double p) {
+        if (p < 0 ||
+            p > 1) {
+            throw new DistributionException(DistributionException.OUT_OF_RANGE, p, 0, 1);
+        }
+        if (p == 1) {
+            return Integer.MAX_VALUE;
+        }
+        if (p == 0) {
+            return 0;
+        }
+        return Math.max(0, (int) Math.ceil(Math.log1p(-p)/log1mProbabilityOfSuccess-1));
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/GumbelDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/GumbelDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/GumbelDistribution.java
new file mode 100644
index 0000000..8898b5e
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/GumbelDistribution.java
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+/**
+ * This class implements the <a href="http://en.wikipedia.org/wiki/Gumbel_distribution">Gumbel distribution</a>.
+ */
+public class GumbelDistribution extends AbstractContinuousDistribution {
+    /** &pi;<sup>2</sup>/6. */
+    private static final double PI_SQUARED_OVER_SIX = Math.PI * Math.PI / 6;
+    /**
+     * <a href="http://mathworld.wolfram.com/Euler-MascheroniConstantApproximations.html">
+     * Approximation of Euler's constant</a>.
+     */
+    private static final double EULER = Math.PI / (2 * Math.E);
+    /** Location parameter. */
+    private final double mu;
+    /** Scale parameter. */
+    private final double beta;
+
+    /**
+     * Creates a distribution.
+     *
+     * @param mu location parameter
+     * @param beta scale parameter (must be positive)
+     * @throws IllegalArgumenException if {@code beta <= 0}
+     */
+    public GumbelDistribution(double mu,
+                              double beta) {
+        if (beta <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE, beta);
+        }
+
+        this.beta = beta;
+        this.mu = mu;
+    }
+
+    /**
+     * Gets the location parameter.
+     *
+     * @return the location parameter.
+     */
+    public double getLocation() {
+        return mu;
+    }
+
+    /**
+     * Gets the scale parameter.
+     *
+     * @return the scale parameter.
+     */
+    public double getScale() {
+        return beta;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double density(double x) {
+        final double z = (x - mu) / beta;
+        final double t = Math.exp(-z);
+        return Math.exp(-z - t) / beta;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double cumulativeProbability(double x) {
+        final double z = (x - mu) / beta;
+        return Math.exp(-Math.exp(-z));
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double inverseCumulativeProbability(double p) {
+        if (p < 0 || p > 1) {
+            throw new DistributionException(DistributionException.OUT_OF_RANGE, p, 0, 1);
+        } else if (p == 0) {
+            return Double.NEGATIVE_INFINITY;
+        } else if (p == 1) {
+            return Double.POSITIVE_INFINITY;
+        }
+        return mu - Math.log(-Math.log(p)) * beta;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getNumericalMean() {
+        return mu + EULER * beta;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getNumericalVariance() {
+        return PI_SQUARED_OVER_SIX * beta * beta;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getSupportLowerBound() {
+        return Double.NEGATIVE_INFINITY;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getSupportUpperBound() {
+        return Double.POSITIVE_INFINITY;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/HypergeometricDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/HypergeometricDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/HypergeometricDistribution.java
new file mode 100644
index 0000000..732a253
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/HypergeometricDistribution.java
@@ -0,0 +1,293 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+/**
+ * Implementation of the <a href="http://en.wikipedia.org/wiki/Hypergeometric_distribution">hypergeometric distribution</a>.
+ */
+public class HypergeometricDistribution extends AbstractDiscreteDistribution {
+    /** The number of successes in the population. */
+    private final int numberOfSuccesses;
+    /** The population size. */
+    private final int populationSize;
+    /** The sample size. */
+    private final int sampleSize;
+
+    /**
+     * Creates a new hypergeometric distribution.
+     *
+     * @param populationSize Population size.
+     * @param numberOfSuccesses Number of successes in the population.
+     * @param sampleSize Sample size.
+     * @throws IllegalArgumentException if {@code numberOfSuccesses < 0}, or
+     * {@code populationSize <= 0} or {@code numberOfSuccesses > populationSize},
+     * or {@code sampleSize > populationSize}.
+     */
+    public HypergeometricDistribution(int populationSize,
+                                      int numberOfSuccesses,
+                                      int sampleSize) {
+        if (populationSize <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE,
+                                            populationSize);
+        }
+        if (numberOfSuccesses < 0) {
+            throw new DistributionException(DistributionException.NEGATIVE,
+                                            numberOfSuccesses);
+        }
+        if (sampleSize < 0) {
+            throw new DistributionException(DistributionException.NEGATIVE,
+                                            sampleSize);
+        }
+
+        if (numberOfSuccesses > populationSize) {
+            throw new DistributionException(DistributionException.TOO_LARGE,
+                                            numberOfSuccesses, populationSize);
+        }
+        if (sampleSize > populationSize) {
+            throw new DistributionException(DistributionException.TOO_LARGE,
+                                            sampleSize, populationSize);
+        }
+
+        this.numberOfSuccesses = numberOfSuccesses;
+        this.populationSize = populationSize;
+        this.sampleSize = sampleSize;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double cumulativeProbability(int x) {
+        double ret;
+
+        int[] domain = getDomain(populationSize, numberOfSuccesses, sampleSize);
+        if (x < domain[0]) {
+            ret = 0.0;
+        } else if (x >= domain[1]) {
+            ret = 1.0;
+        } else {
+            ret = innerCumulativeProbability(domain[0], x, 1);
+        }
+
+        return ret;
+    }
+
+    /**
+     * Return the domain for the given hypergeometric distribution parameters.
+     *
+     * @param n Population size.
+     * @param m Number of successes in the population.
+     * @param k Sample size.
+     * @return a two element array containing the lower and upper bounds of the
+     * hypergeometric distribution.
+     */
+    private int[] getDomain(int n, int m, int k) {
+        return new int[] { getLowerDomain(n, m, k), getUpperDomain(m, k) };
+    }
+
+    /**
+     * Return the lowest domain value for the given hypergeometric distribution
+     * parameters.
+     *
+     * @param n Population size.
+     * @param m Number of successes in the population.
+     * @param k Sample size.
+     * @return the lowest domain value of the hypergeometric distribution.
+     */
+    private int getLowerDomain(int n, int m, int k) {
+        return Math.max(0, m - (n - k));
+    }
+
+    /**
+     * Access the number of successes.
+     *
+     * @return the number of successes.
+     */
+    public int getNumberOfSuccesses() {
+        return numberOfSuccesses;
+    }
+
+    /**
+     * Access the population size.
+     *
+     * @return the population size.
+     */
+    public int getPopulationSize() {
+        return populationSize;
+    }
+
+    /**
+     * Access the sample size.
+     *
+     * @return the sample size.
+     */
+    public int getSampleSize() {
+        return sampleSize;
+    }
+
+    /**
+     * Return the highest domain value for the given hypergeometric distribution
+     * parameters.
+     *
+     * @param m Number of successes in the population.
+     * @param k Sample size.
+     * @return the highest domain value of the hypergeometric distribution.
+     */
+    private int getUpperDomain(int m, int k) {
+        return Math.min(k, m);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double probability(int x) {
+        final double logProbability = logProbability(x);
+        return logProbability == Double.NEGATIVE_INFINITY ? 0 : Math.exp(logProbability);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double logProbability(int x) {
+        double ret;
+
+        int[] domain = getDomain(populationSize, numberOfSuccesses, sampleSize);
+        if (x < domain[0] || x > domain[1]) {
+            ret = Double.NEGATIVE_INFINITY;
+        } else {
+            double p = (double) sampleSize / (double) populationSize;
+            double q = (double) (populationSize - sampleSize) / (double) populationSize;
+            double p1 = SaddlePointExpansion.logBinomialProbability(x,
+                    numberOfSuccesses, p, q);
+            double p2 =
+                    SaddlePointExpansion.logBinomialProbability(sampleSize - x,
+                            populationSize - numberOfSuccesses, p, q);
+            double p3 =
+                    SaddlePointExpansion.logBinomialProbability(sampleSize, populationSize, p, q);
+            ret = p1 + p2 - p3;
+        }
+
+        return ret;
+    }
+
+    /**
+     * For this distribution, {@code X}, this method returns {@code P(X >= x)}.
+     *
+     * @param x Value at which the CDF is evaluated.
+     * @return the upper tail CDF for this distribution.
+     * @since 1.1
+     */
+    public double upperCumulativeProbability(int x) {
+        double ret;
+
+        final int[] domain = getDomain(populationSize, numberOfSuccesses, sampleSize);
+        if (x <= domain[0]) {
+            ret = 1.0;
+        } else if (x > domain[1]) {
+            ret = 0.0;
+        } else {
+            ret = innerCumulativeProbability(domain[1], x, -1);
+        }
+
+        return ret;
+    }
+
+    /**
+     * For this distribution, {@code X}, this method returns
+     * {@code P(x0 <= X <= x1)}.
+     * This probability is computed by summing the point probabilities for the
+     * values {@code x0, x0 + 1, x0 + 2, ..., x1}, in the order directed by
+     * {@code dx}.
+     *
+     * @param x0 Inclusive lower bound.
+     * @param x1 Inclusive upper bound.
+     * @param dx Direction of summation (1 indicates summing from x0 to x1, and
+     * 0 indicates summing from x1 to x0).
+     * @return {@code P(x0 <= X <= x1)}.
+     */
+    private double innerCumulativeProbability(int x0, int x1, int dx) {
+        double ret = probability(x0);
+        while (x0 != x1) {
+            x0 += dx;
+            ret += probability(x0);
+        }
+        return ret;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For population size {@code N}, number of successes {@code m}, and sample
+     * size {@code n}, the mean is {@code n * m / N}.
+     */
+    @Override
+    public double getNumericalMean() {
+        return getSampleSize() * (getNumberOfSuccesses() / (double) getPopulationSize());
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For population size {@code N}, number of successes {@code m}, and sample
+     * size {@code n}, the variance is
+     * {@code (n * m * (N - n) * (N - m)) / (N^2 * (N - 1))}.
+     */
+    @Override
+    public double getNumericalVariance() {
+        final double N = getPopulationSize();
+        final double m = getNumberOfSuccesses();
+        final double n = getSampleSize();
+        return (n * m * (N - n) * (N - m)) / (N * N * (N - 1));
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For population size {@code N}, number of successes {@code m}, and sample
+     * size {@code n}, the lower bound of the support is
+     * {@code max(0, n + m - N)}.
+     *
+     * @return lower bound of the support
+     */
+    @Override
+    public int getSupportLowerBound() {
+        return Math.max(0,
+                        getSampleSize() + getNumberOfSuccesses() - getPopulationSize());
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For number of successes {@code m} and sample size {@code n}, the upper
+     * bound of the support is {@code min(m, n)}.
+     *
+     * @return upper bound of the support
+     */
+    @Override
+    public int getSupportUpperBound() {
+        return Math.min(getNumberOfSuccesses(), getSampleSize());
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/LaplaceDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/LaplaceDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/LaplaceDistribution.java
new file mode 100644
index 0000000..0d1a8bf
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/LaplaceDistribution.java
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+/**
+ * This class implements the Laplace distribution.
+ *
+ * @see <a href="http://en.wikipedia.org/wiki/Laplace_distribution">Laplace distribution (Wikipedia)</a>
+ *
+ * @since 3.4
+ */
+public class LaplaceDistribution extends AbstractContinuousDistribution {
+
+    /** Serializable version identifier. */
+    private static final long serialVersionUID = 20160311L;
+
+    /** The location parameter. */
+    private final double mu;
+    /** The scale parameter. */
+    private final double beta;
+
+    /**
+     * Creates a distribution.
+     *
+     * @param mu location parameter
+     * @param beta scale parameter (must be positive)
+     * @throws IllegalArgumentException if {@code beta <= 0}
+     */
+    public LaplaceDistribution(double mu,
+                               double beta) {
+        if (beta <= 0.0) {
+            throw new DistributionException(DistributionException.NEGATIVE, beta);
+        }
+
+        this.mu = mu;
+        this.beta = beta;
+    }
+
+    /**
+     * Access the location parameter, {@code mu}.
+     *
+     * @return the location parameter.
+     */
+    public double getLocation() {
+        return mu;
+    }
+
+    /**
+     * Access the scale parameter, {@code beta}.
+     *
+     * @return the scale parameter.
+     */
+    public double getScale() {
+        return beta;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double density(double x) {
+        return Math.exp(-Math.abs(x - mu) / beta) / (2.0 * beta);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double cumulativeProbability(double x) {
+        if (x <= mu) {
+            return Math.exp((x - mu) / beta) / 2.0;
+        } else {
+            return 1.0 - Math.exp((mu - x) / beta) / 2.0;
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double inverseCumulativeProbability(double p) {
+        if (p < 0 ||
+            p > 1) {
+            throw new DistributionException(DistributionException.OUT_OF_RANGE, p, 0, 1);
+        } else if (p == 0) {
+            return Double.NEGATIVE_INFINITY;
+        } else if (p == 1) {
+            return Double.POSITIVE_INFINITY;
+        }
+        double x = (p > 0.5) ? -Math.log(2.0 - 2.0 * p) : Math.log(2.0 * p);
+        return mu + beta * x;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getNumericalMean() {
+        return mu;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getNumericalVariance() {
+        return 2.0 * beta * beta;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getSupportLowerBound() {
+        return Double.NEGATIVE_INFINITY;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getSupportUpperBound() {
+        return Double.POSITIVE_INFINITY;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/LevyDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/LevyDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/LevyDistribution.java
new file mode 100644
index 0000000..d16da8d
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/LevyDistribution.java
@@ -0,0 +1,161 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.gamma.Erfc;
+import org.apache.commons.numbers.gamma.InverseErfc;
+
+/**
+ * This class implements the <a href="http://en.wikipedia.org/wiki/L%C3%A9vy_distribution">
+ * L&eacute;vy distribution</a>.
+ */
+public class LevyDistribution extends AbstractContinuousDistribution {
+    /** Location parameter. */
+    private final double mu;
+    /** Scale parameter. */
+    private final double c;
+    /** Half of c (for calculations). */
+    private final double halfC;
+
+    /**
+     * Creates a distribution.
+     *
+     * @param mu location
+     * @param c scale parameter
+     */
+    public LevyDistribution(final double mu,
+                            final double c) {
+        this.mu = mu;
+        this.c = c;
+        this.halfC = 0.5 * c;
+    }
+
+    /** {@inheritDoc}
+    * <p>
+    * From Wikipedia: The probability density function of the L&eacute;vy distribution
+    * over the domain is
+    * </p>
+    * <div style="white-space: pre"><code>
+    * f(x; &mu;, c) = &radic;(c / 2&pi;) * e<sup>-c / 2 (x - &mu;)</sup> / (x - &mu;)<sup>3/2</sup>
+    * </code></div>
+    * <p>
+    * For this distribution, {@code X}, this method returns {@code P(X < x)}.
+    * If {@code x} is less than location parameter &mu;, {@code Double.NaN} is
+    * returned, as in these cases the distribution is not defined.
+    * </p>
+    */
+    @Override
+    public double density(final double x) {
+        if (x < mu) {
+            return Double.NaN;
+        }
+
+        final double delta = x - mu;
+        final double f = halfC / delta;
+        return Math.sqrt(f / Math.PI) * Math.exp(-f) /delta;
+    }
+
+    /** {@inheritDoc}
+     *
+     * See documentation of {@link #density(double)} for computation details.
+     */
+    @Override
+    public double logDensity(double x) {
+        if (x < mu) {
+            return Double.NaN;
+        }
+
+        final double delta = x - mu;
+        final double f     = halfC / delta;
+        return 0.5 * Math.log(f / Math.PI) - f - Math.log(delta);
+    }
+
+    /** {@inheritDoc}
+     * <p>
+     * From Wikipedia: the cumulative distribution function is
+     * </p>
+     * <pre>
+     * f(x; u, c) = erfc (&radic; (c / 2 (x - u )))
+     * </pre>
+     */
+    @Override
+    public double cumulativeProbability(final double x) {
+        if (x < mu) {
+            return Double.NaN;
+        }
+        return Erfc.value(Math.sqrt(halfC / (x - mu)));
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double inverseCumulativeProbability(final double p) {
+        if (p < 0 ||
+            p > 1) {
+            throw new DistributionException(DistributionException.OUT_OF_RANGE, p, 0, 1);
+        }
+        final double t = InverseErfc.value(p);
+        return mu + halfC / (t * t);
+    }
+
+    /**
+     * Gets the scale parameter of the distribution.
+     *
+     * @return scale parameter of the distribution
+     */
+    public double getScale() {
+        return c;
+    }
+
+    /**
+     * Gets the location parameter of the distribution.
+     *
+     * @return location parameter of the distribution
+     */
+    public double getLocation() {
+        return mu;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getNumericalMean() {
+        return Double.POSITIVE_INFINITY;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getNumericalVariance() {
+        return Double.POSITIVE_INFINITY;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getSupportLowerBound() {
+        return mu;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getSupportUpperBound() {
+        return Double.POSITIVE_INFINITY;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/LogNormalDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/LogNormalDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/LogNormalDistribution.java
new file mode 100644
index 0000000..25bdd33
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/LogNormalDistribution.java
@@ -0,0 +1,266 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.gamma.Erf;
+import org.apache.commons.numbers.gamma.ErfDifference;
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.sampling.distribution.ContinuousSampler;
+import org.apache.commons.rng.sampling.distribution.LogNormalSampler;
+import org.apache.commons.rng.sampling.distribution.ZigguratNormalizedGaussianSampler;
+
+/**
+ * Implementation of the <a href="http://en.wikipedia.org/wiki/Log-normal_distribution">log-normal distribution</a>.
+ *
+ * <p>
+ * <strong>Parameters:</strong>
+ * {@code X} is log-normally distributed if its natural logarithm {@code log(X)}
+ * is normally distributed. The probability distribution function of {@code X}
+ * is given by (for {@code x > 0})
+ * </p>
+ * <p>
+ * {@code exp(-0.5 * ((ln(x) - m) / s)^2) / (s * sqrt(2 * pi) * x)}
+ * </p>
+ * <ul>
+ * <li>{@code m} is the <em>scale</em> parameter: this is the mean of the
+ * normally distributed natural logarithm of this distribution,</li>
+ * <li>{@code s} is the <em>shape</em> parameter: this is the standard
+ * deviation of the normally distributed natural logarithm of this
+ * distribution.
+ * </ul>
+ */
+public class LogNormalDistribution extends AbstractContinuousDistribution {
+    /** &radic;(2 &pi;) */
+    private static final double SQRT2PI = Math.sqrt(2 * Math.PI);
+    /** &radic;(2) */
+    private static final double SQRT2 = Math.sqrt(2);
+    /** The scale parameter of this distribution. */
+    private final double scale;
+    /** The shape parameter of this distribution. */
+    private final double shape;
+    /** The value of {@code log(shape) + 0.5 * log(2*PI)} stored for faster computation. */
+    private final double logShapePlusHalfLog2Pi;
+
+    /**
+     * Creates a log-normal distribution, where the mean and standard deviation
+     * of the {@link NormalDistribution normally distributed} natural
+     * logarithm of the log-normal distribution are equal to zero and one
+     * respectively. In other words, the scale of the returned distribution is
+     * {@code 0}, while its shape is {@code 1}.
+     */
+    public LogNormalDistribution() {
+        this(0, 1);
+    }
+
+    /**
+     * Creates a log-normal distribution.
+     *
+     * @param scale Scale parameter of this distribution.
+     * @param shape Shape parameter of this distribution.
+     * @throws IllegalArgumentException if {@code shape <= 0}.
+     */
+    public LogNormalDistribution(double scale,
+                                 double shape) {
+        if (shape <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE, shape);
+        }
+
+        this.scale = scale;
+        this.shape = shape;
+        this.logShapePlusHalfLog2Pi = Math.log(shape) + 0.5 * Math.log(2 * Math.PI);
+    }
+
+    /**
+     * Returns the scale parameter of this distribution.
+     *
+     * @return the scale parameter
+     */
+    public double getScale() {
+        return scale;
+    }
+
+    /**
+     * Returns the shape parameter of this distribution.
+     *
+     * @return the shape parameter
+     */
+    public double getShape() {
+        return shape;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For scale {@code m}, and shape {@code s} of this distribution, the PDF
+     * is given by
+     * <ul>
+     * <li>{@code 0} if {@code x <= 0},</li>
+     * <li>{@code exp(-0.5 * ((ln(x) - m) / s)^2) / (s * sqrt(2 * pi) * x)}
+     * otherwise.</li>
+     * </ul>
+     */
+    @Override
+    public double density(double x) {
+        if (x <= 0) {
+            return 0;
+        }
+        final double x0 = Math.log(x) - scale;
+        final double x1 = x0 / shape;
+        return Math.exp(-0.5 * x1 * x1) / (shape * SQRT2PI * x);
+    }
+
+    /** {@inheritDoc}
+     *
+     * See documentation of {@link #density(double)} for computation details.
+     */
+    @Override
+    public double logDensity(double x) {
+        if (x <= 0) {
+            return Double.NEGATIVE_INFINITY;
+        }
+        final double logX = Math.log(x);
+        final double x0 = logX - scale;
+        final double x1 = x0 / shape;
+        return -0.5 * x1 * x1 - (logShapePlusHalfLog2Pi + logX);
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For scale {@code m}, and shape {@code s} of this distribution, the CDF
+     * is given by
+     * <ul>
+     * <li>{@code 0} if {@code x <= 0},</li>
+     * <li>{@code 0} if {@code ln(x) - m < 0} and {@code m - ln(x) > 40 * s}, as
+     * in these cases the actual value is within {@code Double.MIN_VALUE} of 0,
+     * <li>{@code 1} if {@code ln(x) - m >= 0} and {@code ln(x) - m > 40 * s},
+     * as in these cases the actual value is within {@code Double.MIN_VALUE} of
+     * 1,</li>
+     * <li>{@code 0.5 + 0.5 * erf((ln(x) - m) / (s * sqrt(2))} otherwise.</li>
+     * </ul>
+     */
+    @Override
+    public double cumulativeProbability(double x)  {
+        if (x <= 0) {
+            return 0;
+        }
+        final double dev = Math.log(x) - scale;
+        if (Math.abs(dev) > 40 * shape) {
+            return dev < 0 ? 0.0d : 1.0d;
+        }
+        return 0.5 + 0.5 * Erf.value(dev / (shape * SQRT2));
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double probability(double x0,
+                              double x1) {
+        if (x0 > x1) {
+            throw new DistributionException(DistributionException.TOO_LARGE,
+                                            x0, x1);
+        }
+        if (x0 <= 0 || x1 <= 0) {
+            return super.probability(x0, x1);
+        }
+        final double denom = shape * SQRT2;
+        final double v0 = (Math.log(x0) - scale) / denom;
+        final double v1 = (Math.log(x1) - scale) / denom;
+        return 0.5 * ErfDifference.value(v0, v1);
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For scale {@code m} and shape {@code s}, the mean is
+     * {@code exp(m + s^2 / 2)}.
+     */
+    @Override
+    public double getNumericalMean() {
+        double s = shape;
+        return Math.exp(scale + (s * s / 2));
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For scale {@code m} and shape {@code s}, the variance is
+     * {@code (exp(s^2) - 1) * exp(2 * m + s^2)}.
+     */
+    @Override
+    public double getNumericalVariance() {
+        final double s = shape;
+        final double ss = s * s;
+        return (Math.expm1(ss)) * Math.exp(2 * scale + ss);
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The lower bound of the support is always 0 no matter the parameters.
+     *
+     * @return lower bound of the support (always 0)
+     */
+    @Override
+    public double getSupportLowerBound() {
+        return 0;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The upper bound of the support is always positive infinity
+     * no matter the parameters.
+     *
+     * @return upper bound of the support (always
+     * {@code Double.POSITIVE_INFINITY})
+     */
+    @Override
+    public double getSupportUpperBound() {
+        return Double.POSITIVE_INFINITY;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public ContinuousDistribution.Sampler createSampler(final UniformRandomProvider rng) {
+        return new ContinuousDistribution.Sampler() {
+            /**
+             * Log normal distribution sampler.
+             */
+            private final ContinuousSampler sampler =
+                new LogNormalSampler(new ZigguratNormalizedGaussianSampler(rng), scale, shape);
+
+            /**{@inheritDoc} */
+            @Override
+            public double sample() {
+                return sampler.sample();
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/LogisticDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/LogisticDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/LogisticDistribution.java
new file mode 100644
index 0000000..28a6657
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/LogisticDistribution.java
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+/**
+ * Implementation of the <a href="http://en.wikipedia.org/wiki/Logistic_distribution">Logistic distribution</a>.
+ */
+public class LogisticDistribution extends AbstractContinuousDistribution {
+    /** &pi;<sup>2</sup>/3. */
+    private static final double PI_SQUARED_OVER_THREE = Math.PI * Math.PI / 3;
+    /** Location parameter. */
+    private final double mu;
+    /** Scale parameter. */
+    private final double scale;
+    /** Inverse of "scale". */
+    private final double oneOverScale;
+
+    /**
+     * Creates a distribution.
+     *
+     * @param mu Location parameter.
+     * @param scale Scale parameter (must be positive).
+     * @throws IllegalArgumentException if {@code scale <= 0}.
+     */
+    public LogisticDistribution(double mu,
+                                double scale) {
+        if (scale <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE,
+                                            scale);
+        }
+
+        this.mu = mu;
+        this.scale = scale;
+        this.oneOverScale = 1 / scale;
+    }
+
+    /**
+     * Gets the location parameter.
+     *
+     * @return the location parameter.
+     */
+    public double getLocation() {
+        return mu;
+    }
+
+    /**
+     * Gets the scale parameter.
+     *
+     * @return the scale parameter.
+     */
+    public double getScale() {
+        return scale;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double density(double x) {
+        final double z = oneOverScale * (x - mu);
+        final double v = Math.exp(-z);
+        return oneOverScale * v / ((1 + v) * (1 + v));
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double cumulativeProbability(double x) {
+        final double z = oneOverScale * (x - mu);
+        return 1 / (1 + Math.exp(-z));
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double inverseCumulativeProbability(double p) {
+        if (p < 0 ||
+            p > 1) {
+            throw new DistributionException(DistributionException.OUT_OF_RANGE, p, 0, 1);
+        } else if (p == 0) {
+            return 0;
+        } else if (p == 1) {
+            return Double.POSITIVE_INFINITY;
+        } else {
+            return scale * Math.log(p / (1 - p)) + mu;
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getNumericalMean() {
+        return mu;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getNumericalVariance() {
+        return oneOverScale * oneOverScale * PI_SQUARED_OVER_THREE;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getSupportLowerBound() {
+        return Double.NEGATIVE_INFINITY;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getSupportUpperBound() {
+        return Double.POSITIVE_INFINITY;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/NakagamiDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/NakagamiDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/NakagamiDistribution.java
new file mode 100644
index 0000000..9bf7d2f
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/NakagamiDistribution.java
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.gamma.Gamma;
+import org.apache.commons.numbers.gamma.RegularizedGamma;
+
+/**
+ * This class implements the <a href="http://en.wikipedia.org/wiki/Nakagami_distribution">Nakagami distribution</a>.
+ */
+public class NakagamiDistribution extends AbstractContinuousDistribution {
+    /** The shape parameter. */
+    private final double mu;
+    /** The scale parameter. */
+    private final double omega;
+
+    /**
+     * Creates a distribution.
+     *
+     * @param mu shape parameter
+     * @param omega scale parameter (must be positive)
+     * @throws IllegalArgumentException  if {@code mu < 0.5} or if
+     * {@code omega <= 0}.
+     */
+    public NakagamiDistribution(double mu,
+                                double omega) {
+        if (mu < 0.5) {
+            throw new DistributionException(DistributionException.TOO_SMALL, mu, 0.5);
+        }
+        if (omega <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE, omega);
+        }
+
+        this.mu = mu;
+        this.omega = omega;
+    }
+
+    /**
+     * Access the shape parameter, {@code mu}.
+     *
+     * @return the shape parameter.
+     */
+    public double getShape() {
+        return mu;
+    }
+
+    /**
+     * Access the scale parameter, {@code omega}.
+     *
+     * @return the scale parameter.
+     */
+    public double getScale() {
+        return omega;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double density(double x) {
+        if (x <= 0) {
+            return 0.0;
+        }
+        return 2.0 * Math.pow(mu, mu) / (Gamma.value(mu) * Math.pow(omega, mu)) *
+                     Math.pow(x, 2 * mu - 1) * Math.exp(-mu * x * x / omega);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double cumulativeProbability(double x) {
+        return RegularizedGamma.P.value(mu, mu * x * x / omega);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getNumericalMean() {
+        return Gamma.value(mu + 0.5) / Gamma.value(mu) * Math.sqrt(omega / mu);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getNumericalVariance() {
+        double v = Gamma.value(mu + 0.5) / Gamma.value(mu);
+        return omega * (1 - 1 / mu * v * v);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getSupportLowerBound() {
+        return 0;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double getSupportUpperBound() {
+        return Double.POSITIVE_INFINITY;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+
+}


[13/16] commons-statistics git commit: STATISTICS-2: Migrate "o.a.c.math4.distribution" from Commons Math.

Posted by er...@apache.org.
STATISTICS-2: Migrate "o.a.c.math4.distribution" from Commons Math.

"IntegerDistribution" was renamed "DiscreteDistribution".
"RealDistribution" was renamed "ContinuousDistribution".

All exceptions are instances of "DistributionException" (package-private).

Solver code (used by method "inverseCumulativeProbability") is a private
static inner class in "AbstractContinuousDistribution".
Tolerances are hard-coded. [Constructors that specified a tolerance were
removed.]

Calls to "FastMath" were replaced by calls to JDK "Math".  This has led to
two unit tests failing in "GammaDistributionTest" for which the tolerance
had to be slightly increased. [The main source indicates which calls to
"Math" methods are responsible for the failures at the original tolerance.]


Project: http://git-wip-us.apache.org/repos/asf/commons-statistics/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-statistics/commit/9c794a15
Tree: http://git-wip-us.apache.org/repos/asf/commons-statistics/tree/9c794a15
Diff: http://git-wip-us.apache.org/repos/asf/commons-statistics/diff/9c794a15

Branch: refs/heads/master
Commit: 9c794a15f75aafbe9d2ab4b62b7e43e1c32e7501
Parents: 585178f
Author: Gilles Sadowski <gi...@harfang.homelinux.org>
Authored: Sun Jan 21 14:41:03 2018 +0100
Committer: Gilles Sadowski <gi...@harfang.homelinux.org>
Committed: Sun Jan 21 14:41:03 2018 +0100

----------------------------------------------------------------------
 commons-statistics-distribution/LICENSE.txt     |  275 ++
 commons-statistics-distribution/NOTICE.txt      |    5 +
 commons-statistics-distribution/pom.xml         |   86 +
 .../AbstractContinuousDistribution.java         |  453 +++
 .../AbstractDiscreteDistribution.java           |  220 ++
 .../distribution/BetaDistribution.java          |  202 ++
 .../distribution/BinomialDistribution.java      |  170 +
 .../distribution/CauchyDistribution.java        |  166 +
 .../distribution/ChiSquaredDistribution.java    |  119 +
 .../ConstantContinuousDistribution.java         |  116 +
 .../distribution/ContinuousDistribution.java    |  176 +
 .../distribution/DiscreteDistribution.java      |  163 +
 .../distribution/DistributionException.java     |   61 +
 .../distribution/ExponentialDistribution.java   |  197 ++
 .../statistics/distribution/FDistribution.java  |  209 ++
 .../distribution/GammaDistribution.java         |  354 ++
 .../distribution/GeometricDistribution.java     |  160 +
 .../distribution/GumbelDistribution.java        |  128 +
 .../HypergeometricDistribution.java             |  293 ++
 .../distribution/LaplaceDistribution.java       |  132 +
 .../distribution/LevyDistribution.java          |  161 +
 .../distribution/LogNormalDistribution.java     |  266 ++
 .../distribution/LogisticDistribution.java      |  128 +
 .../distribution/NakagamiDistribution.java      |  117 +
 .../distribution/NormalDistribution.java        |  216 ++
 .../distribution/ParetoDistribution.java        |  225 ++
 .../distribution/PascalDistribution.java        |  211 ++
 .../distribution/PoissonDistribution.java       |  238 ++
 .../distribution/SaddlePointExpansion.java      |  191 +
 .../statistics/distribution/TDistribution.java  |  180 +
 .../distribution/TriangularDistribution.java    |  222 ++
 .../UniformContinuousDistribution.java          |  168 +
 .../UniformDiscreteDistribution.java            |  159 +
 .../distribution/WeibullDistribution.java       |  220 ++
 .../distribution/ZipfDistribution.java          |  236 ++
 .../statistics/distribution/package-info.java   |   20 +
 .../AbstractContinuousDistributionTest.java     |  209 ++
 .../AbstractDiscreteDistributionTest.java       |  130 +
 .../distribution/BetaDistributionTest.java      |  381 ++
 .../distribution/BinomialDistributionTest.java  |  173 +
 .../distribution/CauchyDistributionTest.java    |  111 +
 .../ChiSquaredDistributionTest.java             |  136 +
 .../ConstantContinuousDistributionTest.java     |   92 +
 .../ContinuousDistributionAbstractTest.java     |  456 +++
 .../DiscreteDistributionAbstractTest.java       |  411 +++
 .../ExponentialDistributionTest.java            |  132 +
 .../distribution/FDistributionTest.java         |  150 +
 .../distribution/GammaDistributionTest.java     |  354 ++
 .../distribution/GeometricDistributionTest.java |  167 +
 .../distribution/GumbelDistributionTest.java    |   70 +
 .../HypergeometricDistributionTest.java         |  335 ++
 .../distribution/LaplaceDistributionTest.java   |   70 +
 .../distribution/LevyDistributionTest.java      |   81 +
 .../distribution/LogNormalDistributionTest.java |  250 ++
 .../distribution/LogisticsDistributionTest.java |   70 +
 .../distribution/NakagamiDistributionTest.java  |   70 +
 .../distribution/NormalDistributionTest.java    |  213 ++
 .../distribution/ParetoDistributionTest.java    |  201 ++
 .../distribution/PascalDistributionTest.java    |  132 +
 .../distribution/PoissonDistributionTest.java   |  244 ++
 .../distribution/TDistributionTest.java         |  169 +
 .../statistics/distribution/TestUtils.java      |  281 ++
 .../TriangularDistributionTest.java             |  192 +
 .../UniformContinuousDistributionTest.java      |  123 +
 .../UniformDiscreteDistributionTest.java        |  139 +
 .../distribution/WeibullDistributionTest.java   |  118 +
 .../distribution/ZipfDistributionTest.java      |  166 +
 .../distribution/gamma-distribution-shape-1.csv | 3215 +++++++++++++++++
 .../gamma-distribution-shape-10.csv             |  415 +++
 .../gamma-distribution-shape-100.csv            |  408 +++
 .../gamma-distribution-shape-1000.csv           | 3325 ++++++++++++++++++
 .../gamma-distribution-shape-142.csv            |  775 ++++
 .../distribution/gamma-distribution-shape-8.csv | 3215 +++++++++++++++++
 .../distribution/gamma-distribution.mac         |   73 +
 .../statistics/distribution/testData.txt        | 1000 ++++++
 pom.xml                                         |   65 +-
 76 files changed, 24949 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/LICENSE.txt
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/LICENSE.txt b/commons-statistics-distribution/LICENSE.txt
new file mode 100644
index 0000000..de777e4
--- /dev/null
+++ b/commons-statistics-distribution/LICENSE.txt
@@ -0,0 +1,275 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+================================================================================
+
+Class "org.apache.commons.rng.internal.source64.MersenneTwister64" contains
+Java code partly ported from the reference implementation in C.
+That source file contained the following notice:
+
+   Copyright (C) 2004, Makoto Matsumoto and Takuji Nishimura,
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+     1. Redistributions of source code must retain the above copyright
+        notice, this list of conditions and the following disclaimer.
+
+     2. Redistributions in binary form must reproduce the above copyright
+        notice, this list of conditions and the following disclaimer in the
+        documentation and/or other materials provided with the distribution.
+
+     3. The names of its contributors may not be used to endorse or promote
+        products derived from this software without specific prior written
+        permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+================================================================================
+
+Class "org.apache.commons.rng.internal.source32.MersenneTwister" contains
+Java code partly ported from the reference implementation in C.
+That source file contained the following notice:
+
+   Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+     1. Redistributions of source code must retain the above copyright
+        notice, this list of conditions and the following disclaimer.
+
+     2. Redistributions in binary form must reproduce the above copyright
+        notice, this list of conditions and the following disclaimer in the
+        documentation and/or other materials provided with the distribution.
+
+     3. The names of its contributors may not be used to endorse or promote
+        products derived from this software without specific prior written
+        permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+================================================================================

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/NOTICE.txt
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/NOTICE.txt b/commons-statistics-distribution/NOTICE.txt
new file mode 100644
index 0000000..a67070b
--- /dev/null
+++ b/commons-statistics-distribution/NOTICE.txt
@@ -0,0 +1,5 @@
+Apache Commons Statistics
+Copyright 2018-2018 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/pom.xml
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/pom.xml b/commons-statistics-distribution/pom.xml
new file mode 100644
index 0000000..ed5d669
--- /dev/null
+++ b/commons-statistics-distribution/pom.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.commons</groupId>
+    <artifactId>commons-statistics-parent</artifactId>
+    <version>0.1-SNAPSHOT</version>
+  </parent>
+
+  <groupId>org.apache.commons</groupId>
+  <artifactId>commons-statistics-distribution</artifactId>
+  <version>0.1-SNAPSHOT</version>
+  <name>Apache Commons Statistics Distribution</name>
+
+  <description>Statistical distributions.</description>
+
+  <properties>
+    <!-- This value must reflect the current name of the base package. -->
+    <commons.osgi.symbolicName>org.apache.commons.statistics.distribution</commons.osgi.symbolicName>
+    <!-- OSGi -->
+    <commons.osgi.export>org.apache.commons.statistics.distribution</commons.osgi.export>
+    <!-- Workaround to avoid duplicating config files. -->
+    <statistics.parent.dir>${basedir}/..</statistics.parent.dir>
+  </properties>
+
+  <dependencies>
+
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-rng-client-api</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-rng-sampling</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-numbers-core</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-numbers-combinatorics</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-numbers-gamma</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-rng-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-math3</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+  </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/AbstractContinuousDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/AbstractContinuousDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/AbstractContinuousDistribution.java
new file mode 100644
index 0000000..1d6b254
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/AbstractContinuousDistribution.java
@@ -0,0 +1,453 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import java.util.function.DoubleUnaryOperator;
+import org.apache.commons.numbers.core.Precision;
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.sampling.distribution.InverseTransformContinuousSampler;
+import org.apache.commons.rng.sampling.distribution.ContinuousInverseCumulativeProbabilityFunction;
+import org.apache.commons.rng.sampling.distribution.ContinuousSampler;
+
+/**
+ * Base class for probability distributions on the reals.
+ * Default implementations are provided for some of the methods
+ * that do not vary from distribution to distribution.
+ *
+ * This base class provides a default factory method for creating
+ * a {@link ContinuousDistribution.Sampler sampler instance} that uses the
+ * <a href="http://en.wikipedia.org/wiki/Inverse_transform_sampling">
+ * inversion method</a> for generating random samples that follow the
+ * distribution.
+ */
+public abstract class AbstractContinuousDistribution
+    implements ContinuousDistribution {
+    /**
+     * For a random variable {@code X} whose values are distributed according
+     * to this distribution, this method returns {@code P(x0 < X <= x1)}.
+     *
+     * @param x0 Lower bound (excluded).
+     * @param x1 Upper bound (included).
+     * @return the probability that a random variable with this distribution
+     * takes a value between {@code x0} and {@code x1}, excluding the lower
+     * and including the upper endpoint.
+     * @throws IllegalArgumentException if {@code x0 > x1}.
+     *
+     * The default implementation uses the identity
+     * {@code P(x0 < X <= x1) = P(X <= x1) - P(X <= x0)}
+     */
+    @Override
+    public double probability(double x0,
+                              double x1) {
+        if (x0 > x1) {
+            throw new DistributionException(DistributionException.TOO_LARGE, x0, x1);
+        }
+        return cumulativeProbability(x1) - cumulativeProbability(x0);
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The default implementation returns
+     * <ul>
+     * <li>{@link #getSupportLowerBound()} for {@code p = 0},</li>
+     * <li>{@link #getSupportUpperBound()} for {@code p = 1}.</li>
+     * </ul>
+     */
+    @Override
+    public double inverseCumulativeProbability(final double p) {
+        /*
+         * IMPLEMENTATION NOTES
+         * --------------------
+         * Where applicable, use is made of the one-sided Chebyshev inequality
+         * to bracket the root. This inequality states that
+         * P(X - mu >= k * sig) <= 1 / (1 + k^2),
+         * mu: mean, sig: standard deviation. Equivalently
+         * 1 - P(X < mu + k * sig) <= 1 / (1 + k^2),
+         * F(mu + k * sig) >= k^2 / (1 + k^2).
+         *
+         * For k = sqrt(p / (1 - p)), we find
+         * F(mu + k * sig) >= p,
+         * and (mu + k * sig) is an upper-bound for the root.
+         *
+         * Then, introducing Y = -X, mean(Y) = -mu, sd(Y) = sig, and
+         * P(Y >= -mu + k * sig) <= 1 / (1 + k^2),
+         * P(-X >= -mu + k * sig) <= 1 / (1 + k^2),
+         * P(X <= mu - k * sig) <= 1 / (1 + k^2),
+         * F(mu - k * sig) <= 1 / (1 + k^2).
+         *
+         * For k = sqrt((1 - p) / p), we find
+         * F(mu - k * sig) <= p,
+         * and (mu - k * sig) is a lower-bound for the root.
+         *
+         * In cases where the Chebyshev inequality does not apply, geometric
+         * progressions 1, 2, 4, ... and -1, -2, -4, ... are used to bracket
+         * the root.
+         */
+        if (p < 0 ||
+            p > 1) {
+            throw new DistributionException(DistributionException.OUT_OF_RANGE, p, 0, 1);
+        }
+
+        double lowerBound = getSupportLowerBound();
+        if (p == 0) {
+            return lowerBound;
+        }
+
+        double upperBound = getSupportUpperBound();
+        if (p == 1) {
+            return upperBound;
+        }
+
+        final double mu = getNumericalMean();
+        final double sig = Math.sqrt(getNumericalVariance());
+        final boolean chebyshevApplies;
+        chebyshevApplies = !(Double.isInfinite(mu) ||
+                             Double.isNaN(mu) ||
+                             Double.isInfinite(sig) ||
+                             Double.isNaN(sig));
+
+        if (lowerBound == Double.NEGATIVE_INFINITY) {
+            if (chebyshevApplies) {
+                lowerBound = mu - sig * Math.sqrt((1 - p) / p);
+            } else {
+                lowerBound = -1;
+                while (cumulativeProbability(lowerBound) >= p) {
+                    lowerBound *= 2;
+                }
+            }
+        }
+
+        if (upperBound == Double.POSITIVE_INFINITY) {
+            if (chebyshevApplies) {
+                upperBound = mu + sig * Math.sqrt(p / (1 - p));
+            } else {
+                upperBound = 1;
+                while (cumulativeProbability(upperBound) < p) {
+                    upperBound *= 2;
+                }
+            }
+        }
+
+        // XXX Values copied from defaults in class
+        // "o.a.c.math4.analysis.solvers.BaseAbstractUnivariateSolver"
+        final double solverRelativeAccuracy = 1e-14;
+        final double solverAbsoluteAccuracy = 1e-9;
+        final double solverFunctionValueAccuracy = 1e-15;
+
+        double x = new BrentSolver(solverRelativeAccuracy,
+                                   solverAbsoluteAccuracy,
+                                   solverFunctionValueAccuracy)
+            .solve((arg) -> cumulativeProbability(arg) - p,
+                   lowerBound,
+                   0.5 * (lowerBound + upperBound),
+                   upperBound);
+
+        if (!isSupportConnected()) {
+            /* Test for plateau. */
+            final double dx = solverAbsoluteAccuracy;
+            if (x - dx >= getSupportLowerBound()) {
+                double px = cumulativeProbability(x);
+                if (cumulativeProbability(x - dx) == px) {
+                    upperBound = x;
+                    while (upperBound - lowerBound > dx) {
+                        final double midPoint = 0.5 * (lowerBound + upperBound);
+                        if (cumulativeProbability(midPoint) < px) {
+                            lowerBound = midPoint;
+                        } else {
+                            upperBound = midPoint;
+                        }
+                    }
+                    return upperBound;
+                }
+            }
+        }
+        return x;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @return zero.
+     */
+    @Override
+    public double probability(double x) {
+        return 0;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The default implementation computes the logarithm of {@code density(x)}.
+     */
+    @Override
+    public double logDensity(double x) {
+        return Math.log(density(x));
+    }
+
+    /**
+     * Utility function for allocating an array and filling it with {@code n}
+     * samples generated by the given {@code sampler}.
+     *
+     * @param n Number of samples.
+     * @param sampler Sampler.
+     * @return an array of size {@code n}.
+     */
+    public static double[] sample(int n,
+                                  ContinuousDistribution.Sampler sampler) {
+        final double[] samples = new double[n];
+        for (int i = 0; i < n; i++) {
+            samples[i] = sampler.sample();
+        }
+        return samples;
+    }
+
+    /**{@inheritDoc} */
+    @Override
+    public ContinuousDistribution.Sampler createSampler(final UniformRandomProvider rng) {
+        return new ContinuousDistribution.Sampler() {
+            /**
+             * Inversion method distribution sampler.
+             */
+            private final ContinuousSampler sampler =
+                new InverseTransformContinuousSampler(rng, createICPF());
+
+            /** {@inheritDoc} */
+            @Override
+            public double sample() {
+                return sampler.sample();
+            }
+        };
+    }
+
+    /**
+     * @return an instance for use by {@link #createSampler(UniformRandomProvider)}
+     */
+    private ContinuousInverseCumulativeProbabilityFunction createICPF() {
+        return new ContinuousInverseCumulativeProbabilityFunction() {
+            /** {@inheritDoc} */
+            @Override
+            public double inverseCumulativeProbability(double p) {
+                return AbstractContinuousDistribution.this.inverseCumulativeProbability(p);
+            }
+        };
+    }
+
+    /**
+     * This class implements the <a href="http://mathworld.wolfram.com/BrentsMethod.html">
+     * Brent algorithm</a> for finding zeros of real univariate functions.
+     * The function should be continuous but not necessarily smooth.
+     * The {@code solve} method returns a zero {@code x} of the function {@code f}
+     * in the given interval {@code [a, b]} to within a tolerance
+     * {@code 2 eps abs(x) + t} where {@code eps} is the relative accuracy and
+     * {@code t} is the absolute accuracy.
+     * <p>The given interval must bracket the root.</p>
+     * <p>
+     *  The reference implementation is given in chapter 4 of
+     *  <blockquote>
+     *   <b>Algorithms for Minimization Without Derivatives</b>,
+     *   <em>Richard P. Brent</em>,
+     *   Dover, 2002
+     *  </blockquote>
+     *
+     * Used by {@link #inverseCumulativeProbability(double)}.
+     */
+    private static class BrentSolver {
+        /** Relative accuracy. */
+        private final double relativeAccuracy;
+        /** Absolutee accuracy. */
+        private final double absoluteAccuracy;
+        /** Function accuracy. */
+        private final double functionValueAccuracy;
+
+        /**
+         * Construct a solver.
+         *
+         * @param relativeAccuracy Relative accuracy.
+         * @param absoluteAccuracy Absolute accuracy.
+         * @param functionValueAccuracy Function value accuracy.
+         */
+        BrentSolver(double relativeAccuracy,
+                    double absoluteAccuracy,
+                    double functionValueAccuracy) {
+            this.relativeAccuracy = relativeAccuracy;
+            this.absoluteAccuracy = absoluteAccuracy;
+            this.functionValueAccuracy = functionValueAccuracy;
+        }
+
+        /**
+         * @param func Function to solve.
+         * @param min Lower bound.
+         * @param init Initial guess.
+         * @param max Upper bound.
+         * @return the root.
+         */
+        double solve(DoubleUnaryOperator func,
+                     double min,
+                     double initial,
+                     double max) {
+            if (min > max) {
+                throw new DistributionException(DistributionException.TOO_LARGE, min, max);
+            }
+            if (initial < min ||
+                initial > max) {
+                throw new DistributionException(DistributionException.OUT_OF_RANGE, initial, min, max);
+            }
+
+            // Return the initial guess if it is good enough.
+            double yInitial = func.applyAsDouble(initial);
+            if (Math.abs(yInitial) <= functionValueAccuracy) {
+                return initial;
+            }
+
+            // Return the first endpoint if it is good enough.
+            double yMin = func.applyAsDouble(min);
+            if (Math.abs(yMin) <= functionValueAccuracy) {
+                return min;
+            }
+
+            // Reduce interval if min and initial bracket the root.
+            if (yInitial * yMin < 0) {
+                return brent(func, min, initial, yMin, yInitial);
+            }
+
+            // Return the second endpoint if it is good enough.
+            double yMax = func.applyAsDouble(max);
+            if (Math.abs(yMax) <= functionValueAccuracy) {
+                return max;
+            }
+
+            // Reduce interval if initial and max bracket the root.
+            if (yInitial * yMax < 0) {
+                return brent(func, initial, max, yInitial, yMax);
+            }
+
+            throw new DistributionException(DistributionException.BRACKETING, min, yMin, max, yMax);
+        }
+
+        /**
+         * Search for a zero inside the provided interval.
+         * This implementation is based on the algorithm described at page 58 of
+         * the book
+         * <blockquote>
+         *  <b>Algorithms for Minimization Without Derivatives</b>,
+         *  <it>Richard P. Brent</it>,
+         *  Dover 0-486-41998-3
+         * </blockquote>
+         *
+         * @param func Function to solve.
+         * @param lo Lower bound of the search interval.
+         * @param hi Higher bound of the search interval.
+         * @param fLo Function value at the lower bound of the search interval.
+         * @param fHi Function value at the higher bound of the search interval.
+         * @return the value where the function is zero.
+         */
+        private double brent(DoubleUnaryOperator func,
+                             double lo, double hi,
+                             double fLo, double fHi) {
+            double a = lo;
+            double fa = fLo;
+            double b = hi;
+            double fb = fHi;
+            double c = a;
+            double fc = fa;
+            double d = b - a;
+            double e = d;
+
+            final double t = absoluteAccuracy;
+            final double eps = relativeAccuracy;
+
+            while (true) {
+                if (Math.abs(fc) < Math.abs(fb)) {
+                    a = b;
+                    b = c;
+                    c = a;
+                    fa = fb;
+                    fb = fc;
+                    fc = fa;
+                }
+
+                final double tol = 2 * eps * Math.abs(b) + t;
+                final double m = 0.5 * (c - b);
+
+                if (Math.abs(m) <= tol ||
+                    Precision.equals(fb, 0))  {
+                    return b;
+                }
+                if (Math.abs(e) < tol ||
+                    Math.abs(fa) <= Math.abs(fb)) {
+                    // Force bisection.
+                    d = m;
+                    e = d;
+                } else {
+                    double s = fb / fa;
+                    double p;
+                    double q;
+                    // The equality test (a == c) is intentional,
+                    // it is part of the original Brent's method and
+                    // it should NOT be replaced by proximity test.
+                    if (a == c) {
+                        // Linear interpolation.
+                        p = 2 * m * s;
+                        q = 1 - s;
+                    } else {
+                        // Inverse quadratic interpolation.
+                        q = fa / fc;
+                        final double r = fb / fc;
+                        p = s * (2 * m * q * (q - r) - (b - a) * (r - 1));
+                        q = (q - 1) * (r - 1) * (s - 1);
+                    }
+                    if (p > 0) {
+                        q = -q;
+                    } else {
+                        p = -p;
+                    }
+                    s = e;
+                    e = d;
+                    if (p >= 1.5 * m * q - Math.abs(tol * q) ||
+                        p >= Math.abs(0.5 * s * q)) {
+                        // Inverse quadratic interpolation gives a value
+                        // in the wrong direction, or progress is slow.
+                        // Fall back to bisection.
+                        d = m;
+                        e = d;
+                    } else {
+                        d = p / q;
+                    }
+                }
+                a = b;
+                fa = fb;
+
+                if (Math.abs(d) > tol) {
+                    b += d;
+                } else if (m > 0) {
+                    b += tol;
+                } else {
+                    b -= tol;
+                }
+                fb = func.applyAsDouble(b);
+                if ((fb > 0 && fc > 0) ||
+                    (fb <= 0 && fc <= 0)) {
+                    c = a;
+                    fc = fa;
+                    d = b - a;
+                    e = d;
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/AbstractDiscreteDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/AbstractDiscreteDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/AbstractDiscreteDistribution.java
new file mode 100644
index 0000000..faef96c
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/AbstractDiscreteDistribution.java
@@ -0,0 +1,220 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.sampling.distribution.InverseTransformDiscreteSampler;
+import org.apache.commons.rng.sampling.distribution.DiscreteInverseCumulativeProbabilityFunction;
+import org.apache.commons.rng.sampling.distribution.DiscreteSampler;
+
+/**
+ * Base class for integer-valued discrete distributions.  Default
+ * implementations are provided for some of the methods that do not vary
+ * from distribution to distribution.
+ */
+public abstract class AbstractDiscreteDistribution
+    implements DiscreteDistribution {
+    /**
+     * {@inheritDoc}
+     *
+     * The default implementation uses the identity
+     * {@code P(x0 < X <= x1) = P(X <= x1) - P(X <= x0)}
+     */
+    @Override
+    public double probability(int x0,
+                              int x1) {
+        if (x1 < x0) {
+            throw new DistributionException(DistributionException.TOO_SMALL,
+                                            x1, x0);
+        }
+        return cumulativeProbability(x1) - cumulativeProbability(x0);
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The default implementation returns
+     * <ul>
+     * <li>{@link #getSupportLowerBound()} for {@code p = 0},</li>
+     * <li>{@link #getSupportUpperBound()} for {@code p = 1}, and</li>
+     * <li>{@link #solveInverseCumulativeProbability(double, int, int)} for
+     *     {@code 0 < p < 1}.</li>
+     * </ul>
+     */
+    @Override
+    public int inverseCumulativeProbability(final double p) {
+        if (p < 0 ||
+            p > 1) {
+            throw new DistributionException(DistributionException.OUT_OF_RANGE, p, 0, 1);
+        }
+
+        int lower = getSupportLowerBound();
+        if (p == 0.0) {
+            return lower;
+        }
+        if (lower == Integer.MIN_VALUE) {
+            if (checkedCumulativeProbability(lower) >= p) {
+                return lower;
+            }
+        } else {
+            lower -= 1; // this ensures cumulativeProbability(lower) < p, which
+                        // is important for the solving step
+        }
+
+        int upper = getSupportUpperBound();
+        if (p == 1.0) {
+            return upper;
+        }
+
+        // use the one-sided Chebyshev inequality to narrow the bracket
+        // cf. AbstractRealDistribution.inverseCumulativeProbability(double)
+        final double mu = getNumericalMean();
+        final double sigma = Math.sqrt(getNumericalVariance());
+        final boolean chebyshevApplies = !(Double.isInfinite(mu) ||
+                                           Double.isNaN(mu) ||
+                                           Double.isInfinite(sigma) ||
+                                           Double.isNaN(sigma) ||
+                                           sigma == 0.0);
+        if (chebyshevApplies) {
+            double k = Math.sqrt((1.0 - p) / p);
+            double tmp = mu - k * sigma;
+            if (tmp > lower) {
+                lower = ((int) Math.ceil(tmp)) - 1;
+            }
+            k = 1.0 / k;
+            tmp = mu + k * sigma;
+            if (tmp < upper) {
+                upper = ((int) Math.ceil(tmp)) - 1;
+            }
+        }
+
+        return solveInverseCumulativeProbability(p, lower, upper);
+    }
+
+    /**
+     * This is a utility function used by {@link
+     * #inverseCumulativeProbability(double)}. It assumes {@code 0 < p < 1} and
+     * that the inverse cumulative probability lies in the bracket {@code
+     * (lower, upper]}. The implementation does simple bisection to find the
+     * smallest {@code p}-quantile {@code inf{x in Z | P(X <= x) >= p}}.
+     *
+     * @param p Cumulative probability.
+     * @param lower Value satisfying {@code cumulativeProbability(lower) < p}.
+     * @param upper Value satisfying {@code p <= cumulativeProbability(upper)}.
+     * @return the smallest {@code p}-quantile of this distribution.
+     */
+    private int solveInverseCumulativeProbability(final double p,
+                                                  int lower,
+                                                  int upper) {
+        while (lower + 1 < upper) {
+            int xm = (lower + upper) / 2;
+            if (xm < lower || xm > upper) {
+                /*
+                 * Overflow.
+                 * There will never be an overflow in both calculation methods
+                 * for xm at the same time
+                 */
+                xm = lower + (upper - lower) / 2;
+            }
+
+            double pm = checkedCumulativeProbability(xm);
+            if (pm >= p) {
+                upper = xm;
+            } else {
+                lower = xm;
+            }
+        }
+        return upper;
+    }
+
+    /**
+     * Computes the cumulative probability function and checks for {@code NaN}
+     * values returned. Throws {@code MathInternalError} if the value is
+     * {@code NaN}. Rethrows any exception encountered evaluating the cumulative
+     * probability function. Throws {@code MathInternalError} if the cumulative
+     * probability function returns {@code NaN}.
+     *
+     * @param argument Input value.
+     * @return the cumulative probability.
+     * @throws IllegalStateException if the cumulative probability is {@code NaN}.
+     */
+    private double checkedCumulativeProbability(int argument) {
+        final double result = cumulativeProbability(argument);
+        if (Double.isNaN(result)) {
+            throw new IllegalStateException("Internal error");
+        }
+        return result;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The default implementation simply computes the logarithm of {@code probability(x)}.
+     */
+    @Override
+    public double logProbability(int x) {
+        return Math.log(probability(x));
+    }
+
+    /**
+     * Utility function for allocating an array and filling it with {@code n}
+     * samples generated by the given {@code sampler}.
+     *
+     * @param n Number of samples.
+     * @param sampler Sampler.
+     * @return an array of size {@code n}.
+     */
+    public static int[] sample(int n,
+                               DiscreteDistribution.Sampler sampler) {
+        final int[] samples = new int[n];
+        for (int i = 0; i < n; i++) {
+            samples[i] = sampler.sample();
+        }
+        return samples;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public DiscreteDistribution.Sampler createSampler(final UniformRandomProvider rng) {
+        return new DiscreteDistribution.Sampler() {
+            /**
+             * Inversion method distribution sampler.
+             */
+            private final DiscreteSampler sampler =
+                new InverseTransformDiscreteSampler(rng, createICPF());
+
+            /** {@inheritDoc} */
+            @Override
+            public int sample() {
+                return sampler.sample();
+            }
+        };
+    }
+
+    /**
+     * @return an instance for use by {@link #createSampler(UniformRandomProvider)}.
+     */
+    private DiscreteInverseCumulativeProbabilityFunction createICPF() {
+        return new DiscreteInverseCumulativeProbabilityFunction() {
+            /** {@inheritDoc} */
+            @Override
+            public int inverseCumulativeProbability(double p) {
+                return AbstractDiscreteDistribution.this.inverseCumulativeProbability(p);
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/BetaDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/BetaDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/BetaDistribution.java
new file mode 100644
index 0000000..0a07b49
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/BetaDistribution.java
@@ -0,0 +1,202 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.gamma.RegularizedBeta;
+import org.apache.commons.numbers.gamma.LogGamma;
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.sampling.distribution.ContinuousSampler;
+import org.apache.commons.rng.sampling.distribution.ChengBetaSampler;
+
+/**
+ * Implementation of the <a href="http://en.wikipedia.org/wiki/Beta_distribution">Beta distribution</a>.
+ */
+public class BetaDistribution extends AbstractContinuousDistribution {
+    /** First shape parameter. */
+    private final double alpha;
+    /** Second shape parameter. */
+    private final double beta;
+    /** Normalizing factor used in density computations.*/
+    private final double z;
+
+    /**
+     * Creates a new instance.
+     *
+     * @param alpha First shape parameter (must be positive).
+     * @param beta Second shape parameter (must be positive).
+     */
+    public BetaDistribution(double alpha,
+                            double beta) {
+        this.alpha = alpha;
+        this.beta = beta;
+        z = LogGamma.value(alpha) + LogGamma.value(beta) - LogGamma.value(alpha + beta);
+    }
+
+    /**
+     * Access the first shape parameter, {@code alpha}.
+     *
+     * @return the first shape parameter.
+     */
+    public double getAlpha() {
+        return alpha;
+    }
+
+    /**
+     * Access the second shape parameter, {@code beta}.
+     *
+     * @return the second shape parameter.
+     */
+    public double getBeta() {
+        return beta;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double density(double x) {
+        final double logDensity = logDensity(x);
+        return logDensity == Double.NEGATIVE_INFINITY ? 0 : Math.exp(logDensity);
+    }
+
+    /** {@inheritDoc} **/
+    @Override
+    public double logDensity(double x) {
+        if (x < 0 ||
+            x > 1) {
+            return Double.NEGATIVE_INFINITY;
+        } else if (x == 0) {
+            if (alpha < 1) {
+                throw new DistributionException(DistributionException.TOO_SMALL,
+                                                alpha, 1);
+            }
+            return Double.NEGATIVE_INFINITY;
+        } else if (x == 1) {
+            if (beta < 1) {
+                throw new DistributionException(DistributionException.TOO_SMALL,
+                                                beta, 1);
+            }
+            return Double.NEGATIVE_INFINITY;
+        } else {
+            double logX = Math.log(x);
+            double log1mX = Math.log1p(-x);
+            return (alpha - 1) * logX + (beta - 1) * log1mX - z;
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double cumulativeProbability(double x)  {
+        if (x <= 0) {
+            return 0;
+        } else if (x >= 1) {
+            return 1;
+        } else {
+            return RegularizedBeta.value(x, alpha, beta);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For first shape parameter {@code alpha} and second shape parameter
+     * {@code beta}, the mean is {@code alpha / (alpha + beta)}.
+     */
+    @Override
+    public double getNumericalMean() {
+        final double a = getAlpha();
+        return a / (a + getBeta());
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For first shape parameter {@code alpha} and second shape parameter
+     * {@code beta}, the variance is
+     * {@code (alpha * beta) / [(alpha + beta)^2 * (alpha + beta + 1)]}.
+     */
+    @Override
+    public double getNumericalVariance() {
+        final double a = getAlpha();
+        final double b = getBeta();
+        final double alphabetasum = a + b;
+        return (a * b) / ((alphabetasum * alphabetasum) * (alphabetasum + 1));
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The lower bound of the support is always 0 no matter the parameters.
+     *
+     * @return lower bound of the support (always 0)
+     */
+    @Override
+    public double getSupportLowerBound() {
+        return 0;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The upper bound of the support is always 1 no matter the parameters.
+     *
+     * @return upper bound of the support (always 1)
+     */
+    @Override
+    public double getSupportUpperBound() {
+        return 1;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * Sampling is performed using Cheng's algorithm:
+     * <blockquote>
+     * <pre>
+     * R. C. H. Cheng,
+     * "Generating beta variates with nonintegral shape parameters",
+     * Communications of the ACM, 21, 317-322, 1978.
+     * </pre>
+     * </blockquote>
+     */
+    @Override
+    public ContinuousDistribution.Sampler createSampler(final UniformRandomProvider rng) {
+        return new ContinuousDistribution.Sampler() {
+            /**
+             * Beta distribution sampler.
+             */
+            private final ContinuousSampler sampler =
+                new ChengBetaSampler(rng, alpha, beta);
+
+            /**{@inheritDoc} */
+            @Override
+            public double sample() {
+                return sampler.sample();
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/BinomialDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/BinomialDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/BinomialDistribution.java
new file mode 100644
index 0000000..7177968
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/BinomialDistribution.java
@@ -0,0 +1,170 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.gamma.RegularizedBeta;
+
+/**
+ * Implementation of the <a href="http://en.wikipedia.org/wiki/Binomial_distribution">binomial distribution</a>.
+ */
+public class BinomialDistribution extends AbstractDiscreteDistribution {
+    /** The number of trials. */
+    private final int numberOfTrials;
+    /** The probability of success. */
+    private final double probabilityOfSuccess;
+
+    /**
+     * Creates a binomial distribution.
+     *
+     * @param trials Number of trials.
+     * @param p Probability of success.
+     * @throws IllegalArgumentException if {@code trials < 0}, or if
+     * {@code p < 0} or {@code p > 1}.
+     */
+    public BinomialDistribution(int trials,
+                                double p) {
+        if (trials < 0) {
+            throw new DistributionException(DistributionException.NEGATIVE,
+                                           trials);
+        }
+        if (p < 0 ||
+            p > 1) {
+            throw new DistributionException(DistributionException.OUT_OF_RANGE, p, 0, 1);
+        }
+
+        probabilityOfSuccess = p;
+        numberOfTrials = trials;
+    }
+
+    /**
+     * Access the number of trials for this distribution.
+     *
+     * @return the number of trials.
+     */
+    public int getNumberOfTrials() {
+        return numberOfTrials;
+    }
+
+    /**
+     * Access the probability of success for this distribution.
+     *
+     * @return the probability of success.
+     */
+    public double getProbabilityOfSuccess() {
+        return probabilityOfSuccess;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double probability(int x) {
+        final double logProbability = logProbability(x);
+        return logProbability == Double.NEGATIVE_INFINITY ? 0 : Math.exp(logProbability);
+    }
+
+    /** {@inheritDoc} **/
+    @Override
+    public double logProbability(int x) {
+        if (numberOfTrials == 0) {
+            return (x == 0) ? 0. : Double.NEGATIVE_INFINITY;
+        }
+        double ret;
+        if (x < 0 || x > numberOfTrials) {
+            ret = Double.NEGATIVE_INFINITY;
+        } else {
+            ret = SaddlePointExpansion.logBinomialProbability(x,
+                    numberOfTrials, probabilityOfSuccess,
+                    1.0 - probabilityOfSuccess);
+        }
+        return ret;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double cumulativeProbability(int x) {
+        double ret;
+        if (x < 0) {
+            ret = 0.0;
+        } else if (x >= numberOfTrials) {
+            ret = 1.0;
+        } else {
+            ret = 1.0 - RegularizedBeta.value(probabilityOfSuccess,
+                                              x + 1.0, numberOfTrials - x);
+        }
+        return ret;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For {@code n} trials and probability parameter {@code p}, the mean is
+     * {@code n * p}.
+     */
+    @Override
+    public double getNumericalMean() {
+        return numberOfTrials * probabilityOfSuccess;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For {@code n} trials and probability parameter {@code p}, the variance is
+     * {@code n * p * (1 - p)}.
+     */
+    @Override
+    public double getNumericalVariance() {
+        final double p = probabilityOfSuccess;
+        return numberOfTrials * p * (1 - p);
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The lower bound of the support is always 0 except for the probability
+     * parameter {@code p = 1}.
+     *
+     * @return lower bound of the support (0 or the number of trials)
+     */
+    @Override
+    public int getSupportLowerBound() {
+        return probabilityOfSuccess < 1.0 ? 0 : numberOfTrials;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The upper bound of the support is the number of trials except for the
+     * probability parameter {@code p = 0}.
+     *
+     * @return upper bound of the support (number of trials or 0)
+     */
+    @Override
+    public int getSupportUpperBound() {
+        return probabilityOfSuccess > 0.0 ? numberOfTrials : 0;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/CauchyDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/CauchyDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/CauchyDistribution.java
new file mode 100644
index 0000000..a7b6c64
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/CauchyDistribution.java
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+/**
+ * Implementation of the <a href="http://en.wikipedia.org/wiki/Cauchy_distribution">Cauchy distribution</a>.
+ */
+public class CauchyDistribution extends AbstractContinuousDistribution {
+    /** The median of this distribution. */
+    private final double median;
+    /** The scale of this distribution. */
+    private final double scale;
+
+    /**
+     * Creates a Cauchy distribution with the median equal to zero and scale
+     * equal to one.
+     */
+    public CauchyDistribution() {
+        this(0, 1);
+    }
+
+    /**
+     * Creates a distribution.
+     *
+     * @param median Median for this distribution.
+     * @param scale Scale parameter for this distribution.
+     * @throws IllegalArgumentException if {@code scale <= 0}.
+     */
+    public CauchyDistribution(double median,
+                              double scale) {
+        if (scale <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE, scale);
+        }
+        this.scale = scale;
+        this.median = median;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double cumulativeProbability(double x) {
+        return 0.5 + (Math.atan((x - median) / scale) / Math.PI);
+    }
+
+    /**
+     * Access the median.
+     *
+     * @return the median for this distribution.
+     */
+    public double getMedian() {
+        return median;
+    }
+
+    /**
+     * Access the scale parameter.
+     *
+     * @return the scale parameter for this distribution.
+     */
+    public double getScale() {
+        return scale;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double density(double x) {
+        final double dev = x - median;
+        return (1 / Math.PI) * (scale / (dev * dev + scale * scale));
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * Returns {@code Double.NEGATIVE_INFINITY} when {@code p == 0}
+     * and {@code Double.POSITIVE_INFINITY} when {@code p == 1}.
+     */
+    @Override
+    public double inverseCumulativeProbability(double p) {
+        double ret;
+        if (p < 0 ||
+            p > 1) {
+            throw new DistributionException(DistributionException.OUT_OF_RANGE, p, 0, 1);
+        } else if (p == 0) {
+            ret = Double.NEGATIVE_INFINITY;
+        } else  if (p == 1) {
+            ret = Double.POSITIVE_INFINITY;
+        } else {
+            ret = median + scale * Math.tan(Math.PI * (p - .5));
+        }
+        return ret;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The mean is always undefined no matter the parameters.
+     *
+     * @return mean (always Double.NaN)
+     */
+    @Override
+    public double getNumericalMean() {
+        return Double.NaN;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The variance is always undefined no matter the parameters.
+     *
+     * @return variance (always Double.NaN)
+     */
+    @Override
+    public double getNumericalVariance() {
+        return Double.NaN;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The lower bound of the support is always negative infinity no matter
+     * the parameters.
+     *
+     * @return lower bound of the support (always Double.NEGATIVE_INFINITY)
+     */
+    @Override
+    public double getSupportLowerBound() {
+        return Double.NEGATIVE_INFINITY;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The upper bound of the support is always positive infinity no matter
+     * the parameters.
+     *
+     * @return upper bound of the support (always Double.POSITIVE_INFINITY)
+     */
+    @Override
+    public double getSupportUpperBound() {
+        return Double.POSITIVE_INFINITY;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ChiSquaredDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ChiSquaredDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ChiSquaredDistribution.java
new file mode 100644
index 0000000..5f31254
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ChiSquaredDistribution.java
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+/**
+ * Implementation of the <a href="http://en.wikipedia.org/wiki/Chi-squared_distribution">chi-squared distribution</a>.
+ */
+public class ChiSquaredDistribution extends AbstractContinuousDistribution {
+    /** Internal Gamma distribution. */
+    private final GammaDistribution gamma;
+
+    /**
+     * Creates a distribution.
+     *
+     * @param degreesOfFreedom Degrees of freedom.
+     */
+    public ChiSquaredDistribution(double degreesOfFreedom) {
+        gamma = new GammaDistribution(degreesOfFreedom / 2, 2);
+    }
+
+    /**
+     * Access the number of degrees of freedom.
+     *
+     * @return the degrees of freedom.
+     */
+    public double getDegreesOfFreedom() {
+        return gamma.getShape() * 2;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double density(double x) {
+        return gamma.density(x);
+    }
+
+    /** {@inheritDoc} **/
+    @Override
+    public double logDensity(double x) {
+        return gamma.logDensity(x);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double cumulativeProbability(double x)  {
+        return gamma.cumulativeProbability(x);
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For {@code k} degrees of freedom, the mean is {@code k}.
+     */
+    @Override
+    public double getNumericalMean() {
+        return getDegreesOfFreedom();
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @return {@code 2 * k}, where {@code k} is the number of degrees of freedom.
+     */
+    @Override
+    public double getNumericalVariance() {
+        return 2 * getDegreesOfFreedom();
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The lower bound of the support is always 0 no matter the
+     * degrees of freedom.
+     *
+     * @return zero.
+     */
+    @Override
+    public double getSupportLowerBound() {
+        return 0;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The upper bound of the support is always positive infinity no matter the
+     * degrees of freedom.
+     *
+     * @return {@code Double.POSITIVE_INFINITY}.
+     */
+    @Override
+    public double getSupportUpperBound() {
+        return Double.POSITIVE_INFINITY;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ConstantContinuousDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ConstantContinuousDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ConstantContinuousDistribution.java
new file mode 100644
index 0000000..54694f1
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ConstantContinuousDistribution.java
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.rng.UniformRandomProvider;
+
+/**
+ * Implementation of the constant real distribution.
+ */
+public class ConstantContinuousDistribution extends AbstractContinuousDistribution {
+    /** Constant value of the distribution. */
+    private final double value;
+
+    /**
+     * Create a constant real distribution with the given value.
+     *
+     * @param value Value of this distribution.
+     */
+    public ConstantContinuousDistribution(double value) {
+        this.value = value;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double density(double x) {
+        return x == value ? 1 : 0;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double cumulativeProbability(double x)  {
+        return x < value ? 0 : 1;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double inverseCumulativeProbability(final double p) {
+        if (p < 0 ||
+            p > 1) {
+            throw new DistributionException(DistributionException.OUT_OF_RANGE, p, 0, 1);
+        }
+        return value;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public double getNumericalMean() {
+        return value;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public double getNumericalVariance() {
+        return 0;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public double getSupportLowerBound() {
+        return value;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public double getSupportUpperBound() {
+        return value;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @param rng Not used: distribution contains a single value.
+     * @return the value of the distribution.
+     */
+    @Override
+    public ContinuousDistribution.Sampler createSampler(final UniformRandomProvider rng) {
+        return new ContinuousDistribution.Sampler() {
+            /** {@inheritDoc} */
+            @Override
+            public double sample() {
+                return value;
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ContinuousDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ContinuousDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ContinuousDistribution.java
new file mode 100644
index 0000000..b08f75a
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ContinuousDistribution.java
@@ -0,0 +1,176 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.rng.UniformRandomProvider;
+
+/**
+ * Base interface for distributions on the reals.
+ */
+public interface ContinuousDistribution {
+    /**
+     * For a random variable {@code X} whose values are distributed according
+     * to this distribution, this method returns {@code P(X = x)}. In other
+     * words, this method represents the probability mass function (PMF)
+     * for the distribution.
+     *
+     * @param x the point at which the PMF is evaluated
+     * @return the value of the probability mass function at point {@code x}
+     */
+    double probability(double x);
+
+    /**
+     * For a random variable {@code X} whose values are distributed according
+     * to this distribution, this method returns {@code P(x0 < X <= x1)}.
+     *
+     * @param x0 the exclusive lower bound
+     * @param x1 the inclusive upper bound
+     * @return the probability that a random variable with this distribution
+     * takes a value between {@code x0} and {@code x1},
+     * excluding the lower and including the upper endpoint
+     * @throws IllegalArgumentException if {@code x0 > x1}
+     */
+    double probability(double x0, double x1);
+
+    /**
+     * Returns the probability density function (PDF) of this distribution
+     * evaluated at the specified point {@code x}. In general, the PDF is
+     * the derivative of the {@link #cumulativeProbability(double) CDF}.
+     * If the derivative does not exist at {@code x}, then an appropriate
+     * replacement should be returned, e.g. {@code Double.POSITIVE_INFINITY},
+     * {@code Double.NaN}, or  the limit inferior or limit superior of the
+     * difference quotient.
+     *
+     * @param x the point at which the PDF is evaluated
+     * @return the value of the probability density function at point {@code x}
+     */
+    double density(double x);
+
+    /**
+     * Returns the natural logarithm of the probability density function
+     * (PDF) of this distribution evaluated at the specified point {@code x}.
+     * In general, the PDF is the derivative of the {@link #cumulativeProbability(double) CDF}.
+     * If the derivative does not exist at {@code x}, then an appropriate replacement
+     * should be returned, e.g. {@code Double.POSITIVE_INFINITY}, {@code Double.NaN},
+     * or the limit inferior or limit superior of the difference quotient. Note that
+     * due to the floating point precision and under/overflow issues, this method will
+     * for some distributions be more precise and faster than computing the logarithm of
+     * {@link #density(double)}.
+     *
+     * @param x the point at which the PDF is evaluated
+     * @return the logarithm of the value of the probability density function at point {@code x}
+     */
+    double logDensity(double x);
+
+    /**
+     * For a random variable {@code X} whose values are distributed according
+     * to this distribution, this method returns {@code P(X <= x)}. In other
+     * words, this method represents the (cumulative) distribution function
+     * (CDF) for this distribution.
+     *
+     * @param x the point at which the CDF is evaluated
+     * @return the probability that a random variable with this
+     * distribution takes a value less than or equal to {@code x}
+     */
+    double cumulativeProbability(double x);
+
+    /**
+     * Computes the quantile function of this distribution. For a random
+     * variable {@code X} distributed according to this distribution, the
+     * returned value is
+     * <ul>
+     * <li>{@code inf{x in R | P(X<=x) >= p}} for {@code 0 < p <= 1},</li>
+     * <li>{@code inf{x in R | P(X<=x) > 0}} for {@code p = 0}.</li>
+     * </ul>
+     *
+     * @param p the cumulative probability
+     * @return the smallest {@code p}-quantile of this distribution
+     * (largest 0-quantile for {@code p = 0})
+     * @throws IllegalArgumentException if {@code p < 0} or {@code p > 1}
+     */
+    double inverseCumulativeProbability(double p);
+
+    /**
+     * Use this method to get the numerical value of the mean of this
+     * distribution.
+     *
+     * @return the mean or {@code Double.NaN} if it is not defined
+     */
+    double getNumericalMean();
+
+    /**
+     * Use this method to get the numerical value of the variance of this
+     * distribution.
+     *
+     * @return the variance (possibly {@code Double.POSITIVE_INFINITY} as
+     * for certain cases in {@link TDistribution}) or {@code Double.NaN} if it
+     * is not defined
+     */
+    double getNumericalVariance();
+
+    /**
+     * Access the lower bound of the support. This method must return the same
+     * value as {@code inverseCumulativeProbability(0)}. In other words, this
+     * method must return
+     * <p>{@code inf {x in R | P(X <= x) > 0}}.</p>
+     *
+     * @return lower bound of the support (might be
+     * {@code Double.NEGATIVE_INFINITY})
+     */
+    double getSupportLowerBound();
+
+    /**
+     * Access the upper bound of the support. This method must return the same
+     * value as {@code inverseCumulativeProbability(1)}. In other words, this
+     * method must return
+     * <p>{@code inf {x in R | P(X <= x) = 1}}.</p>
+     *
+     * @return upper bound of the support (might be
+     * {@code Double.POSITIVE_INFINITY})
+     */
+    double getSupportUpperBound();
+
+    /**
+     * Use this method to get information about whether the support is connected,
+     * i.e. whether all values between the lower and upper bound of the support
+     * are included in the support.
+     *
+     * @return whether the support is connected or not
+     */
+    boolean isSupportConnected();
+
+    /**
+     * Creates a sampler.
+     *
+     * @param rng Generator of uniformly distributed numbers.
+     * @return a sampler that produces random numbers according this
+     * distribution.
+     */
+    Sampler createSampler(UniformRandomProvider rng);
+
+    /**
+     * Sampling functionality.
+     */
+    interface Sampler {
+        /**
+         * Generates a random value sampled from this distribution.
+         *
+         * @return a random value.
+         */
+        double sample();
+    }
+}


[07/16] commons-statistics git commit: STATISTICS-2: Migrate "o.a.c.math4.distribution" from Commons Math.

Posted by er...@apache.org.
http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-1.csv
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-1.csv b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-1.csv
new file mode 100644
index 0000000..af00c10
--- /dev/null
+++ b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-1.csv
@@ -0,0 +1,3215 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+0.03125, 0.9692332344763440818481091932463527836047257538965551706218187232
+0.0625, 0.9394130628134757861197108246223050845246808905494418220094926621
+0.09375, 0.910510361380034127843504886276252075818733291262414284628712251
+0.125, 0.8824969025845954028648921432290507362220048249906507417703093192
+0.15625, 0.8553453273074225376957316350710122527786143627149839873486535107
+0.1875, 0.8290291181804003430146455093430818624253884092834511327569909388
+0.21875, 0.8035225736890607339997845865872831280182965042603916162025275109
+0.25, 0.7788007830714048682451702669783206472967722904261414742413173663
+0.28125, 0.7548396019890073373273470959175298273476002094358293950872264578
+0.3125, 0.7316156289466417911595594204914028252812811532198471928443930381
+0.34375, 0.7091061824373984117214474100165018423431187898899713480387516576
+0.375, 0.6872892787909721985452023391465135904346520237725210691826568897
+0.40625, 0.6661436107034877744697913571301831862471733207796816315099744954
+0.4375, 0.6456485264278920373483556800610319463609397772795757545173895435
+0.46875, 0.625784009604591121679874456535199474230970817827008377497225613
+0.5, 0.6065306597126334236037995349911804534419181354871869556828921587
+0.53125, 0.5878696731223464940295448787316932511299614517963065908580042287
+0.5625, 0.5697828247309230097666296898291228158846384743279959772910085157
+0.59375, 0.5522524501630203650603977247307079991729571565907290748875716022
+0.625, 0.5352614285189902419566225080220464054335441250360218912489004165
+0.65625, 0.5187931656538893563426454573373251134367070087589234204556583319
+0.6875, 0.5028315779709409596886366114376251798828429428010994391961524922
+0.71875, 0.4873610767136191107148846960343577688855623931150161764618936127
+0.75, 0.4723665527410147071380465509432679129702035791364766823956579441
+0.78125, 0.4578333617716142609021468406541889706823290687715449060378795405
+0.8125, 0.4437473100810798718472403499994589636605958914444523402526949191
+0.84375, 0.4300946406400622513959465186060427862421483059922175839822179435
+0.875, 0.416862019678508402585297182336392344618725829882351319044251078
+0.90625, 0.4040365236633420953550290605718456381867923936722379918331324315
+0.9375, 0.3916056266767989932268077284687155142918915495004473003052071024
+0.96875, 0.3795571881830895836590761827218683599001339452984509501570991198
+1.0, 0.3678794411714423215955237701614608674458111310317678345078368017
+1.03125, 0.3565609806639469844401037358662226891081270463824920277712236537
+1.0625, 0.345590752576974515890658664998971793213983210117895140527226858
+1.09375, 0.3349580429252949537037634901608895070141722042599714768229239377
+1.125, 0.3246524673583497297970681374724719919001621064047170561253314998
+1.15625, 0.314663961018459026997774856494311223310353591433070038616351043
+1.1875, 0.3049827687110592920355737223383435088209141015643642820305705718
+1.21875, 0.295599435377370746126553344874182205699296982416652929281127462
+1.25, 0.2865047968601901003248854266478376027931507923282510470883822112
+1.28125, 0.2776899709537899611981194437002147828846120284498204238852415214
+1.3125, 0.2691463487291838829011990129080059074542904083128644764337339049
+1.34375, 0.2608655861262849553731805290249272384572228962381659658995463664
+1.375, 0.2528395958047464778109874998193252779685338886322800884660856919
+1.40625, 0.2450605392455259063573116572130182462651772663026172166218102426
+1.4375, 0.2375208190954581318135909045279779320104319870788761070153321478
+1.46875, 0.2302130717473614763011218428836210183363943216825455921103322034
+1.5, 0.2231301601484298289332804707640125213421716293610793287438353188
+1.53125, 0.2162651668298872943875955714762713215307644279129905399429701532
+1.5625, 0.209611387151097822524110127972043884892551160856101795696587466
+1.59375, 0.2031623227515317329327995471698127874208678000696276274149808164
+1.625, 0.1969116752041940500612892180902017514452725360050508105084499613
+1.65625, 0.190853339864316320634776151179227218855855860517957389672700467
+1.6875, 0.1849813999073042875931379164202863890527953585098332670979164482
+1.71875, 0.1792901205501186299837859108419336597096186522439345655325856282
+1.75, 0.1737739434504451266807172586663710160147208533399050376839813873
+1.78125, 0.1684274812781842384143188059534704964630387129343825509595135867
+1.8125, 0.1632455124539583969735835198648102734686808476777614543028580832
+1.84375, 0.1582229760494984069458670548147022193140743670636298503470587577
+1.875, 0.1533549668449284632955644782100792542963062037780625081357711443
+1.90625, 0.1486367305381225218572049326415189978973318478690864726010238934
+1.9375, 0.1440636591014532790849812088278269379336723828229002277930480832
+1.96875, 0.1396312862813989672098016595482470761550233620224010978211659623
+2.0, 0.1353352832366126918939994949724844034076315459095758814681588727
+2.03125, 0.1311714543101942678048647918633013800975226154991932766811987022
+2.0625, 0.1271357329320355753208418768713503741979718733801207365843596391
+2.09375, 0.1232241776472374968448670653979338864516928703573701117104088816
+2.125, 0.1194329682667196179958769476118814108171492183144219507289770435
+2.15625, 0.1157584021362632175327933302825342911924876461597301797677209604
+2.1875, 0.1121968905203437367863572847404054490939802633246679118014154339
+2.21875, 0.1087449550972210275982118015759633710138678548199629871195280889
+2.25, 0.1053992245618643367832176892406980972684910733772778671488440914
+2.28125, 0.1021564313333943010610871843323990812427799232249322372737366938
+2.3125, 0.09901340836382630210299228473911766801908697048040957106948817286
+2.34375, 0.095967086044998466499262948621638495138186402015077520283433108
+2.375, 0.09301448921066348669986457340375418735074932736166132945145388687
+2.40625, 0.09015273423081637996145008521913116682168405010052603521471707227
+2.4375, 0.08737902619542038382348389451644838852747851510731708839071317726
+2.46875, 0.08469065618478049660859598478340674811051228720749353585903893191
+2.5, 0.08208499862389879516952867446715980783780412101543664884575841051
+2.53125, 0.07955950871822768223387023359211768857574965248445227619807606718
+2.5625, 0.07711171996831671233252919483736885810515927617409728327996150704
+2.59375, 0.07473924176092569607834128697678686744012447048653098200056917835
+2.625, 0.0724397570342514627383438533736588140933118544769412636804368982
+2.65625, 0.07021102001498804355289613124765610630466392038532855768326429259
+2.6875, 0.06805085402501019378876506472936150310385234113658660734066781241
+2.71875, 0.06595714935553816858837466323667630187856432973209011509715836924
+2.75, 0.0639278612067075727024300255579517493086340950787684482181901637
+2.78125, 0.06196100769053198153368884987890151761938945734318480175223397675
+2.8125, 0.06005466789530794296105561330779035134400525581922280768501375308
+2.84375, 0.05820698000957197662131505038131479713379460100133873014470015258
+2.875, 0.05641613950377734830626038887821314960169882535811926332555449239
+2.90625, 0.05468039736791476868816284272671297494736592458531798234569272783
+2.9375, 0.05299805840335580277129913664982808646009786096165100737936582067
+2.96875, 0.05136747956725073264257141233972571980085424410978129029933342626
+3.0, 0.04978706836786394297934241565006177663169959218842321556762772761
+3.03125, 0.04825528130927964649545883495298295172562670161513542517399499271
+3.0625, 0.04677062238395898365276137059832508093166339771695327388484855142
+3.09375, 0.04533164161167626462607060228274503415072485708605403892559341259
+3.125, 0.04393693362340741732674768170146271379851763162525379634224798802
+3.15625, 0.04258513628878760750125461386167104630470212141933938823364301198
+3.1875, 0.04127492938579754840342279753211213185223698672686759377149261064
+3.21875, 0.04000503331137925984994428943034664833574615298217753378765368309
+3.25, 0.03877420783172200988689983526759614326014406193602014570069586099
+3.28125, 0.03758125087099791586064928714045584894448072183794777402166860564
+3.3125, 0.03642499733736423323772595805588577874157512396170989949577846233
+3.34375, 0.03530431798508575672991800888194128016944670772720554472386401553
+3.375, 0.03421811831166603469855505944363081450784839756181186425689497358
+3.40625, 0.03316533748891028888857726498472518873556900852888726679091727231
+3.4375, 0.03214494732687607067068765507355672873434966617801554108645972633
+3.46875, 0.03115595126969980451383975875968302952804390529840382836472636453
+3.5, 0.03019738342231850073978629236361984507166053224765700667134022308
+3.53125, 0.02926830760713609313057408023310541927278773018895089880007170508
+3.5625, 0.02836781644971310213744077213749624467231022004485412104498576072
+3.59375, 0.02749503049258666983761830833692773286485077892961080537740819868
+3.625, 0.02664909733635548608738201053301189079810132921618120730838125207
+3.65625, 0.02582919080719075335688241901461542835803520264839673655219847851
+3.6875, 0.02503451014996014651091840491645328728450430590950487444238024608
+3.71875, 0.02426427924617673852579119829026463360176522595301944080944200617
+3.75, 0.02351774585600910823615118510043293947006765527307240394676540465
+3.78125, 0.02279418088361234536609868230311684110897472367468368755671083469
+3.8125, 0.02209287766506244426599278478536929262885164456499991139723175746
+3.84375, 0.02141315127819865319461971149269400381183718427446499392243796903
+3.875, 0.02075433787369974221535389761705478498013687000307133820023945717
+3.90625, 0.0201157940267408907111667251678182724532674786895672028270897495
+3.9375, 0.01949689610859799542033825380205486616607325892924923760012514382
+3.96875, 0.0188970396775856813829097202628926688814309807853980291379544584
+4.0, 0.01831563888873418029371802127324124221191206755347559476959992744
+4.03125, 0.01775212592162854192233499372975969883192972116048677525865461803
+4.0625, 0.01720595042585138235707948982322940047529341132585851978968192352
+4.09375, 0.01667657898348756518324895682260691958111535986151284742846068108
+4.125, 0.01616349458816587510560304740823871079494213811366044004860959064
+4.15625, 0.01566619614012889424610048876769293504677575385308856266054061244
+4.1875, 0.01518419795683794516341405893814046575269691108830998712146152334
+4.21875, 0.01471702929863513683900037335974210223291459524246608140489966716
+4.25, 0.01426423390899925527328694585600154399994991675424012667683653882
+4.28125, 0.01382536956894649329676837613767217643003783845822635747928280964
+4.3125, 0.01340000766514082864451674147191811176204210430334354228622923307
+4.34375, 0.01298773277129224876057393115059744615353740989840303985272128857
+4.375, 0.01258814224243399826757336796622576881843030886975970319595457323
+4.40625, 0.01220084582168260323107615403580086525828111710466436134730941967
+4.4375, 0.01182546525909661755189452909294639250843084293014711674793270227
+4.46875, 0.01146163394226185293955498823828439237425344696414067596797318211
+4.5, 0.01110899653824230649614313428693052777153926750577133022641468813
+4.53125, 0.0107672086465471001571388735068687991328571956376546310277099526
+4.5625, 0.01043593646277450493543211944248485485973121372784432653938656028
+4.59375, 0.01011485645260455060390336023262613206432098786076504123484223477
+4.625, 0.009803655035821828314879244321390670640100662503601143601731585542
+4.65625, 0.00950202828005988956221732114478494195567290342580259606370062681
+4.6875, 0.009209681603968139410830634641258015734158417894329567329273172993
+4.71875, 0.008926329489511324321877855595748131535959913476387904654310882571
+4.75, 0.008651695203120634177071503957250390848166331197708042545706586267
+4.78125, 0.008385510525424082963534131487875892223089310615047011826504625087
+4.8125, 0.008127515489292211464291280832583824030598636473037479059823140986
+4.84375, 0.007877458125943276392000098054503780496517175327953552313161011211
+4.875, 0.007635094218859961636273483672785768137198906071529716542544038036
+4.90625, 0.007400187065277276355347935180263510842824457375129617949252361694
+4.9375, 0.007172507245008698981719370307464823058773867865025775914754147631
+4.96875, 0.00695183239638479305035695205011840214010007921362123075881921208
+5.0, 0.006737946999085467096636048423148424248849585027355085430305531573
+5.03125, 0.006530642163653783493293737192282643610674504746751262503902759223
+5.0625, 0.006329715427485746576865116967905187540393454200016803051892859526
+5.09375, 0.006134970557096825127264916839030658691480833418155633772249464267
+5.125, 0.00594621735647209438641690704566897345954426935151435029030378917
+5.15625, 0.005763271481312824320038095295859153803955380026251520485108213256
+5.1875, 0.005585954258998099543591723607524682825316954885632630339058838564
+5.21875, 0.005414092514085637873237315115703920663880659029111860199037855447
+5.25, 0.005247518399181384276493529341379106806329911285485231513854577937
+5.28125, 0.005086069231012700368741689865188038290511481988202499932730256759
+5.3125, 0.004929587331545051651531164107447126950798927904544537068789732471
+5.34375, 0.004777919873987020380245489513485961708625619105341678130726022967
+5.375, 0.004630918733533246092687426313748240945109580264796832621306751167
+5.40625, 0.004488440342699523089171400701265242243710121215323386473875365156
+5.4375, 0.004350345551108769047948483985028086291301324701160883903760129469
+5.46875, 0.004216499489590925867367123377085963304777517574095613831651517247
+5.5, 0.004086771438464066993464702684720768408390656650938199420680381076
+5.53125, 0.003961034699868069033446693119142766094868253406671148974219209268
+5.5625, 0.003839166474026163359899948647179930944853965620646042204494596222
+5.59375, 0.003721047739313519543060168680392316955514801610558551630843305328
+5.625, 0.003606563136015730555538690380517047631473552097876093745572466032
+5.65625, 0.003495600853663673406870032014333262941803109188574332258876271471
+5.6875, 0.003388052521834711703606328158927367428351543332740652936192571295
+5.71875, 0.003283813104313592005710537575666247468422318690945586779310733822
+5.75, 0.003182780796509667067986418004781851345939727901057288002656106041
+5.78125, 0.003084856926030259320804964811574293912054539621736957175767155352
+5.8125, 0.002989945856313060363425103900754825679952326991605084845848480667
+5.84375, 0.002897954893223449826180732125675816929535904887786868266272340015
+5.875, 0.002808794194525512622515648388314197517982922391089438835732681408
+5.90625, 0.00272237668213834018632021782255284570470723235221065691168614451
+5.9375, 0.002638617957091921515277196742256435992125043561532871686964183121
+5.96875, 0.002557436217099566373645182738544882718147780558370360198366651572
+6.0, 0.002478752176666358423045167430816667891506479585533945050878624006
+6.03125, 0.002402488989655612843094346412494115953917902977953673477679222241
+6.0625, 0.002328572174237713594091962345533610656600547815524059472895722894
+6.09375, 0.002256929540148032205921834983195362648762057591929041048269036814
+6.125, 0.002187491118182885123279463768573825806083879312942809927133102267
+6.15625, 0.002120189091864672399728363485653413483188650354914611245001219715
+6.1875, 0.002054957731209459046647916273573107166349905572817314113467469009
+6.21875, 0.001991733328532313676882760080850538985462636954614898586443564837
+6.25, 0.001930454136227709242213511975650732143585407919243576211998565724
+6.28125, 0.001871060306464219592313564396450257437552175454483135917989664483
+6.3125, 0.001813493832734615164509378050152183509194283444917342181215981724
+6.34375, 0.001757698493204273174334045279742289222040944071904965895584172695
+6.375, 0.0017036197958025739862904270043299632776080172645777986209743189
+6.40625, 0.001651204925003657617706382602198319650868043431634062393900109512
+6.4375, 0.001600402690244564228582236158344265526832877938443435229165394819
+6.46875, 0.001551163475930381588261266833905837775868201619922448173819899769
+6.5, 0.001503439192977572447382903332167653830000512958302965096556049912
+6.53125, 0.001457183231848156994639590235056917960336538733262224712475344933
+6.5625, 0.001412350417028881609513421478289207778153440870914890039820541848
+6.59375, 0.001368896962910916356439235399316295949556277434052950290238985209
+6.625, 0.001326780431026991480997562486094290709950860226266980805409609041
+6.65625, 0.001285959688604208900649307858698212238002983176682635216061156252
+6.6875, 0.001246394868392049625949765651308944788719901705247374082833885321
+6.71875, 0.001208047329726343458052187456838095023215797644340310114509055038
+6.75, 0.001170879620791174400950220091799273421371832897758106014879662438
+6.78125, 0.001134855442041865181211428726095543169982427982518539780513087483
+6.8125, 0.001099939610753318226547311468625499331045671208090165450479575097
+6.84375, 0.001066098026659089524920251332962115164132816306654638569338233662
+6.875, 0.001033297638647637041402983828895914519059593687066794852999205039
+6.90625, 0.001001506412483217851054633889735961973443197912248930675249293748
+6.9375, 0.0009706932995199088610235252463403912008334680925399803101479719059
+6.96875, 0.0009408282063781959212710105633446220691766745343727337616810629252
+7.0, 0.0009118819655545162080031360844092826264737245274360538408161334219
+7.03125, 0.0008838263069350499252242114258773038821312838014912041578206189774
+7.0625, 0.0008566338301859404976667021148674448059212335235427046619836518091
+7.09375, 0.0008302779779929783852050180570158720377852384516439895937985820523
+7.125, 0.0008047330101246132706901273038690763164573324899262360792712440227
+7.15625, 0.0007799739782929634701909835665035132846721735475241756466725398739
+7.1875, 0.0007559767017882707722124483342609427417108699368399178689216450768
+7.21875, 0.0007327177438630042917310443223090345182932092900640954687963308745
+7.25, 0.0007101743888425490635846003705775444086763023873618958855644522888
+7.28125, 0.0006883246199401247129070199651485647721907580134892609555972864646
+7.3125, 0.0006671470977542673209530199216276155530851107969914025145944840415
+7.34375, 0.0006466211394278742245251986783862759994530947228085273846643940838
+7.375, 0.0006267266984484575973461493757061114218681137917704548519805484944
+7.40625, 0.0006074443450698788931298055115451065619431603982686742996924096967
+7.4375, 0.0005887552473364431944026792533143765119654461832521009036030513795
+7.46875, 0.0005706411526908208010939339800391146893821319817614482738883168793
+7.5, 0.0005530843701478335831020000885303571978113365824401972528887275428
+7.53125, 0.0005360677530166962683263688589214700804598921367476956611788248067
+7.5625, 0.0005195746821548384817648154077377751511011296804475912341693433195
+7.59375, 0.0005035890497369525153511317658679789222543652740898643725806614548
+7.625, 0.0004880952435234149992839225273580295054520480237108282363789757093
+7.65625, 0.0004730781316127183551106542984242177413592699480926910084069795239
+7.6875, 0.000458523047663020615100539178839276407743904933327279468421064005
+7.71875, 0.0004444157765683803531278031880725606756002067566927224217526630583
+7.75, 0.0004307425405756875368524022779915575296882599052168986655351139
+7.78125, 0.0004174899858287315131203958398363662611368389675296285759980124156
+7.8125, 0.0004046451693262644985597619222874584407154373696823266385409007843
+7.84375, 0.0003921955462813232727354585300464376399998336397890094508362077356
+7.875, 0.0003801289578694636568311470477163449699605164160677655248865785467
+7.90625, 0.0003684336193539421893761270923520451107525686247565398712710177303
+7.9375, 0.0003570981085762475529911934497159943116560852590903896462252558755
+7.96875, 0.0003461113548007411220296898486203381973135434208805954866705311516
+8.0, 0.0003354626279025118388213891257808610193109001337203193605445757479
+8.03125, 0.0003251415278878858237467176289227121777896123750406957837272502385
+8.0625, 0.0003151379747373560089452314870190118067605404911296618060388284102
+8.09375, 0.0003054421985610119743910581210086984139633807862988455938478021289
+8.125, 0.0002960447300568553658829835512835003838758631844924119150680640514
+8.15625, 0.0002869363912626820852699215171641143729762525419634282179998785012
+8.1875, 0.0002781082865924991528648619138170386175602080099947620047945011662
+8.21875, 0.0002695517941487220305047253027340987160648527339548888513307943198
+8.25, 0.0002612585573016675324874250850694064792219756685595328507642149398
+8.28125, 0.0002532204765281185037084115243266293838846344484090737587696886096
+8.3125, 0.0002454297015009894646814719880957666448340346669548870505757731606
+8.34375, 0.0002378786234223676588728962081855444925150926189674791899369423683
+8.375, 0.0002305598675924416284118058315172409949839717614575935556359394497
+8.40625, 0.0002234662862070598219011440831922913422310912360465962589980848253
+8.4375, 0.0002165909513768850277400186063407818107618834537046234001954973691
+8.46875, 0.0002099271483613268461528687052620375139990780170761165537271196018
+8.5, 0.0002034683690106441743689334304870663872973115267356780263658398019
+8.53125, 0.0001972083054098129869683688307122355378438819190303223813160856672
+8.5625, 0.0001911408437179517458678108499579280420951606037801895095800576118
+8.59375, 0.0001852600581972877642079051009548185206955821847336826854862835836
+8.625, 0.0001795602054258329620569716245961685824652263127008436806541025727
+8.65625, 0.0001740357186881168701483041768869670085875340665883859433917445889
+8.6875, 0.0001686812025384986360510657660838813742089157829846001462515371612
+8.71875, 0.0001634914275317483350725995401184169644526808427558519502773417982
+8.75, 0.0001584613251157512504141786187559691442411373456536354501727274038
+8.78125, 0.0001535859826813471231991754367183116271116802167242622102265169292
+8.8125, 0.0001488606387644698376000191297719821478921550265722770250552348751
+8.84375, 0.000144280678395901749288105776103235561514032244370266263486885873
+8.875, 0.0001398416285941010320876861017929387851379712412841071512443235659
+8.90625, 0.0001355391539967001488298871209777827300106664462291816066773674721
+8.9375, 0.0001313690526264089844437004220966159392950969621360721766010279784
+8.96875, 0.000127327251787187444555606176301367287180387002688406556322889092
+9.0, 0.0001234098040866795494976366907300338260721528322889390525344820451
+9.03125, 0.0001196128835810243658999818888429185108258969652056335864811210863
+9.0625, 0.0001159327820382786364006465934736575289057160061250221623108121509
+9.09375, 0.0001123659053168018091678296196070452829167882997127534685852868165
+9.125, 0.0001089087698550664460359498799265423289335084024396656413830584875
+9.15625, 0.0001055579992694658107581288407532780515474748382865761525665897401
+9.1875, 0.000102310321056795913457270280699597223185739202660922025412309757
+9.21875, 0.00009916256339819151682555891702717186546597366454690376640824727006
+9.25, 0.00009611165206139469381981833979593087119895727427219431164151538848
+9.28125, 0.00009315460739833056229751232947016233824182291525740273140270765718
+9.3125, 0.00009028854143505790302773519680683956834232111555918228389645630795
+9.34375, 0.00008751065505125258470011779653213008153316193144248093340064553933
+9.375, 0.00008481823524646916105206960352762039293004278786652155609070993855
+9.40625, 0.00008220865249051075644022055030382473483700072365945384799617552838
+9.4375, 0.00007967935815531949986690391308296426796681423730861280365529316217
+9.46875, 0.000077227882025879383862004167833631555907410808994544202102439169
+9.5, 0.00007485182988770059147118931935455516611298689892033605294265268263
+9.53125, 0.00007254888118852912727784123833084539649705409903314256417286963298
+9.5625, 0.00007031678677199807993355714793659429975826743470175514020132903918
+9.59375, 0.00006815336668100710488920879483899164352092935367151110553312094012
+9.625, 0.00006605650802868481552526689828881094589221541652261482631592120758
+9.65625, 0.00006402416293485477518526396636453019642137748615388699383998795778
+9.6875, 0.00006205434652598975618245348519219971968000860482231856571425179731
+9.71875, 0.0000601451349967009371561978803011385062520908748761151923745861008
+9.75, 0.00005829466373086880775836652252947021194344306593416814691930087258
+9.78125, 0.00005650112548058079824489084897915161148029638010797033118813556966
+9.8125, 0.00005476276860109710802162914916812398688335412240782379156968551962
+9.84375, 0.00005307789534012092668460102720742305438486830204296956359359991494
+9.875, 0.00005144486017970227704381268784654159588218795110431542530254772534
+9.90625, 0.0000498620682291561138244431660074570758921308086135886143635749965
+9.9375, 0.00004832797366742513440260230294326645510287196312615155677008419238
+9.96875, 0.00004684107823336604771410811213916985477211989506650581752189108809
+10.0, 0.00004539992976248485153559151556055061023791808886656496925907130565
+10.03125, 0.00004400312076869203238853072341515867823568104895032006188494516111
+10.0625, 0.00004264928706969257066298244855962790325822235544080677470684129238
+10.09375, 0.00004133710645466824914014514567688180114132503936917583622810426884
+10.125, 0.00004006529739295106753162709407675403788226058624825403330335790609
+10.15625, 0.00003883261778242659928804804486446733823331529885284603172829791839
+10.1875, 0.00003763786373644492885890546059828306632733946460140753182867903776
+10.21875, 0.00003647986840805441570507797336937163732233188262401830307888942752
+10.25, 0.00003535750085040998240458763976327742517935314399062311603903121235
+10.28125, 0.00003426966491224295375091385758737628534487890029462593428543689659
+10.3125, 0.0000332152981673137163255754019595779336923035418641869452844925794
+10.34375, 0.00003219337087680165707561627992605006568276303205581351790234620451
+10.375, 0.00003120288498361900735586429289694125271021296009202661681254478819
+10.40625, 0.00003024287313766639712192828719310286775329505015756466990535313522
+10.4375, 0.00002931239775107814293282539127211589186606795626877460112672851012
+10.46875, 0.00002841055008253458265500049750329470509792900494680568353941950583
+10.5, 0.00002753644934974715785741109710242551110158986173923072932051393179
+10.53125, 0.00002668924186924945957530934184690544320994677460172602072985336809
+10.5625, 0.00002586810022265412127035908731992101405025019639191270368287288637
+10.59375, 0.00002507222244856129047201337293241817466703521398592655962966686766
+10.625, 0.00002430083125932946299355438797434340908672824184176946039020883551
+10.65625, 0.00002355317328194374524309716473171740728410198571175485565787858429
+10.6875, 0.00002282851832224014470963609116121530661415288528253875866172038151
+10.71875, 0.0000221261586517672991817087994496068148047063472397902413838409455
+10.75, 0.00002144540831658916392913486505515413613217214562057114062390082297
+10.78125, 0.00002078560246735360453881500237216378851843282733731863872875732472
+10.8125, 0.00002014609670997261227168408907269590687518324275883611929109734365
+10.84375, 0.00001952626647627998898364757363375566889996381261697922654781545696
+10.875, 0.0000189255064140518594886702166687149912230057721263352896270619325
+10.90625, 0.000018343229795794279792229454932371279435801680791230245455965807
+10.9375, 0.00001777886794572053835692990837048942425627006939254003275226367834
+10.96875, 0.00001723186968435851237981125047798864921604813388435887866556113703
+11.0, 0.00001670170079024565931263551736058087907793804695928712447812473711
+11.03125, 0.00001618784347818591235827934788723262562436078513543961606318264344
+11.0625, 0.00001568979589355892372697302987028715129039131940322319375784573094
+11.09375, 0.00001520707162218777683275496225151727657178061889913654754991587414
+11.125, 0.00001473919921528648366435084220255094529912234858283760974456454338
+11.15625, 0.00001428572172902331111586894886699274583174628757237904446776262593
+11.1875, 0.00001384619627825025449477100212214554624394207704331337079434825134
+11.21875, 0.00001342019360396281167854175859667327890312420359300517046936084385
+11.25, 0.0000130072976540676209794295301465587490370648287288213976519861627
+11.28125, 0.00001260710517704852279493063652605877692266167843051365148706460503
+11.3125, 0.00001221922532813420226377706232986779938860062625259004096221678145
+11.34375, 0.00001184327928758277971595601053414364498898717010672756919694438398
+11.375, 0.00001147889989071054962511999344895169037263733540062576740931026561
+11.40625, 0.00001112573126930353860013941661243510994374835937351832103773310448
+11.4375, 0.00001078342850406166989142215218975998776609097180211361459039394392
+11.46875, 0.00001045165728773609679424550718688557719682672235004321020401291826
+11.5, 0.00001013009359863071072894135574908649729900677385468906416239442228
+11.53125, 0.000009818423384148951865805481899030743267579258590992237080395150634
+11.5625, 0.000009516342254076860826723418814838068852614463758104003833475731902
+11.59375, 0.000009223555183302818817223660967073720636619151704610897363225172762
+11.625, 0.000008939776223683639808699493540010510759698441461385303749424832621
+11.65625, 0.000008664728224775611101875091698227729796062670701250653459023150083
+11.6875, 0.000008398142563157736483290834156669248605544030529365745367666486941
+11.71875, 0.000008139758880082827692296660509407107964477136371725528465973692184
+11.75, 0.000007889324827200223242267497250908025229971315461862451098397701394
+11.78125, 0.000007646595820101796729839074911371648979714479087445316883019229586
+11.8125, 0.000007411334799450557318862530777708474300845144777946092034085514365
+11.84375, 0.000007183311999458550563576716115734947813627748429275412849059295655
+11.875, 0.000006962304723487945370698571878450321329363891325446644512398306253
+11.90625, 0.000006748097126556149702714124755288108042358242993855089682829576027
+11.9375, 0.000006540480004532540388921002749036702026631577622318669409933892938
+11.96875, 0.000006339250589820927721994491271215685352770177990241786242519896056
+12.0, 0.000006144212353328209758682308178805532311223989314888252975568505876
+12.03125, 0.000005955174812525810599963949485718554858362750995386516757830623889
+12.0625, 0.000005771953345416447394592132088367783301607124037198077163372459349
+12.09375, 0.000005594369010224538201843926186662444142526469412332401088887697497
+12.125, 0.000005422248370634152797224656382546796148767196099722095519287013954
+12.15625, 0.000005255423326403826468166331522802012889288220854318379743916456411
+12.1875, 0.00000509373094919280811685461814314811966227433911439640699980138163
+12.21875, 0.000004937013323438403692814997370884871942945573065740697032837612456
+12.25, 0.000004785117392129009089609771019433047616632788052290612016278131925
+12.28125, 0.000004637894807322207975826985682423008053122232553234922572719520839
+12.3125, 0.000004495201785261944260133393609982211354436168360335017209176963085
+12.34375, 0.000004356898965953270539499408502442532022826863768330425375599353996
+12.375, 0.000004222851277057527335517923455062189095885274590161536671026065095
+12.40625, 0.000004092927801975027437798523247868633205707803177551606914113577989
+12.4375, 0.000003967001651986409366678590653912429672324963630750937642272126852
+12.46875, 0.000003844949842327787834119180822987166645991008265737791562758799407
+12.5, 0.000003726653172078670992924851475950426180337481883969847014640452336
+12.53125, 0.000003611996107745337972514703124111853839612830276205554047110188985
+12.5625, 0.000003500866670425979341106325925033619926240350736293897680595659909
+12.59375, 0.000003393156326447401234194383629460677900392197033522628166916894683
+12.625, 0.000003288759881366484364002504240141483486472455659141172050772336982
+12.65625, 0.000003187575377232875285440994877109384963703554897498963978707331939
+12.6875, 0.000003089503993012572350416282863346077643119956450711977456920128133
+12.71875, 0.000002994449948075155844770596022650031406835118437676372155567176917
+12.75, 0.000002902320408650403885636985130628258815810820544004038528009453869
+12.78125, 0.000002813025397162935683769706957674237495652594744867517908057768313
+12.8125, 0.000002726477704356334577741105691535648512002773682197496792009998577
+12.84375, 0.000002642592804120927569930994981351331955204564565286037263645304058
+12.875, 0.000002561288770942038598661382929960881247932511123930337102729989435
+12.90625, 0.000002482486199888092045475657681858859531407541294805976360291740902
+12.9375, 0.00000240610812906042350091234163974281174211433307678353950696123884
+12.96875, 0.000002332079964429059018763430088214607451848966670151166965112525814
+13.0, 0.000002260329406981054325785277290538689469353142422703218644035360192
+13.03125, 0.000002190786382110243996953225354948543102599024528925193653485585382
+13.0625, 0.000002123382971179439661407705846028640263414588298450854962540225556
+13.09375, 0.000002058053345188238009152436019915288001714384215324591641317203707
+13.125, 0.000001994733700481655795480658131285123862189214798348424534877057005
+13.15625, 0.000001933362196436802197415976441747244235535097855374081523744001904
+13.1875, 0.000001873878895066730710761325559882400959816724986595752069506331702
+13.21875, 0.000001816225702482485174363429366560172522321802304364052601342701881
+13.25, 0.000001760346312156169298583277070545670846355256204940795463759798673
+13.28125, 0.000001706186149929628030116116737054053465150696779907622037999424803
+13.3125, 0.000001653692320715033923096682258398847366032601169859999788593182249
+13.34375, 0.000001602813556835324071872976396958968588897222004727343295113182881
+13.375, 0.000001553500167954034707723917976395643695080819469302538939657586887
+13.40625, 0.000001505703992545632834270445886657108640048063502268890639983941261
+13.4375, 0.000001459378350858948790400712018736336756218813570941140715163676229
+13.46875, 0.000001414477999327771854569383983800152890375295567703005771877312151
+13.5, 0.000001370959086384084364502599612723536382681291526099653792830575549
+13.53125, 0.000001328779109630779701990638708409603216297727083542767700897683076
+13.5625, 0.000001287896874332037221457964778207174921618859663096131917656633651
+13.59375, 0.000001248272453180814080080821335227264065614009267604523362818044089
+13.625, 0.000001209867147304161213196171197145304426019654434173875318393974842
+13.65625, 0.000001172643448468279609764280236637968649964387864894814668760409787
+13.6875, 0.000001136565002446404759383914508849162021384917435631750977281708851
+13.71875, 0.000001101596573513742809161689961151011125410035795713618731254720284
+13.75, 0.000001067704010034782694745456530497899430984764994748658965683200416
+13.78125, 0.000001034854211109375370060936567200622023754525192027691692559723268
+13.8125, 0.000001003015094245005296681653097343992149366022720162198405332817762
+13.84375, 0.0000009721555640236815761978198592868346625299845160598220844614591222
+13.875, 0.0000009422454817328474962428216997306633124349292369726189362373152284
+13.90625, 0.0000009132556359306487616837955087787319155759524383063374151122560645
+13.9375, 0.0000008851577139168132163948763711031687024661402915823345662230917514
+13.96875, 0.0000008579242740812793192268235428525542600815901827190772655275263584
+14.0, 0.0000008315287191035678840639851425652622946076583649845727951595276897
+14.03125, 0.0000008059452699767224654415967213321538339664053731501267205561127827
+14.0625, 0.0000007811489408304490795473003752540639777188068104912817749840444927
+14.09375, 0.0000007571155145288664820484564403041198287145733851561357547120011069
+14.125, 0.0000007338215190190347413712400609285392274431251658284135032734782109
+14.15625, 0.0000007112442044071630876551075007117278249866643118196704882769549315
+14.1875, 0.0000006893615207401086997315043187395830081913401587830214750979479301
+14.21875, 0.0000006681520964704669092106642241606136959041569669319087592204616288
+14.25, 0.0000006475952175842209248323503122835838007039376212704757086900347064
+14.28125, 0.0000006276708073705662636751120150713137434353348256678879118450588217
+14.3125, 0.0000006083594068141522505929193390630889319913680163493240919852469083
+14.34375, 0.0000005896421555905908258831013258210064827870149447130380931129282259
+14.375, 0.0000005715007736466720773651491360594751430180661650273363006852823132
+14.40625, 0.0000005539175433472969621803297855132395049441095991499999168788500302
+14.4375, 0.0000005368752921716911634177451252966820971679784823733834853347189781
+14.46875, 0.0000005203573759420004776850631931507179520362513994642813892921597776
+14.5, 0.0000005043476625678880758922222333462485722099130901169642339945154338
+14.53125, 0.0000004888305162912579286051966255107613145393944498207321291520613855
+14.5625, 0.0000004737907824157171315322522756910649622798248144288524426601834933
+14.59375, 0.0000004592137725058632830621203036897494354532477945989026339913407963
+14.625, 0.000000445085250041941916640468219651708427839152337723096039672947275
+14.65625, 0.0000004313914165158637242809643538836527200033549874285530287120071485
+14.6875, 0.0000004181188979550023580055277592518970676659874562850041432701480716
+14.71875, 0.0000004052547318606113844770423187791368834799763531511822209173810827
+14.75, 0.0000003927863545481039025566457391195863032792210996412992908581801363
+14.78125, 0.000000380701588876830809462681059949024202795254940876073720205623922
+14.8125, 0.0000003689886323573741019380024775808611668705209937712427360369985135
+14.84375, 0.0000003576360456247402958618786903122562883233860445385506674476882963
+14.875, 0.0000003466327412661964011572309055536416483538278668298875316931831333
+14.90625, 0.0000003359679729928372476497237686972987161862461292961391776345590392
+14.9375, 0.0000003256313251443086600008440723869955184905859592824416827581882565
+14.96875, 0.000000315612702516436353823673364501701704370041493620233356343272174
+15.0, 0.0000003059023205018257883714794977022896393708207808185591165592618274
+15.03125, 0.0000002964906955338038717625369011595893568845071324320817401019705404
+15.0625, 0.000000287368635824369671090682015078439046955057911645794167295261573
+15.09375, 0.0000002785272323871084213064410670133865481263157593649517455095351744
+15.125, 0.0000002699578503363014338726084839633428005857109164638257150001951953
+15.15625, 0.0000002616521204537342507073202470438980950013641046517293360800729179
+15.1875, 0.0000002536019310149668342707677039766524310491314554013313644534672512
+15.21875, 0.000000245799419867082986167230116423054377723166495242326534461504394
+15.25, 0.0000002382369667501817918046252454433717387565473839792923742756220843
+15.28125, 0.000000230907185855111937347605486671185350276502418159282168657199692
+15.3125, 0.0000002238029186101804699057090500607962128591456001910050841464082213
+15.34375, 0.0000002169172266897911979506435835835358560035865708068373798918678793
+15.375, 0.0000002102433852381846747590232072968232048892315579314972879574217136
+15.40625, 0.0000002037748763016617849118476267354621194212624023647799472907564005
+15.4375, 0.0000001975053824628765677199495878267682452266488107767171790511529571
+15.46875, 0.0000001914287806709812607433653311757018689234225197080733925055446492
+15.5, 0.000000185539136261597824071710864734925208710176169168731272302952739
+15.53125, 0.0000001798306971607755985418094076094557528958380839595129272682033962
+15.5625, 0.0000001742978882672744396501186455735147276605400932807955148355712165
+15.59375, 0.000000168935306007686829062361490065744255275992974453816303830851889
+15.625, 0.0000001637377130590812674232787623079998641101479600827616090934837723
+15.65625, 0.0000001587000332340128604845205464368971888304115399261105453259549875
+15.6875, 0.0000001538173465229055851851229272864292158762199356079251476460105079
+15.71875, 0.000000149084884288964418107405095592983372235234576954371156431846824
+15.75, 0.0000001444980246109244757972267552742775288194997848481932804611023742
+15.78125, 0.0000001400522877690887002688571213083140741016090398737374624027834001
+15.8125, 0.0000001357433318702455646225347870987886183716969437840369818627479093
+15.84375, 0.0000001315669486071939097599906833827537093037571698638568077516248853
+15.875, 0.0000001275190591487334861576310854394877149593188748511176241901019445
+15.90625, 0.0000001235957101561071929409931918752942889051674032861963443335843898
+15.9375, 0.0000001197930699220045045395367079214472202136203592612564396574311976
+15.96875, 0.0000001161074246283552736011864255612188180277972990588442760025619111
+16.0, 0.0000001125351747192591145137751790601271916379408006576543025777501291
+16.03125, 0.0000001090728313855080181214246864963023606262919495925371045361552675
+16.0625, 0.0000001057170131572688348576624982218873275029091327993189197580104915
+16.09375, 0.0000001024644426015978969846278551835584466237838221570414252129318159
+16.125, 0.00000009931194312156243409514613948799765723113976296694456839397451196
+16.15625, 0.00000009625643585384266949374265739229851839041031273130850821587701023
+16.1875, 0.00000009329493666178466543938344346344689434474582853956001520582632912
+16.21875, 0.00000009042455322096720644065696361894413566465309392094949500035681616
+16.25, 0.00000008764248219443636288699068669801797917295175738301912938849084908
+16.28125, 0.00000008494600649484895051995360725661809512323880867091972810299067204
+16.3125, 0.00000008233249263085098012441295989838538468899099296304093019734069685
+16.34375, 0.00000007979938813509945924656342175224944522503168806641003009849921846
+16.375, 0.00000007734421907141564407045271910225166086632896100885010321719891469
+16.40625, 0.00000007496458761863512268043031436225934860220032460902478260156282208
+16.4375, 0.00000007265816972879501628186110401578727126146240333383462724946280986
+16.46875, 0.00000007042271285737118570217783636363996102837241740167856366722539321
+16.5, 0.00000006825603376334869755383389689872243234910670785227114563978053275
+16.53125, 0.00000006615601637697700653338619353802874999434383544633258523396756447
+16.5625, 0.00000006412060973312741406581261674696082109820980252899575437007759238
+16.59375, 0.00000006214782596823443343993216326797230795057097747307387210314261585
+16.625, 0.00000006023573837886479029283790427826700257340974055690452782091283997
+16.65625, 0.00000005838247954001797543678235083780414258860164930980398440385342962
+16.6875, 0.00000005658623948132060336323100331196852378821358161639309311731596049
+16.71875, 0.00000005484526391933337127954255141989547778341367913338054860961402847
+16.75, 0.00000005315785254424421545476583056411120267842436605173139798370825074
+16.78125, 0.00000005152235735927437749422065275672351524688566488235448374511525815
+16.8125, 0.00000004993718107117557480301402468944624709074439096987866138487386443
+16.84375, 0.00000004840077553024636721556610321756805922748354234856640005499033733
+16.875, 0.00000004691164021834417429378634554468371936296012920885337994749502783
+16.90625, 0.00000004546832078341627236362219418243580821194805100276029038054507631
+16.9375, 0.00000004406940761911853274797008837900310623791312349099600363672116316
+16.96875, 0.00000004271353448813469723456904094944250613840926876810363928133882148
+17.0, 0.00000004139937718785166659651027718955280622936694374245959755699806974
+17.03125, 0.00000004012565225708764464325618795159012136097809218194688149228088534
+17.0625, 0.00000003889111572261007422198489572712026742266831303745103242415190115
+17.09375, 0.0000000376945618842191619700897138913161199698698043735114076305021139
+17.125, 0.00000003653482213721045339244497424564741486636786817187833910090314403
+17.15625, 0.00000003541076383106642578659920140816163596461696310116461824029177528
+17.1875, 0.00000003432128916326244931861610802892503007344086472572908650806826961
+17.21875, 0.00000003326533410710676071816109803528294487355068216431099043689850905
+17.25, 0.00000003224186737256733310674780475755638107075369281405911641494806478
+17.28125, 0.00000003124988939907074186046253705302560011372101811754362759355198862
+17.3125, 0.00000003028843137928935160185059479654272840045360662349404155915147859
+17.34375, 0.00000002935655431296341391081177810313268842626524424083170957780795115
+17.375, 0.00000002845334808983399869888939463701807282148150244157414593158648285
+17.40625, 0.00000002757793060079111305343298781874371289151167020502116875577701941
+17.4375, 0.00000002672944687636891749454318667948907116349267050777377905573802422
+17.46875, 0.00000002590706825174665791094703242516839771388953555588156138937801344
+17.5, 0.00000002510999155743981803547343740192733037123116164780246276122766355
+17.53125, 0.00000002433743833489108746853588997128441772442558565078985482002204512
+17.5625, 0.00000002358865407619505846307458436911384786418169120305165983209342185
+17.59375, 0.00000002286290748721413469694264246994568194221293334451834355837055603
+17.625, 0.00000002215948977336598009820460554032373614703414052529026916936359625
+17.65625, 0.00000002147771394738497776647907048252608103249714945474736241470142545
+17.6875, 0.00000002081691415838162977408603251316421201346222241206000538224628082
+17.71875, 0.00000002017644504154462909381329684172616851799178706537044305163612577
+17.75, 0.0000000195556810878504954002005627830503883782450235709322852089178013
+17.78125, 0.00000001895401603316520671794509312243907483716995142744693667600249418
+17.8125, 0.00000001837086226614119792816486960339354337975935916659020331961592124
+17.84375, 0.00000001780565025433145348747243976999309590778886957383046518131521333
+17.875, 0.00000001725782798796021329369155943745269411526761764060127223725058827
+17.90625, 0.00000001672686044080705482159197139006624859347004492480704241627416402
+17.9375, 0.00000001621222904767782829362457500013443633128403648260048402255557525
+17.96875, 0.00000001571343119795212106755378921020937573002346547234651006059982503
+18.0, 0.00000001522997974471262843613662923351743186217484333974231172832107487
+18.03125, 0.00000001476140252897702597785750505381353274606219635190607909128266614
+18.0625, 0.00000001430724191856768833467676051405007119078651938238519208632413038
+18.09375, 0.00000001386705436116889522800173667488911759904210625988843072828716649
+18.125, 0.0000000134404099511350216196521063651412284755240617213346804464627172
+18.15625, 0.00000001302689200962663871291093102808350691241399459560480199837040694
+18.1875, 0.00000001262609667766446908592433047791271040060632474462574518086615767
+18.21875, 0.00000001223763252170375536829100612862410517216847783947801141798544328
+18.25, 0.00000001186112015134382983309908947354505906820594032792997460525031301
+18.28125, 0.00000001149619184879952402326229331232167755384351705327036593725924971
+18.3125, 0.00000001114249120977254463769332999574707251458609467759248736084079569
+18.34375, 0.00000001079967279537207558842059475715541884804788793097268899336134725
+18.375, 0.00000001046740179474465727782886018971752831897915655033206309801251799
+18.40625, 0.00000001014535369808385327486459675240744009564469310261685173863708418
+18.4375, 0.000000009833213979700351905116576311676775760477357821911462841460482959
+18.46875, 0.000000009530677790842975712710556364536051545816839265798474462877721231
+18.5, 0.000000009237449661970594897883170384597758064645835854156804665664221919
+18.53125, 0.000000008953243214184170983628714642159831946572502240860082175836922145
+18.5625, 0.000000008677780879537103132494793119147332578307608301756563784884416149
+18.59375, 0.000000008410793629950720457641637660995408169415762843689353809069991177
+18.625, 0.000000008152020714470167819062765894965049018317002617446880295764135397
+18.65625, 0.000000007901209404604078174233990640525956725160185970412859259782579776
+18.6875, 0.000000007658114747499319517727401341809612803821550109608759987277415932
+18.71875, 0.00000000742249932670975650705127745702493716025802987352684675919103554
+18.75, 0.000000007194133030325383505481621086436094949487136238075081260786078116
+18.78125, 0.000000006972792826235374220331708630516451330923994789832715663373675008
+18.8125, 0.000000006758262544305560397502502229908609856738872092732223108855277081
+18.84375, 0.000000006550332665257604954809374304322889940057398568270870528930352536
+18.875, 0.000000006348800116043680092676125523181951890964953057590170147456025717
+18.90625, 0.000000006153468071516804703599896749527545501980208406692282472977349453
+18.9375, 0.000000005964145762203144006924866823004748619164697760089629860826694818
+18.96875, 0.000000005780648287988533767904455083955243700480529521020239342364419098
+19.0, 0.000000005602796437537267540012982816206463079783873749462819271605636779
+19.03125, 0.000000005430416513266783738150554513100104229318636427331783696779533731
+19.0625, 0.000000005263340161707315475371147705258743891147382626969917821548013083
+19.09375, 0.000000005101404209080825276434974600079077965879836862126351369874352169
+19.125, 0.000000004944450501938644154178699801554577448912060768358042586690268601
+19.15625, 0.000000004792325752702175077719201916829883968721937112868894333146025206
+19.1875, 0.000000004644881389955809399999949799743246343602825489624737088335910247
+19.21875, 0.000000004501973413345846022841420211857355786498845394056125511315851899
+19.25, 0.000000004363462252943701493269452779618645997615421142233358635022249607
+19.28125, 0.000000004229212632936059238809530434654830336706769714329961310680394108
+19.3125, 0.000000004099093439508832019823291077260896916111811618881521627973128816
+19.34375, 0.000000003972977592795907530988523029226275270120781509510548339636417679
+19.375, 0.000000003850741922767616921868439006922140160731288067535340235117409597
+19.40625, 0.000000003732267048937713705290435545936717581599947793716984711301228389
+19.4375, 0.000000003617437263771379839782959010498987953698647406249822302529141168
+19.46875, 0.000000003506140419680390350809553543115153729267528692554520477514228011
+19.5, 0.000000003398267819495071225140737876810867902387991960362445312088155848
+19.53125, 0.000000003293714110306080894954855243083907243968278884593296961865235828
+19.5625, 0.000000003192377180572336739426620580750818498967183149159123485794418418
+19.59375, 0.000000003094158060394597885884064004490054804323987360690551332224895107
+19.625, 0.000000002998960824857307305436565427828835805244018430291662557477742093
+19.65625, 0.000000002906692500344292788795210341757050774579084855282261315618057792
+19.6875, 0.0000000028172629737368307834181476468072352997970717650483836807785466
+19.71875, 0.000000002730584904405392109672469241203058349590899124702048905415981656
+19.75, 0.000000002646573638909117000693223559709276305618525603321195674246596366
+19.78125, 0.000000002565147128319711392735845926640979315732139359812810691738222802
+19.8125, 0.000000002486225848089019512772774914319378753500893115944315720995282754
+19.84375, 0.000000002409732720382012071128861541613667195993598983492018735170211289
+19.875, 0.000000002335593038799337195316980485091751691359647637535600944958119131
+19.90625, 0.000000002263734395415914988511272198280655255538650453143139472718230541
+19.9375, 0.000000002194086610064318541516231787990588076311042022760628312077569289
+19.96875, 0.00000000212658166179387657976625879069180404059762326269027815840685192
+20.0, 0.000000002061153622438557827965940380155820976375807275599103692972244662
+20.03125, 0.00000000199773859222875669972384317992057066242860563783358888795315168
+20.0625, 0.000000001936274637384096079360248749858040978704853945719828287711099884
+20.09375, 0.000000001876701729626297707515562358423126861020645704223218480052223024
+20.125, 0.000000001818961687553045900803691854779415968108581435695397311949701072
+20.15625, 0.000000001762998119815587859960748373293101631994827051098661518544872205
+20.1875, 0.000000001708756370044575425804394260626506527655946732294925525071355728
+20.21875, 0.000000001656183463470360548300311297331116784431275593365563480979413767
+20.25, 0.000000001605228055185611608653934309109539657171168160140150858203151324
+20.28125, 0.000000001555840379999721693827811254248865694020711994109651342388448214
+20.3125, 0.000000001507972203836034533721868081101059376028446232379522679641080217
+20.34375, 0.000000001461576776624420591743673890650264723277935450006387249614427584
+20.375, 0.000000001416608786643196221223593353898477087234041501984510406286813434
+20.40625, 0.000000001373024316265794289404640137587008570606283660804528574166391129
+20.4375, 0.000000001330780799068966609985148972856970547309074361604308042065896355
+20.46875, 0.000000001289836978260628254307522616273118971291583313492699133643420249
+20.5, 0.000000001250152866386742628937553119231222182271594642076565849338224677
+20.53125, 0.000000001211689706277895372279581440909923571957242557098909147423716582
+20.5625, 0.000000001174409933197415855009921853118431232805065714692999633942350747
+20.59375, 0.00000000113827713815407855093636396779934398639787009035440971839812978
+20.625, 0.000000001103256032343553922476783665789446829728879015411445235221685217
+20.65625, 0.000000001069312412683880849105636375322693083505763353748406528121296867
+20.6875, 0.000000001036413128411301094478011605912412882489877727655018282267522416
+20.71875, 0.000000001004526048703831902017070442758281274430977926279272311153016452
+20.75, 0.0000000009736200313009565409467121337463776649953328334477253542579116729
+20.78125, 0.0000000009436648920887854753542167002513856183044607385965329069978040338
+20.8125, 0.000000000914631375620983748004122305909538006175332392658718265903780255
+20.84375, 0.000000000886491126546674079189127093742912442933649513864394760199218337
+20.875, 0.000000000859216661917410971457821192718880349105361071112494032267767346
+20.90625, 0.0000000008327813443461796487027921062736503879657905868425817814305930325
+20.9375, 0.0000000008071593559922057813100061027195677393185297286881926094122123363
+20.96875, 0.0000000007823256733461684705478123477914199818041530497685537975371119852
+21.0, 0.0000000007582560427911906727941743241268126442980361518896898802629878868
+21.03125, 0.0000000007349269569157389010120837131869161917643680442388073643263418063
+21.0625, 0.0000000007123156315552983870450003201742386032022396141587106112543096637
+21.09375, 0.0000000006903999835404016410098740103263760965771957641672944982575926956
+21.125, 0.0000000006691586091292781984424095320766685233591086526061642795443229856
+21.15625, 0.0000000006485707631040619756384741552999650204096042525986146299107945916
+21.1875, 0.0000000006286163385101407118488394561787140866031486569646616261171994915
+21.21875, 0.0000000006092758470188600965426459675405292240436636771864345821594170212
+21.25, 0.0000000005905303998944039743060089194711978297627087223343364245253396631
+21.28125, 0.0000000005723616895462620836601625498773471215998625899506718727587723779
+21.3125, 0.0000000005547519716492686954494646351757524675287121215647157806240294188
+21.34375, 0.0000000005376840478137498300141448901032536808349431914085236324943340618
+21.375, 0.0000000005211412487888539914917754235340979681910935081149796745931924972
+21.40625, 0.0000000005051074181826620869948856798517168495737139750244668455803185054
+21.4375, 0.0000000004895668966831769066561314958437347211152719571916922756058964486
+21.46875, 0.0000000004745045067647817205362144931935080135264780835533719940745004647
+21.5, 0.0000000004599055378652316779070592536140742516339382273414831770280774728
+21.53125, 0.0000000004457557320187012365083799919631331089587542387874754517228161657
+21.5625, 0.0000000004320412699308562528377960572967875600328272916181235678864577067
+21.59375, 0.0000000004187487574823510643728035782375265414729022687400295500157559764
+21.625, 0.0000000004058652126475693124533616561412342268063892794474077673644163577
+21.65625, 0.0000000003933780528158327990210221912430522517547184464896307164103420838
+21.6875, 0.0000000003812750825026957375861722523180536404883234638548413139202578956
+21.71875, 0.0000000003695444814393227325649697695646913866165233497346868249983475408
+21.75, 0.0000000003581747930283180735669125811956356953889253299804844509248249415
+21.78125, 0.0000000003471549131547318229501193109528811620243414896049131510145105107
+21.8125, 0.0000000003364740793413150555264103747725091919941034789616220074698158069
+21.84375, 0.0000000003261218602374328174702788653865750290088727042093047611000176103
+21.875, 0.000000000316088145431369235619847408603570469776481710887416234166167763
+21.90625, 0.0000000003063631355760750467065098875569011033779067237628761817065427193
+21.9375, 0.0000000002969373328187139370741448926340441537635757320022344608476055657
+21.96875, 0.0000000002878015315246607861192026638113560023595300812552385774465316257
+22.0, 0.0000000002789468092868924807718913030644293207693172926068483265320511174
+22.03125, 0.0000000002703645182119906947030474414476582846144861138054501944024293944
+22.0625, 0.0000000002620462764742461767969384454018244649771623334381846744392608346
+22.09375, 0.0000000002539839601296159326178729821236275630079064304522665169153802768
+22.125, 0.0000000002461696951815384658412357904937687601314699167778584317117956307
+22.15625, 0.0000000002385958498908582217727783460362304731676250670687162653996551116
+22.1875, 0.0000000002312550273223487823733493132083786910592099621183621511018267063
+22.21875, 0.0000000002241400581205554344783071864102583685108727082680539969670803734
+22.25, 0.0000000002172439935079016958265025866427954139161324610052360113798719961
+22.28125, 0.0000000002105600984982214558245434325695811208016120564462549037161457876
+22.3125, 0.0000000002040818453190887816699931024992994555875944841135831449620230391
+22.34375, 0.0000000001978029070365213610215165221448913485550088090655582796105374711
+22.375, 0.0000000001917171513758311989921646674041166170827906984210452648821222554
+22.40625, 0.0000000001858186347325877528839285779285222301712492430626940530723730962
+22.4375, 0.0000000001801015963678443598684466085032263879248459396806626368482709644
+22.46875, 0.0000000001745604527819587720851739000663952328220762010666891795991952147
+22.5, 0.0000000001691897922615130361301943920641707939852013398692267781648297331
+22.53125, 0.000000000163984369594007009994509912754407280534273606375572328998672844
+22.5625, 0.0000000001589391009451636652873474286687896845017040851943310625500811005
+22.59375, 0.0000000001540490588938431360752372177840318359736219124657927889333267258
+22.625, 0.0000000001493094676197164029852572441807134985775478217666799218145577931
+22.65625, 0.0000000001447156982389986926927919326868387555729717586606943946327908907
+22.6875, 0.0000000001402632642836872742470707581216842422806706082003842589122484489
+22.71875, 0.0000000001359478173198884861053650077774656537118054088710472169952196533
+22.75, 0.0000000001317651427009546681277637488457027216928860955828509146750101454
+22.78125, 0.0000000001277111554512833337963405215677610430798936474148178998146082817
+22.8125, 0.0000000001237818962767585281509313260105493105159579346169698629934438497
+22.84375, 0.0000000001199735276979380010081776361618664328040636764745745276939708609
+22.875, 0.0000000001162823303022097037460042452156757580313473719706558782150041482
+22.90625, 0.0000000001127046991112573083708862561097040857762702512746668372150009381
+22.9375, 0.0000000001092371400602870632165686282041455400312312300699695497060202935
+22.96875, 0.0000000001058762665855774504354880023504017872062961149530343934530775114
+23.0, 0.0000000001026187963170189030392752784061249775983384339072303347942040296
+23.03125, 0.00000000009946154787241337694387770569002926698944885021559412124519682572
+23.0625, 0.00000000009640143775040295642065213360399128755441906614011256632224175955
+23.09375, 0.00000000009343547731899299660880308109615789027451889963894655293038258109
+23.125, 0.00000000009056076989672866838205679326464884099162076450376888924967580197
+23.15625, 0.00000000008777450792367426006436955725125275613703346494831371246113844945
+23.1875, 0.00000000008507397021943229563131815480223995362993197690238560348993438731
+23.21875, 0.00000000008245651932552453577213542831517518851051508990879511156879267466
+23.25, 0.00000000007991959892953931954328336519029480664254493025330021153562232889
+23.28125, 0.00000000007746073136852956078485647651570678699020532994198171797642708772
+23.3125, 0.00000000007507751520922311298713126530179569615962249778790525733677236809
+23.34375, 0.0000000000727676229026822344778394739858206313630053172250954803884599646
+23.375, 0.00000000007052879851112159591715026607595741365799858216374362753067662151
+23.40625, 0.00000000006835885550466474514865125574507089339455319564009930580384645663
+23.4375, 0.00000000006625567462588724928777016037819485145263446821747430568516805604
+23.46875, 0.00000000006421720182006093724344499651861132231629723838658240232641142992
+23.5, 0.00000000006224144622907783232136689302022997237838750643220946992160286443
+23.53125, 0.00000000006032647824709455681543669928495257990996293247249621940852269112
+23.5625, 0.00000000005847042763599826929776464155412857271401524541290913235291467396
+23.59375, 0.00000000005667148169885361953741123782172877864901564507208390387664413075
+23.625, 0.00000000005492788350954683267366302879765929035863916128218581191338245187
+23.65625, 0.00000000005323793019689791874496626773419864303540576251634234079397065561
+23.6875, 0.00000000005159997128156519953218794308170757063499751045831260393913246772
+23.71875, 0.00000000005001240706411790386794378439677628430664376025467647286802403476
+23.75, 0.00000000004847368706270255544719939628216547495248779512634412849893239563
+23.78125, 0.00000000004698230849877731255382900488068339269597186295172971361255578254
+23.8125, 0.00000000004553681482943536429733118181335927970942887420840431333030944503
+23.84375, 0.00000000004413579432488398878208519056111761217980378531050967218268863378
+23.875, 0.00000000004277787868968997954640400249723929260207060773823693847904607022
+23.90625, 0.00000000004146174172644489068100517407718724253004393552519169505988187132
+23.9375, 0.00000000004018609804054498001203393641635784898483003105327975573147131101
+23.96875, 0.00000000003894970178482088407371050954245800424862074407897035061948796221
+24.0, 0.00000000003775134544279097751644969547523406779168606482567375617965378112
+24.03125, 0.00000000003658985864935009110776689593139100765040378409240920265647168613
+24.0625, 0.00000000003546410704774182342585231695781743174203619373550464851848409614
+24.09375, 0.00000000003437299118169811742631543759393293633921552889769605005083808293
+24.125, 0.00000000003331544542166411888963861186873509980245246947376748978840293782
+24.15625, 0.00000000003229043692405962287390830861517500256877781306954230639467042647
+24.1875, 0.00000000003129696462256067921596398843487100942078436938271696952830010931
+24.21875, 0.00000000003033405825041620035549178296323237503038409987538181923722592467
+24.25, 0.00000000002940077739284472484256681695837677988851278913485508319509527564
+24.28125, 0.00000000002849621056858586743181644288794507677838919723628460104039854084
+24.3125, 0.00000000002761947433970946035707814608195729200300400566187003253033665014
+24.34375, 0.00000000002676971244881298802776196111867754918174136578723484399507036772
+24.375, 0.00000000002594609498276466594511872890858600291465444444369374272861213349
+24.40625, 0.00000000002514781756217544022702595945666346179625839755109497002630738758
+24.4375, 0.00000000002437410055580831207375228058641099674033904322688191091636254553
+24.46875, 0.00000000002362418831915774634545416781306734767673743045194094613975303662
+24.5, 0.00000000002289734845645552894085224694165523418863054340810247859727246808
+24.53125, 0.00000000002219287110538231691976934719701139869171110483083766976227371828
+24.5625, 0.00000000002151006824378630064482773483363256384364849134513225918982419859
+24.59375, 0.00000000002084827301773189028695922677165790846625388881142824917384476088
+24.625, 0.00000000002020683909022217083651288538281609157834629515186383110686552101
+24.65625, 0.00000000001958514000995906063185823123406909065664870238955772970521520689
+24.6875, 0.00000000001898256859952467807972865376628562883032599774103140216355877709
+24.71875, 0.00000000001839853636238638880868364368975891403085304394756710417728729226
+24.75, 0.00000000001783247290814638949351185043152702641342489919832682756869223951
+24.78125, 0.00000000001728382539547450296873238633954367008418616714145034208244186391
+24.8125, 0.00000000001675205799218012941575742658035263880817261668796963893371791519
+24.84375, 0.0000000000162366513518960372275244244459667932427370618500586757531707112
+24.875, 0.00000000001573710210686290097432467045951881454892809508418045713949900434
+24.90625, 0.00000000001525292237631921856001000464495935007164204622402977931351235225
+24.9375, 0.00000000001478363929001648052611957789322441633071839992747920448073621267
+24.96875, 0.00000000001432879452639423641760543323473459550225175116582149503141916011
+25.0, 0.00000000001388794386496402059466176374608685691039976038020505558354779996
+25.03125, 0.0000000000134606567524649768437209917671582206358848977381221159254967967
+25.0625, 0.00000000001304651588236747115980029006237783615214919687973777468374743811
+25.09375, 0.00000000001264511678731401827791807314487600957571997452646131294517036829
+25.125, 0.00000000001225606744409948265495685311326361683441078344398545282179898611
+25.15625, 0.00000000001187898789080476098511880728367042710695647084316969097653632446
+25.1875, 0.00000000001151350985571002293233392851630933607934635958029778185634691233
+25.21875, 0.00000000001115927639762509117398752373513900910996664714692603062310721874
+25.25, 0.00000000001081594155728569230782478384607772133398035272900120236054656546
+25.28125, 0.00000000001048317001947511756787000017765370291764705664294093802455209593
+25.3125, 0.00000000001016063678554130718062135461188325773240623311810199447385148359
+25.34375, 0.0000000000098480268559895247998618551834828581504447982347057213268575167
+25.375, 0.000000000009545034922840628702625160301045350246501538405750091614443965342
+25.40625, 0.000000000009251365071454483920567265465083431470600683227933607473210460117
+25.4375, 0.000000000008966730491527303534936063064909968662316005184686156791167572542
+25.46875, 0.000000000008690853196980667007631730639614504954729571760675062181956067323
+25.5, 0.000000000008423463754468647405876465262881571277968769169996380269556827686
+25.53125, 0.000000000008164301020237896184906551572238922772629226431694896257807673555
+25.5625, 0.000000000007913111885083692042070040779415970203070308968930987093994741028
+25.59375, 0.000000000007669651027152867214057161509938544278999446942202599489728556863
+25.625, 0.000000000007433680672352188178877733035852826474073210893255820824327521926
+25.65625, 0.000000000007204970362128195530213873785214469960068194698406482175581659916
+25.6875, 0.000000000006983296728391707068224331705727703722836450808167717265381194198
+25.71875, 0.000000000006768443275367165928874380122581907648183843771024011684793881264
+25.75, 0.000000000006560200168153778668203310983724905459866641830583007672967646166
+25.78125, 0.000000000006358364027791943233741931312793610675529846695879693297883335517
+25.8125, 0.000000000006162737732634820094458708652563040537227894773299127575907126865
+25.84375, 0.000000000005973130225831057668083031279896499563394402926963900174947647834
+25.875, 0.000000000005789356328730651594459299271083241355006263765132804457604079334
+25.90625, 0.000000000005611236560031702184725785569555171989906850921398105954194485855
+25.9375, 0.000000000005438596960491441178247482370862314593668991043809629824481877267
+25.96875, 0.000000000005271268923030333238200790727641185284071011194411318083467876093
+26.0, 0.000000000005109089028063324719874400193479215766594073423601830189769617789
+26.03125, 0.000000000004951898883897417297189081970643818589646233645174686010546633907
+26.0625, 0.000000000004799544972039692018456904936060991841172673598240843591497717412
+26.09375, 0.000000000004651878497264705114407929665050019788979812219968558561367688172
+26.125, 0.000000000004508755242294825083742455555354837546003401079014880390805727583
+26.15625, 0.000000000004370035426951585773548798577676811218837046202368270818581191458
+26.1875, 0.000000000004235583571640496753820056679459962763934021402304174799328643363
+26.21875, 0.000000000004105268365035984521595542843949706412618148322450110498205355941
+26.25, 0.000000000003978962535837240094323145250627027327091698719811554277988766866
+26.28125, 0.000000000003856542728469724370096701516850069937788978021859078413709723482
+26.3125, 0.000000000003737889382610936127418351637468862040808870051125180217001918879
+26.34375, 0.000000000003622886616422782472554727127428203069610048627232715649811242819
+26.375, 0.000000000003511422113376511566092447685534091371940424914038629745629366959
+26.40625, 0.000000000003403387012559676107419669397885356492998953149377068913072042967
+26.4375, 0.000000000003298675802357996753258415752296838167645122266580873782096391664
+26.46875, 0.000000000003197186217408290715310949207266177281868136812986628081131557632
+26.5, 0.000000000003098819138721825441641786081838463749528227731418362871414063524
+26.53125, 0.00000000000300347849688055365663374304803548375540834823281988028182537468
+26.5625, 0.000000000002911071178211687139276754751234973820139804636424084435785879075
+26.59375, 0.000000000002821506933848975390177156990818467567123269277808606239966277294
+26.625, 0.000000000002734698291591874614840181647567890890144885369155111264004956186
+26.65625, 0.000000000002650560470476524987903977953747114412200097424787493759276757321
+26.6875, 0.000000000002569011297975102628800016063278193497476760152761932307850513159
+26.71875, 0.000000000002489971129742679700385110630225929818656576284665692020966805694
+26.75, 0.000000000002413362771833214045455987755991730675290459182091108862072684673
+26.78125, 0.000000000002339111405308701231606830200593541644620980840831422643312214184
+26.8125, 0.000000000002267144513167859137752284748153175896229983499111910611124289804
+26.84375, 0.000000000002197391809522980568482020801087130933793025305449422234425902415
+26.875, 0.000000000002129785170955785037676766913988054748094566469768479851583937037
+26.90625, 0.000000000002064258569985228964868916341241888443890139720677341375648699562
+26.9375, 0.000000000002000748010582296155067076916784430756884591145007904798130876335
+26.96875, 0.000000000001939191465668789599631683364981179444485820606390457174237526048
+27.0, 0.000000000001879528816539083294758270418422192621228717249298110713402534449
+27.03125, 0.000000000001821701794145670817595306586796189513154168420501191111045904602
+27.0625, 0.000000000001765653922191167662170695891046245716151892600799538957598446296
+27.09375, 0.000000000001711330461971188595869587628364692734681126476070633828656492791
+27.125, 0.000000000001658678358914231275244965836943773357601563943641187801945697945
+27.15625, 0.000000000001607646190766354727487950399822484502913387980563642508560792423
+27.1875, 0.000000000001558184117370047679591544304313218126079015373384894861080701769
+27.21875, 0.000000000001510243831988238669963650058696988594888539195652349461048145555
+27.25, 0.000000000001463778514125908927567934838840494728306982753933927271260839556
+27.28125, 0.000000000001418742783803231625396436859649354634039130517367213754624294691
+27.3125, 0.000000000001375092657235578736663445880779793553162924874233779444704718412
+27.34375, 0.000000000001332785503877110728064904498598318078821737378968159045750653218
+27.375, 0.000000000001291780004785996056683253834236564309813562885118738973717182616
+27.40625, 0.000000000001252036112270598196259888818401234456127492806183727514623095157
+27.4375, 0.000000000001213515010777218965215753002150258573156923605784722587497578956
+27.46875, 0.000000000001176179078981199484799770490523379181553880614247777847325112286
+27.5, 0.000000000001139991853044355345317869569640344647415229313564944302982978006
+27.53125, 0.000000000001104917991002861649340363550968440663924009003749519374768121732
+27.5625, 0.000000000001070923238250807645586450037918863185375333911929676641239629272
+27.59375, 0.000000000001037974394085710744098065655897837768796379959390463656395318322
+27.625, 0.00000000000100603927928331685742331993441781572629606080401210151237162434
+27.65625, 0.0000000000009750867046700192567604663556606828609229497005742404416073899437
+27.6875, 0.0000000000009450864406622024481305618988019999263563271866913462197886210171
+27.71875, 0.000000000000916009187742761913208636118741833369279409748363998833295431578
+27.75, 0.0000000000008878265478459658447309919032692854118517297039185521506931272157
+27.78125, 0.0000000000008605109966227121313162241295356142252797153292772606272943886037
+27.8125, 0.0000000000008340358565590936774931037907833197876203249281403033135552141412
+27.84375, 0.0000000000008083752709220185214666367772818030905893004412044324790629551062
+27.875, 0.0000000000007835041785064389495850722208831585990391508811210106620151738884
+27.90625, 0.0000000000007593982891595266914647092175310950216342011521376385739541478092
+27.9375, 0.0000000000007360340600578900778843799863897468924961056514817290056968406479
+27.96875, 0.000000000000713388672714664495951601201119798500687445075539289264321401908
+28.0, 0.0000000000006914400106940203009412584658741409271181527296346090570501618862
+28.03125, 0.0000000000006701666380113232377900390890042345453598340940757600548092303626
+28.0625, 0.0000000000006495477781978520622513285212254326217167982480860928098748537069
+28.09375, 0.0000000000006295632940096270861715595823331687885605545394719444972541354501
+28.125, 0.0000000000006101936677605324371143444097035870402061804595206497946665724486
+28.15625, 0.0000000000005914199822605245340051586711231695192194212198813824698284273247
+28.1875, 0.0000000000005732239023403102330666774972492382990997661300308001296001472296
+28.21875, 0.000000000000555587656944450869212194856882314271929814723265033414981511437
+28.25, 0.0000000000005384940217754035666539933702275364106218183008343320580676262725
+28.28125, 0.0000000000005219263024715492609464848839780345954239799954210155506357606684
+28.3125, 0.0000000000005058683183027783885206601017051253347370321722902770787415824085
+28.34375, 0.0000000000004903043863677106683091718887416209053200290879628612466400248802
+28.375, 0.0000000000004752193062771153169720277055240248742314761737160697370688103812
+28.40625, 0.0000000000004605983453085728829848013900184902384113568702899402178220467007
+28.4375, 0.0000000000004464272240178801191968331265124911369291716905884977257230013525
+28.46875, 0.0000000000004326921022931453878902493195200319745776524320623546695569495313
+28.5, 0.0000000000004193795658379544425268072672185771476699172717181871136672587371
+28.53125, 0.0000000000004064766130704054785098636083930962737352608596454456030838366859
+28.5625, 0.000000000000393970642425218500673184044404547962303024182388730411290406747
+28.59375, 0.0000000000003818494400465177145052517900727847506614165250185357405674069814
+28.625, 0.0000000000003701011678592671957913870009821824866678929216040949050940023
+28.65625, 0.000000000000358714352007709902041832784912873308540984113887351518424259478
+28.6875, 0.000000000000347677871649518519942680811298194520489323789701485637850857252
+28.71875, 0.0000000000003369809480947140461767326700731514194548863251582517183667090897
+28.75, 0.0000000000003266131342787447136015818446803018660122273966522474050450870759
+28.78125, 0.0000000000003165643045594442297920068090861372485388755079856186221586782238
+28.8125, 0.0000000000003068246448279046090851995753821066584645932962019631363987094132
+28.84375, 0.0000000000002973846429236054614360741921464725719776657563283707487506011626
+28.875, 0.0000000000002882350793444387510169211198462044370705087698650933120508512609
+28.90625, 0.0000000000002793670182425560447897948256334918477415501927956624147490574617
+28.9375, 0.0000000000002707717986972444175212560197529383846894698321617015111128503383
+28.96875, 0.000000000000262441026256307737523373176810635148888674333123802564667406642
+29.0, 0.0000000000002543665647376922910303385614857681666602800144123121548934271248
+29.03125, 0.0000000000002465405282833498686650378985039204672433581590597812818628443193
+29.0625, 0.0000000000002389552736575777831431700344351582486022365023470224647818214634
+29.09375, 0.0000000000002316033927823140537955879396485201628931317001156661287533031662
+29.125, 0.0000000000002244777055020974138517460612913024571030310251880031685851195475
+29.15625, 0.0000000000002175712525716260967333310734209941494581271075819892107467166293
+29.1875, 0.0000000000002108772888590667569184176111006975625134791566789463533330428285
+29.21875, 0.0000000000002043892767584755915741204355398786321574889953161490658336870876
+29.25, 0.0000000000001981008798048979569085630396929471020125947047048098744992464703
+29.28125, 0.0000000000001920059564859107175184459511895772557032504708487592590665102049
+29.3125, 0.000000000000186098554243563421227312970963814904159288543435509811677763652
+29.34375, 0.0000000000001803729036608603433946635627309679012729777514019091969818816887
+29.375, 0.0000000000001748234128271056750353702769986877044201406665863973879794709982
+29.40625, 0.0000000000001694446618766088143429656062408926715720280988607019795674478819
+29.4375, 0.0000000000001642313976954160319642146762364022888634460629057607321613570079
+29.46875, 0.0000000000001591785287908988819819777887827118164446543945133307586825897215
+29.5, 0.0000000000001542811203191887832972102046746599557028600731621368063667752856
+29.53125, 0.0000000000001495343892656013552966218739868910163908892100498629599255376223
+29.5625, 0.0000000000001449336997733435079083684809432139235314097339433741835464527749
+29.59375, 0.0000000000001404745586159411053103153832091660835036885001680360409996709514
+29.625, 0.0000000000001361526108089653861003804147663390488932690018180235592944250667
+29.65625, 0.0000000000001319636353567723677511499223486123185599443844369323299524862846
+29.6875, 0.0000000000001279035411301013225186447594196980281873310801338069087503460495
+29.71875, 0.0000000000001239683628705062144371630704627362604944947367367166653371892073
+29.75, 0.0000000000001201542573177178574257935655130032575947131787750650772515588676
+29.78125, 0.0000000000001164574994561546138345025805701820504863208673133412998836139031
+29.8125, 0.0000000000001128744788769158182236047221795359881805160157451421495192372021
+29.84375, 0.0000000000001094016962517048964473288007802328013292758261150401268064712016
+29.875, 0.0000000000001060357599152384653509237021707857408205243737520329218936167377
+29.90625, 0.0000000000001027733825528036503531635322126564251763150488617877261447930655
+29.9375, 0.00000000000009961137798972855034934167182231626355990279969424516315758585973
+29.96875, 0.00000000000009654665807963031202736645753195583649247795194522788686069126547
+30.0, 0.0000000000000935762296884017460491583222337870674495832268893588041641331862
+30.03125, 0.00000000000009069719177099091982820195038531505624400640274940219841093197011
+30.0625, 0.00000000000008790673253811878715007745508458084949471000943526007356605391787
+30.09375, 0.00000000000008520212671016775214476471428978312927766113258484513962559858263
+30.125, 0.00000000000008258073285555919991304185839844014058823469735368047818326394869
+30.15625, 0.00000000000008003999081102054158059541073638429398414732122389304833940782911
+30.1875, 0.00000000000007757741918122229829059863817909520064743566219573624447377269316
+30.21875, 0.00000000000007519061291534326475713482041018396907767522577904859818487763564
+30.25, 0.00000000000007287724095819692419343177486977945948929949235942711623755343028
+30.28125, 0.00000000000007063504397362510607670845202241965070838746857999775952206185879
+30.3125, 0.00000000000006846183213793545743423845458085268334699421205004009870555067091
+30.34375, 0.00000000000006635548300122770606364051959206056374865935512003933100209985853
+30.375, 0.00000000000006431393941451999714427133928991949748908272906444170138979674864
+30.40625, 0.00000000000006233520752065084781025732412063385893943738632244263907508248451
+30.4375, 0.0000000000000604173548069945502012133038128592219219469047336787463984659903
+30.46875, 0.00000000000005855850821808822311512658660940619300112898455968361813759145073
+30.5, 0.00000000000005675685232632722461872788723806651277147710851207511617132619384
+30.53125, 0.00000000000005501062755894234996942710926771080860064158948052651918547942972
+30.5625, 0.00000000000005331812847952720635688032422997203085045183833154400733377141058
+30.59375, 0.00000000000005167770212243743196470438416112707263544343835011785509972404668
+30.625, 0.00000000000005008774637843506371533794637958044739004292333288103728547661217
+30.65625, 0.00000000000004854670843000140622428965998860093849496053410531885382893537903
+30.6875, 0.00000000000004705308323479026283315287890146343509630360819935784975940883709
+30.71875, 0.00000000000004560541205574040548908559467309389433171995384029587358737286949
+30.75, 0.00000000000004420228103641172960965413608134328763789392737619307621201699431
+30.78125, 0.00000000000004284231982015370742098026972356734051096094778311351882522005538
+30.8125, 0.00000000000004152420021175756171970067461402797684136716801186306046720927838
+30.84375, 0.00000000000004024663488028507339388680344210137229540404084775767929862897459
+30.875, 0.00000000000003900837610180715086700974167313790096888426102678664627766642413
+30.90625, 0.00000000000003780821454082426717775880793588809789941083643536262769208129359
+30.9375, 0.0000000000000366449780691786487441444891512771624812328311276315798578192818
+30.96875, 0.00000000000003551753062130471587874420243100298454971148596041392366303254154
+31.0, 0.00000000000003442477108469976458392389332851557284618351259439908190502232201
+31.03125, 0.00000000000003336563222453127672188786689464883760081574742682430509214713618
+31.0625, 0.00000000000003233907964133058491858033190960813098226609450201402781173388749
+31.09375, 0.00000000000003134411076075493208330973962071492660316646538127621681336212758
+31.125, 0.00000000000003037975385443128476623390383605324551711085590608983072603787567
+31.15625, 0.00000000000002944506709092561532131244726758837502688188837815767282776061142
+31.1875, 0.00000000000002853913761591078963969855015477889699011408032570901135078845422
+31.21875, 0.00000000000002766108066063471380236658159991081762986715530081832506411185254
+31.25, 0.00000000000002681003867781803222154873116390597902927467718703633772093127027
+31.28125, 0.00000000000002598518050413745869190540711233896083456345504979813651406805532
+31.3125, 0.0000000000000251857005484767864173976322895749104056694868675478862268120944
+31.34375, 0.00000000000002441081800515278887672717595730894460714556684723506996023849669
+31.375, 0.00000000000002365977609134761491693530573569489781939839159979259031526693162
+31.40625, 0.00000000000002293184130800292254309267303935792626716345329260731214860622249
+31.4375, 0.00000000000002222630272345390959084041136712890041529499987866472775368836677
+31.46875, 0.0000000000000215424712791036082063556500687963761956640746203634047195181427
+31.5, 0.0000000000000208796791164593355050988967622456613633950030798314832510108242
+31.53125, 0.00000000000002023727892487405595911098915445354338169686393393796373270426668
+31.5625, 0.00000000000001961464330935563234851933831217158428222692539159608421219058304
+31.59375, 0.00000000000001901116417782654125524358008998805879558683673767931447314114668
+31.625, 0.00000000000001842625214723562521700460207352515644968388951498025805315956558
+31.65625, 0.00000000000001785933596794186535006602668820625770508538378375159376246222395
+31.6875, 0.0000000000000173098619658080034713032174918301520086460462455913951782246162
+31.71875, 0.00000000000001677729350145913893259476358722179991461910440182422512419472669
+31.75, 0.00000000000001626111044617818941534293327338638741095039130088533385404956645
+31.78125, 0.00000000000001576080867392635319261284729670397523401541315017739880785270671
+31.8125, 0.00000000000001527589956899245871966753899790293282736557414092682971654588096
+31.84375, 0.00000000000001480590954879035124107050793207955166055060491245069590322903612
+31.875, 0.00000000000001435037960133826031132337455133011270673032653876563776089319378
+31.90625, 0.00000000000001390886483696843116484910998078500051803540884991703036941764308
+31.9375, 0.00000000000001348093405382920074412826829378359299931738508402274850585101743
+31.96875, 0.00000000000001306616931675516947519282725323019767808212108759017055165579301
+32.0, 0.00000000000001266416554909417572312090415596509638213583379530965917253757587
+32.03125, 0.00000000000001227453013709243401754048325235314398822817036371392675748028511
+32.0625, 0.00000000000001189688254645146296802261665478704348065092118738604612868112709
+32.09375, 0.00000000000001153085395068231626997201672268733885470557940538224246625394659
+32.125, 0.00000000000001117608687089415194301820536575819782967215206765483431961947329
+32.15625, 0.00000000000001083223482666534219858970138282653684895183444692796326573280076
+32.1875, 0.00000000000001049896199765615000772678117440715662772051029906481811399440231
+32.21875, 0.00000000000001017594289563248910510986222526599671626409087589439456007962986
+32.25, 0.000000000000009862862046580452066374245346140893650926785787713027173212154599
+32.28125, 0.000000000000009559413682601146163446821076696597805486186912064829320397234151
+32.3125, 0.00000000000000926530144328492856174915026421876168985297548473746539569456563
+32.34375, 0.000000000000008980238086273390402410617856486404444329545346240554260942795881
+32.375, 0.00000000000000870394520672641245385632388548046776564874384798250885845984231
+32.40625, 0.000000000000008436152965420312083823384476972021891645327212182531614761072072
+32.4375, 0.000000000000008176599825211530788936760245348483903717256077411900648285470143
+32.46875, 0.000000000000007925032295608481657031544299599451096247262546248805022282676566
+32.5, 0.000000000000007681204685202094906742597798918889636324893817601748181424203786
+32.53125, 0.000000000000007444878861713274783297042976561374466886974156659783048016257963
+32.5625, 0.00000000000000721582401942292008479884831418414196574587270622474606546817739
+32.59375, 0.000000000000006993816453757370714822685696882520871062353642732605455661935729
+32.625, 0.00000000000000677863934280913094654373717499274636431937212053442347622279962
+32.65625, 0.000000000000006570082535579493365977953288042119167416536505965592361114822861
+32.6875, 0.000000000000006367942346736252352265268206744637541223087088694311035052220507
+32.71875, 0.000000000000006172021357686058862843947052354142597674687196812318769599446598
+32.75, 0.000000000000005982128223767135435122487288777660319758547823199664046456058344
+32.78125, 0.000000000000005798077487374047716947781969627202542288891733210783818886341612
+32.8125, 0.000000000000005619689396832022333574998010724946448680690590611493935762273974
+32.84375, 0.000000000000005446789730843916147136626333979053746717002894773382409683104367
+32.875, 0.000000000000005279209628338384449872607217489492148100736157337955785703638262
+32.90625, 0.000000000000005116785423553070669979883498086784641689519285457072596953114354
+32.9375, 0.000000000000004959358486191752910691325158397801275098471639666089837692676214
+32.96875, 0.000000000000004806775066499338082418905513785338517911073469370357785420229321
+33.0, 0.0000000

<TRUNCATED>

[03/16] commons-statistics git commit: STATISTICS-2: Migrate "o.a.c.math4.distribution" from Commons Math.

Posted by er...@apache.org.
http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-8.csv
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-8.csv b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-8.csv
new file mode 100644
index 0000000..878f472
--- /dev/null
+++ b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-8.csv
@@ -0,0 +1,3215 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+0.03125, 0.000000000000005596904708180782148228953128471505726134670596981359963913580296
+0.0625, 0.0000000000006943623748308400860911551749291645603377733398446501469280191284
+0.09375, 0.00000000001149882039708756269340206341778109315907267642494151114935069288
+0.125, 0.00000000008349351491101160909116193824619061759748201758054047745090716597
+0.15625, 0.0000000003858789897680218019081493640394438819014188219069017029653664786
+0.1875, 0.000000001340133774745126942389237952354556299276180189208517551288732448
+0.21875, 0.000000003821237028587117444126434114369042829244368696273676940093280958
+0.25, 0.000000009431394341743164888959252093824606363166594616434508723199237233
+0.28125, 0.00000002084835811446620668807334462022263162650030753361074777549483593
+0.3125, 0.00000004224765322293582855349833805490318103700823763718071818009388921
+0.34375, 0.00000007979573571491588555412356156934981847605190181118723756865876005
+0.375, 0.0000001422092699546526536315544745007606936145002857078165836090578558
+0.40625, 0.0000002413742560266709313631472408747976065329735757305978046993444721
+0.4375, 0.0000003930176271214412230480705357027361555305320141276386460041852999
+0.46875, 0.000000617423123254783712225687935163889961643746658004062200704610924
+0.5, 0.0000009401826942470136154572785450632137485148780622011206530302767838
+0.53125, 0.00000139297435635502769736440670924090361148550987191479057642866019
+0.5625, 0.000002014357291679739255148035666988356693491793074214994043693949978
+0.59375, 0.000002850575008976495485723212176530365011710355826874419206072983668
+0.625, 0.000003956357553179880234254838307624996221680076800493892247130033046
+0.65625, 0.000005395714035869425504242274686365922327889631458039837635749653615
+0.6875, 0.000007242707139531209231396108454733109629611529345216321034282686986
+0.71875, 0.000009582201706518155995394378645572863323570736276129419779988101143
+0.75, 0.00001251058004281905842748863349688002481207269611142445524184579908
+0.78125, 0.0000161364171327106381789196757408990529575007634033151943915641541
+0.8125, 0.00002058110956038075759191212562535712109025633075262136951623751429
+0.84375, 0.00002597945255751030195714263487485639072227925329072499151632490814
+0.875, 0.0000324801602318265935154475292925663941118773322369183105457074742
+0.90625, 0.00004024632467230804723754879244257669910302626734707189708103250377
+0.9375, 0.0000494558102646999319685368796687325136179578665846663009424006439
+0.96875, 0.00006030158018001276310318363977108379986524770699611588565632217536
+1.0, 0.00007299195261338141301498487503203588639797839901423964970393587335
+1.03125, 0.00008775078494657983258338674746644138857536059190726386404844919605
+1.0625, 0.0001048175845808948650404680000615362610075565701646650960381326024
+1.09375, 0.0001244475457349318693214920044420652630262236018141233882334978437
+1.125, 0.0001469115120218385447375124591133492230069756933534394307002870505
+1.15625, 0.0001724958651105237500609695390143699903641299185493080372007373065
+1.1875, 0.0002015023402343351555839972814820575709743812026359620734754717481
+1.21875, 0.0002342477697373950947442897637600986518730299037051981432529428125
+1.25, 0.0002710637562428108286525384080294934556532954340210519585234609967
+1.28125, 0.0003122962773880409498245296699565865664670051347219902301997483219
+1.3125, 0.0003583052244008733135361545034086424318365670915770738780252832698
+1.34375, 0.0004094638770850647442943626284199890098255920233118241105865933429
+1.375, 0.0004661583180482403839155245478041267391609154530056126726840923305
+1.40625, 0.0005287867892368692098786241348345471425050978771404499615573166578
+1.4375, 0.0005977589940448981734332662343214656169892560003746157285344166917
+1.46875, 0.000673495348434948721302503050244831917464899848830420687626775285
+1.5, 0.0007564261846549727738670082923500982517598731296699536395752229695
+1.53125, 0.0008469909112501345090017041211051871434736061454300758048511643961
+1.5625, 0.0009456371331607019644639965570296141767101121803221615701209275954
+1.59375, 0.001052819735763222463626235421004865099126957777798560133136156146
+1.625, 0.001168999936755578557798754368817024016568912238842536804132352844
+1.65625, 0.00129464430980805994994293386447560900208663315084936922813736565
+1.6875, 0.001430223783903736257349476044411940281283607133214692897446900631
+1.71875, 0.001576212622273570720584838386082138740521199934202025894570661674
+1.75, 0.001733087384796262843565174082848433063347362405953851299581123032
+1.78125, 0.00190132587768111877775210835843410578149644074561675851786988727
+1.8125, 0.002081406094185669008543563842706043464713514832630941981902270445
+1.84375, 0.00227380515003960124416316050129733291493017418460583481599267797
+1.875, 0.002478998217154135700103838010361767958982874740318873463264559267
+1.90625, 0.002697457459092485007685165617179337649572506152461697213703680441
+1.9375, 0.002929650971663714480217276565439577186376592574333859889283280378
+1.96875, 0.00317604173188030826057087420020859717917351896243570144983303003
+2.0, 0.003437086558390163603657130031047222943685880531036847783318320575
+2.03125, 0.003713235086357640991183112608091933361166683747287856213347322926
+2.0625, 0.00400492875962670359061786107325372144797482512617848862132247436
+2.09375, 0.004312599842853046482351381399478214935447058287216410090105856955
+2.125, 0.00463667045614235345442097018203564457931942938680943988847352424
+2.15625, 0.004977551634579284914102835784895805741557209529507590179370374902
+2.1875, 0.005335642414877301250646733303932690000372403624627564226718873472
+2.21875, 0.005711328951223717678906644932984956530893743183625529596203011218
+2.25, 0.006104983662238174983913965714347385680113020164129412732309488872
+2.28125, 0.006516964410806652256808696510141759933452763549868239608668896002
+2.3125, 0.006947613718397851111659309373326532645607402474639729865934494757
+2.34375, 0.00739725801531480752035441095715554405444033280963768228085005737
+2.375, 0.007866206928182453219872743108244822571745572033557484498650592654
+2.40625, 0.008354752605822025386442624388234138716838711073486625766397044935
+2.4375, 0.008863169084516140034875567799519555525952677435907781951008803159
+2.46875, 0.009391711693524389415900499304855099135169653523610848299908952772
+2.5, 0.009940616501568845133648666438409691200595930918791834373565965745
+2.53125, 0.01051009980487215759693179063413351154703511516992492178397266218
+2.5625, 0.01110035765719831347299863980283675822121314140534727652767382306
+2.59375, 0.01171156544221778637003310003364949565438584470240282137964823845
+2.625, 0.01234387748839499969809013658374842020321585695307202365141959259
+2.65625, 0.01299742672647689123621112690762896546819746246331995629919064029
+2.6875, 0.01367232438954707376805196060566822674229135954793759443557503054
+2.71875, 0.01436865975550074502220367215092917464173854716447827892742892847
+2.75, 0.01508649993169120687148304316907823530562245671384562198496642377
+2.78125, 0.01582588968139967774540404127356602424889718587066443338070777943
+2.8125, 0.01658685129168607013664189445049508821342351291232188779963190503
+2.84375, 0.01736938448208958232290677015860819883434938992738273074996052146
+2.875, 0.01817346635356432560278666600922326394999614547257701138009549901
+2.90625, 0.01899905137695676276303470962473653957555592726480864734263094753
+2.9375, 0.01984607142025844054359732147391482899033105108527965084939496747
+2.96875, 0.02071443581379931336764356794820332649664181496248973579033221307
+3.0, 0.02160403145248381811425036964815180664554107303890507389809560323
+3.03125, 0.02251472293411369777334054853535453809586584532843577697572399271
+3.0625, 0.02344635273278830116093955163217202751564613335051297413889842634
+3.09375, 0.02439874140632461154165005128452640151344988831988551573332571215
+3.125, 0.02537168783659547448108122516221510597866257660566158621703617559
+3.15625, 0.02636496950164529147534967142871687660840869767808039211655659778
+3.1875, 0.02737834277840770027479721228949805321412595789380780844017899441
+3.21875, 0.02841154327481934812726058047460278412111855112563654904028774352
+3.25, 0.02946428619009764749027194541550840522516141731433460326231204012
+3.28125, 0.0305362667019282473049416722636055997074327769886846906731447978
+3.3125, 0.0316271603792897148086826754421058064268947012262927450921243301
+3.34375, 0.03273662361962845787474179945177910226099412016386308115749790369
+3.375, 0.03386429410908607815232916063004438730333256854652564911265340606
+3.40625, 0.03500979130447398100892701893456794745527781233761984574704280419
+3.4375, 0.03617271693568602824325497631333169377714774788736506229706814867
+3.46875, 0.03735265552723915174076345131365479077498865205390586012004063494
+3.5, 0.0385491749376339984107543132626683067799022347917165709405002811
+3.53125, 0.03976182691523269682330659580076328176681727758724515297607438471
+3.5625, 0.04099014766935857257711932861386733944849379516318997844981092399
+3.59375, 0.04223365845533294228947596778477178164524917113738420551861965282
+3.625, 0.0434918661721768363942144453834153619544338821444827173815703976
+3.65625, 0.04476426397172049167422174537424481691992009604312822522645844995
+3.6875, 0.04605033187788057079514449446823281120969781843685818660630871444
+3.71875, 0.04734953741488416563070716226735886099927679781358496638763946445
+3.75, 0.04866133624323958415120616963425026869115182528629127706003183407
+3.78125, 0.04998517280227657028163730582273526748581378077830505051177577415
+3.8125, 0.0513204809581028287495326887502017109464173013083324046392687479
+3.84375, 0.05266668465584939217075607831422049939813120754014028526120968725
+3.875, 0.05402319857510434856974965470535705501168346635480467409440084421
+3.90625, 0.05538942878746262091130139453378681059037256073190925036112480635
+3.9375, 0.05676477341514873646928419801965263082988936293491831430247939603
+3.96875, 0.05814862328969972722981805541593755397293634262825880843719082401
+4.0, 0.05954036260972635117703890090094930801586653071352066363196928793
+4.03125, 0.06093936959680261035549406117599890484904569625702657245296234425
+4.0625, 0.06234501714856596116781214631412490050580485016693249935088918277
+4.09375, 0.06375667348814356561195218224285057066633730012556390402742636425
+4.125, 0.06517370280905332330724997455784717590262358654221805399868175592
+4.15625, 0.06659546591476216148150555376787106462069330547378522413784838979
+4.1875, 0.06802132085211805592477015967223958758644301349585034800690918457
+4.21875, 0.06945062353790642662684440419753357577199402593277750575404276652
+4.25, 0.07088272837781581777940559642458140843576777512559873434308981732
+4.28125, 0.07231698887713205738438341877164543228777025103507015837732632201
+4.3125, 0.07375275824251432513569787521586491691151237778126733703607657162
+4.34375, 0.07518938997424067066997327078661445903803261612109088369396453851
+4.375, 0.0766262384483444536612751566628250539571619803819784336465131277
+4.40625, 0.07806265948809686225616571448352142896045167736124980894777706413
+4.4375, 0.07949801092432405036989371817526847404394681961180234758493035789
+4.46875, 0.08093165314408046434698025491317639109438184086971506603980656983
+4.5, 0.08236294962723255589588174426033268149322823468937809021841585207
+4.53125, 0.08379126747053925492959285537206351821293139103043588316148600994
+4.5625, 0.0852159778988472602105005525501025152076668403129535430106351986
+4.59375, 0.08663645676305035798187150993525848384757303518342628870079805348
+4.625, 0.08805208502449256269397592333102482736096557696128307206648417548
+4.65625, 0.08946224922552485617827439742799219986585171942917761572187051528
+4.6875, 0.09086634194595465182308431369561868448112037040776697840123254071
+4.71875, 0.09226376224515580095096348015018819907559769737694950182181754539
+4.75, 0.09365391608963496494162107400576623009430565520931717166739246732
+4.78125, 0.09503621676587747659169845752359584281680516169081528073624179718
+4.8125, 0.09641008527832238821818124105363094780099335410670540021544740255
+4.84375, 0.09777495073234223501564719038183047814136165165807739462027253859
+4.875, 0.09913025070212811544519854032526519542384606197273808647685937194
+4.90625, 0.1004754315834049934973811289131752183534112123725429229641609383
+4.9375, 0.1018099489309256502228818954425957632621945326212750557111640091
+4.96875, 0.1031332677807144457133355703081362577930580989384771000426191426
+5.0, 0.1044448629570539914533117625116013183415424266393087399290912012
+5.03125, 0.1057442193642289722344686992854558077209919706320235496331059093
+5.0625, 0.1070308322630616939789231521325571225377218638593014006051773641
+5.09375, 0.1083042075322934678978748890618356098075454737653697832877747166
+5.125, 0.1095638619148846730415708452010092122218159178636244401609704622
+5.15625, 0.11080932324932427060869390499518337812379143805399756508134816
+5.1875, 0.1120401306860566779242284835641588926476230135233433082789808429
+5.21875, 0.1132558348891502526433159561986837038202362904505028105599282475
+5.25, 0.1144559982233471946221012098210069735777828819860310642828025583
+5.28125, 0.1156401949266494513112917340367408750752988921622226880060894329
+5.3125, 0.1168080112686092208608583671209845113222785912035053901148028059
+5.34375, 0.1179590456945058947764481601401819871311521585589971611397123605
+5.375, 0.119092908955603779282222741150236477261883411284175404353402077
+5.40625, 0.1202092242256966927334178844153085573514058949965212287420010541
+5.4375, 0.1213076272041565674983314003251882857315116806721967216574455497
+5.46875, 0.1223877662057135014414543194086591883923459191138324855943235866
+5.5, 0.123449302237204319904982861609177674270998513391493059497302087
+5.53125, 0.124491909061535637931172833800329281148573263156319564801985392
+5.5625, 0.1255152732491156689678340106050238455122186800150403005031265053
+5.59375, 0.1265190942170166255201204570603403161222090317019434585949642464
+5.625, 0.1275030842561365146566473183429906617263289434866826140615009384
+5.65625, 0.1284669685466354628337966316303124676539919566831350979660769231
+5.6875, 0.1294104851619274263893736728209290722746262089330116007664623643
+5.71875, 0.1303333850615132727814651392963725454390575856155164643230408293
+5.75, 0.1312354320729457699558080651790099994287252963326560416600219901
+5.78125, 0.1321164028632210140562284957165015938635872961781230476494902488
+5.8125, 0.1329760868998942761427358681255303031533768894107907033673493595
+5.84375, 0.1338142864022211738599941231956665664392067918471793086872205838
+5.875, 0.1346308162826274913912323145199820626961085246969484875204514626
+5.90625, 0.1354255040788128978664788629988871137621790271187092188620825459
+5.9375, 0.1361981898767952680040999349313570544185901185545536721157200405
+5.96875, 0.1369487262252033064615517180095583448026294966988328946936170835
+6.0, 0.1376769780411257364114230138716457823168170375507996908259441448
+6.03125, 0.138382822507825450416376160068304248228501173324480029480558686
+6.0625, 0.1390661489646267548169608503785732352186265865825340475883908212
+6.09375, 0.1397268587892831845015994906457536955329344475160255175445903958
+6.125, 0.1403648652731323398740486589025979890250273192370255263817456412
+6.15625, 0.1409800934893428186681915386010695494610438532404778345686971643
+6.1875, 0.1415724801545565983831828171146396903705638264167598923421856314
+6.21875, 0.1421419734842281867075860124831022559109813980089447391734850277
+6.25, 0.1426885330419595133197975755662326289714423377276454573230023868
+6.28125, 0.1432121295831269025954391350983162399002229342982214982081044993
+6.3125, 0.1437127448930935584590201984451709304348900821742252477609573982
+6.34375, 0.1441903716202978250493031579056545494229580119112807716107220885
+6.375, 0.1446450131045040748996839900724459883739218317588996387449461837
+6.40625, 0.1450766832004994345421199119033079173544455765785646143703747838
+6.4375, 0.145485406097515700093114708550521876298418955493965601495132085
+6.46875, 0.14587121613465173642385907904393746093918338610979206872317556
+6.5, 0.1462341576125674065806946230900897092043376385366968881939080161
+6.53125, 0.1465742846017156565031322547877361012902903135443053937492208395
+6.5625, 0.1468916607473747967453805148045540497396349459464931470780276994
+6.59375, 0.1471863590717382904639950861024962362451493576504700626208044308
+6.625, 0.1474584617733144876649961919877695377047492374178675194959150546
+6.65625, 0.1477080600238837515377348465863239340424550727498295311177137235
+6.6875, 0.1479352537632553152198704352776893278102619873636467140388692638
+6.71875, 0.148140151492060997767412041589440808547358263735547183872304064
+6.75, 0.1483228700628176073239189145624976235806858233018272735590864229
+6.78125, 0.1484835344694844780202979471730167323155289577080655893917938459
+6.8125, 0.1486222776357371351669553843157594469152004032054422386052887636
+6.84375, 0.148739240202172570649367852468491705095786840132838971537801598
+6.875, 0.1488345703126560465843226478562928871791001274057613694767997753
+6.90625, 0.1489084234000137393690518578807648203193136820993856528084466127
+6.9375, 0.1489609619712698970478062313573609692680552348875929746540607884
+6.96875, 0.1489923553926215188783437434144551925928659313878014139088298932
+7.0, 0.149002779674337885215779107214816238502787801289339303219690668
+7.03125, 0.1489924172557665761217116542917476847890320594343698665911024603
+7.0625, 0.1489614567906219259022013329948125681195329146338475387698971374
+7.09375, 0.1489100929327261752044255712689372649737226103235836952443254791
+7.125, 0.1488385261223679091647230072085536719234070754335524389525507906
+7.15625, 0.1487469623734367158918770954187551949234962123992116500369156451
+7.1875, 0.1486356130614873704715821180286845308490094680180548580712654737
+7.21875, 0.1485046947128812515703058051285177373693468397353164602025004183
+7.25, 0.1483544287951471361807945196927776511373460872768112527238491074
+7.28125, 0.1481850415086979983771228115224368376369972232450912535356140255
+7.3125, 0.1479967635800349651387270086508387038713913801890123881357855521
+7.34375, 0.1477898300565641610851824199312335936900045779557286736948341009
+7.375, 0.1475644801031468087884978526890452018431951786488194929414698882
+7.40625, 0.1473209568004976463828079900641466295155327272091445079769356799
+7.4375, 0.1470595069455414833979899022379948088023206256454343443992575633
+7.46875, 0.146780380853832542776041079828230704844287860276009547261497493
+7.5, 0.1464838321641361353125283611982910146093693210416171836329441538
+7.53125, 0.1461701176452671854856447834288420779539292600497307014723747997
+7.5625, 0.1458394970052751777448472251341277028645311017806701719746153109
+7.59375, 0.1454922327030602225557755090211053050835003144716994852548830216
+7.625, 0.145128589762500154344665092874937928707880206302958498304275093
+7.65625, 0.1447488355891638712474285169713012428328522052559893006489699132
+7.6875, 0.1443532397896815113335887532648216158554040736289726260182412444
+7.71875, 0.1439420739938375336315394030474361310721136916517835376258171026
+7.75, 0.1435156116794483365247482473914624220853475043803135552912932387
+7.78125, 0.1430741280000817024280390965913763811463923865449259448835264875
+7.8125, 0.1426178996156711074190491045057361016985004131051277216008398646
+7.84375, 0.1421472045260737788494867261669621764637104193597704977009854287
+7.875, 0.1416623219076173238845315002077622600479864286350828462179901495
+7.90625, 0.1411635319526757882471114310613141048459221763905731779423087318
+7.9375, 0.1406511157123121378535112696525941721793372533159443421959106352
+7.96875, 0.1401253549420203870468004399490992933146008813685132060592053881
+8.0, 0.1395865319505969261523717952201556048352961978634593626199956585
+8.03125, 0.139034929452167028347360234482825094005454984475627880786668059
+8.0625, 0.1384708304213890414751342249781640887207232135165388237754694186
+8.09375, 0.1378945179518553944458534404893760209784770346777328266144149511
+8.125, 0.137306275117706270124538649187209643845913007218244688257597012
+8.15625, 0.1367063848384686168869038404421724142270253704739837253924750777
+8.1875, 0.1360951297471300889809349018549205314364818786088753217098418186
+8.21875, 0.135472792061454521027667211296520105380747996875093793063692204
+8.25, 0.1348396534585426538900662492732683711213139773872726989025896501
+8.28125, 0.134195994952639037105149286593053531166254001095648895689653526
+8.3125, 0.1335420967761833363958288708101099953754046019027703454362920477
+8.34375, 0.1328782382641016726581205859315136572403567504522437174534859629
+8.375, 0.1322046977413311103821640892691300539233545731966601342404412936
+8.40625, 0.1315217524135679977655052705057277764114337938180105910833817906
+8.4375, 0.1308296782612285368000290847251082436367781289122245017714297755
+8.46875, 0.1301287499366077282821264900177115144151343175418109771979675257
+8.5, 0.1294192406642206928722233945489220067994836128911243537546777605
+8.53125, 0.1287014221443083138226873992471819105675528528146455480181817349
+8.5625, 0.1279755644594871785592272518338310880134218185679180109016567457
+8.59375, 0.1272419359845219136498098214540689001581395616946718641068512452
+8.625, 0.1265008032991962094929046934308475348369764359761717341024840736
+8.65625, 0.1257524311042571159296681061600648840395330108327270795847968728
+8.6875, 0.1249970821404055565222031584940638266537662789121884832976175432
+8.71875, 0.1242350171103044559989256291165412529883861907556370383859125794
+8.75, 0.1234664946035744008751557954021362056389488616175423534537103861
+8.78125, 0.1226917710247453560124998000697102215182484981855384927062460262
+8.8125, 0.1219111005241316383608735487772338622411062091258409940338695099
+8.84375, 0.1211247349315961017878972967393393036253007106474480390906175052
+8.875, 0.1203329236931683121796271338859893738816117590208196934874368039
+8.90625, 0.1195359138104803883166872127362114055010679248721249537560162221
+8.9375, 0.1187339497829831498006133671114615046083163829816594408728707471
+8.96875, 0.1179272735529042469261638620216958057123505548330122740722752645
+9.0, 0.1171161244529090472581670367111784045743053095436893911035315581
+9.03125, 0.116300739156424218162210083385227185533605044339847852124075079
+9.0625, 0.1154813516305831720397193881634775620922493157015178549475570141
+9.09375, 0.1146581930917518299109321176590607018060567983412020806855422268
+9.125, 0.1138314919635925076556667041706848420608352271803379539939177428
+9.15625, 0.1130014738376231360458565376957212990823141589064789080116173296
+9.1875, 0.1121683614362284890739190007137677652436395694523246660647205095
+9.21875, 0.1113323745780796133914945012641619056077986973209133253888752737
+9.25, 0.1104937301459172233257130101992574268888571646423888723107456074
+9.28125, 0.1096526420566544493457524437613924141828713725194505127350597242
+9.3125, 0.1088093212337540014323186697259645238954995013351097931174975041
+9.34375, 0.1079639755818345309898787779655610084100681487363171436870377787
+9.375, 0.1071168099634607441821723564042090037193203245757610115628138377
+9.40625, 0.1062680261780716343261392051513118096427559753933825176508211987
+9.4375, 0.1054178229430010597237636532811313712339610267446262576771971889
+9.46875, 0.1045663958765447945377227189071435034687044837875471218789131249
+9.5, 0.1037139374830281225348471064138184894358405720209232547560841715
+9.53125, 0.1028606371398280252593165859252927006739301365365426685611875904
+9.5625, 0.1020066810863040360024670690075651775314553757606669819658493808
+9.59375, 0.1011522524145918873753207979934320576658078337719762942203305787
+9.625, 0.1002975310622141719514067187849198747123084349474381459687816731
+9.65625, 0.09944269380646236094043311244551347186132933931932763395238961378
+9.6875, 0.09858791426050468380921095557578551296102506855325932845067711401
+9.71875, 0.09773336287117456083874535795601281302988611106025759620624639309
+9.75, 0.09687920691839449947249595123014577992202735721004505877045684474
+9.78125, 0.09602561051619061267082966905759933316281161950185383386654675451
+9.8125, 0.09517273461525319206491984563765188703915505596357131601874553098
+9.84375, 0.09432073700699906924830257170489700348610541649798297846314796572
+9.875, 0.0934697723290918238290632200512601609790448068908622816982339473
+9.90625, 0.09261999207237624568809804174997119044476874229376716083851429583
+9.9375, 0.09177154458918383007203469068826461831207499880459753640537030884
+9.96875, 0.09092457510296647654139582190468269259280455276833745760153763756
+10.0, 0.0900792257192159752690307848423623219006311287035019231330779874
+10.03125, 0.08923563543762729563979716734600204632935976805884550301958272071
+10.0625, 0.08839394016546414146459423696291650602396215891002094817810032835
+10.09375, 0.0875542727320857033403975981446079045900950004170380141217798983
+10.125, 0.08671676290459402073880955226978882040738016370274968214772002705
+10.15625, 0.08588153740456186329032286367323554273714780196679598107134503884
+10.1875, 0.08504871992580155147705950812258055922273494943380786172530972376
+10.21875, 0.08421843115313566060574172054166647482048972395137041357727298345
+10.25, 0.08339078878213108758302055413775607723132212504030552984467919505
+10.28125, 0.08256590753975850676023276040171004069036098612758131236530350499
+10.3125, 0.08174389920593979808250412322343169032284488043129175755402777055
+10.34375, 0.08092487263594659712114048278923636920033358297768039227359054973
+10.375, 0.08010893378361369146648178382789854656403551892204511091331458431
+10.40625, 0.07929618572533157061342790577400283781264959560021938264500284631
+10.4375, 0.07848672868478302611059314823253687943738975624995612483168087127
+10.46875, 0.07768066005838929461750852576414987660165990817465531077261871691
+10.5, 0.07687807444143183789729234703220624279380857338216579354887518411
+10.53125, 0.07607906365481645996312680310428816692364016842017608293932628877
+10.5625, 0.07528371677244707191735332262054653143448767903402410303253626836
+10.59375, 0.07449212014917702881663938547103469773019925803122605043397312676
+10.625, 0.07370435744930657953273530927323538552011916583148759884703871688
+10.65625, 0.07292050967559558944542393848831886213771777720290243347547703543
+10.6875, 0.07214065519876131631396157921297464812803513601942652338028874115
+10.71875, 0.07136486978743164125886602479447493314344682213780748878337445234
+10.75, 0.0705932266385247789018877058650651506121612742786201604507144401
+10.78125, 0.06982579640802711283391643020037884671294585057571371909558535625
+10.8125, 0.06906264724214142420453222565923372837428208273649133725449241974
+10.84375, 0.06830384480877840186922864867183951077450874338278457748201476589
+10.875, 0.06754945232936494172719141545968222766494875266081490789943738083
+10.90625, 0.06679953061094336018954323087129961356563802422404758002923660697
+10.9375, 0.06605413807853626170989169439229443426048007046861832278482418048
+10.96875, 0.0653133308077524125792655593271689657287952723742815949379576175
+11.0, 0.06457716255760958234783150545220401784168671597255123666736160942
+11.03125, 0.06384568480355091991580646014974095445569419617921151651521111317
+11.0625, 0.06311894677063203318290649937023367467323984603485566382390229352
+11.09375, 0.06239699546685653882382648399621959603344520302605595275077738711
+11.125, 0.06167987571663844194769248357791483216337325079191816121940298872
+11.15625, 0.0609676301943702937995897381767567188529607835698861025890621261
+11.1875, 0.06026029945807665898551800421785156257701253772225051353875611987
+11.21875, 0.05955792198313300167740480983988375815312060358229032027879208004
+11.25, 0.05886053419603067262623147394501590853935283971236069193541303953
+11.28125, 0.05816817050816924533779857635785778716951948332299664882435651658
+11.3125, 0.0574808633496580102204774535212360255396781394482704077840783975
+11.34375, 0.05679864320310898968477670869263493212582523302622073950513070364
+11.375, 0.05612153863740438486164394161535846674235555525922766863438587243
+11.40625, 0.05544957634142190562432181498870901097330582514315999998588280346
+11.4375, 0.0547827811577019697743597460142397745624021376810795707610064366
+11.46875, 0.05412117611604128442562770613406518902698666372521448724479724358
+11.5, 0.05346478246699784264260207004149530786172344904175906177569486209
+11.53125, 0.0528136197152928811242811251868868144838942789008529933179484138
+11.5625, 0.0521677056530958500477358085992101630263070350051249310071949207
+11.59375, 0.05152705639317894398145946756000800638761012963773573842208917519
+11.625, 0.05089168640192823294500119979566293503896678428072390811724372124
+11.65625, 0.05026160853219891513485821963960316251879364044374241530953591884
+11.6875, 0.04963683405600268747428463283275829189557781257028954713409880922
+11.71875, 0.04901737269701569690324420033732735052135020653013622061296168467
+11.75, 0.04840323266289599414023479513763303971326556773436670509411022052
+11.78125, 0.04779442067739986246520183645872552865184363236066140246343015826
+11.8125, 0.04719094201228683684599321613546618243415908251789683357860193099
+11.84375, 0.04659280051900366342192623347299862353730256873652458178482910522
+11.875, 0.04599999866013787593724569815644791373264054355998011366547189617
+11.90625, 0.04541253754063208416252571154945252607614072917162635227679054418
+11.9375, 0.04483041693875047963884709251768446716786316051519956067197537987
+11.96875, 0.0442536353367894662204835816113971739140188055683013145126281588
+12.0, 0.04368218995152471687635531739281537760189964883435067898333321298
+12.03125, 0.04311607676438734404476547014127263252420545279051499674106103174
+12.0625, 0.04255529055136224853236287308747029578868171152232971661549374741
+12.09375, 0.04199982491260208152536743583929108018337480599025049091911324587
+12.125, 0.04144967230175061576314945964008104380603768593021504686644246521
+12.15625, 0.04090482405496967534110003947385222630048685740611084691528093907
+12.1875, 0.04036527041966411899648465848096108337191779473078386067932884597
+12.21875, 0.03983100058289970912779248348159746755531236781828933676775736839
+12.25, 0.03930200269950902824993546378841277650347059020112867294596109835
+12.28125, 0.03877826391988092614403431893049613289348872850639081869119198565
+12.3125, 0.03825977041742929467530879194795290394691816004020008233248898725
+12.34375, 0.037746507415737273183735783321366111817250504251481785415924853
+12.375, 0.03723845921537328556151527703663072492151770914496108335033055671
+12.40625, 0.03673560922037560068453835831193080739781669600184458029517656766
+12.4375, 0.03623793996440239083101016903469320832974396818984132540245539339
+12.46875, 0.03574543313654453817144717220144296839484240442264261014927766468
+12.5, 0.03525806960679870742582945100797950445978870357757378206026414402
+12.53125, 0.03477582945119846343402560974339524254654627649794884156156752345
+12.5625, 0.03429869197660146575571085671751662921789853475712021504970444148
+12.59375, 0.03382663574513101858939034234531708206459333298170791035266192892
+12.625, 0.03335963859827049336270064119476638054383059942821784619709857119
+12.65625, 0.03289767768060937338596393941607229039254919472314347121675936924
+12.6875, 0.03244072946323989506811157554215359079173782010148374705451200468
+12.71875, 0.03198876976680347846054609764789596236946716979852879152661544347
+12.75, 0.03154177378418635141396187808316080638816052416332403260612468714
+12.78125, 0.03109971610286397650085183859782612701298367634277324233588494615
+12.8125, 0.03066257072689408816907787835047037918281954299789447234854200507
+12.84375, 0.03023031109855833944745076832463048477533027565722711387022125042
+12.875, 0.02980291011965274302188368817860432167519898954793369660785951768
+12.90625, 0.02938034017242727074051228305981922526620887609501706167324990158
+12.9375, 0.0289625731401751486892770735511776997583656427816909538412965764
+12.96875, 0.02854958042747255200768959049621401227436162410810673893580897305
+13.0, 0.0281413329800695646903692480982303363740925865703202581428511404
+13.03125, 0.02773780130443342484651954905806200515303180417407344732301837546
+13.0625, 0.02733895548694522537033722115277473581082515156055185600435491043
+13.09375, 0.02694476521275138381429291375886109283666785114653183209362745783
+13.125, 0.02655519978427133355841434536617153303457230349539182751402792695
+13.15625, 0.02617022813936302123642556425539578180496820430430674621927914252
+13.1875, 0.0257898188691479229181979250028229322606936071091667873311313849
+13.21875, 0.02541394023549741386177664122660085378198896071964208894555595496
+13.25, 0.02504256018818244384148378156398580956217209968617961472205210035
+13.28125, 0.02467564638168858223530245245993062248488381663980076855582391007
+13.3125, 0.02431316619169860431869539877810432437095491962896324428678848523
+13.34375, 0.02395508673124489266664908109195037520870787465704923391069010152
+13.375, 0.02360137486653402531410389886825693949918841596391167080373280115
+13.40625, 0.02325199723244601546960677072424970354343687800780519979046093388
+13.4375, 0.022906920247710756220046794561517314143025194214171416540692479
+13.46875, 0.02256611012976430790716040534545965524698726022796661743168714562
+13.5, 0.02222953290928774579992402554684276313564496766991144538849579827
+13.53125, 0.02189715444443136143109309834353160324362993197658135926055940951
+13.5625, 0.02156894043472708261034789158384430414024682748437226080282659365
+13.59375, 0.02124485643469204476931959053144251339244174216719785762448238992
+13.625, 0.02092486786712631003290033154832020515553225473976608821202936454
+13.65625, 0.02060894003610779034350490623347431081786222321080332201080929914
+13.6875, 0.02029703813968748718623816615417446383595538403698234152178129037
+13.71875, 0.01998912728228821306815255087011842834710346711927050433149472271
+13.75, 0.01968517248681000898787475094235064619344644494234684846226341983
+13.78125, 0.0193851387064455177857246164964714859515789915629372555868373515
+13.8125, 0.01908899083620861558086278002192362548089270044569431157095041703
+13.84375, 0.01879669372417964257171167417742443238820891989332419590640361778
+13.875, 0.01850821218247061038850265365148440799609697622212826075115095109
+13.90625, 0.0182235109979137960307696701030660230211842790751616318185123049
+13.9375, 0.01794255494247716228522977158061526911920574278350595874404072218
+13.96875, 0.01766530878341007148686690000396960883946714985938783415648925456
+14.0, 0.01739173729312278364306556231780631887969713759681244529381747078
+14.03125, 0.01712180525880325137099877164771956192612344977062530661525080283
+14.0625, 0.01685547749177474288459510565731319236025538991134036603996327899
+14.09375, 0.01659271883659784049047526404455923484951974405871725046897261092
+14.125, 0.01633349417992037579217716703127645247497261591390030491046018882
+14.15625, 0.01607776845907887413742363245666721232464496711639717041597930042
+14.1875, 0.01582550667045508985148744112449031202415508488877960933765199321
+14.21875, 0.01557667387759122055694330099531444295444671912127151222754245053
+14.25, 0.01533123521906739346103556447436122212875936556117825461179641207
+14.28125, 0.01508915591614501897000297588447297878304086218143531280370179737
+14.3125, 0.01485040128017960743714980831930667048525584103960935121913685029
+14.34375, 0.01461493671980664333909084294585519649253217004273332018969980859
+14.375, 0.01438272774790410777197066051002478221410586882600513543519777407
+14.40625, 0.01415373998833523493480101806403369245715465723048837567240372514
+14.4375, 0.0139279391824750812873004444592995936620103926189386089092036279
+14.46875, 0.01370529119552447740037775082639886211364653274120826497060294389
+14.5, 0.01348576202261492222299237093930202604133937188144469769807527935
+14.53125, 0.01326931779470796763256594148836411112481413254753350314005290282
+14.5625, 0.01305592478429262777913282815506138616404709313490776842976525673
+14.59375, 0.01284554941088433293643440271100543855474440761669773381683868324
+14.625, 0.01263815824632893139533163120468065884320815875783454305301287547
+14.65625, 0.01243371801991522543410577230112460787092230542087111828432708092
+14.6875, 0.01223219562329950863304235806129712906132887969621611228131906817
+14.71875, 0.01203355811524555182249413297974228306924993254645822617743630436
+14.75, 0.01183777272618346381848877085024065492976172115231605927589757706
+14.78125, 0.01164480686259083086074077209705888018365671961778171405663285354
+14.8125, 0.01145462811119951537626740330526992335794839429486266465411653182
+14.84375, 0.01126720424303147039809983811802754868355663620864325356514383517
+14.875, 0.01108250321726690072201867742453314475391217786068690100065815408
+14.90625, 0.01090049318494807573282744118392403432849342166969474602418733066
+14.9375, 0.01072114249252207182222421584360634264459803681289539641993976189
+14.96875, 0.01054441968522569449848503026145836819610630416861577850817711493
+15.0, 0.01037029351031580169841929658784268727219718885866488076505310045
+15.03125, 0.010198732920148220497739802996526183473715500459371949628848851
+15.0625, 0.01002970707510841941931854043822693556182834154799512699331026333
+15.09375, 0.009863185346397067900869706918206110974273617042611023887557678326
+15.125, 0.009699137318673583244404944129667268049096308158487118089171429876
+15.15625, 0.00953753279256073356824802680610390499679334346380015378579852359
+15.1875, 0.009378341787013332956308961515963939692755113826302515778764801244
+15.21875, 0.009221534541554032185475292400412087148880984348868430777673792339
+15.25, 0.00906708151837917514611360240403184806964588038864559326980478359
+15.28125, 0.00891495340433765738749216329951545330068315973069517857297047596
+15.3125, 0.008765121112785689153130642589552965142266130101551143640750628186
+15.34375, 0.008617555785320330853353475513016838084655976108966557845253003893
+15.375, 0.008472228793394634185389108618455863184430565329575241616138584996
+15.40625, 0.008329111739817187085973320756207798483752415390233786350140594164
+15.4375, 0.008188176460138825417389111683102168848232690928711474747895925408
+15.46875, 0.008049395023929238774084573847594664941740698110351318914020875349
+15.5, 0.007912739735946162081414694650635719822186900082414991230048984677
+15.53125, 0.007778183137199808767714916509292135227341917077002320745436406903
+15.5625, 0.007645698005915165252012212376521919074393611856841901395217601611
+15.59375, 0.007515257358394730327525262704288231218462894546776649893548353995
+15.625, 0.007386834449784246760160214419029787841342898081478173284630426354
+15.65625, 0.007260402774743936085099103450784588726104248508786197067695648134
+15.6875, 0.007135936068027711196112557729165154311724058993624128829251831655
+15.71875, 0.007013408304972804903412752347775659601097175963379834073376279649
+15.75, 0.006892793701902216207916316276142267970294995086846189346747353234
+15.78125, 0.006774066716442339623159155910639778837428212133887633939171694213
+15.8125, 0.006657202047758106490490607687830658108619514888437648195115582276
+15.84375, 0.00654217463670793089752885855173170216247578706774598360181060695
+15.875, 0.006428959665920716542416016107120865072700092313728051308217682283
+15.90625, 0.006317532559797144704694922880922846593691217301236176194339329021
+15.9375, 0.006207868984437427404474126321332152636348041416332165341685831046
+15.96875, 0.006099944847497673871109001072127785931656801454320380313923265594
+16.0, 0.005993736297976982616401083030255336132009925739194946945004034001
+16.03125, 0.005889219725937335730153059269641196029126381998618573511386072621
+16.0625, 0.005786371762158336502030987137848678837899784863378730942774399818
+16.09375, 0.005685169277728796136678993186107051215546208807632687170722840925
+16.125, 0.005585589383577140181903762102105242816264542980353392933224589745
+16.15625, 0.005487609429942570344907926253035995272048304157877838824755031009
+16.1875, 0.005391207005788882640841224926362481264119279087229071962943159304
+16.21875, 0.005296359938162808312635262923185976329086733106557193482781387624
+16.25, 0.005203046291498709691926131346029189874671384728454645996773921921
+16.28125, 0.005111244366871429148052183032797754709076860797990415992349803486
+16.3125, 0.005020932701199055505327508791431121714756779829305233326316614487
+16.34375, 0.00493209006639733880721674120172691547609547161003624402579166358
+16.375, 0.004844695468487451078364587361487328622263887898352861520547953491
+16.40625, 0.004758728146658757789877196334106300435349644918475273826030174679
+16.4375, 0.004674167572288232077560623045800659531506726288032460968923469296
+16.46875, 0.004590993447918111404290794222749883906959691162919473078572949795
+16.5, 0.004509185706193364303176601752709417049883966371357601625110752756
+16.53125, 0.004428724508760503094113029599611806182602121750429661621549607512
+16.5625, 0.004349590245129247038719595253812993475988279247440916518595722085
+16.59375, 0.004271763531498509293132893365522644635752064506482206427160481127
+16.625, 0.004195225209548150239891470497448172751804733123389589438645080414
+16.65625, 0.004119956345197909334057767822635998020306230017300115626447364483
+16.6875, 0.004045938227334897489238271236472876227360545527968910814926922811
+16.71875, 0.003973152366511002260404999696277948826579645222266389863833250566
+16.75, 0.003901580493611528656158574463971599104815789563734600543521014474
+16.78125, 0.003831204558496369336739488508944586617457428700047330480075122825
+16.8125, 0.003762006728614969228799170342472001742836049964835703924214608361
+16.84375, 0.003693969387596321216480913269121976108222751984599390269114771514
+16.875, 0.003627075133815201553223375693850552777481022240114496672638023673
+16.90625, 0.003561306778935825982082547313163040502873558805233171611581552729
+16.9375, 0.003496647346434080256183748780064138261472914222345448672623707917
+16.96875, 0.003433080070099451816800447862074655696814613791052375903256265177
+17.0, 0.003370588392517762815883026502544299200711223278838596233661236072
+17.03125, 0.003309155963535778463743459765015690477610624461354912723741741669
+17.0625, 0.003248766638708738841909275035594403568348544987038432709016552744
+17.09375, 0.003189404477731836846521850727458194548832750778031905811135635887
+17.125, 0.003131053742856639819470029742495838440568741485110239625039759577
+17.15625, 0.003073698897293427682898799720659802554774508209785257653821424662
+17.1875, 0.00301732460360039601778002863501709970892081697493949294727469142
+17.21875, 0.002961915722060648518638588436002423939845982854018412061118718088
+17.25, 0.002907457309047879613856251287310954342333581240549869330320520833
+17.28125, 0.002853934615381624763601777673942980578528436192202620278165163658
+17.3125, 0.002801333084672933034551127991356077014955167331024341529342475831
+17.34375, 0.00274963835166129400118480101103245650359748319151202552069883895
+17.375, 0.00269883624054362883643079589052827609921621261882340293980617437
+17.40625, 0.002648912763296133628452271633075552086256395892735079991071928111
+17.4375, 0.00259985411798974149399595168005853570526578754528481389879404129
+17.46875, 0.002551646687099948950311335428308671715346356062762801910917175961
+17.5, 0.002504277035811731255472322622425798620304510274846659292768413449
+17.53125, 0.002457731910320251029098616931371664264660461168277586707009092537
+17.5625, 0.002411998236128044419973322658666797106387634180372466853393749851
+17.59375, 0.002367063116339349391752968200694377016249022152332026138467689678
+17.625, 0.002322913829952221350618551206223002110068301200773738042720745057
+17.65625, 0.002279537830149062336962873993643696400660441727157891984208221459
+17.6875, 0.002236922742586171344587758334732264020308665538599993344795554231
+17.71875, 0.002195056363682905012833007583865772337973540439485874023434187795
+17.75, 0.002153926658911019956921773753242427137064590991780903822555155188
+17.78125, 0.002113521761084750356840199533440992852494559849865732524690736381
+17.8125, 0.002073829968652157112445087095317052102526991228183778681198540127
+17.84375, 0.002034839743988267889305312015259509442031124133345099963342087203
+17.875, 0.001996539711690510723050030854091612433141622831860723866376363451
+17.90625, 0.001958918656876927516669126455616873802820625454928709588402192843
+17.9375, 0.001921965523487637752173345149656588980945266655365679518597318731
+17.96875, 0.001885669412590007042096894903779101680777942790481320624198471091
+18.0, 0.001850019580687959764280888314626225715717956781557941459933869794
+18.03125, 0.001815005438035859951926266863330096205004241000243064507348592252
+18.0625, 0.001780616546957369846715326163650975361969020942281485580492146856
+18.09375, 0.001746842620169681062492315338627707906184475639819233420519317417
+18.125, 0.001713673519113499147145163906545967961403546430926717227158704095
+18.15625, 0.00168109925228914846748382456434038335524266533443174418470995592
+18.1875, 0.001649109973599150772573347893835558128586080613962869643083297856
+18.21875, 0.001617695980697617511627999133501353014747553846858102199254128342
+18.25, 0.001586847713346782989655113216873662880898123797406295921707869334
+18.28125, 0.001556555751780992733977946858015464333956775854998526194350858827
+18.3125, 0.001526810815078449013967870918847289188964839172250316322012258774
+18.34375, 0.001497603759541003301161456811652166937831728839057666724189517362
+18.375, 0.001468925577082273573795006991890770028544407830553966354349941436
+18.40625, 0.001440767393624352755012274478739466170497612999297531620409026272
+18.4375, 0.001413120467503363223934276269767293113136358468108810817784296206
+18.46875, 0.001385976187884101249758856434562682727559537826353146843639884549
+18.5, 0.001359326073184004367411895171036611365668741258164217336056419052
+18.53125, 0.001333161769506664135328284090105479639842938485484143111675116657
+18.5625, 0.001307475049085096388024318929460399757971594856167874223760831657
+18.59375, 0.001282257808734971014560299749463811896466011088933693844395835749
+18.625, 0.001257502068317993455112217543226695472689237716653104476908311135
+18.65625, 0.001233199969215620508008809754962431808998232639308972257359451638
+18.6875, 0.001209343772813283675086273803933166733856816405670035063723712956
+18.71875, 0.001185925858995284140417572298516069609655627163677469628616728029
+18.75, 0.001162938724650514572747074283129915510387674842729795156293559941
+18.78125, 0.00114037498218915426167694697890068462581205760739453222502455343
+18.8125, 0.001118227358070475638195700397967723476489800506226821719490756969
+18.84375, 0.001096488691341891987913345233374607446248819177854991935550984684
+18.875, 0.001075151932189368136790259021812978860085176453816293289900683301
+18.90625, 0.001054210140499308070654720599013922403054573386384180043260775004
+18.9375, 0.001033656484432025837853297561587348400283793163672063928254296187
+18.96875, 0.001013484239006898675445725001357170756208692694834785884273831561
+19.0, 0.0009936867846992940899404081413689659793979577326565040829668341012
+19.03125, 0.0009742576060493556101901141872697483149061636701845924223023109669
+19.0625, 0.0009551902902827251092758572114333191060591744423906900375053773939
+19.09375, 0.000936478525943272960571689401978770002132318109883570156507658533
+19.125, 0.0009181161015379008473015280169870517979996650037757186023400384769
+19.15625, 0.0009000969041934757813957947267679558937640245682651625428133020165
+19.1875, 0.0008824149183259478029830039988798147851599690208743741433578986254
+19.21875, 0.0008650642243216979230907641786382571376197147742675519008990201795
+19.25, 0.0008480389972311571357927441395902731047271676654814015402391419203
+19.28125, 0.0008313335054747317588640660407804296152149821992043330960593961346
+19.3125, 0.0008149421095610649607693022470235999432859057477736834305992581908
+19.34375, 0.0007988592608176590933083380156289452744028823287011082703222275524
+19.375, 0.0007830795001338783703215183683345013021983401714312557392995900712
+19.40625, 0.0007675974567163465103751303933439837427839597517140168812951493325
+19.4375, 0.0007524078468567491922129831859024408759705516959855127314560910429
+19.46875, 0.0007375054727120465529049028799651900822281125970619888724416319326
+19.5, 0.0007228852210970964870177165679061577572116710763298255144530350239
+19.53125, 0.0007085420622896851777825937824498133159252306885743975881750969742
+19.5625, 0.0006944710488479571051731201056818629052968980208585596871007492822
+19.59375, 0.0006806673144402327281150220327322216650264434305204919957614992884
+19.625, 0.000667126072687198125830315284092671791269370877757468671607112483
+19.65625, 0.0006538426160164471037207773388457992418243678333847289836274414415
+19.6875, 0.0006408123145293526193989373676807747981512693286412619129152044813
+19.71875, 0.000628030614880240861696236955743803530956890843282728067871613038
+19.75, 0.0006154930391678379169709282981111811239941098779864153982962546072
+19.78125, 0.0006031951838389556800923474757281084711150368996857727660325087428
+19.8125, 0.0005911327186043805094196641258952841669932526987784230176481463722
+19.84375, 0.0005793013853669250832849167264029231186097465158157821031023092403
+19.875, 0.0005676969971616009873316234904797261834287878658472296108923655925
+19.90625, 0.0005563154371078667449877557047022803158579644911222804736788764456
+19.9375, 0.0005451526573739032948383453696679272273620997343163617558924477559
+19.96875, 0.0005342046781528663162181658445822197113949939550467898477302116523
+20.0, 0.0005234675866510623055151594616268751686033796255489787156754907077
+20.03125, 0.0005129375360879929080436206928059337555483132979126897190166079575
+20.0625, 0.0005026107447082097115321846611711151666163617467718558417397676831
+20.09375, 0.0004924834948049195049315156096264199926250853511902209314863920711
+20.125, 0.0004825521317552778980727209089307171537323893103150175920475331532
+20.15625, 0.0004728130630673071814286801275535003337780528432116134120788154404
+20.1875, 0.0004632627574383723786115492811561827922269627529825433153673357133
+20.21875, 0.0004538977438251476050815252527050272710743315490272200305453633532
+20.25, 0.0004447146105250030926811884108766253172815885315280582408270234749
+20.28125, 0.000435710004268741568918661043330348417984250806412656038030608365
+20.3125, 0.0004268806293246110903091330931270274891479718253901884323025990031
+20.34375, 0.0004182232466135199184909440008741825716700794782911614434326535002
+20.375, 0.0004097346728353775942373007731893009651301200723566191134372097101
+20.40625, 0.0004014117796064850059005581556213549942731819530544765597603109081
+20.4375, 0.0003932514926078949633000148696791307391826063258100450088394950923
+20.46875, 0.0003852507907446635736778928681021030569658248990766883708572621629
+20.5, 0.0003774067053159115712170792662275906700342333916939355034628410085
+20.53125, 0.000369716319195613673887578320724842817183112177268880779287264372
+20.5625, 0.000362176766024033029249158977339776212838588163269564882568992823
+20.59375, 0.0003547852294097168625012791139329883655638619869166763788067002189
+20.625, 0.0003475389421419685537867830745965461571979799048327957867633916747
+20.65625, 0.0003404351854137105458044388558844439794508414767225800901340241329
+20.6875, 0.0003334712880546517154807017377228301347079306233265154863888633689
+20.71875, 0.0003266446257746721331387042250621916388389543467319888551248457255
+20.75, 0.000319952620417337477659543313458400670844463663390815293639440424
+20.78125, 0.0003133927392234547749659266613169374601723043087624480576953359313
+20.8125, 0.0003069624941045805782105739919509357964984646689326446005820957827
+20.84375, 0.00030065944092639220979150000931790787881981345617549519498691471
+20.875, 0.0002944811788018322362437663469830253922715370589688299639914093914
+20.90625, 0.0002884253493939359457027585187108763335288425442217356549707343936
+20.9375, 0.000282489636228251242557386733543537436404819377270103762353271613
+20.96875, 0.0002766717640147600637019335939914153016007492191045174297072036423
+21.0, 0.0002709694979792101540705690132423059691466472027722730038462955455
+21.03125, 0.0002653806432037658145453431860720767237741399615532951453934048159
+21.0625, 0.0002599030439768860515414411479595917757689245775230906176362924416
+21.09375, 0.0002545345831523384132951344001453323146075016313181096478520496739
+21.125, 0.0002492731815172566918401387850640471750425286461864149447736917883
+21.15625, 0.0002441167971691506006140074280619626675880884422752313015333283424
+21.1875, 0.000239063424901775504371494059434533352466595802922400916457199859
+21.21875, 0.000234111095599770279406607489308502133779770264588500597768617791
+21.25, 0.0002292578756419714168354195223365276381943999793871972965581951938
+21.28125, 0.0002245018663133115487292818325698275029435195610559364970553045796
+21.3125, 0.0002198412032252106750999000100110188866421817713529788969676355924
+21.34375, 0.0002152740557443684980355386231836800139342224938604460862056911426
+21.375, 0.0002107986264298664266078429852250025577803885378907693133932131265
+21.40625, 0.0002064131504784880014718690278527835433172765721078608877298045818
+21.4375, 0.0002021158951781667003522097085202251907533379806354288109283111954
+21.46875, 0.0001979051593694703238533182170535478131900540144221312198778804315
+21.5, 0.0001937792729150314242830419502544173692750302491638696214427979703
+21.53125, 0.000189736596176833527488486081772531851705809300615907420027269357
+21.5625, 0.000185775519501263208148453297827930443666541165106467760295994386
+21.59375, 0.0001818944627118384116446728372323067800636343427441714904928947378
+21.625, 0.0001780918746095237696642810462779493739987243521553820607584453208
+21.65625, 0.0001743662324805440312092640674348561689731398244745199132870761252
+21.6875, 0.0001707160416116071248664584399019208069228751937873434287785017145
+21.71875, 0.0001671398348124487812064348693045742691753028871851855439944963413
+21.75, 0.0001636361719456110752335937809465325844343405317596314541899867083
+21.78125, 0.0001602036394633676971253842588000237383629077153214494082086658999
+21.8125, 0.00015684084995170922431755922518948935412810915011288015431718109
+21.84375, 0.0001535464416813021485758300164943904188367123878176220475832824296
+21.875, 0.0001503190781653359073220677309000225238023966764424631341915724428
+21.90625, 0.0001471574477241726784537205344569237958364908284642943441209240149
+21.9375, 0.0001440602630567152215249655319895997789616919096514478305941190529
+21.96875, 0.0001410262608184085847817376938381997305883569633304735341781380612
+22.0, 0.0001380542012057920465121538493010630651744898446802968662906391646
+22.03125, 0.0001351428675475182198581609553434769529726982135152205852196896735
+22.0625, 0.0001322910659017568220195553267838284614807974891850474088381059511
+22.09375, 0.0001294976246599011910704833169331281989862599555081067370453841167
+22.125, 0.0001267613941564962258200396871132844581830721920756733437451268568
+22.15625, 0.000124081246285307025717468232282320841436654584194649518806811742
+22.1875, 0.0001214560741214481181792185651552438566082596388867492569041072517
+22.21875, 0.000118884791549493779365535699055899413587652213390033777171238555
+22.25, 0.0001163663328974905808392011820895901339119640180783317982474302161
+22.28125, 0.0001138996525767939281940886425025039624879108451078358339232624733
+22.3125, 0.0001114837247276509981563685485323636623017081133893849063404658862
+22.34375, 0.0001091175428704531273606759278769554399528236306646202130433225262
+22.375, 0.0001068001195625813585253868688862898153913850859154080368930748643
+22.40625, 0.0001045304860607695076469651783470601265249921869649329008383771995
+22.4375, 0.0001023076919889097786680749680551932375209593300060279162954087858
+22.46875, 0.0001001308050112266194257730168155461304019973854575532857085751311
+22.5, 0.00009799891051074518414531886282018932988443580110979543218851937232
+22.53125, 0.00009591111127298144291518230050583958090797337305595407466765139615
+22.5625, 0.00009386652717478165707512342291481054734710520447295688981171175146
+22.59375, 0.00009186429487823962089916925133603486429886835987111995629086477861
+22.625, 0.00008990356752962075399801920552506791490432212019864916882843725068
+22.65625, 0.00008798351446322281515143755324887683492385624676539872526196693038
+22.6875, 0.00008610332091010369647229533422453590878657399506323016282172852618
+22.71875, 0.00008426218771160744657282390789995155768804525557211875640373061966
+22.75, 0.00008245933103762036243376732419149813858897770871651127940011252377
+22.78125, 0.00008069398210948968166237540435866692888723010977917791117141875305
+22.8125, 0.00007896538692753809946970663721929402296146145644091046232557667111
+22.84375, 0.00007727280600310802771565940218116879461020426475791374007535248997
+22.875, 0.00007561551409507020648544977137068668406532831928429264235936658404
+22.90625, 0.00007399279995073197160738616264832625144765338125115048973369362977
+22.9375, 0.00007240396605108117404157003820822168350499427904121301403576290932
+22.96875, 0.0000708483283603024389145074129962144914647615328317100674050695602
+23.0, 0.00006932521607950314290637898975301268341054119934235426214238797386
+23.03125, 0.00006783397140458717848540869385099518057667566354425092170572133459
+23.0625, 0.00006637394928821526190539623271582815389986898119676309197775002697
+23.09375, 0.00006494451720579122872432407271581860582348833818147354689967172914
+23.125, 0.00006354505492541444565837786991228738094108945186296711416884094678
+23.15625, 0.00006217495428173915065898013893028840165854841542417197492475884161
+23.1875, 0.00006083361895368221400046802609493345010601704401991431562790884053
+23.21875, 0.00005952046424592149171028580180601721840185718501141576954439150321
+23.25, 0.00005823491687412761868676298579435896483160167781201448098581174918
+23.28125, 0.00005697641475387276216359206277396211065374094892871894258390299004
+23.3125, 0.00005574440679316052663383809188281764861820966987652414032315264852
+23.34375, 0.00005453835268852186878531238500048799385672780022348057221822442141
+23.375, 0.00005335772272462254527563024879395397927735439178845553063858215502
+23.40625, 0.00005220199757732827714788489990293595417594306070136515629776283048
+23.4375, 0.00005107066812017447222150523196423952685393469285267598463275615529
+23.46875, 0.00004996323523418800075852212929662246409815454710913316134150548538
+23.5, 0.00004887920962100916998008242555091766367841483179702915058181669015
+23.53125, 0.0000478181116192626894743374655266654575406758120820936605950737021
+23.5625, 0.00004677947102412706208313595233786499202342024827934006726292647601
+23.59375, 0.00004576282691005247337508330230842902298102243511017340813981395371
+23.625, 0.0000447677274565778872056317499690747362624231867898633817985470593
+23.65625, 0.0000437937297771986850352554135425221336998827886619493439789302671
+23.6875, 0.00004284039975123681253379670446043984501519344615900993762418392406
+23.71875, 0.0000419073118586660184569947285608617578306706629993117154878233081
+23.75, 0.00004099404901784538775903085586995301528728311762531688369813434673
+23.78125, 0.00004010020242611498332628333661944350089804893613097429953106308809
+23.8125, 0.00003922537140320801851049554364989556468101965758643195926342113358
+23.84375, 0.00003836916323743458573671778343481058092050722152885304658234027891
+23.875, 0.00003753119303459256479940370433645590117679110960812095556438343489
+23.90625, 0.00003671108356956192797976483155492971857250021170358904521577154907
+23.9375, 0.00003590846514053924776373781076711248694880505241223626426808428884
+23.96875, 0.00003512297542586979666139851899311716008447625250801034312089627671
+24.0, 0.00003435425934343520737782202742671887929322359545673893338585822963
+24.03125, 0.00003360196891255523531833736777215345157742849628888979094690502462
+24.0625, 0.00003286576311836273408749308665549759879265802360447725791455186413
+24.09375, 0.00003214530777861151822388892268113286756648704179048323119263912845
+24.125, 0.00003144027541287734586871285896801195766437426917451514554434418197
+24.15625, 0.00003075034511411280736393656652116248239197285807216983836057906067
+24.1875, 0.00003007520242251745388936249825485277379231864480077843288037134996
+24.21875, 0.00002941453920168504315179123317512935654625549696766742525457864755
+24.25, 0.00002876805351699031681311154918650178209163050620653243852008521525
+24.28125, 0.00002813544951617825676855145680139156833070927093278479375383024601
+24.3125, 0.00002751643731211929454583651295558635459090934075544231774790172113
+24.34375, 0.00002691073286769446997738910130875101116500608532625523978557365882
+24.375, 0.00002631805788277505189032391522539569734955574261962990829263325496
+24.40625, 0.00002573813968326164485466700146922584894546013116703506595190770654
+24.4375, 0.00002517071111214831202314185546624403353599889024803548978405608175
+24.46875, 0.00002461551042257774478251425049737850997537596893587789632318664474
+24.5, 0.00002407228117285400531556991147330043301983774871251851450665827823
+24.53125, 0.00002354077212337985824515356794388942498591609480913700653682644949
+24.5625, 0.00002302073713548619230022102608671819569966302451441613704668495191
+24.59375, 0.00002251193507212151241342850509717582783073501555679145358914683137
+24.625, 0.00002201412970036995683719757997820783791841338076163604324873481977
+24.65625, 0.0000215270895957667627590816544447970832134824929731498906750215182
+24.6875, 0.00002105058804838056751802354987744046237063533600583009594587653486
+24.71875, 0.00002058440297063239088283906466356114347272725426194621027582817436
+24.75, 0.00002012831680682159696673071837385105052741852026614327286143560002
+24.78125, 0.00001968211644432958223214449079528789950621558029181019021773614603
+24.8125, 0.00001924559312647237870565533512776565066737752912173161178832537556
+24.84375, 0.00001881854236697379899107866368376159200966546455682293648277893206
+24.875, 0.00001840076386603118196031840702000655034059182269287099528485900887
+24.90625, 0.00001799206142794622513657269173524568327746841323330882391287776355
+24.9375, 0.00001759224288029381178569583413993984491019241830879159114407031741
+24.96875, 0.00001720111999460215762225055131600717609773881572106155553845033978
+25.0, 0.00001681850840851801384173410051871025074598495287238839235281299405
+25.03125, 0.00001644422754943106993539819247641126757136902439486920679635053265
+25.0625, 0.00001607810055953210145584073183987079085132567157309570294740366882
+25.09375, 0.00001571995422227980460797822870714285280948334543113188071293435637
+25.125, 0.00001536961889025165126992845061038165744998245585888578365038246124
+25.15625, 0.00001502692841435448483148113690230420003731006594235077955397247736
+25.1875, 0.00001469172007437095910482290023033233689121076221002652880132646578
+25.21875, 0.00001436383451081829954445420214969705785683046351782239706992450026
+25.25, 0.00001404311565809623814302300216069149647199081177985915198768523871
+25.28125, 0.00001372941067890134068007932042733714441051123445665040524492130513
+25.3125, 0.00001342256989988530752521158717689139782130419083897296652533752259
+25.34375, 0.00001312244674853518697001018175246576847907283881256500970380671417
+25.375, 0.00001282889769125379311979563564182492148552098313902410119575607313
+25.40625, 0.00001254178217261896875161997926563651203568040311789173224684259534
+25.4375, 0.00001226096255580067727582689273740153378152888764445632313251505005
+25.46875, 0.00001198630406411524706108793074938529421113230216171474252045442731
+25.5, 0.00001171767472369642593445360772000620937205159580117590877498659913
+25.53125, 0.00001145494530726323368615947798572596540479924381916640929685743639
+25.5625, 0.00001119798927896492593172112924712447151609667204493008798750526629
+25.59375, 0.00001094668274028370374964270372502647708926783173683824023095281046
+25.625, 0.00001070090437697612016061767816659538341079751103488326889166035906
+25.65625, 0.00001046053540703444678251779351610248881422105350977817626879219001
+25.6875, 0.00001022545952964957192415096113029682743718001134145106631982150661
+25.71875, 0.000009995562875157305009404414784013077997478320536666046880823933648
+25.75, 0.000009770733955950261591909807753923497653950270099316962063062368097
+25.78125, 0.000009550863618337798368933208959956071459191160980201358499041403441
+25.8125, 0.000009335844995336758572167657583402805363600079503607120667439362077
+25.84375, 0.000009125573460376074943029750480257668839471335826996985488572240837
+25.875, 0.000008919946581898560231630386735555149501242308362645355485429848387
+25.90625, 0.00000871886407884349383263187790613075958361834865758483261784609632
+25.9375, 0.000008522227776993887828659183362328850013686859396487778017048386525
+25.96875, 0.000008329941566172586393832809173033084629048828984984237515839123666
+26.0, 0.000008141911358271619257436420022992605960045619004955622676669767312
+26.03125, 0.000007958045046099492781876416438557447091373145729884332417420536163
+26.0625, 0.000007778252463031361211119436408081905057087134386725835034629384741
+26.09375, 0.000007602445343447275836907679055217064318996858067369808359245174697
+26.125, 0.000007430537283943961251449474184400526565243615679842182017221641264
+26.15625, 0.000007262443705305815548142965309452236086660592461182675814934381681
+26.1875, 0.000007098081815221075337358403153792211024034668000962076005616039223
+26.21875, 0.000006937370571729326803473133098068612004220261633929770832704268273
+26.25, 0.000006780230647386780783251331024683573873950108100948787955523574663
+26.28125, 0.00000662658439413596303523670458507941336921156156270850647810766972
+26.3125, 0.000006476355808866700535936198699149474579715183450162611211587571363
+26.34375, 0.000006329470499655510821965176338096337280079599211005745689568110189
+26.375, 0.000006185855652670724138629374640225162090792329393770173120779718508
+26.40625, 0.000006045439999730887495134649258686697840317653655458993901842078532
+26.4375, 0.000005908153786504215705097670922780095775183816017614009923108820274
+26.46875, 0.000005773928741337067148480803064915581630014793324292437587521895604
+26.5, 0.000005642698044699631367529092963859412071734420370444223935688391037
+26.53125, 0.00000551439629923722174460841523826757565867048301904576406619271739
+26.5625, 0.000005388959500415769443708357572134804458269913113950718087789988393
+26.59375, 0.00000526632500775031456926442936130681832714029059773686705262972888
+26.625, 0.000005146431516605487145151652899142392680684316549398731757805797402
+26.65625, 0.000005029219030557164082274178321326279003997141610169012633909107264
+26.6875, 0.000004914628834304678823972342811246907254150534252175133498560680778
+26.71875, 0.000004802603467123147873111451305178057145837148047995352808416983759
+26.75, 0.000004693086696845662951592837993829923780727706159700942195715047718
+26.78125, 0.00000458602349436527916028334274540348066985740796863387683202778438
+26.8125, 0.000004481360008646908232892000323903794161496511690872748733691391578
+26.84375, 0.000004379043542239401848775974153965141925007611997093955607030661912
+26.875, 0.000004279022527278283024414830150484828633328262690704258965241554677
+26.90625, 0.000004181246501969753878470598817831989106253653660500959841560313458
+26.9375, 0.000004085666087546775597797111986609880263262303388992941023535823094
+26.96875, 0.000003992232965688181258046204610351488778197884856613530277086458381
+27.0, 0.000003900899856391944308930251405175145395189043308388262282299368303
+27.03125, 0.000003811620496293885056744836105881277320626331785654038588022267089
+27.0625, 0.000003724349617423254401147680792086044533592934880058008595078385769
+27.09375, 0.000003639042926386788444852915008494142682766877324841794163199139462
+27.125, 0.000003555657083972979428959479942279025074155541353989764120681944442
+27.15625, 0.00000347414968516845778791530970074363191676750209792593569933278042
+27.1875, 0.000003394479239578527001148460062167807696340266303008543629732842545
+27.21875, 0.000003316605152244037377390492287073542857937553094529146431779006894
+27.25, 0.000003240487704846926976585896694930275214097255504568896450963054228
+27.28125, 0.000003166088037296897586623343552789799844806712929859706321729584945
+27.3125, 0.000003093368129691831061226586260749136667479018381115004858257312585
+27.34375, 0.000003022290784644686424176824015428381019505277696808770738072332588
+27.375, 0.000002952819609969750986259850773590361514035518442441674336000079856
+27.40625, 0.000002884919001721249337278127067380395520935077768881432779511370302
+27.4375, 0.00000281855412757744249815859062050171218745053939576677986316737615
+27.46875, 0.000002753690910563475779319827342670217214144834632136453798389208909
+27.5, 0.000002690296013106358022414116470007252120137929963327158275507984765
+27.53125, 0.000002628336821415576934385703840400492756081017268979480793092954276
+27.5625, 0.000002567781430182975186218570082287038836515495954886167175045637867
+27.59375, 0.000002508598627595629874193854093323235352966059164686604946002955731
+27.625, 0.000002450757880655593859024332161485213460857081915233455903782498452
+27.65625, 0.000002394229320800471437642583380561949102314353523444612702729288928
+27.6875, 0.000002338983729818912793128577997584391127439356166948793386736616462
+27.71875, 0.00000228499252605522173938563353144666558307318828426728023364778893
+27.75, 0.0000022322277508973794575017929238461916859806717597546341075735085
+27.78125, 0.000002180662055542893238734418951478931474883365179645089564827815712
+27.8125, 0.000002130268688036983732874308792846319153142627973823550662623424698
+27.84375, 0.000002081021480577726878205057381486099498195993669707500109646830601
+27.875, 0.000002032894837082867587875598263947498065167023128542727210409457101
+27.90625, 0.000001985863721013121414430217716501341125106330328284708944022117578
+27.9375, 0.000001939903643446877836352714592328640047322231101318814541209802092
+27.96875, 0.0000018949906514013145343230775463802280720842331618129644116659749
+28.0, 0.000001851101316395026076681969601459241095043380348900286485683643637
+28.03125, 0.000001808212723247362839260132847452079338910705057034870376492559786
+28.0625, 0.000001766302459109766769851319233147214179782906572331017683971369861
+28.09375, 0.000001725348602724479797469738137054704216530424921187449050074183458
+28.125, 0.000001685329713906088306105418697434465036215119001427091838597583663
+28.15625, 0.000001646224823241453166631885779054326952183842077073131437885678264
+28.1875, 0.000001608013422003659373179756605461201826836413859641251324162552946
+28.21875, 0.000001570675452275702385709608274780243213212397021089126040427962524
+28.25, 0.000001534191297279709862434523668014636830240031572681631033560735766
+28.28125, 0.000001498541771907577597590124553639916020666726865164564859619999825
+28.3125, 0.000001463708113448977184958785582074587271110754292118086127581696312
+28.34375, 0.000001429671972512770228356255741579023316715877339171626923804201579
+28.375, 0.000001396415404137939839516252344074444936788452460891527048518320958
+28.40625, 0.00000136392085909022472369890649829082454526539165859980417206763623
+28.4375, 0.000001332171175340714375845476829640480918505368002364614817599210749
+28.46875, 0.000001301149569722735816855948812779270941336519661571184855431355449
+28.5, 0.000001270839629763432911939783791213187238932597742279851538403150196
+28.53125, 0.000001241225305686508652057496195861240144465238986358420858324742958
+28.5625, 0.000001212290902582668866021010965486170139845769145684156348885434566
+28.59375, 0.00000118402107274437268536001317642340336109720133316951649701896126
+28.625, 0.000001156400808161560726815211217034912898278955980986798819242210471
+28.65625, 0.000001129415433175096408234721418667513654808718773638955283563487812
+28.6875, 0.000001103050597284719092397797081539376682519034145448436055759226884
+28.71875, 0.000001077292268108369879268427264193154892288817833539726492306673223
+28.75, 0.000001052126724489811859516296012269782048407070460085012207369225989
+28.78125, 0.000001027540549751526519691843990744393020173631618078873133126719207
+28.8125, 0.00000100352062508992677079703405397087682197359917003788740606646092
+28.84375, 0.0000009800541231099847754813818302186733074426185603786960642720711132
+28.875, 0.0000009571285014964293927800200492108829120051819752721501114863789448
+28.90625, 0.0000009347314968187236610043279024713544977951871655213858792092645397
+28.9375, 0.0000009128511184670873166469553861410525529226204071972630302084551949
+28.96875, 0.0000008914756427168829172690905589151662886624496093652846753692017444
+29.0, 0.0000008705936069187367163444782444489071703848269587137146822636640833
+29.03125, 0.0000008501938038118170447392122068954611943431315041499378431623610846
+29.0625, 0.0000008302652759577436034597409218204437695998167011117505985768745971
+29.09375, 0.0000008107973102926507818113033444895175131884788172048709148404921561
+29.125, 0.0000007917794327949769002415662970804838357712710632907934420919374576
+29.15625, 0.0000007732014032665991537275259156769982665942236501954151811272222518
+29.1875, 0.0000007550532102249810151898255772727535788774620884365867679676700926
+29.21875, 0.0000007373250659040449644462743828678362797085353923815618974449536159
+29.25, 0.0000007200074013615286517735170519422339199951859630063943673740923558
+29.28125, 0.0000007030908616906270011323231568895546247789425401158748959318983095
+29.3125, 0.0000006865663013337663212020364433062469719080446343534452968571326474
+29.34375, 0.0000006704247794963992370145145736694663360545597249233284123479003138
+29.375, 0.0000006546575556587511954080736798967208104929654850979699478818198554
+29.40625, 0.0000006392560851834904477502808528042424098908985207545766147266629159
+29.4375, 0.0000006242120150173337872022837670456734256396939629654980174353468533
+29.46875, 0.0000006095171794846399288012679789439093172312991686751368825466016834
+29.5, 0.0000005951635961710812821958274467447163218995589779264985362343223077
+29.53125, 0.0000005811434618955229921479879915283299260262021616922188676437006851
+29.5625, 0.0000005674491487682755238765466157295488010727690622629565652948244727
+29.59375, 0.0000005540732003339237617177433744572164115869942874111115758215397308
+29.625, 0.0000005410083277969715829792766462855158934140320616038260506111076237
+29.65625, 0.0000005282474063285761766227504020717277295996415012914630950176501385
+29.6875, 0.0000005157834714526810106929532629669039014066570090351502678394241227
+29.71875, 0.0000005036097155098903251922307945300359625033782143878160746842691348
+29.75, 0.0000004917194841974613501565561925297202909121815611247370414538455109
+29.78125, 0.0000004801062731838231336207100914843434115776531644555270345167293647
+29.8125, 0.0000004687637247960629223716951170334496767548288475708751058658032173
+29.84375, 0.0000004576856247788524811074547604883739120682875510913367319149005232
+29.875, 0.0000004468658991233175738867207011409207205911327255312385573586939314
+29.90625, 0.0000004362986109643840764415949493729198538678501326073143025317858784
+29.9375, 0.0000004259779575451638497174935801482543762790883601496452614261180128
+29.96875, 0.0000004158982672469725944218824490001403883726730796250363900736660895
+30.0, 0.000000406053996683600433749026291121611739111584359537753382355077933
+30.03125, 0.0000003964397278584839469789215108863471942010749267910541548516407262
+30.0625, 0.0000003870501653834558103341163919030141517973749861555747364347736915
+30.09375, 0.0000003778801337577751031631950474345108727988181458560530127331902444
+30.125, 0.0000003689245747061677168870496832225946878100152755958389779373472541
+30.15625, 0.0000003601785445746321707164434242328248576333106367402944845465438431
+30.1875, 0.0000003516372117827915012917608827411675347866979170050982724376384693
+30.21875, 0.0000003432958543315967623176756020406355917188685085834494239286487197
+30.25, 0.0000003351498573652120540227630671812231674765546192287354071491439357
+30.28125, 0.0000003271947107859349097716560130290512531660064236159352621185294807
+30.3125, 0.0000003194260069210293071508865248891001971376466586925776424773355957
+30.34375, 0.0000003118394382403715519478289306111813512888035241389350534958260047
+30.375, 0.0000003044307951238318141090221127647799824156503708510974815062389607
+30.40625, 0.0000002971959636773361833206950552972610719820681355490649277425303157
+30.4375, 0.00000029013092359657576648090325933846104644087370049723109555813002
+30.46875, 0.0000002832317460773505780709772745946307006957693398827121651480278649
+30.5, 0.0000002764945917715567851889923902031291002233097480817827847843141148
+30.53125, 0.0000002699157087878462695500279431255921060969186287440711675093719619
+30.5625, 0.0000002634914307360074667247455698531763897214015276160684724872606509
+30.59375, 0.0000002572181748141360457861991663072242958630427071396269540652278917
+30.625, 0.000000251092439937683207742926063031226082987854918825968579846822269
+30.65625, 0.0000002451108049094882159055170638210327980328559907441446292504421769
+30.6875, 0.0000002392699266299202327903051349761556049755847456469985175153117498
+30.71875, 0.0000002335665383462726333107322818767736368659220736982476123353544447
+30.75, 0.0000002279974479405706997262920072432491913504202034169560797932922894
+30.78125, 0.0000002225595362549709868732333282925136390695276122375744383798329842
+30.8125, 0.0000002172497554539476832353909810416283613934857171200882880653462018
+30.84375, 0.0000002120651274224779909567152250976897177238018187934632453227706712
+30.875, 0.0000002070027421994549123644277844166354595740345154368295435389945283
+30.90625, 0.0000002020597564455718682660691249690820353440322444511069022047751495
+30.9375, 0.000000197233391944939290397327048917539917108606363553032348729736029
+30.96875, 0.0000001925209341397087330139193146727538944348951030327387065778610715
+31.0, 0.0000001879197306969951427162782839960667278117374883135338096003099005
+31.03125, 0.0000001834271901074027170412220044238154099487056262844808354831639362
+31.0625, 0.0000001790407803144742769172470567836040881722248918015401170057888835
+31.09375, 0.0000001747580273743982814244128921109559486536375117513607044754547436
+31.125, 0.0000001705765141453215309903003742500836598635401742745061342804520683
+31.15625, 0.0000001664938790056292426555307101445879588682589362796593588757381747
+31.1875, 0.000000162507814600567543723724176807061111076540711464117793384209858
+31.21875, 0.0000001586160666165965232435985714900387427336316942303980016359519737
+31.25, 0.0000001548164325828748095328619956571190877907809043951520226517186256
+31.28125, 0.0000001511067606992892114295311436758788106145216894583196799606763594
+31.3125, 0.0000001474849486904552761398652283663448541288458833765196853190295922
+31.34375, 0.0000001439489426851266823469529690120238535991381886126959906488324305
+31.375, 0.0000001404967361204632084654303539492299703511384425206150540182888752
+31.40625, 0.0000001371263686706185973041777372265400529519598207488354443588923991
+31.4375, 0.0000001338359251991209845729318722635906119960413015170464544165451573
+31.46875, 0.0000001306235347345296741991817014914197883445813269376247575042799277
+31.5, 0.0000001274873694688629327843479494607157769584856862110747603898751727
+31.53125, 0.0000001244256437783021431175084180499919432113646570220578646500119037
+31.5625, 0.0000001214366132656881067951771690165484381358756474071301317230331396
+31.59375, 0.0000001185185738243355229024736168520486993525817512370551166505016388
+31.625, 0.0000001156698607227016975525712754718865489517110708516508220985308449
+31.65625, 0.0000001128888477094553619395729273963959234094763737362131610647628592
+31.6875, 0.0000001101739461385010984419978096010809748657499084474851763699177984
+31.71875, 0.0000001075236041135242991533168521585123570358310336466750614703081387
+31.75, 0.000000104936305651630812873447861998856411760707194706390788369971413
+31.78125, 0.0000001024105698656644788606368265669021705153638986190634588165699179
+31.8125, 0.00000009994495016479460223651440698241433414249924835500333397014469972
+31.84375, 0.00000009753803347297410050931640372642545461000805953785865799183059637
+31.875, 0.00000009518843946487754681462362768579333132025778876803996907568908405
+31.90625, 0.00000009289481981893665668632932295272893915725928901972336394039536961
+31.9375, 0.00000009065585748709891491431966833041397664225111137890043238026493104
+31.96875, 0.00000008847026598094302070672700873839995148428499623429965202062669901
+32.0, 0.00000008633678867379264627758957841876281314089099171515324498246874557
+32.03125, 0.00000008425419811847765938724153602659495254168897581641263619470048387
+32.0625, 0.00000008222129538039945747365739344796505852655587663279702858236809635
+32.09375, 0.00000008023690938556440296920770398662424523085301153074238913103423624
+32.125, 0.00000007829989628325653928083268606491351985633615137188564808495018963
+32.15625, 0.00000007640913882302780774657263361626000325302409360419881654393072129
+32.1875, 0.00000007456354574569088063485801173258707666308904794798932348540600331
+32.21875, 0.0000000727620511880064768361799274388835110352479218732943890969647408
+32.25, 0.00000007100361410076363816600065372848250366330428589595756139302695111
+32.28125, 0.00000006928721767995791795529551351110529587418460548811087181639761087
+32.3125, 0.00000006761186881077877260016089946207593357921393610667961394710185547
+32.34375, 0.00000006597659752412365367157476582335183775977825464381717541925019918
+32.375, 0.00000006438045646536237569654386220643789924837058571559026089833051007
+32.40625, 0.0000000628225203750812854080974462122230362759527439264119625405245078
+32.4375, 0.00000006130188558154258467005111250009544004225675946272304929832003661
+32.46875, 0.00000005981766950459986391078041170648928950147750195749030905445320883
+32.5, 0.00000005836901017081648819833801664438696094889037325867888374835008112
+32.53125, 0.00000005695506573953894646020438453051348895446586625733711394153064407
+32.5625, 0.00000005557501403968262815185498537664285071387600237807347600841242583
+32.59375, 0.00000005422805211699273322104227121595762845832804227990707571294434215
+32.625, 0.00000005291339579154815276672940983903443697298705591383011520428170292
+32.65625, 0.00000005163027922528118157688752151868164155777423105260759360156738902
+32.6875, 0.00000005037795449929084192898220624743506535259781508142758521191437467
+32.71875, 0.00000004915569120073241278999183106119369158915009524561912301647753384
+32.75, 0.0000000479627760190704719569986304497545584377486847079253594302280525
+32.78125, 0.00000004679851235148737279201335005304855477620512198158332417835396328
+32.8125, 0.00000004566221991724359404316597893233573347857338826902632461092948469
+32.84375, 0.00000004455323438079082278706202275986355402300299229340936374440429841
+32.875, 0.00000004347090698344295871392897828666109762056105918972386649711918179
+32.90625, 0.00000004241460418341446471044142931834758745095999070465205588559434386
+32.9375, 0.00000004138370730403963584009817209312999671267394521499679729033613133
+32.96875, 0.00000004037761218999041820669022687396701900484686479732301812273796132
+33.0, 0.00000003939572887131438260604332754407070022986748288164020227351863179
+33.03125, 0.00000003843748123511834708313300428750947280540172176279982705463628296
+33.0625, 0.00000003750230670472694923977815391093751978336766073223959141365996874
+33.09375, 0.00000003658965592614919507260710032860011552884839141139383863019521695
+33.125, 0.00000003569899246168965791892939788552498688241724943139146773797582512
+33.15625, 0.00000003482979249054457037410135889084370222676952972389660134120722873
+33.1875, 0.00000003398154451622654541060092362077341579961338734724026583872351516
+33.21875, 0.00000003315374908066508193766806280947370313068581486121668680216347386
+33.25, 0.00000003234591848483335622162261237547305507476868939675777741830443996
+33.28125, 0.00000003155757651575507544127646362679371379281083225068889502539016576
+33.3125, 0.00000003078825817974837465103767107943254258845581767567979094526284255
+33.34375, 0.00000003003750944176687500812937045870034726642980015076271425775686825
+33.375, 0.0000000293048869707010907030695536960425755486324699857993914518908844
+33.40625, 0.00000002858995789050637599944796474993735062755899743497271909144903094
+33.4375, 0.00000002789229953702654349790195983596975017091876117828271976341874402
+33.46875, 0.00000002721149922038516152089547055421437405141212898174608869823264139
+33.5, 0.00000002654715399281935367386378393571733293632226790059912609581792534
+33.53125, 0.00000002589887042183367845297594872998935483976505596013894696160731694
+33.5625, 0.00000002526626436855436249320303499761075259433627229349744863845661775
+33.59375, 0.00000002464896077116679891060302770132829247919630300628580288192142508
+33.625, 0.00000002404659343332180339327377996132587852050663682471986432674792126
+33.65625, 0.00000002345880481739864641577222598619965327572453825906046536700323453
+33.6875, 0.00000002288524584251535134784995184978396815892013458774694141311896467
+33.71875, 0.00000002232557568717916643286912479246370249137638329156705274789542221
+33.75, 0.00000002177946159647248473429256198352705191921337106240086204258164154
+33.78125, 0.00000002124657869367180127796964764618231212549852815335755953116493921
+33.8125, 0.00000002072660979619956181950036875357609720477810910329696882961274658
+33.84375, 0.00000002021924523581097398425598713407966603195547491142788403121270323
+33.875, 0.00000001972418268292001998614742009543323689639888321366916343108818821
+33.90625, 0.00000001924112697497103173282121296207839758668716205421890090294542495
+33.9375, 0.00000001876978994876426485226197414116000076601353967051514190937232882
+33.96875, 0.00000001830989027664593899158481994037650336796249069656368651374843187
+34.0, 0.00000001786115330647519858644957413746695738940153443041613305470614484
+34.03125, 0.00000001742331090528239210327426700006262080475343856986845399021087943
+34.0625, 0.00000001699610130653496942180645493735204859503957680455224353861025133
+34.09375, 0.00000001657926896092915743980877016524321373276554058182813025135852094
+34.125, 0.0000000161725643906273940138099964813021403936859743467586494130893364
+34.15625, 0.00000001577574404686328085159111242747184398456560753740786051880207656
+34.1875, 0.00000001538857017083755777753113302861619574820417377812266075712490782
+34.21875, 0.00000001501081065783030471836731456176342619862998780805179682296352162
+34.25, 0.00000001464223892445624460491789313807670418917674352042266976645786892
+34.28125, 0.00000001428263377899165093913831784803142187040273927274043742121120139
+34.3125, 0.00000001393177929470295880379248234184279562688732374930194963283051836
+34.34375, 0.00000001358946468610873834658228561387119362693028274142364476274645099
+34.375, 0.00000001325548418810821598896647607070586734578586976756522602194447394
+34.40625, 0.00000001292963693791102151419908031548691490376501504912464683014066437
+34.4375, 0.00000001261172685970429948662106920772868446737799305167652939538444454
+34.46875, 0.00000001230156255199475183773443258827861317491869263106196818090113707
+34.5, 0.00000001199895717756457560264378538633283607493083787559635059787327947
+34.53125, 0.00000001170372835598162636769436690928017156802141927845619

<TRUNCATED>

[15/16] commons-statistics git commit: Report config files (copied from "Commons RNG").

Posted by er...@apache.org.
Report config files (copied from "Commons RNG").


Project: http://git-wip-us.apache.org/repos/asf/commons-statistics/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-statistics/commit/0efff4bf
Tree: http://git-wip-us.apache.org/repos/asf/commons-statistics/tree/0efff4bf
Diff: http://git-wip-us.apache.org/repos/asf/commons-statistics/diff/0efff4bf

Branch: refs/heads/master
Commit: 0efff4bffd4ebbffa8dea12fa701a3c3b3eafd9e
Parents: 021d0f1
Author: Gilles Sadowski <gi...@harfang.homelinux.org>
Authored: Sun Jan 21 15:03:16 2018 +0100
Committer: Gilles Sadowski <gi...@harfang.homelinux.org>
Committed: Sun Jan 21 15:03:16 2018 +0100

----------------------------------------------------------------------
 src/main/resources/checkstyle/checkstyle.xml    | 202 +++++++++++++++++++
 .../resources/checkstyle/license-header.txt     |  16 ++
 src/main/resources/clirr/clirr-ignored.xml      |  21 ++
 .../findbugs/findbugs-exclude-filter.xml        |  28 +++
 src/main/resources/pmd/pmd-ruleset.xml          |  57 ++++++
 5 files changed, 324 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/0efff4bf/src/main/resources/checkstyle/checkstyle.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/checkstyle/checkstyle.xml b/src/main/resources/checkstyle/checkstyle.xml
new file mode 100644
index 0000000..a138af6
--- /dev/null
+++ b/src/main/resources/checkstyle/checkstyle.xml
@@ -0,0 +1,202 @@
+<?xml version="1.0"?>
+
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+  -->
+
+<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.1//EN" "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<!-- Commons RNG customization of default Checkstyle behavior -->
+<module name="Checker">
+  <property name="localeLanguage" value="en"/>
+
+  <module name="TreeWalker">
+
+    <!-- Operator must be at end of wrapped line -->
+    <module name="OperatorWrap">
+      <property name="option" value="eol"/>
+    </module>
+
+    <!-- No if/else/do/for/while without braces -->
+    <module name="NeedBraces"/>
+
+    <!-- Interfaces must be types (not just constants) -->
+    <module name="InterfaceIsType"/>
+
+    <!-- Must have class / interface header comments -->
+    <module name="JavadocType"/>
+
+     <!-- Require method javadocs, allow undeclared RTE -->
+    <module name="JavadocMethod">
+      <property name="allowUndeclaredRTE" value="true"/>
+      <property name="allowThrowsTagsForSubclasses" value="true"/>
+      <property name="validateThrows" value="false"/>
+    </module>
+
+    <!-- Require field javadoc -->
+    <module name="JavadocVariable"/>
+
+    <!-- No public fields -->
+    <module name="VisibilityModifier">
+       <property name="protectedAllowed" value="true"/>
+    </module>
+
+    <!-- Require hash code override when equals is -->
+    <module name="EqualsHashCode"/>
+
+    <!-- Disallow unnecessary instantiation of Boolean, String -->
+    <module name="IllegalInstantiation">
+      <property name="classes" value="java.lang.Boolean, java.lang.String"/>
+    </module>
+
+    <!-- Required for SuppressionCommentFilter below -->
+    <module name="FileContentsHolder"/>
+
+    <!--  Import should be explicit, really needed and only from pure java packages -->
+    <module name="AvoidStarImport" />
+    <module name="UnusedImports" />
+    <module name="IllegalImport" />
+
+    <!-- Utility class should not be instantiated, they must have a private constructor -->
+    <module name="HideUtilityClassConstructor" />
+
+    <!-- Switch statements should be complete and with independent cases -->
+    <module name="FallThrough" />
+    <module name="MissingSwitchDefault" />
+
+    <!-- Constant names should obey the traditional all uppercase naming convention -->
+    <module name="ConstantName" />
+
+    <!-- Method parameters and local variables should not hide fields, except in constructors and setters -->
+    <module name="HiddenField">
+        <property name="ignoreConstructorParameter" value="true" />
+        <property name="ignoreSetter" value="true" />
+    </module>
+
+    <!-- No trailing whitespace -->
+    <module name="Regexp">
+      <property name="format" value="[ \t]+$"/>
+      <property name="illegalPattern" value="true"/>
+      <property name="message" value="Trailing whitespace"/>
+    </module>
+
+    <!-- No System.out.println() statements -->
+    <module name="Regexp">
+      <!-- no sysouts -->
+      <property name="format" value="System\.out\.println"/>
+      <property name="illegalPattern" value="true"/>
+    </module>
+
+    <!-- Authors should be in pom.xml file -->
+    <module name="Regexp">
+      <property name="format" value="@author"/>
+      <property name="illegalPattern" value="true"/>
+      <property name="message" value="developers names should be in pom file"/>
+    </module>
+
+    <!-- Use a consistent way to put modifiers -->
+    <module name="RedundantModifier" />
+    <module name="ModifierOrder" />
+
+    <!-- Use a consistent way to put declarations -->
+    <module name="DeclarationOrder" />
+
+    <!-- Don't add up parentheses when they are not required -->
+    <module name="UnnecessaryParentheses" />
+
+    <!--  Don't use too widespread catch (Exception, Throwable, RuntimeException)  -->
+    <module name="IllegalCatch" />
+
+    <!-- Don't use = or != for string comparisons -->
+    <module name="StringLiteralEquality" />
+
+   <!-- Don't declare multiple variables in the same statement -->
+    <module name="MultipleVariableDeclarations" />
+
+    <!-- String literals more than one character long should not be repeated several times -->
+    <!-- the "unchecked" string is also accepted to allow @SuppressWarnings("unchecked") -->
+    <module name="MultipleStringLiterals" >
+      <property name="ignoreStringsRegexp" value='^(("")|(".")|("unchecked"))$'/>
+    </module>
+
+    <!-- Check if @Override tags are present  -->
+    <module name="MissingOverride" />
+
+    <!-- <module name="TodoComment" /> -->
+
+  </module>
+
+  <!-- Verify that EVERY source file has the appropriate license -->
+  <module name="Header">
+    <property name="headerFile" value="${checkstyle.header.file}"/>
+  </module>
+
+  <!-- No tabs allowed! -->
+  <module name="FileTabCharacter"/>
+
+  <!-- Require files to end with newline characters -->
+  <module name="NewlineAtEndOfFile"/>
+
+  <!-- Require package javadoc -->
+  <module name="JavadocPackage"/>
+
+  <!-- Setup special comments to suppress specific checks from source files -->
+  <module name="SuppressionCommentFilter">
+    <property name="offCommentFormat" value="CHECKSTYLE\: stop JavadocVariable"/>
+    <property name="onCommentFormat"  value="CHECKSTYLE\: resume JavadocVariable"/>
+    <property name="checkFormat"      value="JavadocVariable"/>
+  </module>
+  <module name="SuppressionCommentFilter">
+    <property name="offCommentFormat" value="CHECKSTYLE\: stop JavadocMethodCheck"/>
+    <property name="onCommentFormat"  value="CHECKSTYLE\: resume JavadocMethodCheck"/>
+    <property name="checkFormat"      value="JavadocMethodCheck"/>
+  </module>
+  <module name="SuppressionCommentFilter">
+    <property name="offCommentFormat" value="CHECKSTYLE\: stop ConstantName"/>
+    <property name="onCommentFormat"  value="CHECKSTYLE\: resume ConstantName"/>
+    <property name="checkFormat"      value="ConstantName"/>
+  </module>
+  <module name="SuppressionCommentFilter">
+    <property name="offCommentFormat" value="CHECKSTYLE\: stop HideUtilityClassConstructor"/>
+    <property name="onCommentFormat"  value="CHECKSTYLE\: resume HideUtilityClassConstructor"/>
+    <property name="checkFormat"      value="HideUtilityClassConstructor"/>
+  </module>
+  <module name="SuppressionCommentFilter">
+    <property name="offCommentFormat" value="CHECKSTYLE\: stop MultipleVariableDeclarations"/>
+    <property name="onCommentFormat"  value="CHECKSTYLE\: resume MultipleVariableDeclarations"/>
+    <property name="checkFormat"      value="MultipleVariableDeclarations"/>
+  </module>
+  <module name="SuppressionCommentFilter">
+    <property name="offCommentFormat" value="CHECKSTYLE\: stop IllegalCatch"/>
+    <property name="onCommentFormat"  value="CHECKSTYLE\: resume IllegalCatch"/>
+    <property name="checkFormat"      value="IllegalCatch"/>
+  </module>
+  <module name="SuppressionCommentFilter">
+    <property name="offCommentFormat" value="CHECKSTYLE\: stop DeclarationOrder"/>
+    <property name="onCommentFormat"  value="CHECKSTYLE\: resume DeclarationOrder"/>
+    <property name="checkFormat"      value="DeclarationOrder"/>
+  </module>
+  <module name="SuppressionCommentFilter">
+    <property name="offCommentFormat" value="CHECKSTYLE\: stop RedundantModifier"/>
+    <property name="onCommentFormat"  value="CHECKSTYLE\: resume RedundantModifier"/>
+    <property name="checkFormat"      value="RedundantModifier"/>
+  </module>
+  <module name="SuppressionCommentFilter">
+    <property name="offCommentFormat" value="CHECKSTYLE\: stop all"/>
+    <property name="onCommentFormat" value="CHECKSTYLE\: resume all"/>
+  </module>
+</module>
+

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/0efff4bf/src/main/resources/checkstyle/license-header.txt
----------------------------------------------------------------------
diff --git a/src/main/resources/checkstyle/license-header.txt b/src/main/resources/checkstyle/license-header.txt
new file mode 100644
index 0000000..ae6f28c
--- /dev/null
+++ b/src/main/resources/checkstyle/license-header.txt
@@ -0,0 +1,16 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/0efff4bf/src/main/resources/clirr/clirr-ignored.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/clirr/clirr-ignored.xml b/src/main/resources/clirr/clirr-ignored.xml
new file mode 100644
index 0000000..ed97259
--- /dev/null
+++ b/src/main/resources/clirr/clirr-ignored.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+
+<differences>
+
+</differences>

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/0efff4bf/src/main/resources/findbugs/findbugs-exclude-filter.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/findbugs/findbugs-exclude-filter.xml b/src/main/resources/findbugs/findbugs-exclude-filter.xml
new file mode 100644
index 0000000..8a9c858
--- /dev/null
+++ b/src/main/resources/findbugs/findbugs-exclude-filter.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+
+<!--
+  This file contains some false positive bugs detected by findbugs. Their
+  false positive nature has been analyzed individually and they have been
+  put here to instruct findbugs it must ignore them.
+-->
+<FindBugsFilter>
+
+  <Class name="~.*\.jmh\.generated\..*" />
+
+</FindBugsFilter>

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/0efff4bf/src/main/resources/pmd/pmd-ruleset.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/pmd/pmd-ruleset.xml b/src/main/resources/pmd/pmd-ruleset.xml
new file mode 100644
index 0000000..0524d61
--- /dev/null
+++ b/src/main/resources/pmd/pmd-ruleset.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<ruleset name="commons-statistics-customized"
+    xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
+  <description>
+    This ruleset checks the code for discouraged programming constructs.
+  </description>
+
+  <rule ref="rulesets/java/basic.xml"/>
+
+  <rule ref="rulesets/java/braces.xml"/>
+
+  <rule ref="rulesets/java/comments.xml">
+    <exclude name="CommentSize"/>
+  </rule>
+  <rule ref="rulesets/java/comments.xml/CommentSize">
+    <properties>
+      <property name="maxLines"      value="200"/>
+      <property name="maxLineLength" value="256"/>
+    </properties>
+  </rule>
+
+  <rule ref="rulesets/java/empty.xml"/>
+
+  <rule ref="rulesets/java/finalizers.xml"/>
+
+  <rule ref="rulesets/java/imports.xml"/>
+
+  <rule ref="rulesets/java/typeresolution.xml"/>
+
+  <rule ref="rulesets/java/clone.xml"/>
+
+  <rule ref="rulesets/java/unnecessary.xml">
+    <!-- We do use extra parentheses there as most people do not recall operator precedence,
+         this means even if the parentheses are useless for the compiler, we don't consider
+         them useless for the developer. This is the reason why we disable this rule. -->
+    <exclude name="UselessParentheses"/>
+  </rule>
+
+</ruleset>


[16/16] commons-statistics git commit: Merge branch 'task_STATISTICS-2'

Posted by er...@apache.org.
Merge branch 'task_STATISTICS-2'


Project: http://git-wip-us.apache.org/repos/asf/commons-statistics/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-statistics/commit/30d7c8f6
Tree: http://git-wip-us.apache.org/repos/asf/commons-statistics/tree/30d7c8f6
Diff: http://git-wip-us.apache.org/repos/asf/commons-statistics/diff/30d7c8f6

Branch: refs/heads/master
Commit: 30d7c8f6b528f7859ae46b9dbdecd374c91ab383
Parents: 0efff4b 9c794a1
Author: Gilles Sadowski <gi...@harfang.homelinux.org>
Authored: Sun Jan 21 15:04:11 2018 +0100
Committer: Gilles Sadowski <gi...@harfang.homelinux.org>
Committed: Sun Jan 21 15:04:11 2018 +0100

----------------------------------------------------------------------
 commons-statistics-distribution/LICENSE.txt     |  275 ++
 commons-statistics-distribution/NOTICE.txt      |    5 +
 commons-statistics-distribution/pom.xml         |   86 +
 .../AbstractContinuousDistribution.java         |  453 +++
 .../AbstractDiscreteDistribution.java           |  220 ++
 .../distribution/BetaDistribution.java          |  202 ++
 .../distribution/BinomialDistribution.java      |  170 +
 .../distribution/CauchyDistribution.java        |  166 +
 .../distribution/ChiSquaredDistribution.java    |  119 +
 .../ConstantContinuousDistribution.java         |  116 +
 .../distribution/ContinuousDistribution.java    |  176 +
 .../distribution/DiscreteDistribution.java      |  163 +
 .../distribution/DistributionException.java     |   61 +
 .../distribution/ExponentialDistribution.java   |  197 ++
 .../statistics/distribution/FDistribution.java  |  209 ++
 .../distribution/GammaDistribution.java         |  354 ++
 .../distribution/GeometricDistribution.java     |  160 +
 .../distribution/GumbelDistribution.java        |  128 +
 .../HypergeometricDistribution.java             |  293 ++
 .../distribution/LaplaceDistribution.java       |  132 +
 .../distribution/LevyDistribution.java          |  161 +
 .../distribution/LogNormalDistribution.java     |  266 ++
 .../distribution/LogisticDistribution.java      |  128 +
 .../distribution/NakagamiDistribution.java      |  117 +
 .../distribution/NormalDistribution.java        |  216 ++
 .../distribution/ParetoDistribution.java        |  225 ++
 .../distribution/PascalDistribution.java        |  211 ++
 .../distribution/PoissonDistribution.java       |  238 ++
 .../distribution/SaddlePointExpansion.java      |  191 +
 .../statistics/distribution/TDistribution.java  |  180 +
 .../distribution/TriangularDistribution.java    |  222 ++
 .../UniformContinuousDistribution.java          |  168 +
 .../UniformDiscreteDistribution.java            |  159 +
 .../distribution/WeibullDistribution.java       |  220 ++
 .../distribution/ZipfDistribution.java          |  236 ++
 .../statistics/distribution/package-info.java   |   20 +
 .../AbstractContinuousDistributionTest.java     |  209 ++
 .../AbstractDiscreteDistributionTest.java       |  130 +
 .../distribution/BetaDistributionTest.java      |  381 ++
 .../distribution/BinomialDistributionTest.java  |  173 +
 .../distribution/CauchyDistributionTest.java    |  111 +
 .../ChiSquaredDistributionTest.java             |  136 +
 .../ConstantContinuousDistributionTest.java     |   92 +
 .../ContinuousDistributionAbstractTest.java     |  456 +++
 .../DiscreteDistributionAbstractTest.java       |  411 +++
 .../ExponentialDistributionTest.java            |  132 +
 .../distribution/FDistributionTest.java         |  150 +
 .../distribution/GammaDistributionTest.java     |  354 ++
 .../distribution/GeometricDistributionTest.java |  167 +
 .../distribution/GumbelDistributionTest.java    |   70 +
 .../HypergeometricDistributionTest.java         |  335 ++
 .../distribution/LaplaceDistributionTest.java   |   70 +
 .../distribution/LevyDistributionTest.java      |   81 +
 .../distribution/LogNormalDistributionTest.java |  250 ++
 .../distribution/LogisticsDistributionTest.java |   70 +
 .../distribution/NakagamiDistributionTest.java  |   70 +
 .../distribution/NormalDistributionTest.java    |  213 ++
 .../distribution/ParetoDistributionTest.java    |  201 ++
 .../distribution/PascalDistributionTest.java    |  132 +
 .../distribution/PoissonDistributionTest.java   |  244 ++
 .../distribution/TDistributionTest.java         |  169 +
 .../statistics/distribution/TestUtils.java      |  281 ++
 .../TriangularDistributionTest.java             |  192 +
 .../UniformContinuousDistributionTest.java      |  123 +
 .../UniformDiscreteDistributionTest.java        |  139 +
 .../distribution/WeibullDistributionTest.java   |  118 +
 .../distribution/ZipfDistributionTest.java      |  166 +
 .../distribution/gamma-distribution-shape-1.csv | 3215 +++++++++++++++++
 .../gamma-distribution-shape-10.csv             |  415 +++
 .../gamma-distribution-shape-100.csv            |  408 +++
 .../gamma-distribution-shape-1000.csv           | 3325 ++++++++++++++++++
 .../gamma-distribution-shape-142.csv            |  775 ++++
 .../distribution/gamma-distribution-shape-8.csv | 3215 +++++++++++++++++
 .../distribution/gamma-distribution.mac         |   73 +
 .../statistics/distribution/testData.txt        | 1000 ++++++
 pom.xml                                         |   71 +-
 76 files changed, 24952 insertions(+), 14 deletions(-)
----------------------------------------------------------------------



[05/16] commons-statistics git commit: STATISTICS-2: Migrate "o.a.c.math4.distribution" from Commons Math.

Posted by er...@apache.org.
http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-1000.csv
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-1000.csv b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-1000.csv
new file mode 100644
index 0000000..e0536f9
--- /dev/null
+++ b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-1000.csv
@@ -0,0 +1,3325 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+0.03125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005457022365340747531144703069166332243737626465083128193302885601
+0.0625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002833672787037245923796699676380369862430887877883756225743140728
+0.09375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002259153776402399107644181694804673261411648001988503456720517562
+0.125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000142617218709928525301419106191463276140979827980209555799791213
+0.15625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000898883182542818202004274823379549223847776452605214055626427197
+0.1875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001102037452538991574030852892271340649169536140084921902544370485
+0.21875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008099673125173748881767618802988805731909195366372584342876789319
+0.25, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006742963685255220037508832830445998931159947197274131714816438902
+0.28125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008253706913018735974132017653288672699894592286976030986748093185
+0.3125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000004119176590298921254732436975011040155739995341746082199514143453
+0.34375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000008964605471326193428571226397921642498594843921962811951478060085
+0.375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000004894764562586577721173971401412778169222625704803487284895715164
+0.40625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002532236459542001882465939
 848632291112821853399854552453954917648
+0.4375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003486833766228765238436349273257863640860241102147717548209
 184263
+0.46875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002898142225359822154952929091275541148091077491048233336828375442
+0.5, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000281347375713687423166424051507029492690129609188899634931201216
+0.53125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005473699477565016933799072825275029353623339042858802323524086425
+0.5625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003337869771002700169870633947396939390969171236929468680590594344
+0.59375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009279240683405450486335843674795195273290919691821067417139178955
+0.625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001614578084961229217838430018985951504570403361653742595303823516
+0.65625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002304608300334450002938681598108086118538352744797190662299711229
+0.6875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003405713582312759218419253237853027282229140028353919672228818027
+0.71875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006375092036142686248935722092048609037514357433002973720405698088
+0.75, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001802341342453249432301967555886732787257087503236704524738351872
+0.78125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008980562417002141304247715067587147169349837870042025923446322635
+0.8125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009037281132954115520864718630022639868957216223706290014520050311
+0.84375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002072487224063305680676834281863217444017581303456609915347546277
+0.875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001206127099798037667082432662539358225440488265174142017696304283
+0.90625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

<TRUNCATED>

[14/16] commons-statistics git commit: Create ".gitignore" file.

Posted by er...@apache.org.
Create ".gitignore" file.


Project: http://git-wip-us.apache.org/repos/asf/commons-statistics/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-statistics/commit/021d0f17
Tree: http://git-wip-us.apache.org/repos/asf/commons-statistics/tree/021d0f17
Diff: http://git-wip-us.apache.org/repos/asf/commons-statistics/diff/021d0f17

Branch: refs/heads/master
Commit: 021d0f17bf5b97e8775c36d23ade9c017b98d839
Parents: bb864a0
Author: Gilles Sadowski <gi...@harfang.homelinux.org>
Authored: Sun Jan 21 15:02:26 2018 +0100
Committer: Gilles Sadowski <gi...@harfang.homelinux.org>
Committed: Sun Jan 21 15:02:26 2018 +0100

----------------------------------------------------------------------
 .gitignore | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/021d0f17/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7410e55
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,19 @@
+.classpath
+.project
+.settings
+.checkstyle
+bin
+target
+/build
+/lib
+site-content
+.ekstazi
+*.class
+*.iml
+*.ipr
+*.iws
+.idea
+.DS_Store
+*~
+/.externalToolBuilders/
+/maven-eclipse.xml


[06/16] commons-statistics git commit: STATISTICS-2: Migrate "o.a.c.math4.distribution" from Commons Math.

Posted by er...@apache.org.
http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-10.csv
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-10.csv b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-10.csv
new file mode 100644
index 0000000..3061384
--- /dev/null
+++ b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-10.csv
@@ -0,0 +1,415 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+0.25, 0.000000000008186974254985386188332684109222748579137668937877177711110448987
+0.5, 0.000000003264523243913241720337772725913936626787771049309446711910683277
+0.75, 0.00000009773890658452389396475494919437519384431793837050355657692030534
+1.0, 0.000001013777119630297402985901042111609533305255541864439579221331574
+1.25, 0.000005882459987908221107910989757584493395253807161915190072123719547
+1.5, 0.0000236383182704678991833440091359405703674960353021860512367257178
+1.75, 0.00007371639049914659664469924484337953134029579678102318895787762898
+2.0, 0.0001909492532438979779809516683915123857603266961687137657399066986
+2.25, 0.0004292566637511216785564507142900505556329467302903493327405109363
+2.5, 0.0008629007379834066956292245172230634722739523367006800671498234154
+2.75, 0.001584606329630760443966534916196585479149580956923021059184841385
+3.0, 0.002700503931560477264281296206018975830692634129863134237261950404
+3.25, 0.004322451706707033355777741992379271252649548199759156207752373941
+3.5, 0.006558713791472451118496393575940093861858366336090666583626783936
+3.75, 0.009504167235007731279532455006689505603740590876228765050787467591
+4.0, 0.01323119169105030026156420020021095733685922904744903636265984176
+4.25, 0.01778221224061525289778491090859724569265354775286287693155638646
+4.5, 0.02316457958265915634571674057321856666997044100638758787392945839
+4.75, 0.02934814558017206800687952058687639675698293535639192619091031311
+5.0, 0.03626557741564374703239991753875045775748000924975997914204555598
+5.25, 0.04381518681987509794127311938460423207274500951027751679576035436
+5.5, 0.05186585267604764829341293838441145342635701430684257013601927961
+5.75, 0.06026349267933013221060977993029191814044764041664500524145107011
+6.0, 0.0688384890205628682057115069358228911584085187753998454129720724
+6.25, 0.07741348363821588179242489993827725096106897663175209273166362133
+6.5, 0.08581101609904129066714371979939291963726757261354782675267519001
+6.75, 0.09386056621162676713466743812158052742215274755818757154910937699
+7.0, 0.1014046695005910607718496701878610512032861425441336924689561491
+7.25, 0.1083038842159016853542084991854392401098160237845471037680183154
+7.5, 0.1144404938782313557129127821861648551635697820637634247132376202
+7.75, 0.1197209225902342460071901612354126628680720066922580960372680576
+8.0, 0.1240769172894194899132193735290272042980410647675194334399961409
+8.25, 0.1274656099100286025054532512661365070756171192489062231813542786
+8.5, 0.1298686130276381258335852813355502082119818198803296466496592805
+8.75, 0.1312903262928634037083904942427229617254447530221262005041625199
+9.0, 0.1317556400095226781654379163000757051460934732366505649914730029
+9.25, 0.1313072192445839225111988810440828276135811270793666373206690422
+9.5, 0.1300025396922678897051382132478766482164529392345600519685638399
+9.75, 0.1279108278844427375847798106085518500533017450663876166578688028
+10.0, 0.1251100357211332989847649789477254470842099009770860043514972047
+10.25, 0.1216839548114256581832096801263610814460525105839874962403695546
+10.5, 0.1177195514884425017802289063930658092780193779914413713717151257
+10.75, 0.1133045799085349966923527501254387703835817674836533651678567706
+11.0, 0.1085255092982049925567723911071761966506123976760930505104271492
+11.25, 0.1034657827664601667257975127939732767293311635568840287927182335
+11.5, 0.09820440946195089846505727448594103423212397410795327666438396544
+11.75, 0.09281487929890386376369675560679807701962121451841671141743878224
+12.0, 0.08736437990304943375271063478563075520379929766870135796666642596
+12.25, 0.08191328861243157710772139631595405936183410336190099283268454613
+12.5, 0.07651490800086525049008127388884441072002756852772088120717045143
+12.75, 0.07121541112210824655183580285963650817326868346250504236851589519
+13.0, 0.06605396213377439489822781845279065065585621014422393925197003788
+13.25, 0.06106297879219139301278467223371192626748387848826261957833710927
+13.5, 0.05626850517663460655605768966544574418710132441446334613962998937
+13.75, 0.05169066560121551839263986250053012563817317356822848663050941404
+14.0, 0.0473441737423897999172340307540283125058422079024338788553920038
+14.25, 0.04323887432877600812057686543159688428501664818426054620983206842
+14.5, 0.03938029812853871385255758319428126354432781858435760681972677061
+14.75, 0.03577021428805958120847171122368725677994839525278837008628425846
+15.0, 0.03240716721973688030756030183700839772561621518332775239079093892
+15.25, 0.02928698813358412388775062026510634259301416747061653867790243033
+15.5, 0.02640327391057035333416500541410044010111670478889168948637873012
+15.75, 0.02374782830108497927883668342014640761640697526014976173371549044
+16.0, 0.02131106239280704930275940632979675069159084707269314469334767645
+16.25, 0.01908235293540108372255894525778934654556128513691048553504324663
+16.5, 0.01705035845154365877138652537743248321987374784169593114495003386
+16.75, 0.0152032941283178403971318062228893301922899994371567897915502031
+17.0, 0.01352916729774490908041937026715697873618810454978269877122357257
+17.25, 0.0120159759100494399666402885233398034929255037207100068417152775
+17.5, 0.01065187280857420412483887226552640038150355932877485289458786971
+17.75, 0.009425298860738239238578699210151974998214065268721819591580327521
+18.0, 0.008325088113095818939263997415818015720730805517010736569702414073
+18.25, 0.007340548146202262631833418691597004767626824406578256047553155974
+18.5, 0.006461518729822576315926682253990003331946204105648658100907075287
+18.75, 0.005678411741457590687241573648095290578064818568016577911589648148
+19.0, 0.004982235128839516200951213042141621091148093631791638527097598757
+19.25, 0.004364603484881537029613871530929452463478625944999331364650930942
+19.5, 0.00381773757391904082206231562425439565527413787186689099820509122
+19.75, 0.003334454910977844131784343323361008155249340059473279948582400177
+20.0, 0.00290815325917256836397310812014930649224099791971654842041939282
+20.25, 0.002532788680255681676285830871320780127330297183468394199710157135
+20.5, 0.002202849554291831080610799467113124709470646984158005490698040748
+20.75, 0.001913327779561664829510932193068508872784297028732054303717105105
+21.0, 0.001659688175122662193682235206109124061023214116980172148558560216
+21.25, 0.001437836937077468304371446222987336966974426954055989989264722461
+21.5, 0.001244089845902406609372724187570894846491426842722204618221296691
+21.75, 0.001075140785986397767745721638875264871166253025076953538857647045
+22.0, 0.0009280310192167132015539230980793683825618484003508844900648521617
+22.25, 0.0008001195511119990371764866001142738287471067597208907759703947413
+22.5, 0.0006890548395286770760217732542044562257499392265532491325755268366
+22.75, 0.0005927480211133109560017597323175313243535802134387412367294546956
+23.0, 0.0005093477681396828138538122997131070767246707562792417315739338635
+23.25, 0.0004372168368440362621717127292842106656497594716980149705262897732
+23.5, 0.0003749103265722543627986183265346427745333970952765187279001148214
+23.75, 0.0003211556357517835282337269741547968428539324102156986765413736799
+24.0, 0.000274834074747481659022576219413751034345788763653911467086865837
+24.25, 0.0002349640759907655302904223665762111698786036743899858628780223874
+24.5, 0.0002006859274167446762593172133590081238910778981206838657308559932
+24.75, 0.0001712479453330368679435136899150296408153028794517970636414325658
+25.0, 0.0001459939966017188701539418447804709266144527159061492391737239067
+25.25, 0.0001243522767606247615425153168760537808253283602138395915159523612
+25.5, 0.0001058252498483833467205341447213060783913409745793699261240977234
+25.75, 0.00008998065671760097676091245699772082171072779121844934941582349231
+26.0, 0.00007644350108599464747259749910476391151376164510208334624206614866
+26.25, 0.00006488892611756880046471000394716701559053814393486144723059671064
+26.5, 0.00005503589863736550177565702130375377954688189868256189248384961953
+26.75, 0.00004664162290988367633054375190222117826870790609584729791557428934
+27.0, 0.00003949661104596843612791879547739834712628906349743115560828110407
+27.25, 0.00003342034237958883629237590159068281234261240681404779403983684661
+27.5, 0.00002825744944321782297848160528393033910908763242730782563684602053
+27.75, 0.00002387437336701962872906214463082372201646515343050073510365729013
+28.0, 0.0000201564365563013950572036689936672919238056971324697861774441196
+28.25, 0.00001700528530812900627901600062229070979629771106907269676001478733
+28.5, 0.00001433665957326872753782068589462376853920836828009457516761053815
+28.75, 0.00001207845132932097382126997809224641283870096079394469309241147023
+29.0, 0.00001016901699192579970063480838307681847630054822608658399699640964
+29.25, 0.000008555712948991289682402495593782326502442795701036920568562456822
+29.5, 0.00000719362666066504841431831716013318582129293334084076876608220817
+29.75, 0.000006044478833090494947540791877094938402436981846430035802107557534
+30.0, 0.000005075674958545005421862828639020146738894804494221917279438474162
+30.25, 0.000004259487032711866044225064293923861454014093906361037409783521147
+30.5, 0.00000357234852771514860308416904147862285392685962712608938257789174
+30.75, 0.000002994247734282026142499194251374233520781690327686743516660346394
+31.0, 0.000002508206405552949057643658762780835075376107309295916542026358533
+31.25, 0.000002099832256169634460894938092137574432926173290949870098900263477
+31.5, 0.000001756935310492767292434295178505489301209130863096374041622967223
+31.75, 0.000001469199369665931754197778269253085994173998561995987001405615382
+32.0, 0.000001227900994471717635947940670844626675781560771059957261972888826
+32.25, 0.00000102566939431493724194480631831221991619882519235644946106020963
+32.5, 0.000000856281486012846050826312917786579548642575788256660707766594072
+32.75, 0.0000007144871521382537927552547718300676886720531061395026850539441051
+33.0, 0.0000005958603991786300369164053291040693409767456785848080593869693059
+33.25, 0.0000004966727014567857970523284638105406868208188773778197263475583667
+33.5, 0.0000004137853273394655508401893266924830123303842382145467952921064821
+33.75, 0.000000344557888537943606147987797005017813565680284385638637783029876
+34.0, 0.0000002867707391984073550824403847626639269742801916883479140450042143
+34.25, 0.0000002385591860877771310674513336011819973321686624434141396238261647
+34.5, 0.0000001983577608416143904312050771678146963637004136309521708210926513
+34.75, 0.0000001648530555963296041069625671109391205207946026301875820142638725
+35.0, 0.0000001369438393826411666204050888554478848583604233007574588347643012
+35.25, 0.0000001137073588376537605773591596975758337682189348053564944199301356
+35.5, 0.00000009437088700327813389420965178989200297204016947696687684916506496
+35.75, 0.00000007828772165364262929627671410052708059815495653102324579025739985
+36.0, 0.00000006491695274772336542659448928668721711557299151027348372662701475
+36.25, 0.00000005380641987450719988295346841315594203545010281482533339302922789
+36.5, 0.00000004457836725188057644451748409056565961798568471219661455325581916
+36.75, 0.00000003691737796677546967422291420597428735209681632999012562616037233
+37.0, 0.00000003056023245138750734922029883254230615314243826748880158479669844
+37.25, 0.0000000252873901968860968109996098288383250444651434820609477360523842
+37.5, 0.00000002091583972813185793295793769971826241624456670133489556037766558
+37.75, 0.00000001729310103942849409063297996391895067076965488831460877828935211
+38.0, 0.00000001429219800618755610978872617491933016644071244880298670611133952
+38.25, 0.00000001180744658924535209391155180995547456989089367071830019255677997
+38.5, 0.000000009750928668337726641496114444648484450399671312838158599894238415
+38.75, 0.000000008049541707456786551402738725157263957690554138273272825699690439
+39.0, 0.000000006642531707251846223333171337985252304247645182421536668587422867
+39.25, 0.000000005479431501195302860686872489823329574056154620501424840790950021
+39.5, 0.000000004518338799372804469180625084099624821546304935265885195900702335
+39.75, 0.000000003724478815602643888022757788870667286241808091586112088401200488
+40.0, 0.000000003069005119872019140188456026558917679230105910029235272637769716
+40.25, 0.000000002527999786033835423093822338651067788488758867571140704986322034
+40.5, 0.00000000208164016507031540799804224329944148200812323456608914907506595
+40.75, 0.000000001713504886419352719362730189293808666524880697824790678513021367
+41.0, 0.000000001409996126472545819440234437751633807288134831364049449090861153
+41.25, 0.00000000115985891403708312667031766508232350003957476174244507512818131
+41.5, 0.0000000009537813773444187074325378586258443648521466908696131561755940528
+41.75, 0.0000000007840624693887246532173892893419995838188490746173395960395015582
+42.0, 0.0000000006443359170231513617348421587379731295884279231503435219184413585
+42.25, 0.0000000005293409912205808390972606413472333069064809580264803824263305413
+42.5, 0.0000000004347322477748747891795917348083050928143642537557344218168118275
+42.75, 0.0000000003569216872576454279497644662689757367584755403342809700515579225
+43.0, 0.0000000002929478705829987871299512354069569422870466569650219178990025446
+43.25, 0.0000000002403674360800283713330666739716086188931125360848935417039750084
+43.5, 0.0000000001971652241904543934209725193042342111079956547407511229343119081
+43.75, 0.0000000001616798509285742186551862656860707587929107800860977557669481121
+44.0, 0.0000000001325421013656396535695310183375758802606804422834123002407454587
+44.25, 0.0000000001086239566995748061895939387274733885523351824006782199828265228
+44.5, 0.00000000008899643728246801301611505620872408017436178851776040955438396712
+44.75, 0.00000000007289475133940173194758993649853845041670779720085523795058215321
+45.0, 0.00000000005968949512020330274439179852563592947058566503804409904350001651
+45.25, 0.00000000004886286334492488287219708242209434802494490909520573406394683792
+45.5, 0.00000000003998900612490440121886576856165681141102023674564480107504169371
+45.75, 0.00000000003271781600001054606881071372703598844824200853831222195370729119
+46.0, 0.00000000002676155129510619182116644353109166465379576196512996911037190928
+46.25, 0.00000000002188380381675883485310611354220042675676987167891533083058379224
+46.5, 0.00000000001789040345385841038492574673139729905217997796184211878015540453
+46.75, 0.00000000001462192240985279332440912616790709149517144842755816777130933443
+47.0, 0.00000000001194749999722136573258874830837269726599698013272978432293044138
+47.25, 0.000000000009759757182807822404750951646831157685602343908135121319243374573
+47.5, 0.000000000007970610066357884670599231301948755151593601318316408915463784616
+47.75, 0.00000000000650782460415533303778838864268468090682307182227228937233009802
+48.0, 0.000000000005312182320763912500838422500160625880672977520171217058495859103
+48.25, 0.000000000004335149454647013552673114190898668188742742199068867770106171761
+48.5, 0.000000000003536960764682213988267877446799116978396602147385276372411613929
+48.75, 0.000000000002885044755010904826919240722689087321710982948039845851260628951
+49.0, 0.000000000002352729912508490255079729899223716934622478988725439407064730318
+49.25, 0.000000000001918182157175041469966344522800538430933987342760341696975374941
+49.5, 0.000000000001563532465012282309094466492263561914056760946314773536673769432
+49.75, 0.000000000001274160854104271520815330338494681767757413760393645635818162407
+50.0, 0.000000000001038108891866326862862584790710240695288835502627344369446451556
+50.25, 0.0000000000008455978037478342451442142195327172858077719995793812662800749935
+50.5, 0.0000000000006886333224746665925539409725902279284111324441263188571742330864
+50.75, 0.0000000000005606817624058355802275554110324298194697466279971547668791491248
+51.0, 0.0000000000004564045600795882728526375884252042450006688109673087436288271114
+51.25, 0.0000000000003714407923879311972477473901364157718331243929057047889686792357
+51.5, 0.0000000000003022290530966494012712929190016007473303180945683219925486343095
+51.75, 0.0000000000002458616069214598138416237818818318720325144026643711387287379266
+52.0, 0.0000000000001999650061645834757946699936578139033586178267891223118720699599
+52.25, 0.0000000000001626023959806504022187183741862230393866236160992461501345779129
+52.5, 0.0000000000001321935902784086389540723718098949893784050549370327714389673838
+52.75, 0.0000000000001074497037549860686086458398510273783570781904310525073569490574
+53.0, 0.00000000000008731970355928199712944531777765349747014527059388637449224807525
+53.25, 0.00000000000007094671881780450978934389210841701571448547901568109970752853841
+53.5, 0.00000000000005763233605048136074656001967555302066153124903668084130093285631
+53.75, 0.00000000000004680742845034396854191229874806111770121956600923260145545538557
+54.0, 0.00000000000003800832953166517224618260477938320424436280206946442199139667172
+54.25, 0.00000000000003085737700158328657995399336634740154644852165463388789535645784
+54.5, 0.00000000000002504702930430652937574937630818179746853294212154232686496186383
+54.75, 0.00000000000002032690205503128040396254371021958891080466747973077187965546226
+55.0, 0.00000000000001649319022237750949259335274293824688448970816411592519441542513
+55.25, 0.00000000000001338003911929555551436063724456044083043673989965679825009889493
+55.5, 0.00000000000001085250687407447300536273818893605667967050176632809738115964042
+55.75, 0.000000000000008800826239168257988970934338777781358066491724688823427198473605
+56.0, 0.000000000000007135726954517697702950160946949485111388386477751050072397281745
+56.25, 0.000000000000005784623547267177178799074219293540004905408916257008486046163892
+56.5, 0.000000000000004688509172230436586400541801249445475589801402057784866817393189
+56.75, 0.000000000000003799425313792042008228592174781334702789736103685728495914935187
+57.0, 0.000000000000003078401058510843987624842982057097933274761302272694648153974666
+57.25, 0.000000000000002493775174738606764888369223341568942452997428940913005688175562
+57.5, 0.000000000000002019830193102230429818451849771269638909807629923024517770070912
+57.75, 0.000000000000001635680718750295595803647495423192363871388885450863941898186173
+58.0, 0.000000000000001324368854525638069812679607106260038104448932792853357923396466
+58.25, 0.000000000000001072128309132917701914097544251798180562246653559776624017535506
+58.5, 0.0000000000000008677858624273062512469970430809079396154446289918072809281274384
+58.75, 0.0000000000000007022746529508614456310423556955602106145049815879352239982381467
+59.0, 0.0000000000000005682384795470789404299796654859572970213067072073923955170618229
+59.25, 0.0000000000000004597101646017484596870305364488416302191665147708956122447320131
+59.5, 0.0000000000000003718501709120790007240144696296676355301324896343965740947483949
+59.75, 0.0000000000000003007342279591153329801564647338933261440033316296183087612716162
+60.0, 0.0000000000000002431808131811719362574585223519562682152430992083391330482036398
+60.25, 0.0000000000000001966110369295431784017665368947086604623065281421034513402837002
+60.5, 0.0000000000000001589348673747240376008489898047953775870124317269289472531424389
+60.75, 0.0000000000000001284587619043277533303868139274994215761442408331942031429617729
+61.0, 0.0000000000000001038106920169989979357891016977050468410059296708280121439061126
+61.25, 0.00000000000000008387929814552171983834302751132812954184316979760097164977063123
+61.5, 0.0000000000000000677645208798070741427671489032461992899493244353432299318137262
+61.75, 0.00000000000000005473755152205821964297042926727182265071514638716196255285572013
+62.0, 0.00000000000000004420834884830100058228402012124854244829159508428757627171962304
+62.25, 0.00000000000000003569929754262041238163823109762212640465999565821198903874959834
+62.5, 0.00000000000000002882385101047695473404900593278375190475869643394090652223543916
+62.75, 0.00000000000000002326921857404030252729289012207468225405523900095002193880205151
+63.0, 0.00000000000000001878233370187050581665766406022203245689310334385375703651764881
+63.25, 0.0000000000000000151584835007724213701895963914855868960991330323257458083186962
+63.5, 0.00000000000000001223209636740766420746832641943057316627141881111023137538577711
+63.75, 0.000000000000000009869279483855504153936248195914923523502278248759410092375818302
+64.0, 0.000000000000000007961774833606248654900677399536140022679379373611701086743798715
+64.25, 0.000000000000000006422064940375781811193975545119041584680138515715321923077597529
+64.5, 0.000000000000000005179410299662312762263693024231069543222114094830910447764513282
+64.75, 0.000000000000000004176641685213882995437952256537543820721002146797032836029244171
+65.0, 0.000000000000000003367563961453406813620225069865290266079182269581610325493956817
+65.25, 0.000000000000000002714855175583366679878577561394404617415453423261461004250959528
+65.5, 0.000000000000000002188366724262528626648580403045202899791188405917157543756390113
+65.75, 0.000000000000000001763748252384471543325655625625444465704741834916926966476070313
+66.0, 0.000000000000000001421335428172338817928971287079900955397287566457576403540781027
+66.25, 0.000000000000000001145250485384106590391445186170028536217580621608612878355572443
+66.5, 0.0000000000000000009226749464195208453414413280833368658011611780572498325116542166
+66.75, 0.0000000000000000007432616590368688479112314296927645448427145387140787752606348768
+67.0, 0.0000000000000000005986595348638788226201817883998633776812574368689633961208930377
+67.25, 0.0000000000000000004821294464677990214220655266506217997056228000275340973788125281
+67.5, 0.000000000000000000388233845902360213507965788866962440796939862734331666264946302
+67.75, 0.0000000000000000003125859935344400159977686838440597825238709583003038116220695037
+68.0, 0.0000000000000000002516473793698232354047784165964754293848994891069819391317986853
+68.25, 0.0000000000000000002025640999416358682809055969290412248225948678522104138548859766
+68.5, 0.0000000000000000001630347193393768518214436293520577682698986544085778421441001583
+68.75, 0.0000000000000000001312035719953398124869070444118831443717129748580063798529064649
+69.0, 0.0000000000000000001055746213399804075657899504008162792566195648748639662321873171
+69.25, 0.00000000000000000008494192421139269446840962237272028037271330911054067283449025941
+69.5, 0.00000000000000000006833350795665025657730619921665339816416657428342107597915909891
+69.75, 0.00000000000000000005496607952737488338104759500069819345365507565696013377835496309
+70.0, 0.0000000000000000000442084811207868499733592014849077229213571791025800794499153985
+70.25, 0.00000000000000000003555220738469874778548918795404036980255580073978467498887898385
+70.5, 0.00000000000000000002858762297821777935590237099050046674252747375314220241048407798
+70.75, 0.00000000000000000002298478100560427704450149479259854302006379545844982207431801496
+71.0, 0.00000000000000000001847795437633649550404042453294647757845189812815037434081215623
+71.25, 0.00000000000000000001485316308809687213917931114444017183458824257726549743751998375
+71.5, 0.00000000000000000001193811854906739342085375463405955414232145554259724800284595903
+71.75, 0.000000000000000000009594117637275817458144308088081658117794103595148178197038903757
+72.0, 0.000000000000000000007709509323171192786087818627129234719984661305440129635661082017
+72.25, 0.000000000000000000006194429470770462667212812051571650879230492870869750340912705473
+72.5, 0.000000000000000000004976558209640659094872837637147581933514768131647709427320454668
+72.75, 0.000000000000000000003997701725063543469397921947097978731208752652626163717627847515
+73.0, 0.000000000000000000003211038622209737596669035628721114357579207789169466468546077982
+73.25, 0.00000000000000000000257890194046699358549203120245787850269091414076140714404853348
+73.5, 0.000000000000000000002070992847501464744255440026176313811341838721973795304942960622
+73.75, 0.000000000000000000001662942177766967092337337087808101613575410166715872991708015892
+74.0, 0.000000000000000000001335152225082874476406772714672360426166218968694170788354963194
+74.25, 0.000000000000000000001071864303348201009750532637295215257119598771217900001080088326
+74.5, 0.0000000000000000000008604081590842679244981663768156342213721602088449475297235469464
+74.75, 0.0000000000000000000006905978434369803467293029590467678303708917363308059506587333878
+75.0, 0.0000000000000000000005542455245080700435601752944178600548544237402622303704879400406
+75.25, 0.0000000000000000000004447702623333724205497068274165480973349737103465599045749974215
+75.5, 0.0000000000000000000003568832359350034726411825577421100169172028006513303439003391954
+75.75, 0.0000000000000000000002863345124463453550618952155610817059209866304509312724510797041
+76.0, 0.0000000000000000000002297093500501341452812796709625178781057247469092767579313142493
+76.25, 0.000000000000000000000184264364707225208275415544694858496875246827730147786579089008
+76.5, 0.0000000000000000000001477957745698330764832494675206151947769874220611928758415510588
+76.75, 0.000000000000000000000118533453645882927609747337136476219103588179430404742889137575
+77.0, 0.00000000000000000000009505574875262798868911332912780459467479256218676649061625411457
+77.25, 0.00000000000000000000007622099836129722640548408372354852582192352299683049870856374981
+77.5, 0.00000000000000000000006111248478938021198281005601336212537211299987016542188003629774
+77.75, 0.00000000000000000000004899418959128120002798181086191452488219963654733534757418968454
+78.0, 0.00000000000000000000003927523595863530950116014046616224178678000081713649893228406868
+78.25, 0.00000000000000000000003148131567140937892919270970968380574303576752646552849451781864
+78.5, 0.0000000000000000000000252317311456464438190813210546226888320700862428836948227351701
+78.75, 0.00000000000000000000002022095112132639114149930312339114559916627688943080391026712856
+79.0, 0.00000000000000000000001620379418844329305939106615208384526287401511300011736699617181
+79.25, 0.00000000000000000000001298352786334028032302726472137671605786437016457282202924766276
+79.5, 0.00000000000000000000001040231051855756238558986169531371388458452998115385389028133228
+79.75, 0.000000000000000000000008333515756664344822086856118197976310032708521493582614619613484
+80.0, 0.000000000000000000000006675569131786222432883112184961771968895628225468752571207632768
+80.25, 0.000000000000000000000005346999753504158556138674940023423791084910334739635806014199938
+80.5, 0.000000000000000000000004282467711699704985226753023007640994948260216154426059894193781
+80.75, 0.000000000000000000000003429575219167960797125885779206077511467612147564130386387878762
+81.0, 0.000000000000000000000002746307120152311438780226063808400691898795899440719497357574748
+81.25, 0.000000000000000000000002198976759093297935692179609365769583991672263907588654264812483
+81.5, 0.000000000000000000000001760577594663005314697991086665325005738418402865404728776911294
+81.75, 0.000000000000000000000001409460546109900167796770996481772942041498907421336198576334431
+82.0, 0.000000000000000000000001128272810544776255544067754847099783663190884927628492801842297
+82.25, 0.0000000000000000000000009031065459727936635155984921911620123088748007176216753697218154
+82.5, 0.0000000000000000000000007228159828064950997100511410868113037036681644168667794504494283
+82.75, 0.000000000000000000000000578469694589540547477195959037297389582956511478251760946278059
+83.0, 0.0000000000000000000000004629113193811393434024448851496733151978429170741979095076877526
+83.25, 0.0000000000000000000000003704072924072433400008373600627821339462026944574522710981438137
+83.5, 0.0000000000000000000000002963643819878235754409576370202586256173799149970017322159521382
+83.75, 0.0000000000000000000000002371032184250645300394642203330745907965204587607036060717569045
+84.0, 0.0000000000000000000000001896767334711611640301888272069755048346059691615002035963942188
+84.25, 0.0000000000000000000000001517246179763646331636153331290091953977342230491819046045667517
+84.5, 0.000000000000000000000000121356663250929524673775806412744955722894643980325616787691492
+84.75, 0.00000000000000000000000009705926265018418276239878155767942417063354017372905988210918762
+85.0, 0.0000000000000000000000000776204822723993223544041975465131075902951352602313991646363442
+85.25, 0.00000000000000000000000006207001836060901294827085958850511091798662842273823679840225591
+85.5, 0.00000000000000000000000004963108813195281697140404903492953775198895030894435376158872332
+85.75, 0.00000000000000000000000003968188574774725761536475831260141738198487601186233350862059431
+86.0, 0.0000000000000000000000000317247044334753684015998780022362566127565609828945661472011235
+86.25, 0.00000000000000000000000002536120220387477576533883151376450815919767536346394851891349965
+86.5, 0.00000000000000000000000002027259058506476983315435816656555400508512949443791917160973932
+86.75, 0.00000000000000000000000001620376787709463836695251935856056627954658250102051856251585495
+87.0, 0.0000000000000000000000000129506126855130596270341279452970552152799117533081821104270588
+87.25, 0.00000000000000000000000001034980915592788434450750927253829669633104452610063383705854739
+87.5, 0.000000000000000000000000008270700184331799949299426694723935368368808250349835615228374775
+87.75, 0.000000000000000000000000006608764957627353544833318377060303991347380283378344232227473915
+88.0, 0.00000000000000000000000000528039740540826884774908091733763721885868986155564289860970794
+88.25, 0.000000000000000000000000004218726448639541615454609455735596884659096644720414146071074122
+88.5, 0.00000000000000000000000000337027046858018740020502319851231643392020862591337418590919183
+88.75, 0.00000000000000000000000000269225972100710794835101001229506323844630969937811331186804383
+89.0, 0.000000000000000000000000002150493516478868419918305461214603373397389976783430608764978628
+89.25, 0.000000000000000000000000001717625505025964784009663436910958655274349851830371642955433202
+89.5, 0.000000000000000000000000001371791648784078730582430879781097377643286092197531750711540144
+89.75, 0.000000000000000000000000001095512485506420597703393415529564790145081655721996527488946848
+90.0, 0.0000000000000000000000000008748149188873949017285455221038218838430328331627342634713879968
+90.25, 0.0000000000000000000000000006985296910439369725215405025950120072490092397767241415564486233
+90.5, 0.0000000000000000000000000005577294376871870237223438475719076851194835653999471957047068887
+90.75, 0.0000000000000000000000000004452792297851388420999956447362497574848985797624576154311331787
+91.0, 0.0000000000000000000000000003554771133439440161543859449437302408289914267780769303832219124
+91.25, 0.0000000000000000000000000002837666489827278675870784615651154105042631861385803679429228378
+91.5, 0.0000000000000000000000000002265070477364418609763125500415771987689486729245532128740770617
+91.75, 0.0000000000000000000000000001807893772623414653801104453983266903960470447066946513570103092
+92.0, 0.0000000000000000000000000001442896161706557292197305735668007003211351509426456611713612688
+92.25, 0.0000000000000000000000000001151511779627665865247576830021496393451307370483121744411836972
+92.5, 0.00000000000000000000000000009189100168847357084268402594528496810111309484767175204343313913
+92.75, 0.00000000000000000000000000007332448733277105296893605359688342182187306327857858103048442487
+93.0, 0.00000000000000000000000000005850549890048897352684868317873818143544175602096485205035090792
+93.25, 0.00000000000000000000000000004667841426237576019912803820082731795778783290504551228288595183
+93.5, 0.00000000000000000000000000003723980575602630156243878586334707527186842862996816432610454187
+93.75, 0.00000000000000000000000000002970781948248687053912677944739560889017022384588562284744450134
+94.0, 0.00000000000000000000000000002369770836888358168003004364013206396401307400305915006824985717
+94.25, 0.00000000000000000000000000001890228372341982357248772811545170207931801348593020568457045052
+94.5, 0.00000000000000000000000000001507629767603030879523419872227437012574732784729682582048544987
+94.75, 0.000000000000000000000000000012023966969540806574036091518216173097842966884505824747926881
+95.0, 0.000000000000000000000000000009589006961359774604241630632037000709173106294742407762963241087
+95.25, 0.000000000000000000000000000007646671352301346964951898290669226233676564340053512552455441578
+95.5, 0.000000000000000000000000000006097394428872855409494559215248982583702189155390174557350641038
+95.75, 0.000000000000000000000000000004861713570479017221680840623438948686148900228627036703187933578
+96.0, 0.000000000000000000000000000003876214499596345994459098861269874837414461223307112370537079015
+96.25, 0.00000000000000000000000000000309029349392199938360847481577737664924069988969325312206136868
+96.5, 0.000000000000000000000000000002463572136875100468308970184419635373192943251935832069683535429
+96.75, 0.000000000000000000000000000001963833237941649402265929834775349885846123341061554460625041923
+97.0, 0.000000000000000000000000000001565372971851820853471246244928190945004194395125859127453025923
+97.25, 0.000000000000000000000000000001247685396745217373099355855416076488576198101860536413391732999
+97.5, 0.0000000000000000000000000000009944123809136899308758273261393344392928070887660999828663989917
+97.75, 0.0000000000000000000000000000007925054466809206753216007682905703514010410724363080738183824396
+98.0, 0.0000000000000000000000000000006315568091165255885432290150241847205710852917167857667157345977
+98.25, 0.0000000000000000000000000000005032654907497211052151797939790403806031460399426173375102731491
+98.5, 0.0000000000000000000000000000004010112662604230310911337199040741125889696719840157858674221541
+98.75, 0.0000000000000000000000000000003195146810221878323058829989671913913538353524921562463965600557
+99.0, 0.0000000000000000000000000000002545657723009798986676184210444842046631939060297478921005046057
+99.25, 0.0000000000000000000000000000002028076240261561164742824566055073505083589005916501235019707843
+99.5, 0.0000000000000000000000000000001615636828842084765525989680919135433651860855793297821254053638
+99.75, 0.0000000000000000000000000000001286999969175980384388475022660608802667298459271859076410322999
+100.0, 0.0000000000000000000000000000001025153212086870580621609293392614180268654181100303672597170932

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-100.csv
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-100.csv b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-100.csv
new file mode 100644
index 0000000..4ef5e9f
--- /dev/null
+++ b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution-shape-100.csv
@@ -0,0 +1,408 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+0.03125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101525886200499695720910027704806535476492605455347010117696188
+0.0625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006236984391920056168198990734444763104564785445922383649647179826
+0.09375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001638466631798327740191622957231744173951348386338349176205440442
+0.125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003713648738044600765766739252470470205671394345505764588148317082
+0.15625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001413580052547067341777257822564647853284064146711289432599645271
+0.1875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009455664713222542074175254187280525349010480602191101389605014157
+0.21875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000388913066960929789265799234352714909411592480022612064102823814
+0.25, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002077225203404755562597817221849724686610900713631846698529208343
+0.28125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002333520406251065883643520078365355407423805446755208643375110699
+0.3125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000076635759531166442699548588812029824517675377693515568888652921
+0.34375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009305411736632103878365603686370727225341233134192640242134594086
+0.375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004968570078153503414263779262094520354150227337102998034648654981
+0.40625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001330786040807018020284819640370266193510102612546149023483743045
+0.4375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001980706778834479076441980091969187947650791632179617138437945637
+0.46875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001776673397999419579843037504504497005015732945593108013273106942
+0.5, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001025367466127659894769916406688109548924241493287232467139784294
+0.53125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004016731152570189731681988432450981347081222417701426257571636127
+0.5625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001116441189460572846604804970523006207932556562198944800093948646
+0.59375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002285033846395674284582206502977329561779474027418514315441470316
+0.625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003553726584630887789364740086377540446859637473884642868319755347
+0.65625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000431372958047472162775834129010516645515929755763969688274192727
+0.6875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004182312083727024312982418177830779956995196155832626175849788274
+0.71875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003304114573342625736676975881205581409644636442236570115661592488
+0.75, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002164415122511238622814981006465116179848406354719167717035629689
+0.78125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001193759349959787129169676369284396679907825351289666246997751057
+0.8125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005618827174916347133880517143834679900448090689863313376972693348
+0.84375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002284152911860825047935089154214454977232616933225704452762646921
+0.875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008105614085932746230130666213223216537021677442289934736716156869
+0.90625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002534958824103317136303255136473313012466927591035717229109797328
+0.9375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007046957172040349632057005969418325980682578821785357623447255697
+0.96875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001754823339048634175848814659671286121723195171704619326751468261
+1.0, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003941866060050479209744717573598688470559588840463402689807157696
+1.03125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008038265656088681644587377259124334860038616154050836886064035241
+1.0625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000149666082705684603430459969859052895598427842965826865183449829
+1.09375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002557851296619231298459466912794561222269864984020543076623543516
+1.125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004031946635754342690906960708733381109213277395549539169039382455
+1.15625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005887978012507479073342070719454571839008356771980066246462800412
+1.1875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007998339960983973048217796203097741324137292204804421182652237969
+1.21875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101449097395421563502329183837067421062863103840416572971277372
+1.25, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001205645225708401416475766802046183457017595217922008665555556957
+1.28125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001346822930548076792806326902141366881731610906444161431045774237
+1.3125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001418458824627842726662409195778503744819595075274103405348509647
+1.34375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001412350161499115191494517922962626829974316053676431085102531682
+1.375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001332933709041016305686346552323194901204592929507816736332860436
+1.40625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001195255470843576214435228567666655295723504578835247490933089974
+1.4375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001020646875381834445192261960540926629939116991339567929974941841
+1.46875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008316994359590198213212041736958244041642497300048580002500300659
+1.5, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006480212819234045453899993819139151697446608451324761186671516627
+1.53125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004836675924771696287557783722184626840399491515807974383271745997
+1.5625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003464126899439031692554669678513898884817888167725702038364884528
+1.59375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002384729338856369505992159275868962051718496612791686220800319715
+1.625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001580341621810409018147795650151267711781967192656448913347394776
+1.65625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001009623257719484902519042720875711327958365293504841724731361234
+1.6875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006226711954488972705681183475035978776725906075986384148100128695
+1.71875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003712026865862262508725803398022267745955331620946434510802108539
+1.75, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002141646668147303461415369705335563015647391299680926494699142689
+1.78125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001197215021470100168829968443976376307620902447951674794496248364
+1.8125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006491739824737971510655530093164342742218344351653375380181940119
+1.84375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003417961709879720764984829265973496270865672603276596767292175137
+1.875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001749122095706004767567251566050483126462109145877948782925695243
+1.90625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000870819812896122164307146359565513168554229277558193546988211676
+1.9375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004221630251411394464011862459199173495950321652254331206579512173
+1.96875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001994553207762686886712355995935573155884098320830575667135487572
+2.0, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009191300226354658942029129992622000127072574261681011996526464134
+2.03125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004134377541989686053371411296702290851926378914794025289118890971
+2.0625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001816626902285969890802956606769706873872374677442090813446121495
+2.09375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007802789439451281481268593110509520295571609985976031180592769444
+2.125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003278348173624739295218157859446980855694300435596112438520993339
+2.15625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001348220722269384320415518042486781791680354125175771263000869964
+2.1875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005430443179139847360809462183781016317905669615653386771348157997
+2.21875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002143552541159123501455607805225013851797369321661014130909081137
+2.25, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008296655436284505623172412420562960498620227867390326759535635726
+2.28125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003150484568309086415647318220931025223850126009971557071824960976
+2.3125, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001174309990229598531271022976993780778586056994300498336791909276
+2.34375, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004298687508930505578857353011690382594939047342116069834263850531
+2.375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000154612546410179503924813861065976288801578980319590367841578966
+2.40625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005466497912669052619674911950303280324533181496974994162988676313
+2.4375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001900734065483243461512407947918848354851991614681868917381848356
+2.46875, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006502285391374336170041107088570022792586642780036776941052644767
+2.5, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002189379256792221554678908065413375723918286281007625081582952733
+2.53125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000725867669727626849275463403280227003183856597086739736009375624
+2.5625, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002370501681529090020927176607203377614434768234400115486680730547
+2.59375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007628309837955751110077055684866828174157646505740563154335792686
+2.625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002419773948388999710112437226260854137642855329206054686848324201
+2.65625, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007568806802039747770558821973727915494318705354675325676301985448
+2.6875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002335225071090304812519892959748138032537087121947565392541942132
+2.71875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007109128726838181063741827318604653247613502498200655183643411589
+2.75, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002136108013452834824555611340745683726916751652714399555380998202
+2.78125, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006336911204761581623923405679332855984177641581935800367218829555
+2.8125, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001856537371052938790054060269633464045643714434023211064913447814
+2.84375, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005373056389932544500338593817842707159195249327554108784091390053
+2.875, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001536550234923824440282913343343030449160089299816283170811957022
+2.90625, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004343022310936202279562661059578773031455345940591730692622559696
+2.9375, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001213573144869126853003484165753289082111798155949514301258847482
+2.96875, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003353309752913068298200618850578512871679613301969961854850476213
+3.0, 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009164676019446674196459527165190615441837979440232191031936889725
+4.0, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000788419866679760178086756223524856410273231365822270502870636571
+5.0, 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001139080363163845923501700286733498088263501100130285438224780709
+6.0, 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000002892032984076451735243825582904203310247859721992496701567658374
+7.0, 0.00000000000000000000000000000000000000000000000000000000000000000000000000045148251265064833861653768585185178771087340939844851348799647
+8.0, 0.00000000000000000000000000000000000000000000000000000000000000000000009152699465290857596208216842307644797802625585943426579007616294
+9.0, 0.000000000000000000000000000000000000000000000000000000000000000003902603616301374401423236581255655974513954805294301476973505249
+10.0, 0.00000000000000000000000000000000000000000000000000000000000004864649182067610436458701223522755117545181424119392883621187348
+11.0, 0.0000000000000000000000000000000000000000000000000000000002241985889945582183652952010323186985616135241303709367972963667
+12.0, 0.0000000000000000000000000000000000000000000000000000004543660997030904445374367381193484247192188367117354635923258858
+13.0, 0.0000000000000000000000000000000000000000000000000004619127594055862836556421500497525321895787708436322914278694354
+14.0, 0.0000000000000000000000000000000000000000000000002609450907787229265618970459277574235573983004018931029746302937
+15.0, 0.00000000000000000000000000000000000000000000008884106646231538598078298430314058288128779083747959015726543572
+16.0, 0.00000000000000000000000000000000000000000001946089985387327763807635406514152452908861892700368352035010384
+17.0, 0.000000000000000000000000000000000000000002893565844390712934996737540187734349642239818280885241257513303
+18.0, 0.0000000000000000000000000000000000000003052626543717402514732050640821800393677208672407121300485474038
+19.0, 0.00000000000000000000000000000000000002371415659909633737084897962496080762465186428360518973566054701
+20.0, 0.000000000000000000000000000000000001399833162749540525535014869337029999863204212845335346018987116
+21.0, 0.0000000000000000000000000000000000644944589802876268408619906921049273007782316313203171997633374
+22.0, 0.000000000000000000000000000000002373357410793031225286511503896872647180222066185227180128871191
+23.0, 0.00000000000000000000000000000007116706037693973302035434948521231337096245119407732460408323425
+24.0, 0.00000000000000000000000000000176946390945000659087248744354099241334543140192905415229816946
+25.0, 0.00000000000000000000000000003704206216383417687382434636591020469825248229201201692219634079
+26.0, 0.0000000000000000000000000006617611461248020758834633361996919337276667806167226550394122683
+27.0, 0.00000000000000000000000001021075805443667973242903651498627036730203121686726557976041755
+28.0, 0.0000000000000000000000001375295287518427723294540574806251995094075866060996086197477638
+29.0, 0.00000000000000000000000163251869023083428395520306160766295895987373790388529747579397
+30.0, 0.00000000000000000000001722527267279472427156475038785242326062383109364919779201292777
+31.0, 0.0000000000000000000001628077580513621760160948144738987076470640440109822231923241992
+32.0, 0.000000000000000000001388100076169993784668797503219154984527155522802891342222188763
+33.0, 0.00000000000000000001074381422989729494661881107915038201838879697295790056412559109
+34.0, 0.00000000000000000007592708867747354045496188726767026699783573427304184970183809192
+35.0, 0.0000000000000000004925222664969722919009683339673520663703437804309789954278535927
+36.0, 0.000000000000000002946745118264090553841516829670970481631784017004856833563436159
+37.0, 0.00000000000000001633319689590425667428978282797258542651674279601751129642527009
+38.0, 0.00000000000000008421357379561955542158241239006740103345796957525136895116639197
+39.0, 0.0000000000000004054223126683415182479447304921605542853525303154486745452238911
+40.0, 0.000000000000001828757880581294976657522393232487468465444296668440327920599725
+41.0, 0.000000000000007753975108250123733292655460540279380263578815038050033439238089
+42.0, 0.00000000000003099615719621105638167879951373870499824926485606446032311188299
+43.0, 0.0000000000001171414851497323124921212561450104699142870715256125364260957319
+44.0, 0.0000000000004196180040463759259033674652807025188415025104712817236241236366
+45.0, 0.000000000001428181895511647667570430387768373023103485507566357852178711018
+46.0, 0.000000000004628875651567555278188643409630606218748375055805692096277179548
+47.0, 0.00000000001431672330189130066783911858388009275925910024208673035807314911
+48.0, 0.00000000004233930395846124558186670509616250065760581774301557725978997698
+49.0, 0.0000000001199440350371566298677420826680101464338990597861000783890209152
+50.0, 0.0000000003260638704295460052343810729435128246597284319136247760742048665
+51.0, 0.000000000851971764533611603165195758861474199377427868552812842637326714
+52.0, 0.000000002142961191566209888433567841461872576074366921734763502241526282
+53.0, 0.000000005196367942944164736226510632249575393229196350019863465617046334
+54.0, 0.0000000121640037394459980517407318705968635160461999347922529131753346
+55.0, 0.00000002752365468731173013596453712442634490912404854103999560284217213
+56.0, 0.00000006027261472938364219869380614879061920379623326543316256477711869
+57.0, 0.0000001278855832092003330237821852786556863366737367878509194109216664
+58.0, 0.0000002632011349248908591667277993603843206233354476520950938974368468
+59.0, 0.0000005259822221839870283079853880842509523119172091969227391973644931
+60.0, 0.000001021647835129563498573049448585331145778912969236996859406491534
+61.0, 0.000001930574721109789137053135806912018656616224228224773699235633971
+62.0, 0.000003552349827857868954086874692487244311584199128929243258938672447
+63.0, 0.0000063702779391422723031515086374540323314438839776931406241927936
+64.0, 0.00001114209681769054496133515159973000687448659880667266574757087221
+65.0, 0.00001902292646998749609017433704551509224806908656859558035408253298
+66.0, 0.00003172562293932525396550955555431396574618259461481459220929562539
+67.0, 0.00005172154925395441038225818263557925080811590961998394043600306801
+68.0, 0.00008248100305484238474674052374735154191563749323175896370557338474
+69.0, 0.0001287469877968519167629710942026568464941952659749123713436764137
+70.0, 0.00019682876770053729599878615244696506408659477133848505965643673
+71.0, 0.0002948931288091571591255637612693555566759402425620199893188963706
+72.0, 0.000433222291248379212056546027358763369287368010734309011941744586
+73.0, 0.0006243991716954364751178091130645034127606932302712867024277725653
+74.0, 0.0008833746613058414715922191377952007745533739369363557653370486603
+75.0, 0.001227369362672396742341914191806926517339707286750019437030243001
+76.0, 0.001675565294767155794630642060097037680439521900332610839471241583
+77.0, 0.002248552493403038022180465455745483462289275055912737551940180727
+78.0, 0.002967511585660843122688693253444429919666900862811127925513655899
+79.0, 0.003853135774397894265614684331861256790084253214562802985925854783
+80.0, 0.0049243226989990745962501136239049127618006228259751181909712082
+81.0, 0.00619669584629917763659332210930455587487922348905392596708397322
+82.0, 0.007681043332877395794027496857607125240600414802441966811896110291
+83.0, 0.009381785355089319084141973151704910577939504747511217281941945465
+84.0, 0.01129559689976202495057664399994768248989478872768970271690200815
+85.0, 0.01341031654215249818891822930559276140194493876346094622358147568
+86.0, 0.01570426353935595906422846735202922719647576362842741491955318553
+87.0, 0.01814606361024470894286704439185217299564761402617237683579757936
+88.0, 0.02069505003122633849517124083865580302834508487183640667729960321
+89.0, 0.02330226375894734094000671653476702697970028724163383571358878334
+90.0, 0.02591202825015755649778336991747192584990603031441663106816842058
+91.0, 0.02846402629082596201222531384820293704405269267469359706044665508
+92.0, 0.03089576245935197791600407523283074703065746590761194893900023843
+93.0, 0.03314526038435500268671224297058853268756640829999116236063974945
+94.0, 0.03515382227400321923527702021029750503280867962120688780556444832
+95.0, 0.03686867143613371263505831470354228553932150576931836501742938089
+96.0, 0.03824530718311153668632834045005824908374613083206359286952269869
+97.0, 0.03924942448198831071876291553168182787786946409622015315045906508
+98.0, 0.03985828537960633668280255543707815712656489716536962058892943296
+99.0, 0.04006147193132940975326751038194383583076017753388605805719877344
+100.0, 0.03986099680914713523392064945913874513228946442466768749690412737
+101.0, 0.03927079358016447455068841910456870079794079518936107613849743738
+102.0, 0.03831564983278456934970164269448233870993618041750198494181623239
+103.0, 0.03702967966282289649009248543237145916839055818455251981623600685
+104.0, 0.03545445533194645922260873177521631967371913729430097491035453234
+105.0, 0.03363693015020804542397724106776370667524336427579716177958471022
+106.0, 0.0316272859203348411859980944283802076804436414879771347866763242
+107.0, 0.0294768297089253762736235242525582539716135256392292958611625071
+108.0, 0.02723604812833601970108751735448048739234169639768866239343710345
+109.0, 0.02495290504507706087353050108406763623070147775792946395538644433
+110.0, 0.02267144318042336405237510096373540040643911235907111556582472294
+111.0, 0.02043072385790325133559678402352615471510768476729050808052496336
+112.0, 0.01826411430365845454243924394654114938027308660979828786487165959
+113.0, 0.01619891009564484454252904598930382093871323219851485959683820709
+114.0, 0.01425626273669950571007018001196057219657258434338014826557883788
+115.0, 0.01245136950631700931934226177184417773013467289598533871650594197
+116.0, 0.01079387484149336330696483992669838172806911726075774540076713643
+117.0, 0.009288429208294644977285102544793638535018748211298936697596892152
+118.0, 0.007935352143507592076708110689841553274733808801270627399345771783
+119.0, 0.006731350064312851763170825622523907638603218212396900747068261934
+120.0, 0.005670245669920250687466747981009866777025950637860943610148268716
+121.0, 0.004743683404490132379135971024531972480753032626610674201423373693
+122.0, 0.003941783705511029641005066046866403732028758628592463680048298186
+123.0, 0.003253726943844653749385400657669092758006876625597976685275667962
+124.0, 0.002668255543277657625183066203785781226098265043439638941512553989
+125.0, 0.002174089382881061209429176486048643285407253526279726524531853048
+126.0, 0.001760255022327741180227395288871422356230444513813649371495473123
+127.0, 0.001416333469786730772175980920234811792846986808287900561548621055
+128.0, 0.001132634162847308697006328893501915004604931474917243462669169543
+129.0, 0.0009003046627377835507992605105826060129862417734974289688258141744
+130.0, 0.0007113864294468024194526313525275759733520592877253429414167008002
+131.0, 0.0005588271348245359133262012613087304160727809122481346958496768007
+132.0, 0.0004364594724898465561156280495052324388845805685720513884780708531
+133.0, 0.0003389555176307983346699148780674001272497308866969752274404921932
+134.0, 0.000261764536370136543412944995717128235079133759411354740581928027
+135.0, 0.0002010408766485025170469116196034621688390975538081105687453104226
+136.0, 0.0001535672952139029039561330769546599940392332309880894567186547676
+137.0, 0.0001166778648191423637878335196655248564456139878897526368037398109
+138.0, 0.00008818351307496893831200303521437853341094524511385547974013144015
+139.0, 0.00006630229873613613130322627297446429129011559609792585272130239721
+140.0, 0.0000495957441543576357775196859782486330437125114639897356593883139
+141.0, 0.00003691191268093349088070664094067839771704902016736664910479519192
+142.0, 0.00002733543623090223075516238225569905755599717573646416323776453211
+143.0, 0.0000201443446026833628646145519265734693436265234861440658240650202
+144.0, 0.00001477330515532495315096552138323848704773277076216919905574745069
+145.0, 0.00001078272900640586668178334510715524766968276262760447157723870056
+146.0, 0.000007833118742358106561181516280597779487519478957740306709405659314
+147.0, 0.000005664005228397486661745776802582323641718504634906221318387053395
+148.0, 0.000004076832305019841259674355770246669555058921349754422426447517394
+149.0, 0.000002921185353798683940134046137956323060555226880837278471738750784
+150.0, 0.00000208381282358263862212340769960588729876863835283009660692632213
+151.0, 0.000001479951079838258397100508043520731356288692401482257316088262683
+152.0, 0.000001046526674857164118696576443205985785077187746462661738827963498
+153.0, 0.0000007368723575197662945744147627482068834902863477056477434334847147
+154.0, 0.0000005166512625184480766471716268082228047936401012468191941748515904
+155.0, 0.0000003607362357462140887391107080579772199346717025301639915663500936
+156.0, 0.0000002508374663783818439713450644841378772514432137871277791492054244
+157.0, 0.0000001737113818233254904439257429677924906057979184965960051710274253
+158.0, 0.0000001198173784132041195023253106916923723067770113412395659172678153
+159.0, 0.00000008231690446795792520296377057522477937392043971340457338824278086
+160.0, 0.00000005633230521797210576690702943004567655780792554786167199404485424
+161.0, 0.00000003840134944729452979193298012433979054948668230455661031349035276
+162.0, 0.00000002607814625563307409896104977635061811660077125479048242057832473
+163.0, 0.00000001764284550259369161449338380479585068907161688593843391343413526
+164.0, 0.00000001189165414798119358377749842222530914679494913684050199589025677
+165.0, 0.000000007985779388898498357369319528233262622500891153106942647530111684
+166.0, 0.000000005343343147525183567546827677151895462591051067242415490986227908
+167.0, 0.000000003562447813444424686967324193137759361671501917826470175569215434
+168.0, 0.000000002366694908066117360925124448921129989213544209590713015639537505
+169.0, 0.000000001566796744107979252728872453736864807861536189652991881503930065
+170.0, 0.000000001033659827843871116464646365235518013536740491977934239563637232
+171.0, 0.0000000006796023448406316420512042759345911869815306585157539836376675994
+172.0, 0.0000000004453092349753449524836040253826900713791166024578287343671738768
+173.0, 0.0000000002908139168502099294717681338060236460442230653546286287632997602
+174.0, 0.0000000001892919190267114570607070636207764093863998098050124414610462712
+175.0, 0.0000000001228086146077000608704614380997640724064041355851483953948209492
+176.0, 0.00000000007941849337138878176045739331488112147361462696565066623820940635
+177.0, 0.00000000005119486690010761078091211616419508179948890316064179012345388403
+178.0, 0.00000000003289718939075291795774437546155200060888892582294224420290285524
+179.0, 0.00000000002107337772369361938516424626106445368545306599597573438057576764
+180.0, 0.0000000000134575997612344672538075057056796967110550656617768928946490004
+181.0, 0.000000000008567892973705953370207503114019094750680300832155095005263492252
+182.0, 0.000000000005438361208010347985066525902574037790707148113424670096123245242
+183.0, 0.000000000003441628903099740912856836116753296534748735011097813779109037109
+184.0, 0.000000000002171581599228548270097204029344076217899347381257276990758229445
+185.0, 0.000000000001366212658983260860759301626377545410349975254859458733295225351
+186.0, 0.0000000000008570461115636667175736978968817983854062833087829149078629329177
+187.0, 0.0000000000005361018136861249815859835202889032087800318817677332926975890447
+188.0, 0.000000000000334395808084753826603800353927883945950037871223450984019245086
+189.0, 0.0000000000002079973868164366743804436528338900588109379349472366508922941889
+190.0, 0.0000000000001290182889635003601761803122984616225681213869048119684396563574
+191.0, 0.00000000000007980932896542701440395142411445829053665762742048038989158992819
+192.0, 0.00000000000004923539897182101655286246709393703555074202667751067754755347949
+193.0, 0.00000000000003029248696803042865687381385433082145739535384231503265960320044
+194.0, 0.00000000000001858823349243584317202059682857541657929535829961787433055471316
+195.0, 0.00000000000001137624401878787151940868870932504895660534972621520257740532626
+196.0, 0.000000000000006944307707945884870128370062084557987418836724096132505281434734
+197.0, 0.000000000000004228046941157708713201906860333695304390323311686860521323242064
+198.0, 0.00000000000000256769103237665918467600310018048541205380517701737033938255883
+199.0, 0.000000000000001555424771157526687795553198968528314950939446085280607814603186
+200.0, 0.0000000000000009398737827450507055439413086891342449561325068018791901479616681
+201.0, 0.0000000000000005665198967912412585257132500168250195119783157143284952804408326
+202.0, 0.0000000000000003406407309772735333523396582860616970478362501548397370157801859
+203.0, 0.0000000000000002043263007477511763059737526284389094975696969245869434910797257
+204.0, 0.0000000000000001222668186663148114457416594920295846958326681655357338381673182
+205.0, 0.00000000000000007298940101413154795300529429189941238661840928437579021846457917
+206.0, 0.00000000000000004346982479387689328454144045909903464279511684425011497456252527
+207.0, 0.00000000000000002582871448531971287505389855119994445899894553089747754963923237
+208.0, 0.00000000000000001531137773353573489010540526780497207384192308614448235916924356
+209.0, 0.000000000000000009055906971566678003899181753983616382084431938422979629597085017
+210.0, 0.000000000000000005343986154315020377640850944615037917737612368211837408817950481
+211.0, 0.000000000000000003146471034911638258372843071125320538599193118215154348829427675
+212.0, 0.000000000000000001848487055835540592177317924048364934440145236431066436064025637
+213.0, 0.000000000000000001083558692136768921308517183733231932300899122314545943943102074
+214.0, 0.0000000000000000006337832826084628200963176534626410730868251122368113149508171375
+215.0, 0.0000000000000000003699050562345616697744704295756762903213270150529187435271715767
+216.0, 0.0000000000000000002154317047563743311318419895328185015660108645276043201079180255
+217.0, 0.0000000000000000001252008920705881199757458540671898269440905509270830857610446581
+218.0, 0.00000000000000000007260928450656147141513543379793995173627741627644704063944506554
+219.0, 0.00000000000000000004202156063985908040370671196962546586531473726124672875724082794
+220.0, 0.0000000000000000000242692149375338286271880093652443833219063023781459435693288425
+221.0, 0.00000000000000000001398784913122477830168257915828623248614716656597533576038735527
+222.0, 0.000000000000000000008045737021814632076213080472874292985957813498174639415061198831
+223.0, 0.000000000000000000004618578426494319022914728195785817754257816496810382740447058595
+224.0, 0.000000000000000000002645977909314908236281091523270533735364661951683917468351085148
+225.0, 0.000000000000000000001512889504698869978593986296856695841355166886433908507970240355
+226.0, 0.0000000000000000000008633341312371826744398659578553469598567568310604397821610922211
+227.0, 0.0000000000000000000004917097448641603229860356060973952024507687207123501984659200526
+228.0, 0.0000000000000000000002795144885867555458810621771556235984845844475880081498188374484
+229.0, 0.0000000000000000000001585888833147939413945634860114434181018209411314150795787849002
+230.0, 0.00000000000000000000008980929211993700072061253194818074034879449114678193233557742212
+231.0, 0.00000000000000000000005076414020992202462225281877370208922676120827499362503134565468
+232.0, 0.00000000000000000000002864092552096289035938575966729003286809341317297905790600853269
+233.0, 0.00000000000000000000001612940115500902266665087315640375702379027377663977635055227235
+234.0, 0.000000000000000000000009066871558061758999026455144322180226255603152828512947910706486
+235.0, 0.000000000000000000000005087582478123327334702987199000578436375669303388682228285199809
+236.0, 0.000000000000000000000002849619737149774675305065301996488251555705717595530548883295123
+237.0, 0.000000000000000000000001593273706855971641876720033029443473673464980479583664522182021
+238.0, 0.0000000000000000000000008892592695114045060428228247035793370652947417954502365549610363
+239.0, 0.0000000000000000000000004954585921577413819288929566415432055518578524126230944737977755
+240.0, 0.0000000000000000000000002755710670965094139459109781886232158051431424676438910594314875
+241.0, 0.000000000000000000000000153007747419420662897716975976650035259702720642222477324007104
+242.0, 0.0000000000000000000000000848111509136179961652298809901341478700795870056398729105335872
+243.0, 0.00000000000000000000000004693084015644312897825439051930048458249050426635234539249165161
+244.0, 0.00000000000000000000000002592600308812300438040680569953195383552928949267130812790714073
+245.0, 0.0000000000000000000000000142985049834959076526915138991240348295443618994025353931662144
+246.0, 0.000000000000000000000000007872803290556434421788563248105278817178467420217772143785886927
+247.0, 0.000000000000000000000000004327705385277240322357869549050509391727826928551359697616235293
+248.0, 0.000000000000000000000000002375096365467313673612725353360901936577158126236388640814965362
+249.0, 0.000000000000000000000000001301384751834282192848817278172603867038707802353626984983858466
+250.0, 0.0000000000000000000000000007119290720969086625583781004067674755915105539212300629219301868
+251.0, 0.0000000000000000000000000003888479504360105351305860334941329648240739630269296091265169657
+252.0, 0.000000000000000000000000000212051057698766920263479165870539731762025720667751158569834188
+253.0, 0.0000000000000000000000000001154579973218360356056964830327779317764373565515739526102811231
+254.0, 0.000000000000000000000000000062767652618614337753309536956087843340350736217644049625954385
+255.0, 0.00000000000000000000000000003407072090352256547731118478732563731806448176250187574452711963
+256.0, 0.00000000000000000000000000001846569014999301753564641784200017690112960268217843429581440735
+257.0, 0.00000000000000000000000000000999294980521790781074674545758542096824537201245403465440388076
+258.0, 0.000000000000000000000000000005399715826623219067676328831864497813986968277351997655001382046
+259.0, 0.000000000000000000000000000002913413822564400862304691226782344086327645157177543627954477859
+260.0, 0.000000000000000000000000000001569612683917048250755715681145408155466951313366270705699112308
+261.0, 0.000000000000000000000000000000844397220409153835050514078863761062102292638463131410816720199
+262.0, 0.0000000000000000000000000000004535967427841018830359588069925359072683771623761091066413072274
+263.0, 0.0000000000000000000000000000002433137796947836270710523423009569199567660919556971037946615458
+264.0, 0.0000000000000000000000000000001303292460653885281685804357422783277128458221906735026896450826
+265.0, 0.00000000000000000000000000000006971081507958502071338831436097634595144427726953261604006181889
+266.0, 0.00000000000000000000000000000003723455651344991790634644445846982423836640166490101811216043813
+267.0, 0.0000000000000000000000000000000198602427350860837990716745872714535992188453794224281724263548
+268.0, 0.00000000000000000000000000000001057839559454630609513957738623169806334388682978985522613089313
+269.0, 0.0000000000000000000000000000000056267346333307892720722873356704835968802390181138538044545874
+270.0, 0.00000000000000000000000000000000298881396076170969495625334700190998722844837261980394299397287
+271.0, 0.00000000000000000000000000000000158544633382966990721199645001162402746555565013920987608974462
+272.0, 0.0000000000000000000000000000000008398829538837581388720250238443077523945536547305403208700009488
+273.0, 0.0000000000000000000000000000000004443291877274093611011314614322736377686178959769324901214075654
+274.0, 0.0000000000000000000000000000000002347545524431004350695685068381103606192882205038317363405123134
+275.0, 0.0000000000000000000000000000000001238655430684634314318026348048860209226674517490926559147130336
+276.0, 0.00000000000000000000000000000000006527072917185749153796253711208531841328948117774742908444902131
+277.0, 0.00000000000000000000000000000000003434962462828752346280262950473129988372172744052942046759722405
+278.0, 0.00000000000000000000000000000000001805365637620469441310118915198033109012459610580254465791947366
+279.0, 0.000000000000000000000000000000000009476588404228570883264004409183921751187251375159932133104611814
+280.0, 0.000000000000000000000000000000000004968056373879030069717483249416746372630724438333200949811065
+281.0, 0.000000000000000000000000000000000002601193146466678489474744383341049825978930055692466008181404876
+282.0, 0.000000000000000000000000000000000001360235710240181102084191508041117283093589928599308604068333636
+283.0, 0.000000000000000000000000000000000000710419843308422945427383893201611515039903966792281071198680952
+284.0, 0.0000000000000000000000000000000000003705775872717264175125942992783260810229728621951251533388577172
+285.0, 0.0000000000000000000000000000000000001930679315249488699793151793654177444161407357998444555043137301
+286.0, 0.0000000000000000000000000000000000001004643088254077483379169608552392885590447227350932692518212295
+287.0, 0.00000000000000000000000000000000000005221410229941628000038760428749139897067541776774576774808739136
+288.0, 0.00000000000000000000000000000000000002710452777914277696993580780281148685483565781199171805149421957
+289.0, 0.0000000000000000000000000000000000000140532738141941824388873824677812305052768828220152155811876313
+290.0, 0.000000000000000000000000000000000000007277770987314779944035540124492605803284471270401511086659220619
+291.0, 0.00000000000000000000000000000000000000376450623726254940741679281975058194592023828835937400254867727
+292.0, 0.000000000000000000000000000000000000001944956636089637896639972092482997900071525225696143343248958431
+293.0, 0.000000000000000000000000000000000000001003708409078418771723923522024996312596684737389569261583597351
+294.0, 0.0000000000000000000000000000000000000005173737337961358300839063658980698417328126646912736152013518944
+295.0, 0.0000000000000000000000000000000000000002663813193950744612357084002480212173870832785291721528996017798
+296.0, 0.0000000000000000000000000000000000000001369963816624701547248911259170935157571647953545349964756980543
+297.0, 0.00000000000000000000000000000000000000007037585795965792278535022092947101177406768166318665817448222999
+298.0, 0.0000000000000000000000000000000000000000361119451146544637430446582179882613819764176701938154704488672
+299.0, 0.00000000000000000000000000000000000000001850946646188305088535822593948936874728178038286526057870947845
+300.0, 0.000000000000000000000000000000000000000009476675102264851244077077022585830576142918820956902898519990507


[11/16] commons-statistics git commit: STATISTICS-2: Migrate "o.a.c.math4.distribution" from Commons Math.

Posted by er...@apache.org.
http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/NormalDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/NormalDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/NormalDistribution.java
new file mode 100644
index 0000000..632657f
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/NormalDistribution.java
@@ -0,0 +1,216 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.gamma.Erfc;
+import org.apache.commons.numbers.gamma.InverseErf;
+import org.apache.commons.numbers.gamma.ErfDifference;
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.sampling.distribution.ContinuousSampler;
+import org.apache.commons.rng.sampling.distribution.GaussianSampler;
+import org.apache.commons.rng.sampling.distribution.ZigguratNormalizedGaussianSampler;
+
+/**
+ * Implementation of the <a href="http://en.wikipedia.org/wiki/Normal_distribution">normal (Gaussian) distribution</a>.
+ */
+public class NormalDistribution extends AbstractContinuousDistribution {
+    /** &radic;(2) */
+    private static final double SQRT2 = Math.sqrt(2.0);
+    /** Mean of this distribution. */
+    private final double mean;
+    /** Standard deviation of this distribution. */
+    private final double standardDeviation;
+    /** The value of {@code log(sd) + 0.5*log(2*pi)} stored for faster computation. */
+    private final double logStandardDeviationPlusHalfLog2Pi;
+
+    /**
+     * Create a normal distribution with mean equal to zero and standard
+     * deviation equal to one.
+     */
+    public NormalDistribution() {
+        this(0, 1);
+    }
+
+    /**
+     * Creates a distribution.
+     *
+     * @param mean Mean for this distribution.
+     * @param sd Standard deviation for this distribution.
+     * @throws IllegalArgumentException if {@code sd <= 0}.
+     */
+    public NormalDistribution(double mean,
+                              double sd) {
+        if (sd <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE, sd);
+        }
+
+        this.mean = mean;
+        standardDeviation = sd;
+        logStandardDeviationPlusHalfLog2Pi = Math.log(sd) + 0.5 * Math.log(2 * Math.PI);
+    }
+
+    /**
+     * Access the mean.
+     *
+     * @return the mean for this distribution.
+     */
+    public double getMean() {
+        return mean;
+    }
+
+    /**
+     * Access the standard deviation.
+     *
+     * @return the standard deviation for this distribution.
+     */
+    public double getStandardDeviation() {
+        return standardDeviation;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double density(double x) {
+        return Math.exp(logDensity(x));
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double logDensity(double x) {
+        final double x0 = x - mean;
+        final double x1 = x0 / standardDeviation;
+        return -0.5 * x1 * x1 - logStandardDeviationPlusHalfLog2Pi;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * If {@code x} is more than 40 standard deviations from the mean, 0 or 1
+     * is returned, as in these cases the actual value is within
+     * {@code Double.MIN_VALUE} of 0 or 1.
+     */
+    @Override
+    public double cumulativeProbability(double x)  {
+        final double dev = x - mean;
+        if (Math.abs(dev) > 40 * standardDeviation) {
+            return dev < 0 ? 0.0d : 1.0d;
+        }
+        return 0.5 * Erfc.value(-dev / (standardDeviation * SQRT2));
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double inverseCumulativeProbability(final double p) {
+        if (p < 0 ||
+            p > 1) {
+            throw new DistributionException(DistributionException.OUT_OF_RANGE, p, 0, 1);
+        }
+        return mean + standardDeviation * SQRT2 * InverseErf.value(2 * p - 1);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double probability(double x0,
+                              double x1) {
+        if (x0 > x1) {
+            throw new DistributionException(DistributionException.TOO_LARGE,
+                                            x0, x1);
+        }
+        final double denom = standardDeviation * SQRT2;
+        final double v0 = (x0 - mean) / denom;
+        final double v1 = (x1 - mean) / denom;
+        return 0.5 * ErfDifference.value(v0, v1);
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For mean parameter {@code mu}, the mean is {@code mu}.
+     */
+    @Override
+    public double getNumericalMean() {
+        return getMean();
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For standard deviation parameter {@code s}, the variance is {@code s^2}.
+     */
+    @Override
+    public double getNumericalVariance() {
+        final double s = getStandardDeviation();
+        return s * s;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The lower bound of the support is always negative infinity
+     * no matter the parameters.
+     *
+     * @return lower bound of the support (always
+     * {@code Double.NEGATIVE_INFINITY})
+     */
+    @Override
+    public double getSupportLowerBound() {
+        return Double.NEGATIVE_INFINITY;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The upper bound of the support is always positive infinity
+     * no matter the parameters.
+     *
+     * @return upper bound of the support (always
+     * {@code Double.POSITIVE_INFINITY})
+     */
+    @Override
+    public double getSupportUpperBound() {
+        return Double.POSITIVE_INFINITY;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public ContinuousDistribution.Sampler createSampler(final UniformRandomProvider rng) {
+        return new ContinuousDistribution.Sampler() {
+            /** Gaussian distribution sampler. */
+            private final ContinuousSampler sampler =
+                new GaussianSampler(new ZigguratNormalizedGaussianSampler(rng),
+                                    mean, standardDeviation);
+
+            /** {@inheritDoc} */
+            @Override
+            public double sample() {
+                return sampler.sample();
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ParetoDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ParetoDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ParetoDistribution.java
new file mode 100644
index 0000000..2bbd42d
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ParetoDistribution.java
@@ -0,0 +1,225 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.sampling.distribution.ContinuousSampler;
+import org.apache.commons.rng.sampling.distribution.InverseTransformParetoSampler;
+
+/**
+ * Implementation of the <a href="http://en.wikipedia.org/wiki/Pareto_distribution">Pareto distribution</a>.
+ *
+ * <p>
+ * <strong>Parameters:</strong>
+ * The probability distribution function of {@code X} is given by (for {@code x >= k}):
+ * <pre>
+ *  α * k^α / x^(α + 1)
+ * </pre>
+ * <ul>
+ * <li>{@code k} is the <em>scale</em> parameter: this is the minimum possible value of {@code X},</li>
+ * <li>{@code α} is the <em>shape</em> parameter: this is the Pareto index</li>
+ * </ul>
+ */
+public class ParetoDistribution extends AbstractContinuousDistribution {
+    /** The scale parameter of this distribution. */
+    private final double scale;
+    /** The shape parameter of this distribution. */
+    private final double shape;
+
+    /**
+     * Creates a Pareto distribution with a scale of {@code 1} and a shape of {@code 1}.
+     */
+    public ParetoDistribution() {
+        this(1, 1);
+    }
+
+    /**
+     * Creates a Pareto distribution.
+     *
+     * @param scale Scale parameter of this distribution.
+     * @param shape Shape parameter of this distribution.
+     * @throws IllegalArgumentException if {@code scale <= 0} or {@code shape <= 0}.
+     */
+    public ParetoDistribution(double scale,
+                              double shape) {
+        if (scale <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE, scale);
+        }
+
+        if (shape <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE, shape);
+        }
+
+        this.scale = scale;
+        this.shape = shape;
+    }
+
+    /**
+     * Returns the scale parameter of this distribution.
+     *
+     * @return the scale parameter
+     */
+    public double getScale() {
+        return scale;
+    }
+
+    /**
+     * Returns the shape parameter of this distribution.
+     *
+     * @return the shape parameter
+     */
+    public double getShape() {
+        return shape;
+    }
+
+    /**
+     * {@inheritDoc}
+     * <p>
+     * For scale {@code k}, and shape {@code α} of this distribution, the PDF
+     * is given by
+     * <ul>
+     * <li>{@code 0} if {@code x < k},</li>
+     * <li>{@code α * k^α / x^(α + 1)} otherwise.</li>
+     * </ul>
+     */
+    @Override
+    public double density(double x) {
+        if (x < scale) {
+            return 0;
+        }
+        return Math.pow(scale, shape) / Math.pow(x, shape + 1) * shape;
+    }
+
+    /** {@inheritDoc}
+     *
+     * See documentation of {@link #density(double)} for computation details.
+     */
+    @Override
+    public double logDensity(double x) {
+        if (x < scale) {
+            return Double.NEGATIVE_INFINITY;
+        }
+        return Math.log(scale) * shape - Math.log(x) * (shape + 1) + Math.log(shape);
+    }
+
+    /**
+     * {@inheritDoc}
+     * <p>
+     * For scale {@code k}, and shape {@code α} of this distribution, the CDF is given by
+     * <ul>
+     * <li>{@code 0} if {@code x < k},</li>
+     * <li>{@code 1 - (k / x)^α} otherwise.</li>
+     * </ul>
+     */
+    @Override
+    public double cumulativeProbability(double x)  {
+        if (x <= scale) {
+            return 0;
+        }
+        return 1 - Math.pow(scale / x, shape);
+    }
+
+    /**
+     * {@inheritDoc}
+     * <p>
+     * For scale {@code k} and shape {@code α}, the mean is given by
+     * <ul>
+     * <li>{@code ∞} if {@code α <= 1},</li>
+     * <li>{@code α * k / (α - 1)} otherwise.</li>
+     * </ul>
+     */
+    @Override
+    public double getNumericalMean() {
+        if (shape <= 1) {
+            return Double.POSITIVE_INFINITY;
+        }
+        return shape * scale / (shape - 1);
+    }
+
+    /**
+     * {@inheritDoc}
+     * <p>
+     * For scale {@code k} and shape {@code α}, the variance is given by
+     * <ul>
+     * <li>{@code ∞} if {@code 1 < α <= 2},</li>
+     * <li>{@code k^2 * α / ((α - 1)^2 * (α - 2))} otherwise.</li>
+     * </ul>
+     */
+    @Override
+    public double getNumericalVariance() {
+        if (shape <= 2) {
+            return Double.POSITIVE_INFINITY;
+        }
+        double s = shape - 1;
+        return scale * scale * shape / (s * s) / (shape - 2);
+    }
+
+    /**
+     * {@inheritDoc}
+     * <p>
+     * The lower bound of the support is equal to the scale parameter {@code k}.
+     *
+     * @return lower bound of the support
+     */
+    @Override
+    public double getSupportLowerBound() {
+        return scale;
+    }
+
+    /**
+     * {@inheritDoc}
+     * <p>
+     * The upper bound of the support is always positive infinity no matter the parameters.
+     *
+     * @return upper bound of the support (always {@code Double.POSITIVE_INFINITY})
+     */
+    @Override
+    public double getSupportUpperBound() {
+        return Double.POSITIVE_INFINITY;
+    }
+
+    /**
+     * {@inheritDoc}
+     * <p>
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public ContinuousDistribution.Sampler createSampler(final UniformRandomProvider rng) {
+        return new ContinuousDistribution.Sampler() {
+            /**
+             * Pareto distribution sampler.
+             */
+            private final ContinuousSampler sampler =
+                new InverseTransformParetoSampler(rng, scale, shape);
+
+            /**{@inheritDoc} */
+            @Override
+            public double sample() {
+                return sampler.sample();
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/PascalDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/PascalDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/PascalDistribution.java
new file mode 100644
index 0000000..8bdf6b6
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/PascalDistribution.java
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.combinatorics.BinomialCoefficientDouble;
+import org.apache.commons.numbers.combinatorics.LogBinomialCoefficient;
+import org.apache.commons.numbers.gamma.RegularizedBeta;
+
+/**
+ * Implementation of the <a href="http://en.wikipedia.org/wiki/Negative_binomial_distribution">Pascal distribution.</a>
+ *
+ * The Pascal distribution is a special case of the Negative Binomial distribution
+ * where the number of successes parameter is an integer.
+ *
+ * There are various ways to express the probability mass and distribution
+ * functions for the Pascal distribution. The present implementation represents
+ * the distribution of the number of failures before {@code r} successes occur.
+ * This is the convention adopted in e.g.
+ * <a href="http://mathworld.wolfram.com/NegativeBinomialDistribution.html">MathWorld</a>,
+ * but <em>not</em> in
+ * <a href="http://en.wikipedia.org/wiki/Negative_binomial_distribution">Wikipedia</a>.
+ *
+ * For a random variable {@code X} whose values are distributed according to this
+ * distribution, the probability mass function is given by<br>
+ * {@code P(X = k) = C(k + r - 1, r - 1) * p^r * (1 - p)^k,}<br>
+ * where {@code r} is the number of successes, {@code p} is the probability of
+ * success, and {@code X} is the total number of failures. {@code C(n, k)} is
+ * the binomial coefficient ({@code n} choose {@code k}). The mean and variance
+ * of {@code X} are<br>
+ * {@code E(X) = (1 - p) * r / p, var(X) = (1 - p) * r / p^2.}<br>
+ * Finally, the cumulative distribution function is given by<br>
+ * {@code P(X <= k) = I(p, r, k + 1)},
+ * where I is the regularized incomplete Beta function.
+ */
+public class PascalDistribution extends AbstractDiscreteDistribution {
+    /** The number of successes. */
+    private final int numberOfSuccesses;
+    /** The probability of success. */
+    private final double probabilityOfSuccess;
+    /** The value of {@code log(p)}, where {@code p} is the probability of success,
+     * stored for faster computation. */
+    private final double logProbabilityOfSuccess;
+    /** The value of {@code log(1-p)}, where {@code p} is the probability of success,
+     * stored for faster computation. */
+    private final double log1mProbabilityOfSuccess;
+
+    /**
+     * Create a Pascal distribution with the given number of successes and
+     * probability of success.
+     *
+     * @param r Number of successes.
+     * @param p Probability of success.
+     * @throws IllegalArgumentException if {@code r <= 0} or {@code p < 0}
+     * or {@code p > 1}.
+     */
+    public PascalDistribution(int r,
+                              double p) {
+        if (r <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE,
+                                            r);
+        }
+        if (p < 0 ||
+            p > 1) {
+            throw new DistributionException(DistributionException.OUT_OF_RANGE, p, 0, 1);
+        }
+
+        numberOfSuccesses = r;
+        probabilityOfSuccess = p;
+        logProbabilityOfSuccess = Math.log(p);
+        log1mProbabilityOfSuccess = Math.log1p(-p);
+    }
+
+    /**
+     * Access the number of successes for this distribution.
+     *
+     * @return the number of successes.
+     */
+    public int getNumberOfSuccesses() {
+        return numberOfSuccesses;
+    }
+
+    /**
+     * Access the probability of success for this distribution.
+     *
+     * @return the probability of success.
+     */
+    public double getProbabilityOfSuccess() {
+        return probabilityOfSuccess;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double probability(int x) {
+        double ret;
+        if (x < 0) {
+            ret = 0.0;
+        } else {
+            ret = BinomialCoefficientDouble.value(x +
+                  numberOfSuccesses - 1, numberOfSuccesses - 1) *
+                  Math.pow(probabilityOfSuccess, numberOfSuccesses) *
+                  Math.pow(1.0 - probabilityOfSuccess, x);
+        }
+        return ret;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double logProbability(int x) {
+        double ret;
+        if (x < 0) {
+            ret = Double.NEGATIVE_INFINITY;
+        } else {
+            ret = LogBinomialCoefficient.value(x +
+                  numberOfSuccesses - 1, numberOfSuccesses - 1) +
+                  logProbabilityOfSuccess * numberOfSuccesses +
+                  log1mProbabilityOfSuccess * x;
+        }
+        return ret;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double cumulativeProbability(int x) {
+        double ret;
+        if (x < 0) {
+            ret = 0.0;
+        } else {
+            ret = RegularizedBeta.value(probabilityOfSuccess,
+                                        numberOfSuccesses, x + 1.0);
+        }
+        return ret;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For number of successes {@code r} and probability of success {@code p},
+     * the mean is {@code r * (1 - p) / p}.
+     */
+    @Override
+    public double getNumericalMean() {
+        final double p = getProbabilityOfSuccess();
+        final double r = getNumberOfSuccesses();
+        return (r * (1 - p)) / p;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For number of successes {@code r} and probability of success {@code p},
+     * the variance is {@code r * (1 - p) / p^2}.
+     */
+    @Override
+    public double getNumericalVariance() {
+        final double p = getProbabilityOfSuccess();
+        final double r = getNumberOfSuccesses();
+        return r * (1 - p) / (p * p);
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The lower bound of the support is always 0 no matter the parameters.
+     *
+     * @return lower bound of the support (always 0)
+     */
+    @Override
+    public int getSupportLowerBound() {
+        return 0;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The upper bound of the support is always positive infinity no matter the
+     * parameters. Positive infinity is symbolized by {@code Integer.MAX_VALUE}.
+     *
+     * @return upper bound of the support (always {@code Integer.MAX_VALUE}
+     * for positive infinity)
+     */
+    @Override
+    public int getSupportUpperBound() {
+        return Integer.MAX_VALUE;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/PoissonDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/PoissonDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/PoissonDistribution.java
new file mode 100644
index 0000000..225b8f1
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/PoissonDistribution.java
@@ -0,0 +1,238 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.gamma.RegularizedGamma;
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.sampling.distribution.DiscreteSampler;
+import org.apache.commons.rng.sampling.distribution.PoissonSampler;
+
+/**
+ * Implementation of the <a href="http://en.wikipedia.org/wiki/Poisson_distribution">Poisson distribution</a>.
+ */
+public class PoissonDistribution extends AbstractDiscreteDistribution {
+    /** ln(2 &pi;). */
+    private static final double LOG_TWO_PI = Math.log(2 * Math.PI);
+    /** Default maximum number of iterations. */
+    private static final int DEFAULT_MAX_ITERATIONS = 10000000;
+    /** Default convergence criterion. */
+    private static final double DEFAULT_EPSILON = 1e-12;
+    /** Distribution used to compute normal approximation. */
+    private final NormalDistribution normal;
+    /** Mean of the distribution. */
+    private final double mean;
+    /** Maximum number of iterations for cumulative probability. */
+    private final int maxIterations;
+    /** Convergence criterion for cumulative probability. */
+    private final double epsilon;
+
+    /**
+     * Creates a new Poisson distribution with specified mean.
+     *
+     * @param p the Poisson mean
+     * @throws IllegalArgumentException if {@code p <= 0}.
+     */
+    public PoissonDistribution(double p) {
+        this(p, DEFAULT_EPSILON, DEFAULT_MAX_ITERATIONS);
+    }
+
+    /**
+     * Creates a new Poisson distribution with specified mean, convergence
+     * criterion and maximum number of iterations.
+     *
+     * @param p Poisson mean.
+     * @param epsilon Convergence criterion for cumulative probabilities.
+     * @param maxIterations the maximum number of iterations for cumulative
+     * probabilities.
+     * @throws IllegalArgumentException if {@code p <= 0}.
+     */
+    public PoissonDistribution(double p,
+                               double epsilon,
+                               int maxIterations) {
+        if (p <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE, p);
+        }
+        mean = p;
+        this.epsilon = epsilon;
+        this.maxIterations = maxIterations;
+
+        normal = new NormalDistribution(p, Math.sqrt(p));
+    }
+
+    /**
+     * Creates a new Poisson distribution with the specified mean and
+     * convergence criterion.
+     *
+     * @param p Poisson mean.
+     * @param epsilon Convergence criterion for cumulative probabilities.
+     * @throws IllegalArgumentException if {@code p <= 0}.
+     */
+    public PoissonDistribution(double p,
+                               double epsilon) {
+        this(p, epsilon, DEFAULT_MAX_ITERATIONS);
+    }
+
+    /**
+     * Creates a new Poisson distribution with the specified mean and maximum
+     * number of iterations.
+     *
+     * @param p Poisson mean.
+     * @param maxIterations Maximum number of iterations for cumulative
+     * probabilities.
+     */
+    public PoissonDistribution(double p,
+                               int maxIterations) {
+        this(p, DEFAULT_EPSILON, maxIterations);
+    }
+
+    /**
+     * Get the mean for the distribution.
+     *
+     * @return the mean for the distribution.
+     */
+    public double getMean() {
+        return mean;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double probability(int x) {
+        final double logProbability = logProbability(x);
+        return logProbability == Double.NEGATIVE_INFINITY ? 0 : Math.exp(logProbability);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double logProbability(int x) {
+        double ret;
+        if (x < 0 || x == Integer.MAX_VALUE) {
+            ret = Double.NEGATIVE_INFINITY;
+        } else if (x == 0) {
+            ret = -mean;
+        } else {
+            ret = -SaddlePointExpansion.getStirlingError(x) -
+                  SaddlePointExpansion.getDeviancePart(x, mean) -
+                  0.5 * LOG_TWO_PI - 0.5 * Math.log(x);
+        }
+        return ret;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double cumulativeProbability(int x) {
+        if (x < 0) {
+            return 0;
+        }
+        if (x == Integer.MAX_VALUE) {
+            return 1;
+        }
+        return RegularizedGamma.Q.value((double) x + 1, mean, epsilon,
+                                        maxIterations);
+    }
+
+    /**
+     * Calculates the Poisson distribution function using a normal
+     * approximation. The {@code N(mean, sqrt(mean))} distribution is used
+     * to approximate the Poisson distribution. The computation uses
+     * "half-correction" (evaluating the normal distribution function at
+     * {@code x + 0.5}).
+     *
+     * @param x Upper bound, inclusive.
+     * @return the distribution function value calculated using a normal
+     * approximation.
+     */
+    public double normalApproximateProbability(int x)  {
+        // Calculate the probability using half-correction.
+        return normal.cumulativeProbability(x + 0.5);
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For mean parameter {@code p}, the mean is {@code p}.
+     */
+    @Override
+    public double getNumericalMean() {
+        return getMean();
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For mean parameter {@code p}, the variance is {@code p}.
+     */
+    @Override
+    public double getNumericalVariance() {
+        return getMean();
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The lower bound of the support is always 0 no matter the mean parameter.
+     *
+     * @return lower bound of the support (always 0)
+     */
+    @Override
+    public int getSupportLowerBound() {
+        return 0;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The upper bound of the support is positive infinity,
+     * regardless of the parameter values. There is no integer infinity,
+     * so this method returns {@code Integer.MAX_VALUE}.
+     *
+     * @return upper bound of the support (always {@code Integer.MAX_VALUE} for
+     * positive infinity)
+     */
+    @Override
+    public int getSupportUpperBound() {
+        return Integer.MAX_VALUE;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+
+    /**{@inheritDoc} */
+    @Override
+    public DiscreteDistribution.Sampler createSampler(final UniformRandomProvider rng) {
+        return new DiscreteDistribution.Sampler() {
+            /**
+             * Poisson distribution sampler.
+             */
+            private final DiscreteSampler sampler = new PoissonSampler(rng, mean);
+
+            /**{@inheritDoc} */
+            @Override
+            public int sample() {
+                return sampler.sample();
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/SaddlePointExpansion.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/SaddlePointExpansion.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/SaddlePointExpansion.java
new file mode 100644
index 0000000..7bb847a
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/SaddlePointExpansion.java
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.gamma.LogGamma;
+
+/**
+ * Utility class used by various distributions to accurately compute their
+ * respective probability mass functions. The implementation for this class is
+ * based on the Catherine Loader's
+ * <a href="http://www.herine.net/stat/software/dbinom.html">dbinom</a> routines.
+ *
+ * This class is not intended to be called directly.
+ *
+ * @since 1.0
+ */
+final class SaddlePointExpansion {
+    /** 2 &pi; */
+    private static final double TWO_PI = 2 * Math.PI;
+    /** 1/2 * log(2 &pi;). */
+    private static final double HALF_LOG_TWO_PI = 0.5 * Math.log(TWO_PI);
+
+    /** exact Stirling expansion error for certain values. */
+    private static final double[] EXACT_STIRLING_ERRORS = { 0.0, /* 0.0 */
+    0.1534264097200273452913848, /* 0.5 */
+    0.0810614667953272582196702, /* 1.0 */
+    0.0548141210519176538961390, /* 1.5 */
+    0.0413406959554092940938221, /* 2.0 */
+    0.03316287351993628748511048, /* 2.5 */
+    0.02767792568499833914878929, /* 3.0 */
+    0.02374616365629749597132920, /* 3.5 */
+    0.02079067210376509311152277, /* 4.0 */
+    0.01848845053267318523077934, /* 4.5 */
+    0.01664469118982119216319487, /* 5.0 */
+    0.01513497322191737887351255, /* 5.5 */
+    0.01387612882307074799874573, /* 6.0 */
+    0.01281046524292022692424986, /* 6.5 */
+    0.01189670994589177009505572, /* 7.0 */
+    0.01110455975820691732662991, /* 7.5 */
+    0.010411265261972096497478567, /* 8.0 */
+    0.009799416126158803298389475, /* 8.5 */
+    0.009255462182712732917728637, /* 9.0 */
+    0.008768700134139385462952823, /* 9.5 */
+    0.008330563433362871256469318, /* 10.0 */
+    0.007934114564314020547248100, /* 10.5 */
+    0.007573675487951840794972024, /* 11.0 */
+    0.007244554301320383179543912, /* 11.5 */
+    0.006942840107209529865664152, /* 12.0 */
+    0.006665247032707682442354394, /* 12.5 */
+    0.006408994188004207068439631, /* 13.0 */
+    0.006171712263039457647532867, /* 13.5 */
+    0.005951370112758847735624416, /* 14.0 */
+    0.005746216513010115682023589, /* 14.5 */
+    0.005554733551962801371038690 /* 15.0 */
+    };
+
+    /**
+     * Forbid construction.
+     */
+    private SaddlePointExpansion() {}
+
+    /**
+     * Compute the error of Stirling's series at the given value.
+     * <p>
+     * References:
+     * <ol>
+     * <li>Eric W. Weisstein. "Stirling's Series." From MathWorld--A Wolfram Web
+     * Resource. <a target="_blank"
+     * href="http://mathworld.wolfram.com/StirlingsSeries.html">
+     * http://mathworld.wolfram.com/StirlingsSeries.html</a></li>
+     * </ol>
+     * </p>
+     *
+     * @param z the value.
+     * @return the Striling's series error.
+     */
+    static double getStirlingError(double z) {
+        double ret;
+        if (z < 15.0) {
+            double z2 = 2.0 * z;
+            if (Math.floor(z2) == z2) {
+                ret = EXACT_STIRLING_ERRORS[(int) z2];
+            } else {
+                ret = LogGamma.value(z + 1.0) - (z + 0.5) * Math.log(z) +
+                      z - HALF_LOG_TWO_PI;
+            }
+        } else {
+            double z2 = z * z;
+            ret = (0.083333333333333333333 -
+                    (0.00277777777777777777778 -
+                            (0.00079365079365079365079365 -
+                                    (0.000595238095238095238095238 -
+                                            0.0008417508417508417508417508 /
+                                            z2) / z2) / z2) / z2) / z;
+        }
+        return ret;
+    }
+
+    /**
+     * A part of the deviance portion of the saddle point approximation.
+     * <p>
+     * References:
+     * <ol>
+     * <li>Catherine Loader (2000). "Fast and Accurate Computation of Binomial
+     * Probabilities.". <a target="_blank"
+     * href="http://www.herine.net/stat/papers/dbinom.pdf">
+     * http://www.herine.net/stat/papers/dbinom.pdf</a></li>
+     * </ol>
+     * </p>
+     *
+     * @param x the x value.
+     * @param mu the average.
+     * @return a part of the deviance.
+     */
+    static double getDeviancePart(double x, double mu) {
+        double ret;
+        if (Math.abs(x - mu) < 0.1 * (x + mu)) {
+            double d = x - mu;
+            double v = d / (x + mu);
+            double s1 = v * d;
+            double s = Double.NaN;
+            double ej = 2.0 * x * v;
+            v *= v;
+            int j = 1;
+            while (s1 != s) {
+                s = s1;
+                ej *= v;
+                s1 = s + ej / ((j * 2) + 1);
+                ++j;
+            }
+            ret = s1;
+        } else {
+            if (x == 0) {
+                return mu;
+            }
+            ret = x * Math.log(x / mu) + mu - x;
+        }
+        return ret;
+    }
+
+    /**
+     * Compute the logarithm of the PMF for a binomial distribution
+     * using the saddle point expansion.
+     *
+     * @param x the value at which the probability is evaluated.
+     * @param n the number of trials.
+     * @param p the probability of success.
+     * @param q the probability of failure (1 - p).
+     * @return log(p(x)).
+     */
+    static double logBinomialProbability(int x, int n, double p, double q) {
+        double ret;
+        if (x == 0) {
+            if (p < 0.1) {
+                ret = -getDeviancePart(n, n * q) - n * p;
+            } else {
+                if (n == 0) {
+                    return 0;
+                }
+                ret = n * Math.log(q);
+            }
+        } else if (x == n) {
+            if (q < 0.1) {
+                ret = -getDeviancePart(n, n * p) - n * q;
+            } else {
+                ret = n * Math.log(p);
+            }
+        } else {
+            ret = getStirlingError(n) - getStirlingError(x) -
+                  getStirlingError(n - x) - getDeviancePart(x, n * p) -
+                  getDeviancePart(n - x, n * q);
+            final double f = (TWO_PI * x * (n - x)) / n;
+            ret = -0.5 * Math.log(f) + ret;
+        }
+        return ret;
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/TDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/TDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/TDistribution.java
new file mode 100644
index 0000000..ef34c1f
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/TDistribution.java
@@ -0,0 +1,180 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.gamma.RegularizedBeta;
+import org.apache.commons.numbers.gamma.LogGamma;
+
+/**
+ * Implementation of <a href='http://en.wikipedia.org/wiki/Student&apos;s_t-distribution'>Student's t-distribution</a>.
+ */
+public class TDistribution extends AbstractContinuousDistribution {
+    /** The degrees of freedom. */
+    private final double degreesOfFreedom;
+    /** degreesOfFreedom / 2 */
+    private final double dofOver2;
+    /** Cached value. */
+    private final double factor;
+
+    /**
+     * Creates a distribution.
+     *
+     * @param degreesOfFreedom Degrees of freedom.
+     * @throws IllegalArgumentException if {@code degreesOfFreedom <= 0}
+     */
+    public TDistribution(double degreesOfFreedom) {
+        if (degreesOfFreedom <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE,
+                                            degreesOfFreedom);
+        }
+        this.degreesOfFreedom = degreesOfFreedom;
+
+        dofOver2 = 0.5 * degreesOfFreedom;
+        factor = LogGamma.value(dofOver2 + 0.5) -
+                 0.5 * (Math.log(Math.PI) + Math.log(degreesOfFreedom)) -
+                 LogGamma.value(dofOver2);
+    }
+
+    /**
+     * Access the degrees of freedom.
+     *
+     * @return the degrees of freedom.
+     */
+    public double getDegreesOfFreedom() {
+        return degreesOfFreedom;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double density(double x) {
+        return Math.exp(logDensity(x));
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double logDensity(double x) {
+        final double nPlus1Over2 = dofOver2 + 0.5;
+        return factor - nPlus1Over2 * Math.log(1 + x * x / degreesOfFreedom);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double cumulativeProbability(double x) {
+        double ret;
+        if (x == 0) {
+            ret = 0.5;
+        } else {
+            final double t =
+                RegularizedBeta.value(degreesOfFreedom / (degreesOfFreedom + (x * x)),
+                                      dofOver2,
+                                      0.5);
+            if (x < 0) {
+                ret = 0.5 * t;
+            } else {
+                ret = 1 - 0.5 * t;
+            }
+        }
+
+        return ret;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For degrees of freedom parameter {@code df}, the mean is
+     * <ul>
+     *  <li>if {@code df > 1} then {@code 0},</li>
+     * <li>else undefined ({@code Double.NaN}).</li>
+     * </ul>
+     */
+    @Override
+    public double getNumericalMean() {
+        final double df = getDegreesOfFreedom();
+
+        if (df > 1) {
+            return 0;
+        }
+
+        return Double.NaN;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For degrees of freedom parameter {@code df}, the variance is
+     * <ul>
+     *  <li>if {@code df > 2} then {@code df / (df - 2)},</li>
+     *  <li>if {@code 1 < df <= 2} then positive infinity
+     *  ({@code Double.POSITIVE_INFINITY}),</li>
+     *  <li>else undefined ({@code Double.NaN}).</li>
+     * </ul>
+     */
+    @Override
+    public double getNumericalVariance() {
+        final double df = getDegreesOfFreedom();
+
+        if (df > 2) {
+            return df / (df - 2);
+        }
+
+        if (df > 1 && df <= 2) {
+            return Double.POSITIVE_INFINITY;
+        }
+
+        return Double.NaN;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The lower bound of the support is always negative infinity no matter the
+     * parameters.
+     *
+     * @return lower bound of the support (always
+     * {@code Double.NEGATIVE_INFINITY})
+     */
+    @Override
+    public double getSupportLowerBound() {
+        return Double.NEGATIVE_INFINITY;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The upper bound of the support is always positive infinity no matter the
+     * parameters.
+     *
+     * @return upper bound of the support (always
+     * {@code Double.POSITIVE_INFINITY})
+     */
+    @Override
+    public double getSupportUpperBound() {
+        return Double.POSITIVE_INFINITY;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/TriangularDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/TriangularDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/TriangularDistribution.java
new file mode 100644
index 0000000..6a94b62
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/TriangularDistribution.java
@@ -0,0 +1,222 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+/**
+ * Implementation of the triangular real distribution.
+ *
+ * @see <a href="http://en.wikipedia.org/wiki/Triangular_distribution">
+ * Triangular distribution (Wikipedia)</a>
+ *
+ * @since 3.0
+ */
+public class TriangularDistribution extends AbstractContinuousDistribution {
+    /** Serializable version identifier. */
+    private static final long serialVersionUID = 20160311L;
+    /** Lower limit of this distribution (inclusive). */
+    private final double a;
+    /** Upper limit of this distribution (inclusive). */
+    private final double b;
+    /** Mode of this distribution. */
+    private final double c;
+
+    /**
+     * Creates a distribution.
+     *
+     * @param a Lower limit of this distribution (inclusive).
+     * @param b Upper limit of this distribution (inclusive).
+     * @param c Mode of this distribution.
+     * @throws IllegalArgumentException if {@code a >= b}, if {@code c > b}
+     * or if {@code c < a}.
+     */
+    public TriangularDistribution(double a,
+                                  double c,
+                                  double b) {
+        if (a >= b) {
+            throw new DistributionException(DistributionException.TOO_LARGE,
+                                            a, b);
+        }
+        if (c < a) {
+            throw new DistributionException(DistributionException.TOO_SMALL,
+                                            c, a);
+        }
+        if (c > b) {
+            throw new DistributionException(DistributionException.TOO_LARGE,
+                                            c, b);
+        }
+
+        this.a = a;
+        this.c = c;
+        this.b = b;
+    }
+
+    /**
+     * Gets the mode.
+     *
+     * @return the mode of the distribution.
+     */
+    public double getMode() {
+        return c;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For lower limit {@code a}, upper limit {@code b} and mode {@code c}, the
+     * PDF is given by
+     * <ul>
+     * <li>{@code 2 * (x - a) / [(b - a) * (c - a)]} if {@code a <= x < c},</li>
+     * <li>{@code 2 / (b - a)} if {@code x = c},</li>
+     * <li>{@code 2 * (b - x) / [(b - a) * (b - c)]} if {@code c < x <= b},</li>
+     * <li>{@code 0} otherwise.
+     * </ul>
+     */
+    @Override
+    public double density(double x) {
+        if (x < a) {
+            return 0;
+        }
+        if (a <= x && x < c) {
+            double divident = 2 * (x - a);
+            double divisor = (b - a) * (c - a);
+            return divident / divisor;
+        }
+        if (x == c) {
+            return 2 / (b - a);
+        }
+        if (c < x && x <= b) {
+            double divident = 2 * (b - x);
+            double divisor = (b - a) * (b - c);
+            return divident / divisor;
+        }
+        return 0;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For lower limit {@code a}, upper limit {@code b} and mode {@code c}, the
+     * CDF is given by
+     * <ul>
+     * <li>{@code 0} if {@code x < a},</li>
+     * <li>{@code (x - a)^2 / [(b - a) * (c - a)]} if {@code a <= x < c},</li>
+     * <li>{@code (c - a) / (b - a)} if {@code x = c},</li>
+     * <li>{@code 1 - (b - x)^2 / [(b - a) * (b - c)]} if {@code c < x <= b},</li>
+     * <li>{@code 1} if {@code x > b}.</li>
+     * </ul>
+     */
+    @Override
+    public double cumulativeProbability(double x)  {
+        if (x < a) {
+            return 0;
+        }
+        if (a <= x && x < c) {
+            double divident = (x - a) * (x - a);
+            double divisor = (b - a) * (c - a);
+            return divident / divisor;
+        }
+        if (x == c) {
+            return (c - a) / (b - a);
+        }
+        if (c < x && x <= b) {
+            double divident = (b - x) * (b - x);
+            double divisor = (b - a) * (b - c);
+            return 1 - (divident / divisor);
+        }
+        return 1;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For lower limit {@code a}, upper limit {@code b}, and mode {@code c},
+     * the mean is {@code (a + b + c) / 3}.
+     */
+    @Override
+    public double getNumericalMean() {
+        return (a + b + c) / 3;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For lower limit {@code a}, upper limit {@code b}, and mode {@code c},
+     * the variance is {@code (a^2 + b^2 + c^2 - a * b - a * c - b * c) / 18}.
+     */
+    @Override
+    public double getNumericalVariance() {
+        return (a * a + b * b + c * c - a * b - a * c - b * c) / 18;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The lower bound of the support is equal to the lower limit parameter
+     * {@code a} of the distribution.
+     *
+     * @return lower bound of the support
+     */
+    @Override
+    public double getSupportLowerBound() {
+        return a;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The upper bound of the support is equal to the upper limit parameter
+     * {@code b} of the distribution.
+     *
+     * @return upper bound of the support
+     */
+    @Override
+    public double getSupportUpperBound() {
+        return b;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double inverseCumulativeProbability(double p) {
+        if (p < 0 ||
+            p > 1) {
+            throw new DistributionException(DistributionException.OUT_OF_RANGE, p, 0, 1);
+        }
+        if (p == 0) {
+            return a;
+        }
+        if (p == 1) {
+            return b;
+        }
+        if (p < (c - a) / (b - a)) {
+            return a + Math.sqrt(p * (b - a) * (c - a));
+        }
+        return b - Math.sqrt((1 - p) * (b - a) * (b - c));
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/UniformContinuousDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/UniformContinuousDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/UniformContinuousDistribution.java
new file mode 100644
index 0000000..2bb9a0b
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/UniformContinuousDistribution.java
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.sampling.distribution.ContinuousSampler;
+import org.apache.commons.rng.sampling.distribution.ContinuousUniformSampler;
+
+/**
+ * Implementation of the <a href="http://en.wikipedia.org/wiki/Uniform_distribution_(continuous)">uniform distribution</a>.
+ */
+public class UniformContinuousDistribution extends AbstractContinuousDistribution {
+    private final double lower;
+    /** Upper bound of this distribution (exclusive). */
+    private final double upper;
+    
+    /**
+     * Create a standard uniform real distribution with lower bound (inclusive)
+     * equal to zero and upper bound (exclusive) equal to one.
+     */
+    public UniformContinuousDistribution() {
+        this(0, 1);
+    }
+
+    /**
+     * Creates a uniform distribution.
+     *
+     * @param lower Lower bound of this distribution (inclusive).
+     * @param upper Upper bound of this distribution (exclusive).
+     * @throws IllegalArgumentException if {@code lower >= upper}.
+     */
+    public UniformContinuousDistribution(double lower,
+                                         double upper) {
+        if (lower >= upper) {
+            throw new DistributionException(DistributionException.TOO_LARGE,
+                                            lower, upper);
+        }
+
+        this.lower = lower;
+        this.upper = upper;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double density(double x) {
+        if (x < lower ||
+            x > upper) {
+            return 0;
+        }
+        return 1 / (upper - lower);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double cumulativeProbability(double x)  {
+        if (x <= lower) {
+            return 0;
+        }
+        if (x >= upper) {
+            return 1;
+        }
+        return (x - lower) / (upper - lower);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double inverseCumulativeProbability(final double p) {
+        if (p < 0 ||
+            p > 1) {
+            throw new DistributionException(DistributionException.OUT_OF_RANGE, p, 0, 1);
+        }
+        return p * (upper - lower) + lower;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For lower bound {@code lower} and upper bound {@code upper}, the mean is
+     * {@code 0.5 * (lower + upper)}.
+     */
+    @Override
+    public double getNumericalMean() {
+        return 0.5 * (lower + upper);
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For lower bound {@code lower} and upper bound {@code upper}, the
+     * variance is {@code (upper - lower)^2 / 12}.
+     */
+    @Override
+    public double getNumericalVariance() {
+        double ul = upper - lower;
+        return ul * ul / 12;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The lower bound of the support is equal to the lower bound parameter
+     * of the distribution.
+     *
+     * @return lower bound of the support
+     */
+    @Override
+    public double getSupportLowerBound() {
+        return lower;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The upper bound of the support is equal to the upper bound parameter
+     * of the distribution.
+     *
+     * @return upper bound of the support
+     */
+    @Override
+    public double getSupportUpperBound() {
+        return upper;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public ContinuousDistribution.Sampler createSampler(final UniformRandomProvider rng) {
+        return new ContinuousDistribution.Sampler() {
+            /**
+             * Uniform distribution sampler.
+             */
+            private final ContinuousSampler sampler =
+                new ContinuousUniformSampler(rng, lower, upper);
+
+            /**{@inheritDoc} */
+            @Override
+            public double sample() {
+                return sampler.sample();
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/UniformDiscreteDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/UniformDiscreteDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/UniformDiscreteDistribution.java
new file mode 100644
index 0000000..41df2bd
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/UniformDiscreteDistribution.java
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.sampling.distribution.DiscreteSampler;
+import org.apache.commons.rng.sampling.distribution.DiscreteUniformSampler;
+
+/**
+ * Implementation of the <a href="http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)">
+ * uniform integer distribution</a>.
+ */
+public class UniformDiscreteDistribution extends AbstractDiscreteDistribution {
+    /** 1 / 12 **/
+    private static final double ONE_TWELFTH = 1 / 12d;
+    /** Lower bound (inclusive) of this distribution. */
+    private final int lower;
+    /** Upper bound (inclusive) of this distribution. */
+    private final int upper;
+    /** "upper" + "lower" (to avoid overflow). */
+    private final double upperPlusLower;
+    /** "upper" - "lower" (to avoid overflow). */
+    private final double upperMinusLower;
+
+    /**
+     * Creates a new uniform integer distribution using the given lower and
+     * upper bounds (both inclusive).
+     *
+     * @param lower Lower bound (inclusive) of this distribution.
+     * @param upper Upper bound (inclusive) of this distribution.
+     * @throws IllegalArgumentException if {@code lower > upper}.
+     */
+    public UniformDiscreteDistribution(int lower,
+                                       int upper) {
+        if (lower > upper) {
+            throw new DistributionException(DistributionException.TOO_LARGE,
+                                            lower, upper);
+        }
+        this.lower = lower;
+        this.upper = upper;
+        upperPlusLower = (double) upper + (double) lower;
+        upperMinusLower = (double) upper - (double) lower;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double probability(int x) {
+        if (x < lower || x > upper) {
+            return 0;
+        }
+        return 1 / (upperMinusLower + 1);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double cumulativeProbability(int x) {
+        if (x < lower) {
+            return 0;
+        }
+        if (x > upper) {
+            return 1;
+        }
+        return (x - lower + 1) / (upperMinusLower + 1);
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For lower bound {@code lower} and upper bound {@code upper}, the mean is
+     * {@code 0.5 * (lower + upper)}.
+     */
+    @Override
+    public double getNumericalMean() {
+        return 0.5 * upperPlusLower;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For lower bound {@code lower} and upper bound {@code upper}, and
+     * {@code n = upper - lower + 1}, the variance is {@code (n^2 - 1) / 12}.
+     */
+    @Override
+    public double getNumericalVariance() {
+        double n = upperMinusLower + 1;
+        return ONE_TWELFTH * (n * n - 1);
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The lower bound of the support is equal to the lower bound parameter
+     * of the distribution.
+     *
+     * @return lower bound of the support
+     */
+    @Override
+    public int getSupportLowerBound() {
+        return lower;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The upper bound of the support is equal to the upper bound parameter
+     * of the distribution.
+     *
+     * @return upper bound of the support
+     */
+    @Override
+    public int getSupportUpperBound() {
+        return upper;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+
+    /**{@inheritDoc} */
+    @Override
+    public DiscreteDistribution.Sampler createSampler(final UniformRandomProvider rng) {
+        return new DiscreteDistribution.Sampler() {
+            /**
+             * Discrete uniform distribution sampler.
+             */
+            private final DiscreteSampler sampler =
+                new DiscreteUniformSampler(rng, lower, upper);
+
+            /**{@inheritDoc} */
+            @Override
+            public int sample() {
+                return sampler.sample();
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/WeibullDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/WeibullDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/WeibullDistribution.java
new file mode 100644
index 0000000..0e396d8
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/WeibullDistribution.java
@@ -0,0 +1,220 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.gamma.LogGamma;
+
+/**
+ * Implementation of the Weibull distribution. This implementation uses the
+ * two parameter form of the distribution defined by
+ * <a href="http://mathworld.wolfram.com/WeibullDistribution.html">
+ * Weibull Distribution</a>, equations (1) and (2).
+ *
+ * @see <a href="http://en.wikipedia.org/wiki/Weibull_distribution">Weibull distribution (Wikipedia)</a>
+ * @see <a href="http://mathworld.wolfram.com/WeibullDistribution.html">Weibull distribution (MathWorld)</a>
+ *
+ * @since 1.1
+ */
+public class WeibullDistribution extends AbstractContinuousDistribution {
+    /** The shape parameter. */
+    private final double shape;
+    /** The scale parameter. */
+    private final double scale;
+
+    /**
+     * Creates a distribution.
+     *
+     * @param alpha Shape parameter.
+     * @param beta Scale parameter.
+     * @throws IllegalArgumentException if {@code alpha <= 0} or {@code beta <= 0}.
+     */
+    public WeibullDistribution(double alpha,
+                               double beta) {
+        if (alpha <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE,
+                                            alpha);
+        }
+        if (beta <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE,
+                                            beta);
+        }
+        scale = beta;
+        shape = alpha;
+    }
+
+    /**
+     * Access the shape parameter, {@code alpha}.
+     *
+     * @return the shape parameter, {@code alpha}.
+     */
+    public double getShape() {
+        return shape;
+    }
+
+    /**
+     * Access the scale parameter, {@code beta}.
+     *
+     * @return the scale parameter, {@code beta}.
+     */
+    public double getScale() {
+        return scale;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double density(double x) {
+        if (x < 0) {
+            return 0;
+        }
+
+        final double xscale = x / scale;
+        final double xscalepow = Math.pow(xscale, shape - 1);
+
+        /*
+         * Math.pow(x / scale, shape) =
+         * Math.pow(xscale, shape) =
+         * Math.pow(xscale, shape - 1) * xscale
+         */
+        final double xscalepowshape = xscalepow * xscale;
+
+        return (shape / scale) * xscalepow * Math.exp(-xscalepowshape);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double logDensity(double x) {
+        if (x < 0) {
+            return Double.NEGATIVE_INFINITY;
+        }
+
+        final double xscale = x / scale;
+        final double logxscalepow = Math.log(xscale) * (shape - 1);
+
+        /*
+         * Math.pow(x / scale, shape) =
+         * Math.pow(xscale, shape) =
+         * Math.pow(xscale, shape - 1) * xscale
+         */
+        final double xscalepowshape = Math.exp(logxscalepow) * xscale;
+
+        return Math.log(shape / scale) + logxscalepow - xscalepowshape;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double cumulativeProbability(double x) {
+        double ret;
+        if (x <= 0.0) {
+            ret = 0.0;
+        } else {
+            ret = 1.0 - Math.exp(-Math.pow(x / scale, shape));
+        }
+        return ret;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * Returns {@code 0} when {@code p == 0} and
+     * {@code Double.POSITIVE_INFINITY} when {@code p == 1}.
+     */
+    @Override
+    public double inverseCumulativeProbability(double p) {
+        double ret;
+        if (p < 0 ||
+            p > 1) {
+            throw new DistributionException(DistributionException.OUT_OF_RANGE, p, 0, 1);
+        } else if (p == 0) {
+            ret = 0.0;
+        } else  if (p == 1) {
+            ret = Double.POSITIVE_INFINITY;
+        } else {
+            ret = scale * Math.pow(-Math.log1p(-p), 1.0 / shape);
+        }
+        return ret;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The mean is {@code scale * Gamma(1 + (1 / shape))}, where {@code Gamma()}
+     * is the Gamma-function.
+     */
+    @Override
+    public double getNumericalMean() {
+        final double sh = getShape();
+        final double sc = getScale();
+
+        return sc * Math.exp(LogGamma.value(1 + (1 / sh)));
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The variance is {@code scale^2 * Gamma(1 + (2 / shape)) - mean^2}
+     * where {@code Gamma()} is the Gamma-function.
+     */
+    @Override
+    public double getNumericalVariance() {
+        final double sh = getShape();
+        final double sc = getScale();
+        final double mn = getNumericalMean();
+
+        return (sc * sc) * Math.exp(LogGamma.value(1 + (2 / sh))) -
+               (mn * mn);
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The lower bound of the support is always 0 no matter the parameters.
+     *
+     * @return lower bound of the support (always 0)
+     */
+    @Override
+    public double getSupportLowerBound() {
+        return 0;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The upper bound of the support is always positive infinity
+     * no matter the parameters.
+     *
+     * @return upper bound of the support (always
+     * {@code Double.POSITIVE_INFINITY})
+     */
+    @Override
+    public double getSupportUpperBound() {
+        return Double.POSITIVE_INFINITY;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ZipfDistribution.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ZipfDistribution.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ZipfDistribution.java
new file mode 100644
index 0000000..f0d54a1
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/ZipfDistribution.java
@@ -0,0 +1,236 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.sampling.distribution.DiscreteSampler;
+import org.apache.commons.rng.sampling.distribution.RejectionInversionZipfSampler;
+
+/**
+ * Implementation of the <a href="https://en.wikipedia.org/wiki/Zipf's_law">Zipf distribution</a>.
+ * <p>
+ * <strong>Parameters:</strong>
+ * For a random variable {@code X} whose values are distributed according to this
+ * distribution, the probability mass function is given by
+ * <pre>
+ *   P(X = k) = H(N,s) * 1 / k^s    for {@code k = 1,2,...,N}.
+ * </pre>
+ * {@code H(N,s)} is the normalizing constant
+ * which corresponds to the generalized harmonic number of order N of s.
+ * <ul>
+ * <li>{@code N} is the number of elements</li>
+ * <li>{@code s} is the exponent</li>
+ * </ul>
+ */
+public class ZipfDistribution extends AbstractDiscreteDistribution {
+    /** Number of elements. */
+    private final int numberOfElements;
+    /** Exponent parameter of the distribution. */
+    private final double exponent;
+    /** Cached values of the nth generalized harmonic. */
+    private final double nthHarmonic;
+
+    /**
+     * Creates a distribution.
+     *
+     * @param numberOfElements Number of elements.
+     * @param exponent Exponent.
+     * @exception IllegalArgumentException if {@code numberOfElements <= 0}
+     * or {@code exponent <= 0}.
+     */
+    public ZipfDistribution(int numberOfElements,
+                            double exponent) {
+        if (numberOfElements <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE,
+                                            numberOfElements);
+        }
+        if (exponent <= 0) {
+            throw new DistributionException(DistributionException.NEGATIVE,
+                                            exponent);
+        }
+
+        this.numberOfElements = numberOfElements;
+        this.exponent = exponent;
+        this.nthHarmonic = generalizedHarmonic(numberOfElements, exponent);
+    }
+
+    /**
+     * Get the number of elements (e.g. corpus size) for the distribution.
+     *
+     * @return the number of elements
+     */
+    public int getNumberOfElements() {
+        return numberOfElements;
+    }
+
+    /**
+     * Get the exponent characterizing the distribution.
+     *
+     * @return the exponent
+     */
+    public double getExponent() {
+        return exponent;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double probability(final int x) {
+        if (x <= 0 || x > numberOfElements) {
+            return 0;
+        }
+
+        return (1 / Math.pow(x, exponent)) / nthHarmonic;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double logProbability(int x) {
+        if (x <= 0 || x > numberOfElements) {
+            return Double.NEGATIVE_INFINITY;
+        }
+
+        return -Math.log(x) * exponent - Math.log(nthHarmonic);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double cumulativeProbability(final int x) {
+        if (x <= 0) {
+            return 0;
+        } else if (x >= numberOfElements) {
+            return 1;
+        }
+
+        return generalizedHarmonic(x, exponent) / nthHarmonic;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For number of elements {@code N} and exponent {@code s}, the mean is
+     * {@code Hs1 / Hs}, where
+     * <ul>
+     *  <li>{@code Hs1 = generalizedHarmonic(N, s - 1)},</li>
+     *  <li>{@code Hs = generalizedHarmonic(N, s)}.</li>
+     * </ul>
+     */
+    @Override
+    public double getNumericalMean() {
+        final int N = getNumberOfElements();
+        final double s = getExponent();
+
+        final double Hs1 = generalizedHarmonic(N, s - 1);
+        final double Hs = nthHarmonic;
+
+        return Hs1 / Hs;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * For number of elements {@code N} and exponent {@code s}, the mean is
+     * {@code (Hs2 / Hs) - (Hs1^2 / Hs^2)}, where
+     * <ul>
+     *  <li>{@code Hs2 = generalizedHarmonic(N, s - 2)},</li>
+     *  <li>{@code Hs1 = generalizedHarmonic(N, s - 1)},</li>
+     *  <li>{@code Hs = generalizedHarmonic(N, s)}.</li>
+     * </ul>
+     */
+    @Override
+    public double getNumericalVariance() {
+        final int N = getNumberOfElements();
+        final double s = getExponent();
+
+        final double Hs2 = generalizedHarmonic(N, s - 2);
+        final double Hs1 = generalizedHarmonic(N, s - 1);
+        final double Hs = nthHarmonic;
+
+        return (Hs2 / Hs) - ((Hs1 * Hs1) / (Hs * Hs));
+    }
+
+    /**
+     * Calculates the Nth generalized harmonic number. See
+     * <a href="http://mathworld.wolfram.com/HarmonicSeries.html">Harmonic
+     * Series</a>.
+     *
+     * @param n Term in the series to calculate (must be larger than 1)
+     * @param m Exponent (special case {@code m = 1} is the harmonic series).
+     * @return the n<sup>th</sup> generalized harmonic number.
+     */
+    private double generalizedHarmonic(final int n, final double m) {
+        double value = 0;
+        for (int k = n; k > 0; --k) {
+            value += 1 / Math.pow(k, m);
+        }
+        return value;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The lower bound of the support is always 1 no matter the parameters.
+     *
+     * @return lower bound of the support (always 1)
+     */
+    @Override
+    public int getSupportLowerBound() {
+        return 1;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The upper bound of the support is the number of elements.
+     *
+     * @return upper bound of the support
+     */
+    @Override
+    public int getSupportUpperBound() {
+        return getNumberOfElements();
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * The support of this distribution is connected.
+     *
+     * @return {@code true}
+     */
+    @Override
+    public boolean isSupportConnected() {
+        return true;
+    }
+
+    /**{@inheritDoc} */
+    @Override
+    public DiscreteDistribution.Sampler createSampler(final UniformRandomProvider rng) {
+        return new DiscreteDistribution.Sampler() {
+            /**
+             * Zipf distribution sampler.
+             */
+            private final DiscreteSampler sampler =
+                new RejectionInversionZipfSampler(rng, numberOfElements, exponent);
+
+            /**{@inheritDoc} */
+            @Override
+            public int sample() {
+                return sampler.sample();
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/main/java/commons/statistics/distribution/package-info.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/main/java/commons/statistics/distribution/package-info.java b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/package-info.java
new file mode 100644
index 0000000..98315c6
--- /dev/null
+++ b/commons-statistics-distribution/src/main/java/commons/statistics/distribution/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Implementations of common discrete and continuous distributions.
+ */
+package org.apache.commons.statistics.distribution;

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/AbstractContinuousDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/AbstractContinuousDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/AbstractContinuousDistributionTest.java
new file mode 100644
index 0000000..3e30763
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/AbstractContinuousDistributionTest.java
@@ -0,0 +1,209 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.math3.analysis.UnivariateFunction;
+import org.apache.commons.math3.analysis.integration.RombergIntegrator;
+import org.apache.commons.math3.analysis.integration.UnivariateIntegrator;
+import org.junit.Assert;
+import org.junit.Test;
+
+/** Various tests related to MATH-699. */
+public class AbstractContinuousDistributionTest {
+
+    @Test
+    public void testContinuous() {
+        final double x0 = 0.0;
+        final double x1 = 1.0;
+        final double x2 = 2.0;
+        final double x3 = 3.0;
+        final double p12 = 0.5;
+        final AbstractContinuousDistribution distribution;
+        distribution = new AbstractContinuousDistribution() {
+            private static final long serialVersionUID = 1L;
+
+            @Override
+            public double cumulativeProbability(final double x) {
+                if (x < x0 ||
+                    x > x3) {
+                    throw new DistributionException(DistributionException.OUT_OF_RANGE, x, x0, x3);
+                }
+                if (x <= x1) {
+                    return p12 * (x - x0) / (x1 - x0);
+                } else if (x <= x2) {
+                    return p12;
+                } else if (x <= x3) {
+                    return p12 + (1.0 - p12) * (x - x2) / (x3 - x2);
+                }
+                return 0.0;
+            }
+
+            @Override
+            public double density(final double x) {
+                if (x < x0 ||
+                    x > x3) {
+                    throw new DistributionException(DistributionException.OUT_OF_RANGE, x, x0, x3);
+                }
+                if (x <= x1) {
+                    return p12 / (x1 - x0);
+                } else if (x <= x2) {
+                    return 0.0;
+                } else if (x <= x3) {
+                    return (1.0 - p12) / (x3 - x2);
+                }
+                return 0.0;
+            }
+
+            @Override
+            public double getNumericalMean() {
+                return ((x0 + x1) * p12 + (x2 + x3) * (1.0 - p12)) / 2.0;
+            }
+
+            @Override
+            public double getNumericalVariance() {
+                final double meanX = getNumericalMean();
+                final double meanX2;
+                meanX2 = ((x0 * x0 + x0 * x1 + x1 * x1) * p12 + (x2 * x2 + x2
+                        * x3 + x3 * x3)
+                        * (1.0 - p12)) / 3.0;
+                return meanX2 - meanX * meanX;
+            }
+
+            @Override
+            public double getSupportLowerBound() {
+                return x0;
+            }
+
+            @Override
+            public double getSupportUpperBound() {
+                return x3;
+            }
+
+            @Override
+            public boolean isSupportConnected() {
+                return false;
+            }
+
+            @Override
+            public double probability(final double x) {
+                throw new UnsupportedOperationException();
+            }
+        };
+        final double expected = x1;
+        final double actual = distribution.inverseCumulativeProbability(p12);
+        Assert.assertEquals("", expected, actual, 1e-8);
+    }
+
+    @Test
+    public void testDiscontinuous() {
+        final double x0 = 0.0;
+        final double x1 = 0.25;
+        final double x2 = 0.5;
+        final double x3 = 0.75;
+        final double x4 = 1.0;
+        final double p12 = 1.0 / 3.0;
+        final double p23 = 2.0 / 3.0;
+        final AbstractContinuousDistribution distribution;
+        distribution = new AbstractContinuousDistribution() {
+            @Override
+            public double cumulativeProbability(final double x) {
+                if (x < x0 ||
+                    x > x4) {
+                    throw new DistributionException(DistributionException.OUT_OF_RANGE, x, x0, x4);
+                }
+                if (x <= x1) {
+                    return p12 * (x - x0) / (x1 - x0);
+                } else if (x <= x2) {
+                    return p12;
+                } else if (x <= x3) {
+                    return p23;
+                } else {
+                    return (1.0 - p23) * (x - x3) / (x4 - x3) + p23;
+                }
+            }
+
+            @Override
+            public double density(final double x) {
+                if (x < x0 ||
+                    x > x4) {
+                    throw new DistributionException(DistributionException.OUT_OF_RANGE, x, x0, x4);
+                }
+                if (x <= x1) {
+                    return p12 / (x1 - x0);
+                } else if (x <= x2) {
+                    return 0.0;
+                } else if (x <= x3) {
+                    return 0.0;
+                } else {
+                    return (1.0 - p23) / (x4 - x3);
+                }
+            }
+
+            @Override
+            public double getNumericalMean() {
+                final UnivariateFunction f = new UnivariateFunction() {
+
+                    @Override
+                    public double value(final double x) {
+                        return x * density(x);
+                    }
+                };
+                final UnivariateIntegrator integrator = new RombergIntegrator();
+                return integrator.integrate(Integer.MAX_VALUE, f, x0, x4);
+            }
+
+            @Override
+            public double getNumericalVariance() {
+                final double meanX = getNumericalMean();
+                final UnivariateFunction f = new UnivariateFunction() {
+
+                    @Override
+                    public double value(final double x) {
+                        return x * x * density(x);
+                    }
+                };
+                final UnivariateIntegrator integrator = new RombergIntegrator();
+                final double meanX2 = integrator.integrate(Integer.MAX_VALUE,
+                                                           f, x0, x4);
+                return meanX2 - meanX * meanX;
+            }
+
+            @Override
+            public double getSupportLowerBound() {
+                return x0;
+            }
+
+            @Override
+            public double getSupportUpperBound() {
+                return x4;
+            }
+
+            @Override
+            public boolean isSupportConnected() {
+                return false;
+            }
+
+            @Override
+            public double probability(final double x) {
+                throw new UnsupportedOperationException();
+            }
+        };
+        final double expected = x2;
+        final double actual = distribution.inverseCumulativeProbability(p23);
+        Assert.assertEquals("", expected, actual, 1e-8);
+    }
+}


[02/16] commons-statistics git commit: STATISTICS-2: Migrate "o.a.c.math4.distribution" from Commons Math.

Posted by er...@apache.org.
http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution.mac
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution.mac b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution.mac
new file mode 100644
index 0000000..d9ce678
--- /dev/null
+++ b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/gamma-distribution.mac
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * This Maxima script allows the creation of reference data for the Gamma
+ * distribution.
+ */
+
+/*
+ * Set floating-point accuracy to four times the double precision.
+ */
+fpprec : 64;
+
+/*
+ * Probability density function for Gamma distribution with shape parameter a
+ * and scale parameter b.
+ */
+p(x, a, b) := (x / b)**a * exp(-x / b) / x / gamma(a);
+
+/* 
+ * Make sure x is a list of exactly representable doubles: use only power-of-two
+ * fractions of unity.
+ */
+out :  openw("gamma-distribution-shape-1.csv");
+x : float(makelist(i / 32, i, 1, 3200));
+y : p(bfloat(x), 1, 1);
+printf(out, "~{~h, ~h~%~}", join(x, y));
+close(out);
+
+out :  openw("gamma-distribution-shape-8.csv");
+x : float(makelist(i / 32, i, 1, 3200));
+y : p(bfloat(x), 8, 1);
+printf(out, "~{~h, ~h~%~}", join(x, y));
+close(out);
+
+out :  openw("gamma-distribution-shape-10.csv");
+x : float(makelist(i / 4, i, 1, 400));
+y : p(bfloat(x), 10, 1);
+printf(out, "~{~h, ~h~%~}", join(x, y));
+close(out);
+
+out :  openw("gamma-distribution-shape-100.csv");
+x : float(append(makelist(i / 32, i, 1, 32 * 3), makelist(i + 3, i, 1, 297)));
+y : p(bfloat(x), 100, 1);
+printf(out, "~{~h, ~h~%~}", join(x, y));
+close(out);
+
+out :  openw("gamma-distribution-shape-142.csv");
+x : float(append(makelist(i / 32, i, 1, 32 * 10), makelist(i + 10, i, 1, 440)));
+y : p(bfloat(x), 142, 1);
+printf(out, "~{~h, ~h~%~}", join(x, y));
+close(out);
+
+out :  openw("gamma-distribution-shape-1000.csv");
+x : float(append(makelist(i / 32, i, 1, 32 * 10), makelist(i + 10, i, 1, 2990)));
+y : p(bfloat(x), 1000, 1);
+printf(out, "~{~h, ~h~%~}", join(x, y));
+close(out);
+

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/testData.txt
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/testData.txt b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/testData.txt
new file mode 100644
index 0000000..4a10132
--- /dev/null
+++ b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/testData.txt
@@ -0,0 +1,1000 @@
+4.038625496201205
+3.6485326248346936
+3.6651209675932845
+5.814896279561131
+5.384126469824717
+5.251190723365563
+4.465213440111648
+4.736608014129308
+5.566383814840726
+3.8872277480629114
+5.246598498086048
+3.7511487364188176
+6.733371385175343
+5.388632419618035
+6.036263402962769
+3.8105605069222905
+5.738599503606028
+4.994552792425298
+2.945504336988336
+4.095314381239862
+5.760924710543879
+3.889753944419315
+3.808861160991701
+5.084302950012555
+6.370292933705698
+5.9615431859588455
+4.8790354385481445
+4.068164663649243
+4.26491661935213
+5.911067976258105
+4.1316140545022115
+4.0479985648577115
+5.560425919351912
+5.7777862258090265
+4.6491664757229145
+5.322284766164775
+3.9643060017297818
+3.3374606422520423
+4.070818520139152
+5.162814971692577
+4.68959876937858
+5.729533112912969
+7.160010937980058
+5.154920628387343
+5.992604820701763
+5.317279162752973
+6.3388993007264
+4.38451874656454
+5.024014917973479
+3.7534872319471946
+5.042363342784924
+5.528064915562473
+4.645749024871185
+2.5572755520373756
+3.953716919712825
+3.479482401208564
+4.676100783445583
+4.602236051449888
+7.136692300563229
+3.2411466558895095
+4.188618724984135
+3.6403999184454445
+3.4104206071160776
+4.807963390662261
+4.039073733966207
+4.201017826594899
+4.381868005163936
+5.0635235098658935
+5.9840760229548735
+4.195400406346137
+5.649256144660377
+4.679088153774095
+4.169683379901892
+5.671299804360453
+6.159089864893807
+5.315685219074694
+6.3327786025390305
+5.57348047674858
+6.124073677151904
+4.599177837977919
+4.792320274522308
+5.670142645005109
+5.479531549270221
+4.7740747976996705
+4.99464290442364
+5.474337090086012
+5.232353744280737
+6.411298157619626
+4.757268066271138
+5.217779158748026
+5.07395379944902
+5.5759984176628965
+4.521182520094989
+5.738026445940142
+4.742204968903384
+4.670762511507285
+4.884925361512115
+3.2573282568729462
+4.548387675110013
+4.337950021352034
+3.7875587274144618
+3.6055586455442974
+7.361861332197413
+4.834945622163155
+6.019473054836964
+4.453304225895349
+3.258695681592217
+5.794572588445252
+3.706438851580378
+6.079300672323756
+4.828008457182361
+5.315261102210712
+3.981847695058188
+4.039767325290114
+5.790863349525503
+5.160671471128728
+4.835236459763434
+4.405281184174698
+6.036293520404953
+5.889067983920324
+4.645514887430352
+4.347244670972515
+6.447181244432997
+6.564267268399325
+5.1013992003059885
+4.123378901103389
+2.7101740954226283
+4.209200680057913
+5.085704888132955
+4.26810090240086
+5.54254381015526
+4.721081268239747
+6.890088385585999
+3.9983110493877954
+5.321006894021748
+4.316867375040024
+3.694764624577479
+5.453875921043777
+3.7798857421649927
+3.7228653199742623
+4.807698651287013
+3.953745662132547
+4.821189486606762
+4.453489509051613
+6.4517275696030225
+4.823034188588044
+4.722822481625316
+5.810689805246644
+2.79248319144007
+4.928162269110059
+4.661918219482871
+4.574123379557206
+5.241478194631993
+5.8345087395944155
+7.024415739565572
+3.5536052565954
+6.095523994939967
+5.714650096778455
+4.846741263282074
+6.002769586957791
+5.982356840660745
+5.045480762532407
+6.461077219605347
+4.806649266171423
+6.350848113862498
+6.402679936682352
+3.8190196431210914
+4.189064677946727
+4.868517260374518
+2.145198341547173
+5.9469461091347
+5.88772432287321
+4.258280909990726
+6.740134075161574
+4.6047650031608445
+3.9273659909763774
+4.291244045368331
+5.183827109845055
+5.696810583954774
+3.608472134466666
+4.169004030425733
+3.9965477474540467
+3.7571221568428017
+5.575534565152322
+5.0764208309825065
+5.3185446180363485
+5.157450995663762
+4.961815558094033
+5.687338919107788
+4.185906295178724
+4.382007991332045
+3.5280961455873676
+4.531506809760329
+4.5870808989545635
+4.1932173503939625
+7.213813469684956
+3.1814836225682908
+4.647297462243001
+5.223975935315364
+5.585001659776854
+5.120918864744974
+5.026571594328509
+6.348097968923147
+6.50023470519147
+5.712556147497515
+5.206026515338916
+5.749621140061565
+3.0714726650374033
+6.576852312067237
+7.873101351668455
+6.565410149266118
+6.42923283018875
+4.576910183319347
+4.891822273316748
+6.059357175219146
+3.5324494806223328
+5.02539429500825
+6.078049839679652
+4.395054417468175
+5.710022806162443
+5.577091376894232
+3.131753802875934
+5.4869998928318
+6.413992453090146
+6.368380820674971
+6.052068461844252
+5.480278219624535
+7.051236227914206
+4.748415087916627
+4.559239556696287
+4.780665068784505
+5.349223485326002
+4.522305152002386
+5.678473361027541
+6.734219964637535
+6.713281662687456
+6.22214905332774
+5.716102543806569
+6.336616632829493
+4.8399311234283635
+5.811391244308217
+4.3965755331585905
+5.297963707368242
+5.021726117260926
+4.497125082388555
+4.735667209277485
+6.048804114181307
+4.264048138073914
+7.181013762432201
+4.781684059171574
+5.779533272721499
+4.164421460389599
+3.6986809242837757
+4.8415576143236185
+4.924528568365373
+4.758045335351253
+5.628351489493518
+5.7967639104855415
+4.491988822693669
+2.776750089391839
+4.704679957076673
+4.039607278211126
+5.660350110077993
+4.955611684289963
+3.0641653090331107
+4.896101875253389
+3.6528358436331603
+5.552472713484715
+4.857203367367906
+6.698826102960048
+4.485176970803183
+3.359916665137426
+4.036570806638963
+3.48793689188148
+4.19214761961293
+3.9792199677002866
+6.760873252923419
+4.333561067615548
+5.018626873497648
+3.377671327382937
+4.426183834007672
+8.806961710969402
+5.2068790380550265
+5.483008251803699
+4.287267636533901
+5.931330465014387
+5.257260104496106
+4.623908313559696
+4.365112456604631
+5.600514050451817
+6.184093404453588
+4.9116883675838485
+6.019780977080248
+7.485280872899538
+3.5982660410679284
+4.232210941334369
+5.446496617538108
+6.487976163896015
+3.3960660696641156
+4.733884295853101
+5.352545256764909
+4.107747627715545
+3.949506252011129
+5.017847997679714
+4.24906287118262
+6.720303792581198
+5.832137142236708
+5.010377506040941
+6.458070081692352
+6.501223021355141
+4.612768564431788
+3.801740464538825
+4.469721893125596
+5.061713024524103
+6.872685648715577
+6.145993249521355
+4.638532388190405
+4.70471535512485
+6.417576222531886
+4.118577249932789
+4.431328683019108
+4.747884983644578
+4.495605382683923
+3.5972439735401767
+5.210796056817244
+2.9160129894156026
+3.4596190721900797
+3.972452277026154
+5.5237190584690214
+6.104711796147512
+4.787324556447702
+4.548676032231089
+6.356843891618192
+3.6148998030697816
+4.760679260180754
+4.698041709266617
+4.244003753086054
+5.595546833817678
+3.2784025595193267
+5.326657347561453
+6.213858447402109
+5.213011705084566
+7.232075882741927
+4.806572191866972
+4.680144670146755
+3.946663831660007
+3.6143084085883554
+7.789315918667734
+7.099181638561095
+3.672742516732736
+5.953845998789752
+6.28847712720666
+6.946689084108734
+6.325454389782429
+4.334133006331358
+3.039424552213366
+4.847328734611504
+4.249781519880862
+6.126424188695286
+3.3823135936253257
+6.3280255743100025
+6.150431997847958
+5.4226742397784005
+5.94864601826791
+4.425906835511732
+4.897545227095195
+6.26027333638832
+3.647858418615367
+5.276322437292433
+4.176876069581277
+4.346107259567459
+3.1384418250329995
+4.212957347421948
+4.637757894698186
+6.535589923573854
+5.193072556110316
+5.017309492685374
+5.1750466093509
+4.6381038872450375
+6.071604634493695
+4.357240286904764
+5.122391923621759
+6.556903940099011
+3.8006848201076036
+4.522363890394659
+6.2456602471550635
+5.829300589393535
+4.452647643620209
+5.371890862621703
+4.948677662633424
+5.661113800822228
+5.773629402623548
+6.139823333391851
+6.093004328053013
+5.362399773949667
+6.915042845179306
+5.394739321037944
+5.141451574018252
+5.053294383161769
+4.9834920876470665
+6.812746808763125
+3.5705971688428266
+4.664119854301202
+6.310596552569324
+5.674835228932813
+3.4639740645984807
+4.788956793299906
+5.1005488900135845
+4.534989910256703
+3.931742089464332
+3.572625977535623
+5.374511045697475
+3.859408179493194
+5.767053789854141
+5.1414168750827285
+4.7490168496463525
+7.481142748403815
+4.5189492261011575
+5.40235395980428
+6.700234279658992
+3.5063554778412183
+3.9690452319798735
+3.00630763890251
+7.23611608840341
+5.018006325958164
+4.523410620276403
+4.076684362167451
+5.916234395538267
+7.047286572236027
+3.8682363461132017
+4.390658924201581
+4.5292330092964255
+5.07906584568947
+4.671213490610071
+4.095193931403399
+4.054590162572947
+3.2227278245030027
+6.132646335444107
+2.8407359953623814
+4.7279370282096655
+5.593872406613741
+3.382542536766184
+5.85844025043303
+6.461000354065181
+3.4994741020969773
+4.132683344034104
+5.647894883473891
+5.011301190267978
+4.401435886120444
+3.3496957519609927
+6.119687677370172
+4.644762759286699
+4.5205629205178735
+3.0320051244977195
+4.596487037061894
+5.14520534308978
+5.282269168918912
+5.761372455401502
+4.148416743583162
+6.372742039103559
+5.649143130777574
+5.084494528193606
+4.811163551671385
+3.9806520282362476
+4.411511792047385
+4.670987670787611
+5.768451736319585
+3.984558689428816
+5.3293696591099975
+5.413539058295544
+6.40970782426591
+5.481145473625602
+4.36515208836978
+5.161811987273001
+3.963554978392394
+5.098946908474979
+7.786683053797615
+4.927631219070586
+5.524180021898693
+4.523736107490982
+3.557364094609177
+6.128701594561169
+4.2509207146594115
+3.944944115965259
+4.966138264389299
+5.394430219583224
+6.77531735530901
+4.128069102169693
+5.2683457909620355
+3.8872836447608496
+4.486696800422189
+6.5335585640393825
+4.916400608546338
+4.270979919569207
+4.311416898242187
+4.498167295277512
+6.132808180917634
+5.1041291367018875
+5.498388642491546
+5.584526454067219
+6.142894025331306
+4.944671156061267
+4.1686843376349945
+4.818977261651865
+6.235820918635881
+3.3212806573760028
+5.68435151611855
+6.189749316228399
+3.591267557367338
+5.043902793214377
+7.818905185451641
+4.768708643560666
+5.669288800286096
+6.398657810380692
+5.3717200778027605
+5.2573487416126525
+4.822935237131512
+6.182572962936934
+5.6072955002277105
+3.9675191626756288
+6.350858167126948
+6.283995295688788
+4.445782391191543
+6.877548745307459
+5.3208290700871315
+6.09847688940267
+6.434994026138841
+4.32779758193763
+7.2924037238697
+5.419935895280957
+4.288818201810987
+7.242433265647824
+4.947890367713541
+5.916218606455959
+6.490437527083841
+4.617582424838291
+7.957708355752131
+4.879357620439287
+6.103294400805588
+5.639488259504568
+4.335236791293937
+5.202542624850618
+5.4406339076225505
+5.782530244910674
+4.055314639567904
+5.552293301411749
+5.290496801505254
+4.022580394801182
+4.625571974654451
+5.5086593656510825
+4.913637297182931
+4.906396844626936
+6.439485089212817
+5.7942799739945325
+7.158136207286507
+4.280431104751667
+3.9206066719991517
+5.127791240556268
+6.70098532482022
+4.657147097255419
+4.524267698037553
+4.647534545829241
+4.839690189371444
+6.798322548455047
+5.094754599613737
+5.916399329150566
+5.767837713902285
+5.294550523894544
+4.161295164684424
+5.233358678928891
+5.546871474458429
+4.897048191655597
+3.939430251326603
+5.005888208270397
+3.2926576330038655
+4.0159694347757835
+5.056229917378723
+6.568879235955665
+4.497327615853924
+4.690014685240942
+4.746884105330737
+4.841384111334085
+4.14796180246966
+5.461902744235217
+5.869304766250897
+3.52354738655413
+5.582741221891035
+4.997825621424692
+5.439611672191855
+4.819402835865619
+5.76136287301575
+6.143090288547951
+5.976125217642891
+6.157007787875113
+4.912778652906766
+6.540414953620538
+3.8210262932626495
+4.727149320768898
+4.955255599543759
+5.7983414047818265
+5.167409288825197
+5.059246623397723
+6.965380962189423
+5.531311904089661
+5.4022568784996885
+4.344352255655229
+5.745261070226892
+5.118820012265567
+4.960430609470355
+4.487905086804239
+3.8537512154805835
+4.839114062528739
+5.367538410451759
+6.202050661574205
+4.001800559371117
+6.119617239220475
+3.236283913097008
+5.610134770285298
+5.757041556538514
+4.083399027093518
+5.055588718117847
+4.580930359877383
+6.545516697552579
+5.916270431823864
+3.761559453909257
+6.037777237143994
+7.29718541816528
+4.8965176227762734
+3.941358569293476
+3.9289815988008847
+3.2604315357316436
+4.639329221347256
+6.570997662310685
+3.851958625190621
+5.859087244914328
+4.647365626452129
+6.076778087850363
+4.627936340272149
+4.422345848512504
+6.2183675417422
+5.243889853389288
+5.90909311946919
+6.09260484846961
+6.0271781583360475
+6.913810502971691
+5.285845705409185
+5.318460367681083
+5.179580543035928
+4.6834977896331615
+5.382546996207003
+4.606307320228796
+4.038858683454586
+6.271279252908354
+6.0668723017439365
+5.713564644555386
+5.144428649779485
+5.2496039700779615
+3.8392027391676207
+4.7050632415088876
+7.137275712725372
+4.208879180827962
+4.81480733241727
+4.699941077536472
+4.423440083005291
+5.742161495602944
+4.592506326637019
+6.224046541049566
+4.611093653533141
+6.1166037746546165
+5.904004955760586
+5.589433336321981
+4.57489510266225
+5.500028469975376
+4.382479722617695
+4.257470376496386
+6.373209588018213
+5.375461447759072
+2.8662337475774584
+4.699832117278568
+3.102810935311515
+6.501460955698313
+4.550333534073201
+7.944860661426514
+5.69020177364993
+4.006199611798767
+5.11813341012065
+4.896479097282944
+4.816212778128475
+4.940296064591277
+5.419056166663748
+3.4659391357743616
+7.246324501631043
+5.907112751874067
+5.614502217435809
+4.750614593197476
+7.0951293897280205
+4.3819944682346055
+4.958360318480322
+4.962367933857186
+5.715499159595656
+5.220101872658552
+6.088622700649866
+5.491586360474799
+4.656477235994459
+3.8695533953710326
+3.7143742249025538
+3.7411936672155304
+6.603415889834424
+5.62928670505705
+5.5959396553858785
+5.6577330557176095
+6.003846653929077
+4.508563176717718
+5.549881486113916
+4.953305865372426
+6.203554032873964
+5.612208234244517
+4.854464793588011
+5.263585016371758
+3.897600440182904
+5.981235398882815
+5.531277293213279
+4.8817070690071445
+3.712544699529063
+3.513432242611217
+5.006035295792077
+7.124520658535316
+3.4782033127607037
+4.829578059223972
+5.742892584711905
+4.361333503197903
+4.601687049512891
+6.035189727259647
+4.711273209758127
+4.272043208125593
+4.447702393976457
+5.17487393756583
+4.741015989802225
+4.953808452791662
+4.6645084492292765
+4.276788530554644
+7.325515154525428
+4.602597440231014
+5.082884146093998
+3.068409439905545
+4.809983425115099
+3.8747882947708083
+4.893233436073575
+5.376932606908371
+6.239910432522629
+6.041695571547008
+5.317735375674715
+5.160517819092331
+5.283748111202239
+6.5357867130743745
+5.537247902605441
+5.4185896683530235
+5.287616337544387
+5.981700012459223
+5.992385624329782
+5.758772999982491
+4.599744432168506
+5.7237660286844605
+2.5862937961454855
+4.319918124665613
+7.566860260437548
+3.202784785619934
+6.67642720284947
+5.215802050091852
+5.452814592454087
+4.192858032386887
+5.299199379721475
+3.291677765243241
+4.632695766333648
+5.115714853147839
+4.996260485718097
+3.5271286032511773
+4.659715887897552
+6.587392147323261
+5.989132075359954
+3.8378063660060056
+4.975951043892332
+3.90853196371359
+5.708783809093124
+6.591895462100242
+5.653528117636727
+3.665428787393319
+4.324537690925271
+6.234413976864244
+4.053504794002944
+5.713371183460703
+4.670243561862966
+3.352660528859447
+4.020147292531281
+5.121933145078237
+4.282377411958472
+4.088770874857499
+4.275716553910016
+4.284046155337823
+6.449567142111275
+3.3275914286077084
+4.837717853228399
+5.261182985672333
+6.073443097165901
+5.40483608136289
+4.690566013556853
+4.222184746341714
+5.790245443382679
+5.020060832906476
+5.576527321711127
+5.340393035828579
+5.301460661931292
+5.076040366457228
+6.296482877500045
+3.037720796600903
+6.321850760102656
+5.701339165316606
+4.991940459105436
+5.758970102557518
+4.322111367356909
+5.721255109646473
+5.511881303620453
+4.9563635195228954
+6.861001584068987
+3.8299029968884195
+4.322974731453332
+5.3047403550360634
+6.0756269754391825
+6.117153630436378
+4.5085862451026495
+4.832132638553977
+4.699215334058029
+7.982648077178181
+3.303778194960711
+6.845166964779691
+5.175136241842978
+5.611538016661082
+4.293354218279116
+6.2617605857039775
+4.646868778200023
+5.596211970851805
+6.4731028962866635
+5.9737535333484795
+6.411386536458501
+2.7695062051965302
+3.5560570906765894
+5.451690061978083
+6.503535887841675
+4.695530301460264
+4.706120568510652
+2.800841111510871
+5.364729318170148
+5.1911558656154835
+5.947415408072919
+4.777513714112934
+4.596459418828304
+5.043317097051506
+5.174749896541634
+5.258257882159918
+3.887023257269741
+5.131383317673293
+5.843231353166214
+6.472487193651527
+5.763704927517821
+6.024396779444038
+4.926879229092987
+6.558645082464584
+5.447575064546803
+4.286751335276036
+3.9071252303818644
+4.618489035299945
+5.088217807208579
+3.808752600228301
+5.861810119867259
+4.033532296400091
+5.74542761207288
+4.925806147050348
+3.679404591586196
+4.05604604887352
+5.87881882930846
+4.513573760688276
+4.915009783906388
+3.654483449601882
+4.912095784340134
+3.3774256594506396
+4.188548007093734
+5.4860540834510445
+4.483111427918742
+6.091604204270534
+4.913639044459108
+6.347957296069254
+5.777137740280461
+4.996625717628335
+3.357832000765961
+4.529640780144531
+6.655383658310578
+5.187418414545693
+5.275067584707507
+5.50723064248028
+4.636201988408981
+4.947416066568987
+7.027581910469225
+4.570962245627946
+5.947355941474328
+4.7057667163042245
+4.786943520378938
+5.615852784022176
+4.645129057815488
+5.263882354785195
+3.844951724466573
+5.554260404852657
+4.684091248268045
+5.13336102667963
+3.417837773686996
+4.392489033666552
+6.270027300253521
+6.102372796945901
+4.219653651099504
+5.076173402237902
+4.383422445264855
+3.0437995085361025
+5.377941796580727
+6.276975902314367
+4.315133675763909
+5.507204150696545
+4.886780791403244
+7.147240935203286
+3.900457465197911
+5.102470142455588
+7.084247234995372
+5.457300111792919
+4.60867925423519
+6.2840312118540815
+7.236947706509271
+7.133509547170027
+4.3015318378968
+5.043756433592529
+5.108881706267525
+5.5240023845728645
+5.858632364389344
+5.981971317600007
+6.259948473084726
+4.062783955426871
+5.218852203995356
+3.8038254404258813
+4.758585778361602
+4.376196481713867
+4.458880802424765
+3.96326498727664
+3.6778134622710104
+4.374934998721925
+7.489468914416122
+5.700987063590436
+3.3100952240676955
+5.1696122166092415
+6.541584919841012
+4.4595571152023465
+4.366611842258099
+5.382259676070623
+4.7794428978336825
+3.757838857759169
+6.545307984939696
+4.881890171568036
+5.7063933726311165
+4.7730257133517116
+3.873677842944983
+3.840259191338565
+4.593661080441791
+4.511107632929962
+5.5385052402039605
+5.441167937479936
+5.984890322415174
+5.403820054129332
+5.148546201719365
+4.838476271562129
+6.2440438844133075
+3.9741885421050913
+6.327490860577795
+4.633940514497735
+5.232122748521683
+4.456999940494487
+5.576626928088951
+3.2818610857426584
+5.134684374559793
+4.602466559265273
+5.891324885962796
+5.517816321593768
+6.624687761337339
+5.2683180340267874
+4.662418552035468
+4.622236368091395
+5.536060664096081
+3.272870360657461
+3.9899131914173696
+5.121549579739896
+5.928806028927443
+4.259133981719825
+5.313734011651727
+5.635277610987355
+4.524627655490917

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 3422571..39cae27 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
   <version>0.1-SNAPSHOT</version>
   <name>Apache Commons Statistics</name>
 
-  <inceptionYear>2016</inceptionYear>
+  <inceptionYear>2018</inceptionYear>
   <description>The Apache Commons Statistics project provides tools for statistics.</description>
   <url>http://commons.apache.org/proper/commons-statistics/</url>
 
@@ -63,15 +63,6 @@
   <contributors>
   </contributors>
 
-  <dependencies>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.12</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
   <properties>
     <!-- Do not change: "statistics" is the name of the component even if the
          name of the base package evolves with major release numbers
@@ -128,8 +119,60 @@
         Temporary workaround?
     -->
     <commons.release.name>commons-statistics-${project.version}</commons.release.name>
+    <statistics.commons.rng.version>1.0</statistics.commons.rng.version>
+    <statistics.commons.numbers.version>1.0-SNAPSHOT</statistics.commons.numbers.version> <!-- XXX -->
+    <statistics.commons.math3.version>3.6.1</statistics.commons.math3.version>
   </properties>
 
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.apache.commons</groupId>
+        <artifactId>commons-rng-client-api</artifactId>
+        <version>${statistics.commons.rng.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.commons</groupId>
+        <artifactId>commons-rng-simple</artifactId>
+        <version>${statistics.commons.rng.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.commons</groupId>
+        <artifactId>commons-rng-sampling</artifactId>
+        <version>1.1-SNAPSHOT</version> <!-- XXX -->
+      </dependency>
+      <dependency>
+        <groupId>org.apache.commons</groupId>
+        <artifactId>commons-numbers-core</artifactId>
+        <version>${statistics.commons.numbers.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.commons</groupId>
+        <artifactId>commons-numbers-combinatorics</artifactId>
+        <version>${statistics.commons.numbers.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.commons</groupId>
+        <artifactId>commons-numbers-gamma</artifactId>
+        <version>${statistics.commons.numbers.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.commons</groupId>
+        <artifactId>commons-math3</artifactId>
+        <version>${statistics.commons.math3.version}</version>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.12</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
   <build>
     <plugins>
       <plugin>
@@ -535,7 +578,7 @@
   </profiles>
 
   <modules>
-<!--    <module>commons-statistics-distribution</module> -->
+    <module>commons-statistics-distribution</module>
 <!--    <module>commons-statistics-regression</module> -->
   </modules>
 


[09/16] commons-statistics git commit: STATISTICS-2: Migrate "o.a.c.math4.distribution" from Commons Math.

Posted by er...@apache.org.
http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ExponentialDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ExponentialDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ExponentialDistributionTest.java
new file mode 100644
index 0000000..649ce7a
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ExponentialDistributionTest.java
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.core.Precision;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for ExponentialDistribution.
+ * Extends ContinuousDistributionAbstractTest.  See class javadoc for
+ * ContinuousDistributionAbstractTest for details.
+ *
+ */
+public class ExponentialDistributionTest extends ContinuousDistributionAbstractTest {
+
+    // --------------------- Override tolerance  --------------
+    @Override
+    public void setUp() {
+        super.setUp();
+        setTolerance(1e-9);
+    }
+
+    //-------------- Implementations for abstract methods -----------------------
+
+    /** Creates the default continuous distribution instance to use in tests. */
+    @Override
+    public ExponentialDistribution makeDistribution() {
+        return new ExponentialDistribution(5.0);
+    }
+
+    /** Creates the default cumulative probability distribution test input values */
+    @Override
+    public double[] makeCumulativeTestPoints() {
+        // quantiles computed using R version 2.9.2
+        return new double[] {0.00500250166792, 0.0502516792675, 0.126589039921, 0.256466471938,
+                             0.526802578289, 34.5387763949, 23.0258509299, 18.4443972706, 14.9786613678, 11.5129254650};
+    }
+
+    /** Creates the default cumulative probability density test expected values */
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] {0.001, 0.01, 0.025, 0.05, 0.1, 0.999,
+                             0.990, 0.975, 0.950, 0.900};
+    }
+
+    /** Creates the default probability density test expected values */
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] {0.1998, 0.198, 0.195, 0.19, 0.18, 0.000200000000000,
+                             0.00200000000002, 0.00499999999997, 0.00999999999994, 0.0199999999999};
+    }
+
+    //------------ Additional tests -------------------------------------------
+
+    @Test
+    public void testCumulativeProbabilityExtremes() {
+        setCumulativeTestPoints(new double[] {-2, 0});
+        setCumulativeTestValues(new double[] {0, 0});
+        verifyCumulativeProbabilities();
+    }
+
+    @Test
+    public void testInverseCumulativeProbabilityExtremes() {
+         setInverseCumulativeTestPoints(new double[] {0, 1});
+         setInverseCumulativeTestValues(new double[] {0, Double.POSITIVE_INFINITY});
+         verifyInverseCumulativeProbabilities();
+    }
+
+    @Test
+    public void testCumulativeProbability2() {
+        double actual = getDistribution().probability(0.25, 0.75);
+        Assert.assertEquals(0.0905214, actual, 10e-4);
+    }
+
+    @Test
+    public void testDensity() {
+        ExponentialDistribution d1 = new ExponentialDistribution(1);
+        Assert.assertTrue(Precision.equals(0.0, d1.density(-1e-9), 1));
+        Assert.assertTrue(Precision.equals(1.0, d1.density(0.0), 1));
+        Assert.assertTrue(Precision.equals(0.0, d1.density(1000.0), 1));
+        Assert.assertTrue(Precision.equals(Math.exp(-1), d1.density(1.0), 1));
+        Assert.assertTrue(Precision.equals(Math.exp(-2), d1.density(2.0), 1));
+
+        ExponentialDistribution d2 = new ExponentialDistribution(3);
+        Assert.assertTrue(Precision.equals(1/3.0, d2.density(0.0), 1));
+        // computed using  print(dexp(1, rate=1/3), digits=10) in R 2.5
+        Assert.assertEquals(0.2388437702, d2.density(1.0), 1e-8);
+
+        // computed using  print(dexp(2, rate=1/3), digits=10) in R 2.5
+        Assert.assertEquals(0.1711390397, d2.density(2.0), 1e-8);
+    }
+
+    @Test
+    public void testMeanAccessors() {
+        ExponentialDistribution distribution = (ExponentialDistribution) getDistribution();
+        Assert.assertEquals(5d, distribution.getMean(), Double.MIN_VALUE);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition1() {
+        new ExponentialDistribution(0);
+    }
+
+    @Test
+    public void testMoments() {
+        final double tol = 1e-9;
+        ExponentialDistribution dist;
+
+        dist = new ExponentialDistribution(11d);
+        Assert.assertEquals(dist.getNumericalMean(), 11d, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), 11d * 11d, tol);
+
+        dist = new ExponentialDistribution(10.5d);
+        Assert.assertEquals(dist.getNumericalMean(), 10.5d, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), 10.5d * 10.5d, tol);
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/FDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/FDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/FDistributionTest.java
new file mode 100644
index 0000000..b29a0be
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/FDistributionTest.java
@@ -0,0 +1,150 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for FDistribution.
+ * Extends ContinuousDistributionAbstractTest.  See class javadoc for
+ * ContinuousDistributionAbstractTest for details.
+ *
+ */
+public class FDistributionTest extends ContinuousDistributionAbstractTest {
+
+    //-------------- Implementations for abstract methods -----------------------
+
+    /** Creates the default continuous distribution instance to use in tests. */
+    @Override
+    public FDistribution makeDistribution() {
+        return new FDistribution(5.0, 6.0);
+    }
+
+    /** Creates the default cumulative probability distribution test input values */
+    @Override
+    public double[] makeCumulativeTestPoints() {
+        // quantiles computed using R version 2.9.2
+        return new double[] {0.0346808448626, 0.0937009113303, 0.143313661184, 0.202008445998, 0.293728320107,
+                             20.8026639595, 8.74589525602, 5.98756512605, 4.38737418741, 3.10751166664};
+    }
+
+    /** Creates the default cumulative probability density test expected values */
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] {0.001, 0.01, 0.025, 0.05, 0.1, 0.999, 0.990, 0.975, 0.950, 0.900};
+    }
+
+    /** Creates the default probability density test expected values */
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] {0.0689156576706, 0.236735653193, 0.364074131941, 0.481570789649, 0.595880479994,
+                             0.000133443915657, 0.00286681303403, 0.00969192007502, 0.0242883861471, 0.0605491314658};
+    }
+
+    // --------------------- Override tolerance  --------------
+    @Override
+    public void setUp() {
+        super.setUp();
+        setTolerance(1e-9);
+    }
+
+    //---------------------------- Additional test cases -------------------------
+
+    @Test
+    public void testCumulativeProbabilityExtremes() {
+        setCumulativeTestPoints(new double[] {-2, 0});
+        setCumulativeTestValues(new double[] {0, 0});
+        verifyCumulativeProbabilities();
+    }
+
+    @Test
+    public void testInverseCumulativeProbabilityExtremes() {
+        setInverseCumulativeTestPoints(new double[] {0, 1});
+        setInverseCumulativeTestValues(new double[] {0, Double.POSITIVE_INFINITY});
+        verifyInverseCumulativeProbabilities();
+    }
+
+    @Test
+    public void testDfAccessors() {
+        FDistribution dist = (FDistribution) getDistribution();
+        Assert.assertEquals(5d, dist.getNumeratorDegreesOfFreedom(), Double.MIN_VALUE);
+        Assert.assertEquals(6d, dist.getDenominatorDegreesOfFreedom(), Double.MIN_VALUE);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition1() {
+        new FDistribution(0, 1);
+    }
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition2() {
+        new FDistribution(1, 0);
+    }
+
+    @Test
+    public void testLargeDegreesOfFreedom() {
+        FDistribution fd = new FDistribution(100000, 100000);
+        double p = fd.cumulativeProbability(.999);
+        double x = fd.inverseCumulativeProbability(p);
+        Assert.assertEquals(.999, x, 1.0e-5);
+    }
+
+    @Test
+    public void testSmallDegreesOfFreedom() {
+        FDistribution fd = new FDistribution(1, 1);
+        double p = fd.cumulativeProbability(0.975);
+        double x = fd.inverseCumulativeProbability(p);
+        Assert.assertEquals(0.975, x, 1.0e-5);
+
+        fd = new FDistribution(1, 2);
+        p = fd.cumulativeProbability(0.975);
+        x = fd.inverseCumulativeProbability(p);
+        Assert.assertEquals(0.975, x, 1.0e-5);
+    }
+
+    @Test
+    public void testMoments() {
+        final double tol = 1e-9;
+        FDistribution dist;
+
+        dist = new FDistribution(1, 2);
+        Assert.assertTrue(Double.isNaN(dist.getNumericalMean()));
+        Assert.assertTrue(Double.isNaN(dist.getNumericalVariance()));
+
+        dist = new FDistribution(1, 3);
+        Assert.assertEquals(dist.getNumericalMean(), 3d / (3d - 2d), tol);
+        Assert.assertTrue(Double.isNaN(dist.getNumericalVariance()));
+
+        dist = new FDistribution(1, 5);
+        Assert.assertEquals(dist.getNumericalMean(), 5d / (5d - 2d), tol);
+        Assert.assertEquals(dist.getNumericalVariance(), (2d * 5d * 5d * 4d) / 9d, tol);
+    }
+
+    @Test
+    public void testMath785() {
+        // this test was failing due to inaccurate results from ContinuedFraction.
+
+        try {
+            double prob = 0.01;
+            FDistribution f = new FDistribution(200000, 200000);
+            double result = f.inverseCumulativeProbability(prob);
+            Assert.assertTrue(result < 1.0);
+        } catch (Exception e) {
+            Assert.fail("Failing to calculate inverse cumulative probability");
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/GammaDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/GammaDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/GammaDistributionTest.java
new file mode 100644
index 0000000..b25f251
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/GammaDistributionTest.java
@@ -0,0 +1,354 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import org.apache.commons.numbers.gamma.LanczosApproximation;
+import org.apache.commons.math3.stat.descriptive.SummaryStatistics;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for GammaDistribution.
+ * Extends ContinuousDistributionAbstractTest.  See class javadoc for
+ * ContinuousDistributionAbstractTest for details.
+ *
+ */
+public class GammaDistributionTest extends ContinuousDistributionAbstractTest {
+
+    //-------------- Implementations for abstract methods -----------------------
+
+    /** Creates the default continuous distribution instance to use in tests. */
+    @Override
+    public GammaDistribution makeDistribution() {
+        return new GammaDistribution(4d, 2d);
+    }
+
+    /** Creates the default cumulative probability distribution test input values */
+    @Override
+    public double[] makeCumulativeTestPoints() {
+        // quantiles computed using R version 2.9.2
+        return new double[] {0.857104827257, 1.64649737269, 2.17973074725, 2.7326367935, 3.48953912565,
+                             26.1244815584, 20.0902350297, 17.5345461395, 15.5073130559, 13.3615661365};
+    }
+
+    /** Creates the default cumulative probability density test expected values */
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] {0.001, 0.01, 0.025, 0.05, 0.1, 0.999, 0.990, 0.975, 0.950, 0.900};
+    }
+
+    /** Creates the default probability density test expected values */
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] {0.00427280075546, 0.0204117166709, 0.0362756163658, 0.0542113174239, 0.0773195272491,
+                             0.000394468852816, 0.00366559696761, 0.00874649473311, 0.0166712508128, 0.0311798227954};
+    }
+
+    // --------------------- Override tolerance  --------------
+    @Override
+    public void setUp() {
+        super.setUp();
+        setTolerance(1e-9);
+    }
+
+    //---------------------------- Additional test cases -------------------------
+    @Test
+    public void testParameterAccessors() {
+        GammaDistribution distribution = (GammaDistribution) getDistribution();
+        Assert.assertEquals(4d, distribution.getShape(), 0);
+        Assert.assertEquals(2d, distribution.getScale(), 0);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition1() {
+        new GammaDistribution(0, 1);
+    }
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition2() {
+        new GammaDistribution(1, 0);
+    }
+
+    @Test
+    public void testProbabilities() {
+        testProbability(-1.000, 4.0, 2.0, .0000);
+        testProbability(15.501, 4.0, 2.0, .9499);
+        testProbability(0.504, 4.0, 1.0, .0018);
+        testProbability(10.011, 1.0, 2.0, .9933);
+        testProbability(5.000, 2.0, 2.0, .7127);
+    }
+
+    @Test
+    public void testValues() {
+        testValue(15.501, 4.0, 2.0, .9499);
+        testValue(0.504, 4.0, 1.0, .0018);
+        testValue(10.011, 1.0, 2.0, .9933);
+        testValue(5.000, 2.0, 2.0, .7127);
+    }
+
+    private void testProbability(double x, double a, double b, double expected) {
+        GammaDistribution distribution = new GammaDistribution( a, b );
+        double actual = distribution.cumulativeProbability(x);
+        Assert.assertEquals("probability for " + x, expected, actual, 10e-4);
+    }
+
+    private void testValue(double expected, double a, double b, double p) {
+        GammaDistribution distribution = new GammaDistribution( a, b );
+        double actual = distribution.inverseCumulativeProbability(p);
+        Assert.assertEquals("critical value for " + p, expected, actual, 10e-4);
+    }
+
+    @Test
+    public void testDensity() {
+        double[] x = new double[]{-0.1, 1e-6, 0.5, 1, 2, 5};
+        // R2.5: print(dgamma(x, shape=1, rate=1), digits=10)
+        checkDensity(1, 1, x, new double[]{0.000000000000, 0.999999000001, 0.606530659713, 0.367879441171, 0.135335283237, 0.006737946999});
+        // R2.5: print(dgamma(x, shape=2, rate=1), digits=10)
+        checkDensity(2, 1, x, new double[]{0.000000000000, 0.000000999999, 0.303265329856, 0.367879441171, 0.270670566473, 0.033689734995});
+        // R2.5: print(dgamma(x, shape=4, rate=1), digits=10)
+        checkDensity(4, 1, x, new double[]{0.000000000e+00, 1.666665000e-19, 1.263605541e-02, 6.131324020e-02, 1.804470443e-01, 1.403738958e-01});
+        // R2.5: print(dgamma(x, shape=4, rate=10), digits=10)
+        checkDensity(4, 10, x, new double[]{0.000000000e+00, 1.666650000e-15, 1.403738958e+00, 7.566654960e-02, 2.748204830e-05, 4.018228850e-17});
+        // R2.5: print(dgamma(x, shape=.1, rate=10), digits=10)
+        checkDensity(0.1, 10, x, new double[]{0.000000000e+00, 3.323953832e+04, 1.663849010e-03, 6.007786726e-06, 1.461647647e-10, 5.996008322e-24});
+        // R2.5: print(dgamma(x, shape=.1, rate=20), digits=10)
+        checkDensity(0.1, 20, x, new double[]{0.000000000e+00, 3.562489883e+04, 1.201557345e-05, 2.923295295e-10, 3.228910843e-19, 1.239484589e-45});
+        // R2.5: print(dgamma(x, shape=.1, rate=4), digits=10)
+        checkDensity(0.1, 4, x, new double[]{0.000000000e+00, 3.032938388e+04, 3.049322494e-02, 2.211502311e-03, 2.170613371e-05, 5.846590589e-11});
+        // R2.5: print(dgamma(x, shape=.1, rate=1), digits=10)
+        checkDensity(0.1, 1, x, new double[]{0.000000000e+00, 2.640334143e+04, 1.189704437e-01, 3.866916944e-02, 7.623306235e-03, 1.663849010e-04});
+    }
+
+    private void checkDensity(double alpha, double rate, double[] x, double[] expected) {
+        GammaDistribution d = new GammaDistribution(alpha, 1 / rate);
+        for (int i = 0; i < x.length; i++) {
+            Assert.assertEquals(expected[i], d.density(x[i]), 1e-5);
+        }
+    }
+
+    @Test
+    public void testInverseCumulativeProbabilityExtremes() {
+        setInverseCumulativeTestPoints(new double[] {0, 1});
+        setInverseCumulativeTestValues(new double[] {0, Double.POSITIVE_INFINITY});
+        verifyInverseCumulativeProbabilities();
+    }
+
+    @Test
+    public void testMoments() {
+        final double tol = 1e-9;
+        GammaDistribution dist;
+
+        dist = new GammaDistribution(1, 2);
+        Assert.assertEquals(dist.getNumericalMean(), 2, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), 4, tol);
+
+        dist = new GammaDistribution(1.1, 4.2);
+        Assert.assertEquals(dist.getNumericalMean(), 1.1d * 4.2d, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), 1.1d * 4.2d * 4.2d, tol);
+    }
+
+    private static final double HALF_LOG_2_PI = 0.5 * Math.log(2.0 * Math.PI);
+
+    public static double logGamma(double x) {
+        /*
+         * This is a copy of
+         * double Gamma.logGamma(double)
+         * prior to MATH-849
+         */
+        double ret;
+
+        if (Double.isNaN(x) || (x <= 0.0)) {
+            ret = Double.NaN;
+        } else {
+            double sum = LanczosApproximation.value(x);
+            double tmp = x + LanczosApproximation.g() + .5;
+            ret = ((x + .5) * Math.log(tmp)) - tmp +
+                HALF_LOG_2_PI + Math.log(sum / x);
+        }
+
+        return ret;
+    }
+
+    public static double density(final double x,
+                                 final double shape,
+                                 final double scale) {
+        /*
+         * This is a copy of
+         * double GammaDistribution.density(double)
+         * prior to MATH-753.
+         */
+        if (x < 0) {
+            return 0;
+        }
+        return Math.pow(x / scale, shape - 1) / scale *
+               Math.exp(-x / scale) / Math.exp(logGamma(shape));
+    }
+
+    /*
+     * MATH-753: large values of x or shape parameter cause density(double) to
+     * overflow. Reference data is generated with the Maxima script
+     * gamma-distribution.mac, which can be found in
+     * src/test/resources/org/apache/commons/math3/distribution.
+     */
+
+    private void doTestMath753(final double shape,
+                               final double meanNoOF, final double sdNoOF,
+                               final double meanOF, final double sdOF,
+                               final String resourceName)
+        throws IOException {
+        final GammaDistribution distribution = new GammaDistribution(shape, 1.0);
+        final SummaryStatistics statOld = new SummaryStatistics();
+        final SummaryStatistics statNewNoOF = new SummaryStatistics();
+        final SummaryStatistics statNewOF = new SummaryStatistics();
+
+        final InputStream resourceAsStream;
+        resourceAsStream = this.getClass().getResourceAsStream(resourceName);
+        Assert.assertNotNull("Could not find resource " + resourceName,
+                             resourceAsStream);
+        final BufferedReader in;
+        in = new BufferedReader(new InputStreamReader(resourceAsStream));
+
+        try {
+            for (String line = in.readLine(); line != null; line = in.readLine()) {
+                if (line.startsWith("#")) {
+                    continue;
+                }
+                final String[] tokens = line.split(", ");
+                Assert.assertTrue("expected two floating-point values",
+                                  tokens.length == 2);
+                final double x = Double.parseDouble(tokens[0]);
+                final String msg = "x = " + x + ", shape = " + shape +
+                                   ", scale = 1.0";
+                final double expected = Double.parseDouble(tokens[1]);
+                final double ulp = Math.ulp(expected);
+                final double actualOld = density(x, shape, 1.0);
+                final double actualNew = distribution.density(x);
+                final double errOld, errNew;
+                errOld = Math.abs((actualOld - expected) / ulp);
+                errNew = Math.abs((actualNew - expected) / ulp);
+
+                if (Double.isNaN(actualOld) || Double.isInfinite(actualOld)) {
+                    Assert.assertFalse(msg, Double.isNaN(actualNew));
+                    Assert.assertFalse(msg, Double.isInfinite(actualNew));
+                    statNewOF.addValue(errNew);
+                } else {
+                    statOld.addValue(errOld);
+                    statNewNoOF.addValue(errNew);
+                }
+            }
+            if (statOld.getN() != 0) {
+                /*
+                 * If no overflow occurs, check that new implementation is
+                 * better than old one.
+                 */
+                final StringBuilder sb = new StringBuilder("shape = ");
+                sb.append(shape);
+                sb.append(", scale = 1.0\n");
+                sb.append("Old implementation\n");
+                sb.append("------------------\n");
+                sb.append(statOld.toString());
+                sb.append("New implementation\n");
+                sb.append("------------------\n");
+                sb.append(statNewNoOF.toString());
+                final String msg = sb.toString();
+
+                final double oldMin = statOld.getMin();
+                final double newMin = statNewNoOF.getMin();
+                Assert.assertTrue(msg, newMin <= oldMin);
+
+                final double oldMax = statOld.getMax();
+                final double newMax = statNewNoOF.getMax();
+                Assert.assertTrue(msg, newMax <= oldMax);
+
+                final double oldMean = statOld.getMean();
+                final double newMean = statNewNoOF.getMean();
+                Assert.assertTrue(msg, newMean <= oldMean);
+
+                final double oldSd = statOld.getStandardDeviation();
+                final double newSd = statNewNoOF.getStandardDeviation();
+                Assert.assertTrue(msg, newSd <= oldSd);
+
+                Assert.assertTrue(msg, newMean <= meanNoOF);
+                Assert.assertTrue(msg, newSd <= sdNoOF);
+            }
+            if (statNewOF.getN() != 0) {
+                final double newMean = statNewOF.getMean();
+                final double newSd = statNewOF.getStandardDeviation();
+
+                final StringBuilder sb = new StringBuilder("shape = ");
+                sb.append(shape);
+                sb.append(", scale = 1.0");
+                sb.append(", max. mean error (ulps) = ");
+                sb.append(meanOF);
+                sb.append(", actual mean error (ulps) = ");
+                sb.append(newMean);
+                sb.append(", max. sd of error (ulps) = ");
+                sb.append(sdOF);
+                sb.append(", actual sd of error (ulps) = ");
+                sb.append(newSd);
+                final String msg = sb.toString();
+
+                Assert.assertTrue(msg, newMean <= meanOF);
+                Assert.assertTrue(msg, newSd <= sdOF);
+            }
+        } catch (IOException e) {
+            Assert.fail(e.getMessage());
+        } finally {
+            in.close();
+        }
+    }
+
+
+    @Test
+    public void testMath753Shape1() throws IOException {
+        doTestMath753(1.0, 1.5, 0.5, 0.0, 0.0, "gamma-distribution-shape-1.csv");
+    }
+
+    @Test
+    public void testMath753Shape8() throws IOException {
+        doTestMath753(8.0, 1.5, 1.0, 0.0, 0.0, "gamma-distribution-shape-8.csv");
+    }
+
+    @Test
+    public void testMath753Shape10() throws IOException {
+        doTestMath753(10.0, 1.0, 1.0, 0.0, 0.0, "gamma-distribution-shape-10.csv");
+    }
+
+    @Test
+    public void testMath753Shape100() throws IOException {
+        // XXX Increased tolerance ("1.5" -> "2.0") to make test pass with JDK "Math"
+        // where CM used "FastMath" (cf. "XXX" comment in main source code).
+        doTestMath753(100.0, 2.0, 1.0, 0.0, 0.0, "gamma-distribution-shape-100.csv");
+    }
+
+    @Test
+    public void testMath753Shape142() throws IOException {
+        doTestMath753(142.0, 3.3, 1.6, 40.0, 40.0, "gamma-distribution-shape-142.csv");
+    }
+
+    @Test
+    public void testMath753Shape1000() throws IOException {
+        // XXX Increased tolerance ("220.0" -> "230.0") to make test pass with JDK "Math"
+        // where CM used "FastMath" (cf. "XXX" comment in main source code).
+        doTestMath753(1000.0, 1.0, 1.0, 160.0, 230.0, "gamma-distribution-shape-1000.csv");
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/GeometricDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/GeometricDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/GeometricDistributionTest.java
new file mode 100644
index 0000000..25cf6ed
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/GeometricDistributionTest.java
@@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
+ * or agreed to in writing, software distributed under the License is
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for GeometricDistribution.
+ * See class javadoc for DiscreteDistributionAbstractTest for details.
+ */
+public class GeometricDistributionTest extends DiscreteDistributionAbstractTest {
+
+    /**
+     * Constructor to override default tolerance.
+     */
+    public GeometricDistributionTest() {
+        setTolerance(1e-12);
+    }
+
+    // -------------- Implementations for abstract methods --------------------
+
+    /** Creates the default discrete distribution instance to use in tests. */
+    @Override
+    public DiscreteDistribution makeDistribution() {
+        return new GeometricDistribution(0.40);
+    }
+
+    /** Creates the default probability density test input values */
+    @Override
+    public int[] makeDensityTestPoints() {
+        return new int[] { -1,  0,  1,  2,  3,  4,  5,  6,  7,  8,
+                           9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+                           19, 20, 21, 22, 23, 24, 25, 26, 27, 28 };
+    }
+
+    /**
+     * Creates the default probability density test expected values.
+     * Reference values are from R, version version 2.15.3.
+     */
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] {
+            0d, 0.4, 0.24, 0.144, 0.0864, 0.05184, 0.031104, 0.0186624,
+            0.01119744, 0.006718464, 0.0040310784, 0.00241864704,
+            0.001451188224,0.0008707129344, 0.00052242776064, 0.000313456656384,
+            0.00018807399383, 0.000112844396298, 6.77066377789e-05, 4.06239826674e-05,
+            2.43743896004e-05, 1.46246337603e-05, 8.77478025615e-06, 5.26486815369e-06,
+            3.15892089221e-06, 1.89535253533e-06, 1.1372115212e-06, 6.82326912718e-07,
+            4.09396147631e-07, 2.45637688579e-07
+        };
+    }
+
+    /**
+     * Creates the default log probability density test expected values.
+     * Reference values are from R, version version 2.14.1.
+     */
+    @Override
+    public double[] makeLogDensityTestValues() {
+        return new double[] {
+            Double.NEGATIVE_INFINITY, -0.916290731874155, -1.42711635564015, -1.93794197940614,
+            -2.44876760317213, -2.95959322693812, -3.47041885070411, -3.9812444744701,
+            -4.49207009823609, -5.00289572200208, -5.51372134576807, -6.02454696953406,
+            -6.53537259330005, -7.04619821706604, -7.55702384083203, -8.06784946459802,
+            -8.57867508836402, -9.08950071213001, -9.600326335896, -10.111151959662,
+            -10.621977583428, -11.132803207194, -11.64362883096, -12.154454454726,
+            -12.6652800784919, -13.1761057022579, -13.6869313260239, -14.1977569497899,
+            -14.7085825735559, -15.2194081973219
+        };
+    }
+
+    /** Creates the default cumulative probability density test input values */
+    @Override
+    public int[] makeCumulativeTestPoints() {
+        return makeDensityTestPoints();
+    }
+
+    /** Creates the default cumulative probability density test expected values */
+    @Override
+    public double[] makeCumulativeTestValues() {
+        final double[] densities = makeDensityTestValues();
+        final int n = densities.length;
+        final double[] ret = new double[n];
+        ret[0] = densities[0];
+        for (int i = 1; i < n; i++) {
+            ret[i] = ret[i - 1] + densities[i];
+        }
+        return ret;
+    }
+
+    /** Creates the default inverse cumulative probability test input values */
+    @Override
+    public double[] makeInverseCumulativeTestPoints() {
+        return new double[] {
+            0.000, 0.005, 0.010, 0.015, 0.020, 0.025, 0.030, 0.035, 0.040,
+            0.045, 0.050, 0.055, 0.060, 0.065, 0.070, 0.075, 0.080, 0.085,
+            0.090, 0.095, 0.100, 0.105, 0.110, 0.115, 0.120, 0.125, 0.130,
+            0.135, 0.140, 0.145, 0.150, 0.155, 0.160, 0.165, 0.170, 0.175,
+            0.180, 0.185, 0.190, 0.195, 0.200, 0.205, 0.210, 0.215, 0.220,
+            0.225, 0.230, 0.235, 0.240, 0.245, 0.250, 0.255, 0.260, 0.265,
+            0.270, 0.275, 0.280, 0.285, 0.290, 0.295, 0.300, 0.305, 0.310,
+            0.315, 0.320, 0.325, 0.330, 0.335, 0.340, 0.345, 0.350, 0.355,
+            0.360, 0.365, 0.370, 0.375, 0.380, 0.385, 0.390, 0.395, 0.400,
+            0.405, 0.410, 0.415, 0.420, 0.425, 0.430, 0.435, 0.440, 0.445,
+            0.450, 0.455, 0.460, 0.465, 0.470, 0.475, 0.480, 0.485, 0.490,
+            0.495, 0.500, 0.505, 0.510, 0.515, 0.520, 0.525, 0.530, 0.535,
+            0.540, 0.545, 0.550, 0.555, 0.560, 0.565, 0.570, 0.575, 0.580,
+            0.585, 0.590, 0.595, 0.600, 0.605, 0.610, 0.615, 0.620, 0.625,
+            0.630, 0.635, 0.640, 0.645, 0.650, 0.655, 0.660, 0.665, 0.670,
+            0.675, 0.680, 0.685, 0.690, 0.695, 0.700, 0.705, 0.710, 0.715,
+            0.720, 0.725, 0.730, 0.735, 0.740, 0.745, 0.750, 0.755, 0.760,
+            0.765, 0.770, 0.775, 0.780, 0.785, 0.790, 0.795, 0.800, 0.805,
+            0.810, 0.815, 0.820, 0.825, 0.830, 0.835, 0.840, 0.845, 0.850,
+            0.855, 0.860, 0.865, 0.870, 0.875, 0.880, 0.885, 0.890, 0.895,
+            0.900, 0.905, 0.910, 0.915, 0.920, 0.925, 0.930, 0.935, 0.940,
+            0.945, 0.950, 0.955, 0.960, 0.965, 0.970, 0.975, 0.980, 0.985,
+            0.990, 0.995, 1.000
+        };
+    }
+
+    /**
+     * Creates the default inverse cumulative probability density test expected
+     * values
+     */
+    @Override
+    public int[] makeInverseCumulativeTestValues() {
+        return new int[] {
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
+            1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+            1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+            1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+            2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+            3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5,
+            5, 5, 6, 6, 6, 6, 7, 7, 8, 9, 10, Integer.MAX_VALUE
+        };
+    }
+
+    // ----------------- Additional test cases ---------------------------------
+
+    @Test
+    public void testMoments() {
+        final double tol = 1e-9;
+        GeometricDistribution dist;
+
+        dist = new GeometricDistribution(0.5);
+        Assert.assertEquals(dist.getNumericalMean(), (1.0d - 0.5d) / 0.5d, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), (1.0d - 0.5d) / (0.5d * 0.5d), tol);
+
+        dist = new GeometricDistribution(0.3);
+        Assert.assertEquals(dist.getNumericalMean(), (1.0d - 0.3d) / 0.3d, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), (1.0d - 0.3d) / (0.3d * 0.3d), tol);
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/GumbelDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/GumbelDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/GumbelDistributionTest.java
new file mode 100644
index 0000000..7722942
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/GumbelDistributionTest.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.core.Precision;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for GumbelDistribution.
+ */
+public class GumbelDistributionTest extends ContinuousDistributionAbstractTest {
+
+    @Test
+    public void testParameters() {
+        GumbelDistribution d = makeDistribution();
+        Assert.assertEquals(0.5, d.getLocation(), Precision.EPSILON);
+        Assert.assertEquals(2, d.getScale(), Precision.EPSILON);
+    }
+
+    @Test
+    public void testSupport() {
+        GumbelDistribution d = makeDistribution();
+        Assert.assertTrue(Double.isInfinite(d.getSupportLowerBound()));
+        Assert.assertTrue(Double.isInfinite(d.getSupportUpperBound()));
+        Assert.assertTrue(d.isSupportConnected());
+    }
+
+    @Override
+    public GumbelDistribution makeDistribution() {
+        return new GumbelDistribution(0.5, 2);
+    }
+
+    @Override
+    public double[] makeCumulativeTestPoints() {
+        return new double[] {
+            -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5
+        };
+    }
+
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] {
+            1.258262e-06, 3.594689e-04, 9.115766e-03, 5.321100e-02, 1.274352e-01, 1.777864e-01,
+            1.787177e-01, 1.472662e-01, 1.075659e-01, 7.302736e-02, 4.742782e-02
+        };
+    }
+
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] {
+            1.608760e-07, 7.577548e-05, 3.168165e-03, 3.049041e-02, 1.203923e-01, 2.769203e-01,
+            4.589561e-01, 6.235249e-01, 7.508835e-01, 8.404869e-01, 8.999652e-01
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/HypergeometricDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/HypergeometricDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/HypergeometricDistributionTest.java
new file mode 100644
index 0000000..95be226
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/HypergeometricDistributionTest.java
@@ -0,0 +1,335 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.core.Precision;
+import org.apache.commons.rng.simple.RandomSource;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for HyperGeometriclDistribution.
+ * Extends DiscreteDistributionAbstractTest.  See class javadoc for
+ * DiscreteDistributionAbstractTest for details.
+ *
+ */
+public class HypergeometricDistributionTest extends DiscreteDistributionAbstractTest {
+
+    /**
+     * Constructor to override default tolerance.
+     */
+    public HypergeometricDistributionTest() {
+        setTolerance(1e-12);
+    }
+
+    //-------------- Implementations for abstract methods -----------------------
+
+    /** Creates the default discrete distribution instance to use in tests. */
+    @Override
+    public DiscreteDistribution makeDistribution() {
+        return new HypergeometricDistribution(10, 5, 5);
+    }
+
+    /** Creates the default probability density test input values */
+    @Override
+    public int[] makeDensityTestPoints() {
+        return new int[] {-1, 0, 1, 2, 3, 4, 5, 10};
+    }
+
+    /**
+     * Creates the default probability density test expected values
+     * Reference values are from R, version 2.15.3.
+     */
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] {0d, 0.00396825396825, 0.0992063492063, 0.396825396825, 0.396825396825,
+                             0.0992063492063, 0.00396825396825, 0d};
+    }
+
+    /**
+     * Creates the default probability log density test expected values
+     * Reference values are from R, version 2.14.1.
+     */
+    @Override
+    public double[] makeLogDensityTestValues() {
+        //-Inf  -Inf
+        return new double[] {Double.NEGATIVE_INFINITY, -5.52942908751142, -2.31055326264322, -0.924258901523332,
+                             -0.924258901523332, -2.31055326264322, -5.52942908751142, Double.NEGATIVE_INFINITY};
+    }
+
+    /** Creates the default cumulative probability density test input values */
+    @Override
+    public int[] makeCumulativeTestPoints() {
+        return makeDensityTestPoints();
+    }
+
+    /**
+     * Creates the default cumulative probability density test expected values
+     * Reference values are from R, version 2.15.3.
+     */
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] {0d, 0.00396825396825, 0.103174603175, .5, 0.896825396825, 0.996031746032,
+                             1, 1};
+    }
+
+    /** Creates the default inverse cumulative probability test input values */
+    @Override
+    public double[] makeInverseCumulativeTestPoints() {
+        return new double[] {0d, 0.001d, 0.010d, 0.025d, 0.050d, 0.100d, 0.999d,
+                             0.990d, 0.975d, 0.950d, 0.900d, 1d};
+    }
+
+    /** Creates the default inverse cumulative probability density test expected values */
+    @Override
+    public int[] makeInverseCumulativeTestValues() {
+        return new int[] {0, 0, 1, 1, 1, 1, 5, 4, 4, 4, 4, 5};
+    }
+
+    //-------------------- Additional test cases ------------------------------
+
+    /** Verify that if there are no failures, mass is concentrated on sampleSize */
+    @Test
+    public void testDegenerateNoFailures() {
+        HypergeometricDistribution dist = new HypergeometricDistribution(5,5,3);
+        setDistribution(dist);
+        setCumulativeTestPoints(new int[] {-1, 0, 1, 3, 10 });
+        setCumulativeTestValues(new double[] {0d, 0d, 0d, 1d, 1d});
+        setDensityTestPoints(new int[] {-1, 0, 1, 3, 10});
+        setDensityTestValues(new double[] {0d, 0d, 0d, 1d, 0d});
+        setInverseCumulativeTestPoints(new double[] {0.1d, 0.5d});
+        setInverseCumulativeTestValues(new int[] {3, 3});
+        verifyDensities();
+        verifyCumulativeProbabilities();
+        verifyInverseCumulativeProbabilities();
+        Assert.assertEquals(dist.getSupportLowerBound(), 3);
+        Assert.assertEquals(dist.getSupportUpperBound(), 3);
+    }
+
+    /** Verify that if there are no successes, mass is concentrated on 0 */
+    @Test
+    public void testDegenerateNoSuccesses() {
+        HypergeometricDistribution dist = new HypergeometricDistribution(5,0,3);
+        setDistribution(dist);
+        setCumulativeTestPoints(new int[] {-1, 0, 1, 3, 10 });
+        setCumulativeTestValues(new double[] {0d, 1d, 1d, 1d, 1d});
+        setDensityTestPoints(new int[] {-1, 0, 1, 3, 10});
+        setDensityTestValues(new double[] {0d, 1d, 0d, 0d, 0d});
+        setInverseCumulativeTestPoints(new double[] {0.1d, 0.5d});
+        setInverseCumulativeTestValues(new int[] {0, 0});
+        verifyDensities();
+        verifyCumulativeProbabilities();
+        verifyInverseCumulativeProbabilities();
+        Assert.assertEquals(dist.getSupportLowerBound(), 0);
+        Assert.assertEquals(dist.getSupportUpperBound(), 0);
+    }
+
+    /** Verify that if sampleSize = populationSize, mass is concentrated on numberOfSuccesses */
+    @Test
+    public void testDegenerateFullSample() {
+        HypergeometricDistribution dist = new HypergeometricDistribution(5,3,5);
+        setDistribution(dist);
+        setCumulativeTestPoints(new int[] {-1, 0, 1, 3, 10 });
+        setCumulativeTestValues(new double[] {0d, 0d, 0d, 1d, 1d});
+        setDensityTestPoints(new int[] {-1, 0, 1, 3, 10});
+        setDensityTestValues(new double[] {0d, 0d, 0d, 1d, 0d});
+        setInverseCumulativeTestPoints(new double[] {0.1d, 0.5d});
+        setInverseCumulativeTestValues(new int[] {3, 3});
+        verifyDensities();
+        verifyCumulativeProbabilities();
+        verifyInverseCumulativeProbabilities();
+        Assert.assertEquals(dist.getSupportLowerBound(), 3);
+        Assert.assertEquals(dist.getSupportUpperBound(), 3);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition1() {
+        new HypergeometricDistribution(0, 3, 5);
+    }
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition2() {
+        new HypergeometricDistribution(5, -1, 5);
+    }
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition3() {
+        new HypergeometricDistribution(5, 3, -1);
+    }
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition4() {
+        new HypergeometricDistribution(5, 6, 5);
+    }
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition5() {
+        new HypergeometricDistribution(5, 3, 6);
+    }
+
+    @Test
+    public void testAccessors() {
+        HypergeometricDistribution dist = new HypergeometricDistribution(5, 3, 4);
+        Assert.assertEquals(5, dist.getPopulationSize());
+        Assert.assertEquals(3, dist.getNumberOfSuccesses());
+        Assert.assertEquals(4, dist.getSampleSize());
+    }
+
+    @Test
+    public void testLargeValues() {
+        int populationSize = 3456;
+        int sampleSize = 789;
+        int numberOfSucceses = 101;
+        double[][] data = {
+            {0.0, 2.75646034603961e-12, 2.75646034603961e-12, 1.0},
+            {1.0, 8.55705370142386e-11, 8.83269973602783e-11, 0.999999999997244},
+            {2.0, 1.31288129219665e-9, 1.40120828955693e-9, 0.999999999911673},
+            {3.0, 1.32724172984193e-8, 1.46736255879763e-8, 0.999999998598792},
+            {4.0, 9.94501711734089e-8, 1.14123796761385e-7, 0.999999985326375},
+            {5.0, 5.89080768883643e-7, 7.03204565645028e-7, 0.999999885876203},
+            {20.0, 0.0760051397707708, 0.27349758476299, 0.802507555007781},
+            {21.0, 0.087144222047629, 0.360641806810619, 0.72650241523701},
+            {22.0, 0.0940378846881819, 0.454679691498801, 0.639358193189381},
+            {23.0, 0.0956897500614809, 0.550369441560282, 0.545320308501199},
+            {24.0, 0.0919766921922999, 0.642346133752582, 0.449630558439718},
+            {25.0, 0.083641637261095, 0.725987771013677, 0.357653866247418},
+            {96.0, 5.93849188852098e-57, 1.0, 6.01900244560712e-57},
+            {97.0, 7.96593036832547e-59, 1.0, 8.05105570861321e-59},
+            {98.0, 8.44582921934367e-61, 1.0, 8.5125340287733e-61},
+            {99.0, 6.63604297068222e-63, 1.0, 6.670480942963e-63},
+            {100.0, 3.43501099007557e-65, 1.0, 3.4437972280786e-65},
+            {101.0, 8.78623800302957e-68, 1.0, 8.78623800302957e-68},
+        };
+
+        testHypergeometricDistributionProbabilities(populationSize, sampleSize, numberOfSucceses, data);
+    }
+
+    private void testHypergeometricDistributionProbabilities(int populationSize, int sampleSize, int numberOfSucceses, double[][] data) {
+        HypergeometricDistribution dist = new HypergeometricDistribution(populationSize, numberOfSucceses, sampleSize);
+        for (int i = 0; i < data.length; ++i) {
+            int x = (int)data[i][0];
+            double pmf = data[i][1];
+            double actualPmf = dist.probability(x);
+            TestUtils.assertRelativelyEquals("Expected equals for <"+x+"> pmf",pmf, actualPmf, 1.0e-9);
+
+            double cdf = data[i][2];
+            double actualCdf = dist.cumulativeProbability(x);
+            TestUtils.assertRelativelyEquals("Expected equals for <"+x+"> cdf",cdf, actualCdf, 1.0e-9);
+
+            double cdf1 = data[i][3];
+            double actualCdf1 = dist.upperCumulativeProbability(x);
+            TestUtils.assertRelativelyEquals("Expected equals for <"+x+"> cdf1",cdf1, actualCdf1, 1.0e-9);
+        }
+    }
+
+    @Test
+    public void testMoreLargeValues() {
+        int populationSize = 26896;
+        int sampleSize = 895;
+        int numberOfSucceses = 55;
+        double[][] data = {
+            {0.0, 0.155168304750504, 0.155168304750504, 1.0},
+            {1.0, 0.29437545000746, 0.449543754757964, 0.844831695249496},
+            {2.0, 0.273841321577003, 0.723385076334967, 0.550456245242036},
+            {3.0, 0.166488572570786, 0.889873648905753, 0.276614923665033},
+            {4.0, 0.0743969744713231, 0.964270623377076, 0.110126351094247},
+            {5.0, 0.0260542785784855, 0.990324901955562, 0.0357293766229237},
+            {20.0, 3.57101101678792e-16, 1.0, 3.78252101622096e-16},
+            {21.0, 2.00551638598312e-17, 1.0, 2.11509999433041e-17},
+            {22.0, 1.04317070180562e-18, 1.0, 1.09583608347287e-18},
+            {23.0, 5.03153504903308e-20, 1.0, 5.266538166725e-20},
+            {24.0, 2.2525984149695e-21, 1.0, 2.35003117691919e-21},
+            {25.0, 9.3677424515947e-23, 1.0, 9.74327619496943e-23},
+            {50.0, 9.83633962945521e-69, 1.0, 9.8677629437617e-69},
+            {51.0, 3.13448949497553e-71, 1.0, 3.14233143064882e-71},
+            {52.0, 7.82755221928122e-74, 1.0, 7.84193567329055e-74},
+            {53.0, 1.43662126065532e-76, 1.0, 1.43834540093295e-76},
+            {54.0, 1.72312692517348e-79, 1.0, 1.7241402776278e-79},
+            {55.0, 1.01335245432581e-82, 1.0, 1.01335245432581e-82},
+        };
+        testHypergeometricDistributionProbabilities(populationSize, sampleSize, numberOfSucceses, data);
+    }
+
+    @Test
+    public void testMoments() {
+        final double tol = 1e-9;
+        HypergeometricDistribution dist;
+
+        dist = new HypergeometricDistribution(1500, 40, 100);
+        Assert.assertEquals(dist.getNumericalMean(), 40d * 100d / 1500d, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), ( 100d * 40d * (1500d - 100d) * (1500d - 40d) ) / ( (1500d * 1500d * 1499d) ), tol);
+
+        dist = new HypergeometricDistribution(3000, 55, 200);
+        Assert.assertEquals(dist.getNumericalMean(), 55d * 200d / 3000d, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), ( 200d * 55d * (3000d - 200d) * (3000d - 55d) ) / ( (3000d * 3000d * 2999d) ), tol);
+    }
+
+    @Test
+    public void testMath644() {
+        int N = 14761461;  // population
+        int m = 1035;      // successes in population
+        int n = 1841;      // number of trials
+
+        int k = 0;
+        final HypergeometricDistribution dist = new HypergeometricDistribution(N, m, n);
+
+        Assert.assertTrue(Precision.compareTo(1.0, dist.upperCumulativeProbability(k), 1) == 0);
+        Assert.assertTrue(Precision.compareTo(dist.cumulativeProbability(k), 0.0, 1) > 0);
+
+        // another way to calculate the upper cumulative probability
+        double upper = 1.0 - dist.cumulativeProbability(k) + dist.probability(k);
+        Assert.assertTrue(Precision.compareTo(1.0, upper, 1) == 0);
+    }
+
+    @Test
+    public void testZeroTrial() {
+        final int n = 11; // population
+        final int m = 4;  // successes in population
+        final int s = 0;  // number of trials
+
+        final HypergeometricDistribution dist = new HypergeometricDistribution(n, m, 0);
+
+        for (int i = 1; i <= n; i++) {
+            final double p = dist.probability(i);
+            Assert.assertEquals("p=" + p, 0, p, 0d);
+        }
+    }
+
+    @Test
+    public void testMath1356() {
+        final int n = 11;  // population
+        final int m = 11;  // successes in population
+
+        for (int s = 0; s <= n; s++) {
+            final HypergeometricDistribution dist = new HypergeometricDistribution(n, m, s);
+            final double p = dist.probability(s);
+            Assert.assertEquals("p=" + p, 1, p, 0d);
+        }
+    }
+
+    @Test
+    public void testMath1021() {
+        final int N = 43130568;
+        final int m = 42976365;
+        final int n = 50;
+        final DiscreteDistribution.Sampler dist =
+            new HypergeometricDistribution(N, m, n).createSampler(RandomSource.create(RandomSource.WELL_512_A));
+
+        for (int i = 0; i < 100; i++) {
+            final int sample = dist.sample();
+            Assert.assertTrue("sample=" + sample, 0 <= sample);
+            Assert.assertTrue("sample=" + sample, sample <= n);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/LaplaceDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/LaplaceDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/LaplaceDistributionTest.java
new file mode 100644
index 0000000..d935aca
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/LaplaceDistributionTest.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.core.Precision;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for LaplaceDistribution.
+ */
+public class LaplaceDistributionTest extends ContinuousDistributionAbstractTest {
+
+    @Test
+    public void testParameters() {
+        LaplaceDistribution d = makeDistribution();
+        Assert.assertEquals(0, d.getLocation(), Precision.EPSILON);
+        Assert.assertEquals(1, d.getScale(), Precision.EPSILON);
+    }
+
+    @Test
+    public void testSupport() {
+        LaplaceDistribution d = makeDistribution();
+        Assert.assertTrue(Double.isInfinite(d.getSupportLowerBound()));
+        Assert.assertTrue(Double.isInfinite(d.getSupportUpperBound()));
+        Assert.assertTrue(d.isSupportConnected());
+    }
+
+    @Override
+    public LaplaceDistribution makeDistribution() {
+        return new LaplaceDistribution(0, 1);
+    }
+
+    @Override
+    public double[] makeCumulativeTestPoints() {
+        return new double[] {
+            -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5
+        };
+    }
+
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] {
+            0.003368973, 0.009157819, 0.024893534, 0.067667642, 0.183939721,
+            0.500000000, 0.183939721, 0.067667642, 0.024893534, 0.009157819, 0.003368973
+        };
+    }
+
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] {
+            0.003368973, 0.009157819, 0.024893534, 0.067667642, 0.183939721,
+            0.500000000, 0.816060279, 0.932332358, 0.975106466, 0.990842181, 0.996631027
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/LevyDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/LevyDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/LevyDistributionTest.java
new file mode 100644
index 0000000..78b210c
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/LevyDistributionTest.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.core.Precision;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class LevyDistributionTest extends ContinuousDistributionAbstractTest {
+
+    @Test
+    public void testParameters() {
+        LevyDistribution d = makeDistribution();
+        Assert.assertEquals(1.2, d.getLocation(), Precision.EPSILON);
+        Assert.assertEquals(0.4,   d.getScale(),  Precision.EPSILON);
+    }
+
+    @Test
+    public void testSupport() {
+        LevyDistribution d = makeDistribution();
+        Assert.assertEquals(d.getLocation(), d.getSupportLowerBound(), Precision.EPSILON);
+        Assert.assertTrue(Double.isInfinite(d.getSupportUpperBound()));
+        Assert.assertTrue(d.isSupportConnected());
+    }
+
+    @Override
+    public LevyDistribution makeDistribution() {
+        return new LevyDistribution(1.2, 0.4);
+    }
+
+    @Override
+    public double[] makeCumulativeTestPoints() {
+        return new double[] {
+            1.2001, 1.21, 1.225, 1.25, 1.3, 1.9, 3.4, 5.6
+        };
+    }
+
+    @Override
+    public double[] makeCumulativeTestValues() {
+        // values computed with R and function plevy from rmutil package
+        return new double[] {
+            0, 2.53962850749e-10, 6.33424836662e-05, 0.00467773498105,
+            0.0455002638964, 0.449691797969, 0.669815357599, 0.763024600553
+        };
+    }
+
+    @Override
+    public double[] makeDensityTestValues() {
+        // values computed with R and function dlevy from rmutil package
+        return new double[] {
+            0, 5.20056373765e-07, 0.0214128361224, 0.413339707082, 1.07981933026,
+            0.323749319161, 0.0706032550094, 0.026122839884
+        };
+    }
+
+    /**
+     * Creates the default logarithmic probability density test expected values.
+     * Reference values are from R, version 2.14.1.
+     */
+    @Override
+    public double[] makeLogDensityTestValues() {
+        return new double[] {
+            -1987.561573341398d, -14.469328620160d, -3.843764717971d,
+            -0.883485488811d, 0.076793740349d, -1.127785768948d,
+            -2.650679030597d, -3.644945255983d};
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/LogNormalDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/LogNormalDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/LogNormalDistributionTest.java
new file mode 100644
index 0000000..43b2fdd
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/LogNormalDistributionTest.java
@@ -0,0 +1,250 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.statistics.distribution;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for {@link LogNormalDistribution}. Extends
+ * {@link ContinuousDistributionAbstractTest}. See class javadoc of that class
+ * for details.
+ */
+public class LogNormalDistributionTest extends ContinuousDistributionAbstractTest {
+
+    //-------------- Implementations for abstract methods -----------------------
+
+    /** Creates the default real distribution instance to use in tests. */
+    @Override
+    public LogNormalDistribution makeDistribution() {
+        return new LogNormalDistribution(2.1, 1.4);
+    }
+
+    /** Creates the default cumulative probability distribution test input values */
+    @Override
+    public double[] makeCumulativeTestPoints() {
+        // quantiles computed using R
+        return new double[] { -2.226325228634938, -1.156887023657177,
+                              -0.643949578356075, -0.2027950777320613,
+                              0.305827808237559, 6.42632522863494,
+                              5.35688702365718, 4.843949578356074,
+                              4.40279507773206, 3.89417219176244 };
+    }
+
+    /** Creates the default cumulative probability density test expected values */
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] { 0, 0, 0, 0, 0.00948199951485, 0.432056525076,
+                              0.381648158697, 0.354555726206, 0.329513316888,
+                              0.298422824228 };
+    }
+
+    /** Creates the default probability density test expected values */
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] { 0, 0, 0, 0, 0.0594218160072, 0.0436977691036,
+                              0.0508364857798, 0.054873528325, 0.0587182664085,
+                              0.0636229042785 };
+    }
+
+    /**
+     * Creates the default inverse cumulative probability distribution test
+     * input values.
+     */
+    @Override
+    public double[] makeInverseCumulativeTestPoints() {
+        // Exclude the test points less than zero, as they have cumulative
+        // probability of zero, meaning the inverse returns zero, and not the
+        // points less than zero.
+        double[] points = makeCumulativeTestValues();
+        double[] points2 = new double[points.length - 4];
+        System.arraycopy(points, 4, points2, 0, points2.length - 4);
+        return points2;
+        //return Arrays.copyOfRange(points, 4, points.length - 4);
+    }
+
+    /**
+     * Creates the default inverse cumulative probability test expected
+     * values.
+     */
+    @Override
+    public double[] makeInverseCumulativeTestValues() {
+        // Exclude the test points less than zero, as they have cumulative
+        // probability of zero, meaning the inverse returns zero, and not the
+        // points less than zero.
+        double[] points = makeCumulativeTestPoints();
+        double[] points2 = new double[points.length - 4];
+        System.arraycopy(points, 4, points2, 0, points2.length - 4);
+        return points2;
+        //return Arrays.copyOfRange(points, 1, points.length - 4);
+    }
+
+    // --------------------- Override tolerance  --------------
+    @Override
+    public void setUp() {
+        super.setUp();
+        setTolerance(1e-7);
+    }
+
+    //---------------------------- Additional test cases -------------------------
+
+    private void verifyQuantiles() {
+        LogNormalDistribution distribution = (LogNormalDistribution)getDistribution();
+        double mu = distribution.getScale();
+        double sigma = distribution.getShape();
+        setCumulativeTestPoints( new double[] { mu - 2 *sigma, mu - sigma,
+                                                mu, mu + sigma, mu + 2 * sigma,
+                                                mu + 3 * sigma,mu + 4 * sigma,
+                                                mu + 5 * sigma });
+        verifyCumulativeProbabilities();
+    }
+
+    @Test
+    public void testQuantiles() {
+        setCumulativeTestValues(new double[] {0, 0.0396495152787,
+                                              0.16601209243, 0.272533253269,
+                                              0.357618409638, 0.426488363093,
+                                              0.483255136841, 0.530823013877});
+        setDensityTestValues(new double[] {0, 0.0873055825147, 0.0847676303432,
+                                           0.0677935186237, 0.0544105523058,
+                                           0.0444614628804, 0.0369750288945,
+                                           0.0312206409653});
+        verifyQuantiles();
+        verifyDensities();
+
+        setDistribution(new LogNormalDistribution(0, 1));
+        setCumulativeTestValues(new double[] {0, 0, 0, 0.5, 0.755891404214,
+                                              0.864031392359, 0.917171480998,
+                                              0.946239689548});
+        setDensityTestValues(new double[] {0, 0, 0, 0.398942280401,
+                                           0.156874019279, 0.07272825614,
+                                           0.0381534565119, 0.0218507148303});
+        verifyQuantiles();
+        verifyDensities();
+
+        setDistribution(new LogNormalDistribution(0, 0.1));
+        setCumulativeTestValues(new double[] {0, 0, 0, 1.28417563064e-117,
+                                              1.39679883412e-58,
+                                              1.09839325447e-33,
+                                              2.52587961726e-20,
+                                              2.0824223487e-12});
+        setDensityTestValues(new double[] {0, 0, 0, 2.96247992535e-114,
+                                           1.1283370232e-55, 4.43812313223e-31,
+                                           5.85346445002e-18,
+                                           2.9446618076e-10});
+        verifyQuantiles();
+        verifyDensities();
+    }
+
+    @Test
+    public void testInverseCumulativeProbabilityExtremes() {
+        setInverseCumulativeTestPoints(new double[] {0, 1});
+        setInverseCumulativeTestValues(new double[] {0, Double.POSITIVE_INFINITY});
+        verifyInverseCumulativeProbabilities();
+    }
+
+    @Test
+    public void testGetScale() {
+        LogNormalDistribution distribution = (LogNormalDistribution)getDistribution();
+        Assert.assertEquals(2.1, distribution.getScale(), 0);
+    }
+
+    @Test
+    public void testGetShape() {
+        LogNormalDistribution distribution = (LogNormalDistribution)getDistribution();
+        Assert.assertEquals(1.4, distribution.getShape(), 0);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testPrecondition1() {
+        new LogNormalDistribution(1, 0);
+    }
+
+    @Test
+    public void testDensity() {
+        double [] x = new double[]{-2, -1, 0, 1, 2};
+        // R 2.13: print(dlnorm(c(-2,-1,0,1,2)), digits=10)
+        checkDensity(0, 1, x, new double[] { 0.0000000000, 0.0000000000,
+                                             0.0000000000, 0.3989422804,
+                                             0.1568740193 });
+        // R 2.13: print(dlnorm(c(-2,-1,0,1,2), mean=1.1), digits=10)
+        checkDensity(1.1, 1, x, new double[] { 0.0000000000, 0.0000000000,
+                                               0.0000000000, 0.2178521770,
+                                               0.1836267118});
+    }
+
+    private void checkDensity(double scale,
+                              double shape,
+                              double[] x,
+                              double[] expected) {
+        LogNormalDistribution d = new LogNormalDistribution(scale, shape);
+        for (int i = 0; i < x.length; i++) {
+            Assert.assertEquals(expected[i], d.density(x[i]), 1e-9);
+        }
+    }
+
+    /**
+     * Check to make sure top-coding of extreme values works correctly.
+     * Verifies fixes for JIRA MATH-167, MATH-414
+     */
+    @Test
+    public void testExtremeValues() {
+        LogNormalDistribution d = new LogNormalDistribution(0, 1);
+        for (int i = 0; i < 1e5; i++) { // make sure no convergence exception
+            double upperTail = d.cumulativeProbability(i);
+            if (i <= 72) { // make sure not top-coded
+                Assert.assertTrue(upperTail < 1.0d);
+            }
+            else { // make sure top coding not reversed
+                Assert.assertTrue(upperTail > 0.99999);
+            }
+        }
+
+        Assert.assertEquals(d.cumulativeProbability(Double.MAX_VALUE), 1, 0);
+        Assert.assertEquals(d.cumulativeProbability(-Double.MAX_VALUE), 0, 0);
+        Assert.assertEquals(d.cumulativeProbability(Double.POSITIVE_INFINITY), 1, 0);
+        Assert.assertEquals(d.cumulativeProbability(Double.NEGATIVE_INFINITY), 0, 0);
+    }
+
+    @Test
+    public void testMeanVariance() {
+        final double tol = 1e-9;
+        LogNormalDistribution dist;
+
+        dist = new LogNormalDistribution(0, 1);
+        Assert.assertEquals(dist.getNumericalMean(), 1.6487212707001282, tol);
+        Assert.assertEquals(dist.getNumericalVariance(),
+                            4.670774270471604, tol);
+
+        dist = new LogNormalDistribution(2.2, 1.4);
+        Assert.assertEquals(dist.getNumericalMean(), 24.046753552064498, tol);
+        Assert.assertEquals(dist.getNumericalVariance(),
+                            3526.913651880464, tol);
+
+        dist = new LogNormalDistribution(-2000.9, 10.4);
+        Assert.assertEquals(dist.getNumericalMean(), 0.0, tol);
+        Assert.assertEquals(dist.getNumericalVariance(), 0.0, tol);
+    }
+
+    @Test
+    public void testTinyVariance() {
+        LogNormalDistribution dist = new LogNormalDistribution(0, 1e-9);
+        double t = dist.getNumericalVariance();
+        Assert.assertEquals(1e-18, t, 1e-20);
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/LogisticsDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/LogisticsDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/LogisticsDistributionTest.java
new file mode 100644
index 0000000..cfdf6d8
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/LogisticsDistributionTest.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.core.Precision;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for LogisticsDistribution.
+ */
+public class LogisticsDistributionTest extends ContinuousDistributionAbstractTest {
+
+    @Test
+    public void testParameters() {
+        LogisticDistribution d = makeDistribution();
+        Assert.assertEquals(2, d.getLocation(), Precision.EPSILON);
+        Assert.assertEquals(5, d.getScale(), Precision.EPSILON);
+    }
+
+    @Test
+    public void testSupport() {
+        LogisticDistribution d = makeDistribution();
+        Assert.assertTrue(Double.isInfinite(d.getSupportLowerBound()));
+        Assert.assertTrue(Double.isInfinite(d.getSupportUpperBound()));
+        Assert.assertTrue(d.isSupportConnected());
+    }
+
+    @Override
+    public LogisticDistribution makeDistribution() {
+        return new LogisticDistribution(2, 5);
+    }
+
+    @Override
+    public double[] makeCumulativeTestPoints() {
+        return new double[] {
+            -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5
+        };
+    }
+
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] {
+            0.03173698, 0.03557889, 0.03932239, 0.04278194, 0.04575685, 0.04805215,
+            0.04950331, 0.05000000, 0.04950331, 0.04805215, 0.04575685
+        };
+    }
+
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] {
+            0.1978161, 0.2314752, 0.2689414, 0.3100255, 0.3543437, 0.4013123,
+            0.4501660, 0.5000000, 0.5498340, 0.5986877, 0.6456563
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-statistics/blob/9c794a15/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/NakagamiDistributionTest.java
----------------------------------------------------------------------
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/NakagamiDistributionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/NakagamiDistributionTest.java
new file mode 100644
index 0000000..6aab2dd
--- /dev/null
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/NakagamiDistributionTest.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.distribution;
+
+import org.apache.commons.numbers.core.Precision;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test cases for NakagamiDistribution.
+ */
+public class NakagamiDistributionTest extends ContinuousDistributionAbstractTest {
+
+    @Test
+    public void testParameters() {
+        NakagamiDistribution d = makeDistribution();
+        Assert.assertEquals(0.5, d.getShape(), Precision.EPSILON);
+        Assert.assertEquals(1, d.getScale(), Precision.EPSILON);
+    }
+
+    @Test
+    public void testSupport() {
+        NakagamiDistribution d = makeDistribution();
+        Assert.assertEquals(d.getSupportLowerBound(), 0, Precision.EPSILON);
+        Assert.assertTrue(Double.isInfinite(d.getSupportUpperBound()));
+        Assert.assertTrue(d.isSupportConnected());
+    }
+
+    @Override
+    public NakagamiDistribution makeDistribution() {
+        return new NakagamiDistribution(0.5, 1);
+    }
+
+    @Override
+    public double[] makeCumulativeTestPoints() {
+        return new double[] {
+            0, 0.2, 0.4, 0.6, 0.8, 1, 1.2, 1.4, 1.6, 1.8, 2
+        };
+    }
+
+    @Override
+    public double[] makeDensityTestValues() {
+        return new double[] {
+            0.0000000, 0.7820854, 0.7365403, 0.6664492, 0.5793831, 0.4839414,
+            0.3883721, 0.2994549, 0.2218417, 0.1579003, 0.1079819
+        };
+    }
+
+    @Override
+    public double[] makeCumulativeTestValues() {
+        return new double[] {
+            0.0000000, 0.1585194, 0.3108435, 0.4514938, 0.5762892, 0.6826895,
+            0.7698607, 0.8384867, 0.8904014, 0.9281394, 0.9544997
+        };
+    }
+}