Skip to content

Commit

Permalink
Features:
Browse files Browse the repository at this point in the history
Bug Fixes/Re-organization:

	- Special Function Derived Log Big Pi - N Ellipsoid Volume (1)
	- Special Function Derived Log Small Pi (2, 3, 4)
	- Special Function Derived Log Small Pi - Big Estimator (5, 6)
	- Special Function Derived Log Small Pi - Constructor (7, 8)
	- Special Function Derived Log Small Pi - Evaluate (9, 10)
	- Special Function Derived Log Small Pi - Weierstrass (11, 12)
	- Special Function Derived Power Source Exponential Decay (13, 14, 15)
	- Special Function Derived Power Source Exponential Decay - Source Coefficient (16, 17)
	- Special Function Derived Power Source Exponential Decay - Constructor (18, 19)
	- Special Function Derived Power Source Exponential Decay - Evaluate (20, 21, 22)
	- Special Function Derived Riemann Zeta (23, 24, 25)
	- Special Function Derived Riemann Zeta - Gamma Estimator (26, 27)
	- Special Function Derived Riemann Zeta - Constructor (28, 29)
	- Special Function Derived Riemann Zeta - Evaluate (30, 31, 32)
	- Special Function Derived Riemann Zeta - Apery's Constant (33, 34)
	- Special Function Derived Stretched Exponential Moment (35, 36, 37)
	- Special Function Derived Stretched Exponential Moment - Beta (38, 39)
	- Special Function Derived Stretched Exponential Moment - Tau (40, 41)
	- Special Function Derived Stretched Exponential Moment - Constructor (42, 43)
	- Special Function Derived Stretched Exponential Moment - Evaluate (44, 45, 46)
	- Special Function Derived Stretched Exponential Moment - Weierstrass #1 (47, 48, 49)
	- Special Function Derived Stretched Exponential Moment - Weierstrass #2 (50, 51)
	- Special Function Digamma Binet First Integral (52, 53)
	- Special Function Digamma Binet First Integral - Constructor (54)
	- Special Function Digamma Binet First Integral - Evaluate (55, 56, 57)
	- Special Function Digamma Cumulative Series Term (58, 59, 60)


Samples:

IdeaDRIP:
  • Loading branch information
Lakshmik committed Feb 5, 2024
1 parent 54a7a2b commit 23249ff
Show file tree
Hide file tree
Showing 8 changed files with 306 additions and 198 deletions.
36 changes: 36 additions & 0 deletions ReleaseNotes/06_20_2023.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

Features:

Bug Fixes/Re-organization:

- Special Function Derived Log Big Pi - N Ellipsoid Volume (1)
- Special Function Derived Log Small Pi (2, 3, 4)
- Special Function Derived Log Small Pi - Big Estimator (5, 6)
- Special Function Derived Log Small Pi - Constructor (7, 8)
- Special Function Derived Log Small Pi - Evaluate (9, 10)
- Special Function Derived Log Small Pi - Weierstrass (11, 12)
- Special Function Derived Power Source Exponential Decay (13, 14, 15)
- Special Function Derived Power Source Exponential Decay - Source Coefficient (16, 17)
- Special Function Derived Power Source Exponential Decay - Constructor (18, 19)
- Special Function Derived Power Source Exponential Decay - Evaluate (20, 21, 22)
- Special Function Derived Riemann Zeta (23, 24, 25)
- Special Function Derived Riemann Zeta - Gamma Estimator (26, 27)
- Special Function Derived Riemann Zeta - Constructor (28, 29)
- Special Function Derived Riemann Zeta - Evaluate (30, 31, 32)
- Special Function Derived Riemann Zeta - Apery's Constant (33, 34)
- Special Function Derived Stretched Exponential Moment (35, 36, 37)
- Special Function Derived Stretched Exponential Moment - Beta (38, 39)
- Special Function Derived Stretched Exponential Moment - Tau (40, 41)
- Special Function Derived Stretched Exponential Moment - Constructor (42, 43)
- Special Function Derived Stretched Exponential Moment - Evaluate (44, 45, 46)
- Special Function Derived Stretched Exponential Moment - Weierstrass #1 (47, 48, 49)
- Special Function Derived Stretched Exponential Moment - Weierstrass #2 (50, 51)
- Special Function Digamma Binet First Integral (52, 53)
- Special Function Digamma Binet First Integral - Constructor (54)
- Special Function Digamma Binet First Integral - Evaluate (55, 56, 57)
- Special Function Digamma Cumulative Series Term (58, 59, 60)


Samples:

IdeaDRIP:
Binary file modified ScheduleSheet.xlsx
Binary file not shown.
67 changes: 41 additions & 26 deletions src/main/java/org/drip/specialfunction/derived/LogSmallPi.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@

package org.drip.specialfunction.derived;

import org.drip.function.definition.R1ToR1;
import org.drip.numerical.common.NumberUtil;

/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*/

