Skip to content

Commit ecf2ef6

Browse files
committed
Features:
Bug Fixes/Re-organization: - Special Function Property Gamma Inequality Lemma - Gautschi Right #1 (1, 2) - Special Function Property Gamma Inequality Lemma - Gautschi Right #2 (3, 4) - Special Function Property Gamma Inequality Lemma - Jensen Multi-point Interpolant #1 (5, 6, 7) - Special Function Property Gamma Inequality Lemma - Jensen Multi-point Interpolant #2 (8, 9, 10) - Special Function Property Gamma Inequality Lemma - Jensen Multi-point Interpolant #3 (11, 12, 13) - Special Function Property Gamma Inequality Lemma - Jensen Multi-point Interpolant #4 (14, 15, 16) - Special Function Property Gamma Inequality Lemma - Jensen Multi-point Interpolant #5 (17, 18) - Gamma Polynomial Quotient Lemma - Constructor (19, 20, 21) - Special Function Property Gamma Polynomial Quotient Lemma (22, 23, 24) - Special Function Property Gamma Polynomial Quotient Lemma - Monic P (25, 26) - Special Function Property Gamma Polynomial Quotient Lemma - Monic Q (27, 28) - Special Function Property Gamma Polynomial Quotient Lemma - Constructor (29, 30) - Special Function Property Gamma Polynomial Quotient Lemma - Equality #1 (31, 32, 33) - Special Function Property Gamma Polynomial Quotient Lemma - Equality #2 (34, 35, 36) - Special Function Property Gamma Polynomial Quotient Lemma - Equality #3 (37, 38) - Special Function Property Gamma Polynomial Quotient Lemma - Equality #4 (39, 40) - Special Function Property Gauss Contiguous Equality Lemma (41, 42, 43) - Special Function Property Gauss Contiguous Equality Lemma - Relation Identity 2 #1 (44, 45, 46) - Special Function Property Gauss Contiguous Equality Lemma - Relation Identity 2 #2 (47, 48, 49) - Special Function Property Gauss Contiguous Equality Lemma - Relation Identity 3 #1 (50, 51, 52) - Special Function Property Gauss Contiguous Equality Lemma - Relation Identity 3 #2 (53, 54, 55) - Special Function Property Gauss Contiguous Equality Lemma - Relation Identity 4 #1 (56, 57, 58) - Special Function Property Gauss Contiguous Equality Lemma - Relation Identity 4 #2 (59, 60) Samples: IdeaDRIP:
1 parent c10d00f commit ecf2ef6

File tree

4 files changed

+272
-288
lines changed

4 files changed

+272
-288
lines changed

ReleaseNotes/08_31_2023.txt

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
Features:
3+
4+
Bug Fixes/Re-organization:
5+
6+
- Special Function Property Gamma Inequality Lemma - Gautschi Right #1 (1, 2)
7+
- Special Function Property Gamma Inequality Lemma - Gautschi Right #2 (3, 4)
8+
- Special Function Property Gamma Inequality Lemma - Jensen Multi-point Interpolant #1 (5, 6, 7)
9+
- Special Function Property Gamma Inequality Lemma - Jensen Multi-point Interpolant #2 (8, 9, 10)
10+
- Special Function Property Gamma Inequality Lemma - Jensen Multi-point Interpolant #3 (11, 12, 13)
11+
- Special Function Property Gamma Inequality Lemma - Jensen Multi-point Interpolant #4 (14, 15, 16)
12+
- Special Function Property Gamma Inequality Lemma - Jensen Multi-point Interpolant #5 (17, 18)
13+
- Gamma Polynomial Quotient Lemma - Constructor (19, 20, 21)
14+
- Special Function Property Gamma Polynomial Quotient Lemma (22, 23, 24)
15+
- Special Function Property Gamma Polynomial Quotient Lemma - Monic P (25, 26)
16+
- Special Function Property Gamma Polynomial Quotient Lemma - Monic Q (27, 28)
17+
- Special Function Property Gamma Polynomial Quotient Lemma - Constructor (29, 30)
18+
- Special Function Property Gamma Polynomial Quotient Lemma - Equality #1 (31, 32, 33)
19+
- Special Function Property Gamma Polynomial Quotient Lemma - Equality #2 (34, 35, 36)
20+
- Special Function Property Gamma Polynomial Quotient Lemma - Equality #3 (37, 38)
21+
- Special Function Property Gamma Polynomial Quotient Lemma - Equality #4 (39, 40)
22+
- Special Function Property Gauss Contiguous Equality Lemma (41, 42, 43)
23+
- Special Function Property Gauss Contiguous Equality Lemma - Relation Identity 2 #1 (44, 45, 46)
24+
- Special Function Property Gauss Contiguous Equality Lemma - Relation Identity 2 #2 (47, 48, 49)
25+
- Special Function Property Gauss Contiguous Equality Lemma - Relation Identity 3 #1 (50, 51, 52)
26+
- Special Function Property Gauss Contiguous Equality Lemma - Relation Identity 3 #2 (53, 54, 55)
27+
- Special Function Property Gauss Contiguous Equality Lemma - Relation Identity 4 #1 (56, 57, 58)
28+
- Special Function Property Gauss Contiguous Equality Lemma - Relation Identity 4 #2 (59, 60)
29+
30+
31+
Samples:
32+
33+
IdeaDRIP:

ScheduleSheet.xlsx

107 Bytes
Binary file not shown.

src/main/java/org/drip/specialfunction/property/GammaPolynomialQuotientLemma.java

+67-43
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11

22
package org.drip.specialfunction.property;
33

4+
import org.drip.function.definition.R1PropertyVerification;
5+
import org.drip.function.definition.R1ToR1Property;
6+
import org.drip.function.r1tor1.MonicPolynomial;
7+
import org.drip.specialfunction.loggamma.InfiniteSumEstimator;
8+
49
/*
510
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
611
*/
712

813
/*!
14+
* Copyright (C) 2025 Lakshmi Krishnamurthy
15+
* Copyright (C) 2024 Lakshmi Krishnamurthy
16+
* Copyright (C) 2023 Lakshmi Krishnamurthy
917
* Copyright (C) 2022 Lakshmi Krishnamurthy
1018
* Copyright (C) 2021 Lakshmi Krishnamurthy
1119
* Copyright (C) 2020 Lakshmi Krishnamurthy
@@ -78,7 +86,7 @@
7886

7987
/**
8088
* <i>GammaPolynomialQuotientLemma</i> contains the Verifiable Gamma Polynomial Quotient Equality Lemma. The
81-
* References are:
89+
* References are:
8290
*
8391
* <br><br>
8492
* <ul>
@@ -102,30 +110,65 @@
102110
* Wikipedia (2019): Gamma Function https://en.wikipedia.org/wiki/Gamma_function
103111
* </li>
104112
* </ul>
113+
*
114+
* It provides the following functionality:
105115
*
106-
* <br><br>
107116
* <ul>
108-
* <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></li>
109-
* <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FunctionAnalysisLibrary.md">Function Analysis Library</a></li>
110-
* <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/README.md">Special Function Implementation Analysis</a></li>
111-
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/property/README.md">Special Function Property Lemma Verifiers</a></li>
117+
* <li><i>GammaPolynomialQuotientLemma</i> Constructor</li>
118+
* <li>Retrieve the Monic Polynomial "P"</li>
119+
* <li>Retrieve the Monic Polynomial "Q"</li>
120+
* <li>Run the Equality Lemma over the specified a and b</li>
112121
* </ul>
113122
*
123+
* <br>
124+
* <style>table, td, th {
125+
* padding: 1px; border: 2px solid #008000; border-radius: 8px; background-color: #dfff00;
126+
* text-align: center; color: #0000ff;
127+
* }
128+
* </style>
129+
*
130+
* <table style="border:1px solid black;margin-left:auto;margin-right:auto;">
131+
* <tr><td><b>Module </b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></td></tr>
132+
* <tr><td><b>Library</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FunctionAnalysisLibrary.md">Function Analysis Library</a></td></tr>
133+
* <tr><td><b>Project</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/README.md">Special Function Implementation and Analysis</a></td></tr>
134+
* <tr><td><b>Package</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/property/README.md">Special Function Property Lemma Verifiers</a></td></tr>
135+
* </table>
136+
*
114137
* @author Lakshmi Krishnamurthy
115138
*/
116139