/*!
* Copyright (C) 2025 Lakshmi Krishnamurthy
* Copyright (C) 2024 Lakshmi Krishnamurthy
* Copyright (C) 2023 Lakshmi Krishnamurthy
* Copyright (C) 2022 Lakshmi Krishnamurthy
* Copyright (C) 2021 Lakshmi Krishnamurthy
* Copyright (C) 2020 Lakshmi Krishnamurthy
Expand Down Expand Up @@ -78,7 +84,7 @@

/**
* <i>LogSmallPi</i> implements the Log Small Pi Function - the Reciprocal of the Log Big Pi Function. The
* References are:
* References are:
*
* <br><br>
* <ul>
Expand All @@ -102,21 +108,35 @@
* Wikipedia (2019): Gamma Function https://en.wikipedia.org/wiki/Gamma_function
* </li>
* </ul>
*
* It provides the following functionality:
*
* <br><br>
* <ul>
* <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></li>
* <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FunctionAnalysisLibrary.md">Function Analysis Library</a></li>
* <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>
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/derived/README.md">Special Functions Derived using Others</a></li>
* <li>Generate the Weierstrass Infinite Sum Series Version of Log Small Pi Estimator</li>
* <li><i>LogSmallPi</i> Constructor</li>
* <li>Retrieve the <i>LogBigPi</i> Estimator</li>
* </ul>
*
* <br>
* <style>table, td, th {
* padding: 1px; border: 2px solid #008000; border-radius: 8px; background-color: #dfff00;
* text-align: center; color: #0000ff;
* }
* </style>
*
* <table style="border:1px solid black;margin-left:auto;margin-right:auto;">
* <tr><td><b>Module </b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ProductCore.md">Product Core Module</a></td></tr>
* <tr><td><b>Library</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FixedIncomeAnalyticsLibrary.md">Fixed Income Analytics</a></td></tr>
* <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>
* <tr><td><b>Package</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/derived/README.md">Special Functions Derived using Others</a></td></tr>
* </table>
*
* @author Lakshmi Krishnamurthy
*/