117140
public class GammaPolynomialQuotientLemma
118141
{
119-
private org.drip.function.r1tor1.MonicPolynomial _monicPolynomialP = null;
120-
private org.drip.function.r1tor1.MonicPolynomial _monicPolynomialQ = null;
142+
private MonicPolynomial _monicPolynomialP = null;
143+
private MonicPolynomial _monicPolynomialQ = null;
144+
145+
/**
146+
* <i>GammaPolynomialQuotientLemma</i> Constructor
147+
*
148+
* @param monicPolynomialP Monic Polynomial "P"
149+
* @param monicPolynomialQ Monic Polynomial "Q"
150+
*
151+
* @throws Exception Thrown if the Inputs are Invalid
152+
*/
153+
154+
public GammaPolynomialQuotientLemma (
155+
final MonicPolynomial monicPolynomialP,
156+
final MonicPolynomial monicPolynomialQ)
157+
throws Exception
158+
{
159+
if (null == (_monicPolynomialP = monicPolynomialP) || null == (_monicPolynomialQ = monicPolynomialQ))
160+
{
161+
throw new Exception ("GammaPolynomialQuotientLemma Constructor => Invalid Inputs");
162+
}
163+
}
121164

122165
/**
123166
* Retrieve the Monic Polynomial "P"
124167
*
125168
* @return The Monic Polynomial "P"
126169
*/
127170

128-
public org.drip.function.r1tor1.MonicPolynomial _monicPolynomialP()
171+
public MonicPolynomial monicPolynomialP()
129172
{
130173
return _monicPolynomialP;
131174
}
@@ -136,7 +179,7 @@ public org.drip.function.r1tor1.MonicPolynomial _monicPolynomialP()
136179
* @return The Monic Polynomial "Q"
137180
*/
138181

139-
public org.drip.function.r1tor1.MonicPolynomial _monicPolynomialQ()
182+
public MonicPolynomial monicPolynomialQ()
140183
{
141184
return _monicPolynomialQ;
142185
}
@@ -150,57 +193,38 @@ public org.drip.function.r1tor1.MonicPolynomial _monicPolynomialQ()
150193
* @return Result of the Equality Lemma Run
151194
*/
152195

153-
public org.drip.function.definition.R1PropertyVerification equalityLemma (
196+
public R1PropertyVerification equalityLemma (
154197
final int a,
155198
final int b)
156199
{
157-
if (a >= b)
158-
{
200+
if (a >= b) {
159201
return null;
160202
}
161203

162-
org.drip.specialfunction.loggamma.InfiniteSumEstimator logGammaEstimator =
163-
org.drip.specialfunction.loggamma.InfiniteSumEstimator.Weierstrass (1638400);
204+
InfiniteSumEstimator logGammaEstimator = InfiniteSumEstimator.Weierstrass (1638400);
164205

165-
try
166-
{
206+
try {
167207
double lValue = 1.;
168208

169-
for (int i = a; i <= b; ++i)
170-
{
209+
for (int i = a; i <= b; ++i) {
171210
lValue = lValue * _monicPolynomialP.evaluate (i) / _monicPolynomialQ.evaluate (i);
172211
}
173212

174-
double rValue = java.lang.Math.exp (
175-
_monicPolynomialP.logGammaProduct (
176-
a,
177-
b,
178-
logGammaEstimator
179-
) - _monicPolynomialQ.logGammaProduct (
180-
a,
181-
b,
182-
logGammaEstimator
183-
)
213+
double rValue = Math.exp (
214+
_monicPolynomialP.logGammaProduct (a, b, logGammaEstimator) -
215+
_monicPolynomialQ.logGammaProduct (a, b, logGammaEstimator)
184216
);
185217

186-
double leftTolerance = java.lang.Math.abs (lValue *
187-
org.drip.function.definition.R1ToR1Property.MISMATCH_TOLERANCE);
218+
double leftTolerance = Math.abs (lValue * R1ToR1Property.MISMATCH_TOLERANCE);
188219

189-
double rightTolerance = java.lang.Math.abs (rValue *
190-
org.drip.function.definition.R1ToR1Property.MISMATCH_TOLERANCE);
220+
double rightTolerance = Math.abs (rValue * R1ToR1Property.MISMATCH_TOLERANCE);
191221

192222
double tolerance = leftTolerance < rightTolerance ? leftTolerance: rightTolerance;
193-
tolerance = tolerance < org.drip.function.definition.R1ToR1Property.MISMATCH_TOLERANCE ?
194-
org.drip.function.definition.R1ToR1Property.MISMATCH_TOLERANCE : tolerance;
223+
tolerance = tolerance < R1ToR1Property.MISMATCH_TOLERANCE ?
224+
R1ToR1Property.MISMATCH_TOLERANCE : tolerance;
195225

196-
return new org.drip.function.definition.R1PropertyVerification (
197-
lValue,
198-
rValue,
199-
java.lang.Math.abs (lValue - rValue) < tolerance
200-
);
201-
}
202-
catch (java.lang.Exception e)
203-
{
226+
return new R1PropertyVerification (lValue, rValue, Math.abs (lValue - rValue) < tolerance);
227+
} catch (Exception e) {
204228
e.printStackTrace();
205229
}
206230

0 commit comments

Comments
 (0)