public class LogSmallPi extends org.drip.function.definition.R1ToR1
public class LogSmallPi extends R1ToR1
{
private org.drip.function.definition.R1ToR1 _logBigPiEstimator = null;
private R1ToR1 _logBigPiEstimator = null;

/**
* Generate the Weierstrass Infinite Sum Series Version of Log Small Pi Estimator
Expand All @@ -129,35 +149,31 @@ public class LogSmallPi extends org.drip.function.definition.R1ToR1
public static final LogSmallPi Weierstrass (
final int termCount)
{
try
{
return new LogSmallPi (org.drip.specialfunction.derived.LogBigPi.Weierstrass (termCount));
}
catch (java.lang.Exception e)
{
try {
return new LogSmallPi (LogBigPi.Weierstrass (termCount));
} catch (Exception e) {
e.printStackTrace();
}

return null;
}

/**
* LogSmallPi Constructor
* <i>LogSmallPi</i> Constructor
*
* @param logBigPiEstimator The Log Big Pi Estimator
*
* @throws java.lang.Exception Thrown if the Inputs are Invalid
* @throws Exception Thrown if the Inputs are Invalid
*/

public LogSmallPi (
final org.drip.function.definition.R1ToR1 logBigPiEstimator)
throws java.lang.Exception
final R1ToR1 logBigPiEstimator)
throws Exception
{
super (null);

if (null == (_logBigPiEstimator = logBigPiEstimator))
{
throw new java.lang.Exception ("LogSmallPi Constructor => Invalid Inputs");
if (null == (_logBigPiEstimator = logBigPiEstimator)) {
throw new Exception ("LogSmallPi Constructor => Invalid Inputs");
}
}

Expand All @@ -167,18 +183,17 @@ public LogSmallPi (
* @return The Log Big Pi Estimator
*/

public org.drip.function.definition.R1ToR1 logBigPiEstimator()
public R1ToR1 logBigPiEstimator()
{
return _logBigPiEstimator;
}

@Override public double evaluate (
final double z)
throws java.lang.Exception
throws Exception
{
if (!org.drip.numerical.common.NumberUtil.IsValid (z))
{
throw new java.lang.Exception ("LogSmallPi::evaluate => Invalid Inputs");
if (!NumberUtil.IsValid (z)) {
throw new Exception ("LogSmallPi::evaluate => Invalid Inputs");
}

return -1. * _logBigPiEstimator.evaluate (z);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@

package org.drip.specialfunction.derived;

import org.drip.function.definition.R1ToR1;
import org.drip.numerical.common.NumberUtil;
import org.drip.numerical.differentiation.DerivativeControl;
import org.drip.numerical.integration.NewtonCotesQuadratureGenerator;

/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*/

/*!
* Copyright (C) 2025 Lakshmi Krishnamurthy
* Copyright (C) 2024 Lakshmi Krishnamurthy
* Copyright (C) 2023 Lakshmi Krishnamurthy
* Copyright (C) 2022 Lakshmi Krishnamurthy
* Copyright (C) 2021 Lakshmi Krishnamurthy
* Copyright (C) 2020 Lakshmi Krishnamurthy
Expand Down Expand Up @@ -78,7 +86,7 @@

/**
* <i>PowerSourceExponentialDecay</i> implements the Power Source Exponential Decay Function. The References
* are:
* are:
*
* <br><br>
* <ul>
Expand All @@ -102,29 +110,43 @@
* Wikipedia (2019): Gamma Function https://en.wikipedia.org/wiki/Gamma_function
* </li>
* </ul>
*
* It provides the following functionality:
*
* <br><br>
* <ul>
* <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></li>
* <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FunctionAnalysisLibrary.md">Function Analysis Library</a></li>
* <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>
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/derived/README.md">Special Functions Derived using Others</a></li>
* <li>Construct the Analytic Version of <i>PowerSourceExponentialDecay</i></li>
* <li><i>PowerSourceExponentialDecay</i> Constructor</li>
* <li>Retrieve the Source Power Coefficient</li>
* </ul>
*
* <br>
* <style>table, td, th {
* padding: 1px; border: 2px solid #008000; border-radius: 8px; background-color: #dfff00;
* text-align: center; color: #0000ff;
* }
* </style>
*
* <table style="border:1px solid black;margin-left:auto;margin-right:auto;">
* <tr><td><b>Module </b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ProductCore.md">Product Core Module</a></td></tr>
* <tr><td><b>Library</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FixedIncomeAnalyticsLibrary.md">Fixed Income Analytics</a></td></tr>
* <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>
* <tr><td><b>Package</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/derived/README.md">Special Functions Derived using Others</a></td></tr>
* </table>
*
* @author Lakshmi Krishnamurthy
*/

public class PowerSourceExponentialDecay extends org.drip.function.definition.R1ToR1
public class PowerSourceExponentialDecay extends R1ToR1
{
private double _sourcePowerCoefficient = java.lang.Double.NaN;
private double _sourcePowerCoefficient = Double.NaN;

/**
* Construct the Analytic Version of PowerSourceExponentialDecay
* Construct the Analytic Version of <i>PowerSourceExponentialDecay</i>
*
* @param logGammaEstimator The Log Gamma Estimator
* @param sourcePowerCoefficient The Source Power Coefficient
*
* @return The Analytic Version of PowerSourceExponentialDecay
* @return The Analytic Version of <i>PowerSourceExponentialDecay</i>
*/

public static final PowerSourceExponentialDecay Analytic (
Expand Down Expand Up @@ -172,25 +194,24 @@ public static final PowerSourceExponentialDecay Analytic (
}

/**
* PowerSourceExponentialDecay Constructor
* <i>PowerSourceExponentialDecay</i> Constructor
*
* @param dc The Derivative Control
* @param derivativeControl The Derivative Control
* @param sourcePowerCoefficient The Source Power Coefficient
*
* @throws java.lang.Exception Thrown if the Inputs are Invalid
* @throws Exception Thrown if the Inputs are Invalid
*/

public PowerSourceExponentialDecay (
final org.drip.numerical.differentiation.DerivativeControl dc,
final DerivativeControl derivativeControl,
final double sourcePowerCoefficient)
throws java.lang.Exception
{
super (dc);
super (derivativeControl);

if (!org.drip.numerical.common.NumberUtil.IsValid (_sourcePowerCoefficient = sourcePowerCoefficient)
|| 0. >= _sourcePowerCoefficient)
{
throw new java.lang.Exception ("PowerSourceExponentialDecay Constructor => Invalid Inputs");
if (!NumberUtil.IsValid (_sourcePowerCoefficient = sourcePowerCoefficient) ||
0. >= _sourcePowerCoefficient) {
throw new Exception ("PowerSourceExponentialDecay Constructor => Invalid Inputs");
}
}

Expand All @@ -207,28 +228,20 @@ public double sourcePowerCoefficient()

@Override public double evaluate (
final double exponentialDecayCoefficient)
throws java.lang.Exception
throws Exception
{
if (!org.drip.numerical.common.NumberUtil.IsValid (exponentialDecayCoefficient) ||
0. >= exponentialDecayCoefficient)
{
throw new java.lang.Exception ("PowerSourceExponentialDecay::evaluate => Invalid Inputs");
if (!NumberUtil.IsValid (exponentialDecayCoefficient) || 0. >= exponentialDecayCoefficient) {
throw new Exception ("PowerSourceExponentialDecay::evaluate => Invalid Inputs");
}

return org.drip.numerical.integration.NewtonCotesQuadratureGenerator.GaussLaguerreLeftDefinite (
0.,
100
).integrate (
new org.drip.function.definition.R1ToR1 (null)
{
return NewtonCotesQuadratureGenerator.GaussLaguerreLeftDefinite (0., 100).integrate (
new R1ToR1 (null) {
@Override public double evaluate (
final double t)
throws java.lang.Exception
throws Exception
{
return java.lang.Double.isInfinite (t) ? 0. : java.lang.Math.pow (
t,
_sourcePowerCoefficient
) * java.lang.Math.exp (-1. * exponentialDecayCoefficient * t);
return Double.isInfinite (t) ? 0. : Math.pow (t, _sourcePowerCoefficient) *
Math.exp (-1. * exponentialDecayCoefficient * t);
}
}
);
Expand Down
Loading

0 comments on commit 23249ff

Please sign in to comment.