diff --git a/ReleaseNotes/06_20_2023.txt b/ReleaseNotes/06_20_2023.txt new file mode 100644 index 000000000000..32634956215e --- /dev/null +++ b/ReleaseNotes/06_20_2023.txt @@ -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: diff --git a/ScheduleSheet.xlsx b/ScheduleSheet.xlsx index 61336370d37e..d972cc1cc841 100644 Binary files a/ScheduleSheet.xlsx and b/ScheduleSheet.xlsx differ diff --git a/src/main/java/org/drip/specialfunction/derived/LogSmallPi.java b/src/main/java/org/drip/specialfunction/derived/LogSmallPi.java index 4d2876d44b0c..0f38bc893170 100644 --- a/src/main/java/org/drip/specialfunction/derived/LogSmallPi.java +++ b/src/main/java/org/drip/specialfunction/derived/LogSmallPi.java @@ -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 @@ -78,7 +84,7 @@ /** * LogSmallPi implements the Log Small Pi Function - the Reciprocal of the Log Big Pi Function. The - * References are: + * References are: * *

* + * + * It provides the following functionality: * - *

* * + *
+ * + * + * + * + * + * + * + *
Module Product Core Module
Library Fixed Income Analytics
Project Special Function Implementation and Analysis
Package Special Functions Derived using Others
+ * * @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 @@ -129,12 +149,9 @@ 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(); } @@ -142,22 +159,21 @@ public static final LogSmallPi Weierstrass ( } /** - * LogSmallPi Constructor + * LogSmallPi 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"); } } @@ -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); diff --git a/src/main/java/org/drip/specialfunction/derived/PowerSourceExponentialDecay.java b/src/main/java/org/drip/specialfunction/derived/PowerSourceExponentialDecay.java index 24f84db4820d..6f319b9c6ac3 100644 --- a/src/main/java/org/drip/specialfunction/derived/PowerSourceExponentialDecay.java +++ b/src/main/java/org/drip/specialfunction/derived/PowerSourceExponentialDecay.java @@ -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 @@ -78,7 +86,7 @@ /** * PowerSourceExponentialDecay implements the Power Source Exponential Decay Function. The References - * are: + * are: * *

* + * + * It provides the following functionality: * - *

* * + *
+ * + * + * + * + * + * + * + *
Module Product Core Module
Library Fixed Income Analytics
Project Special Function Implementation and Analysis
Package Special Functions Derived using Others
+ * * @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 PowerSourceExponentialDecay * * @param logGammaEstimator The Log Gamma Estimator * @param sourcePowerCoefficient The Source Power Coefficient * - * @return The Analytic Version of PowerSourceExponentialDecay + * @return The Analytic Version of PowerSourceExponentialDecay */ public static final PowerSourceExponentialDecay Analytic ( @@ -172,25 +194,24 @@ public static final PowerSourceExponentialDecay Analytic ( } /** - * PowerSourceExponentialDecay Constructor + * PowerSourceExponentialDecay 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"); } } @@ -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); } } ); diff --git a/src/main/java/org/drip/specialfunction/derived/RiemannZeta.java b/src/main/java/org/drip/specialfunction/derived/RiemannZeta.java index 7f97894dd575..cdcb2386440f 100644 --- a/src/main/java/org/drip/specialfunction/derived/RiemannZeta.java +++ b/src/main/java/org/drip/specialfunction/derived/RiemannZeta.java @@ -1,11 +1,20 @@ 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; +import org.drip.specialfunction.gamma.NemesAnalytic; + /* * -*- 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 @@ -101,21 +110,35 @@ * Wikipedia (2019): Gamma Function https://en.wikipedia.org/wiki/Gamma_function * * + * + * It provides the following functionality: * - *

* * + *
+ * + * + * + * + * + * + * + *
Module Product Core Module
Library Fixed Income Analytics
Project Special Function Implementation and Analysis
Package Special Functions Derived using Others
+ * * @author Lakshmi Krishnamurthy */ -public class RiemannZeta extends org.drip.function.definition.R1ToR1 +public class RiemannZeta extends R1ToR1 { - private org.drip.function.definition.R1ToR1 _gammaEstimator = null; + private R1ToR1 _gammaEstimator = null; /** * Compute the Apery's Constant (i.e., Riemann Zeta at Value 3.) @@ -125,43 +148,32 @@ public class RiemannZeta extends org.drip.function.definition.R1ToR1 public static final double AperyConstant() { - try - { - return new RiemannZeta ( - null, - new org.drip.specialfunction.gamma.NemesAnalytic ( - null - ) - ).evaluate ( - 3. - ); - } - catch (java.lang.Exception e) - { + try { + return new RiemannZeta (null, new NemesAnalytic (null)).evaluate (3.); + } catch (Exception e) { } - return java.lang.Double.NaN; + return Double.NaN; } /** - * RiemannZeta Constructor + * RiemannZeta Constructor * - * @param dc The Derivative Control + * @param derivativeControl The Derivative Control * @param gammaEstimator The Gamma Estimator * - * @throws java.lang.Exception Thrown if the Inputs are Invalid + * @throws Exception Thrown if the Inputs are Invalid */ public RiemannZeta ( - final org.drip.numerical.differentiation.DerivativeControl dc, - final org.drip.function.definition.R1ToR1 gammaEstimator) + final DerivativeControl derivativeControl, + final R1ToR1 gammaEstimator) throws java.lang.Exception { - super (dc); + super (derivativeControl); - if (null == (_gammaEstimator = gammaEstimator)) - { - throw new java.lang.Exception ("RiemannZeta Constructor => Invalid Inputs"); + if (null == (_gammaEstimator = gammaEstimator)) { + throw new Exception ("RiemannZeta Constructor => Invalid Inputs"); } } @@ -171,34 +183,27 @@ public RiemannZeta ( * @return The Gamma Estimator */ - public org.drip.function.definition.R1ToR1 gammaEstimator() + public R1ToR1 gammaEstimator() { return _gammaEstimator; } @Override public double evaluate ( final double s) - throws java.lang.Exception + throws Exception { - if (!org.drip.numerical.common.NumberUtil.IsValid (s)) - { - throw new java.lang.Exception ("RiemannZeta::evaluate => Invalid Inputs"); + if (!NumberUtil.IsValid (s)) { + throw new Exception ("RiemannZeta::evaluate => Invalid Inputs"); } - return org.drip.numerical.integration.NewtonCotesQuadratureGenerator.GaussLaguerreLeftDefinite ( - 0., - 10000 - ).integrate ( - new org.drip.function.definition.R1ToR1 (null) - { + return NewtonCotesQuadratureGenerator.GaussLaguerreLeftDefinite (0., 10000 ).integrate ( + new R1ToR1 (null) { @Override public double evaluate ( final double t) - throws java.lang.Exception + throws Exception { - return java.lang.Double.isInfinite (t) || 0. == t ? 0. : java.lang.Math.pow ( - t, - s - 1 - ) / ((java.lang.Math.exp (t) - 1.)); + return Double.isInfinite (t) || 0. == t ? 0. : + Math.pow (t, s - 1) / ((Math.exp (t) - 1.)); } } ) / _gammaEstimator.evaluate (s); diff --git a/src/main/java/org/drip/specialfunction/derived/StretchedExponentialMoment.java b/src/main/java/org/drip/specialfunction/derived/StretchedExponentialMoment.java index c9fb4bb4045a..f17daccd3db0 100644 --- a/src/main/java/org/drip/specialfunction/derived/StretchedExponentialMoment.java +++ b/src/main/java/org/drip/specialfunction/derived/StretchedExponentialMoment.java @@ -1,11 +1,20 @@ 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; +import org.drip.specialfunction.loggamma.InfiniteSumEstimator; + /* * -*- 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 @@ -78,7 +87,7 @@ /** * StretchedExponentialMoment estimates the specified Moment Stretched Exponential Integral Function. - * The References are: + * The References are: * *

* + * + * It provides the following functionality: * - *

* * + *
+ * + * + * + * + * + * + * + *
Module Product Core Module
Library Fixed Income Analytics
Project Special Function Implementation and Analysis
Package Special Functions Derived using Others
+ * * @author Lakshmi Krishnamurthy */ -public class StretchedExponentialMoment extends org.drip.function.definition.R1ToR1 +public class StretchedExponentialMoment extends R1ToR1 { - private double _tau = java.lang.Double.NaN; - private double _beta = java.lang.Double.NaN; + private double _tau = Double.NaN; + private double _beta = Double.NaN; /** - * Construct the Weierstrass Version of the Log of StretchedExponentialMoment Estimator + * Construct the Weierstrass Version of the Log of StretchedExponentialMoment Estimator * * @param tau Tau * @param beta Beta * @param termCount Number of Terms in the Estimation * - * @return Weierstrass Version of the Log of StretchedExponentialMoment Estimator + * @return Weierstrass Version of the Log of StretchedExponentialMoment Estimator */ public static final StretchedExponentialMoment Weierstrass ( @@ -134,42 +158,31 @@ public static final StretchedExponentialMoment Weierstrass ( final double beta, final int termCount) { - final org.drip.specialfunction.loggamma.InfiniteSumEstimator weierstrassLogGamma = - org.drip.specialfunction.loggamma.InfiniteSumEstimator.Weierstrass (termCount); + final InfiniteSumEstimator weierstrassLogGamma = InfiniteSumEstimator.Weierstrass (termCount); - if (null == weierstrassLogGamma) - { + if (null == weierstrassLogGamma) { return null; } - try - { - return new StretchedExponentialMoment ( - null, - tau, - beta - ) - { + try { + return new StretchedExponentialMoment (null, tau, beta) { @Override public double evaluate ( final double moment) - throws java.lang.Exception + throws Exception { - if (!org.drip.numerical.common.NumberUtil.IsValid (moment) || 1. > moment) - { - throw new java.lang.Exception - ("StretchedExponentialMoment::Weierstrass::evaluate => Invalid Inputs"); + if (!NumberUtil.IsValid (moment) || 1. > moment) { + throw new Exception ( + "StretchedExponentialMoment::Weierstrass::evaluate => Invalid Inputs" + ); } - return java.lang.Math.exp ( - moment * java.lang.Math.log (tau) + - weierstrassLogGamma.evaluate (moment / beta) - - java.lang.Math.log (beta) + return Math.exp ( + moment * Math.log (tau) + weierstrassLogGamma.evaluate (moment / beta) - + Math.log (beta) ); } }; - } - catch (java.lang.Exception e) - { + } catch (Exception e) { e.printStackTrace(); } @@ -177,27 +190,26 @@ public static final StretchedExponentialMoment Weierstrass ( } /** - * StretchedExponentialMoment Constructor + * StretchedExponentialMoment Constructor * - * @param dc The Derivative Control + * @param derivativeControl The Derivative Control * @param tau Tau * @param beta Beta * - * @throws java.lang.Exception Thrown if the Inputs are Invalid + * @throws Exception Thrown if the Inputs are Invalid */ public StretchedExponentialMoment ( - final org.drip.numerical.differentiation.DerivativeControl dc, + final DerivativeControl derivativeControl, final double tau, final double beta) - throws java.lang.Exception + throws Exception { - super (dc); + super (derivativeControl); - if (!org.drip.numerical.common.NumberUtil.IsValid (_tau = tau) || 0. >= _tau || - !org.drip.numerical.common.NumberUtil.IsValid (_beta = beta) || 0. >= _beta) - { - throw new java.lang.Exception ("StretchedExponentialMoment Constructor => Invalid Inputs"); + if (!NumberUtil.IsValid (_tau = tau) || 0. >= _tau || + !NumberUtil.IsValid (_beta = beta) || 0. >= _beta) { + throw new Exception ("StretchedExponentialMoment Constructor => Invalid Inputs"); } } @@ -225,32 +237,20 @@ public double beta() @Override public double evaluate ( final double moment) - throws java.lang.Exception + throws Exception { - if (!org.drip.numerical.common.NumberUtil.IsValid (moment) || 1. > moment) - { - throw new java.lang.Exception ("StretchedExponentialMoment::evaluate => Invalid Inputs"); + if (!NumberUtil.IsValid (moment) || 1. > moment) { + throw new Exception ("StretchedExponentialMoment::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. == t ? 0. : java.lang.Math.pow ( - t, - moment - 1 - ) * java.lang.Math.exp ( - -java.lang.Math.pow ( - t / _tau, - _beta - ) - ); + return Double.isInfinite (t) || 0. == t ? 0. : Math.pow (t, moment - 1) * + Math.exp (-Math.pow (t / _tau, _beta)); } } ); diff --git a/src/main/java/org/drip/specialfunction/digamma/BinetFirstIntegral.java b/src/main/java/org/drip/specialfunction/digamma/BinetFirstIntegral.java index 7a7b71b0bcbe..0aa6a9d080ed 100644 --- a/src/main/java/org/drip/specialfunction/digamma/BinetFirstIntegral.java +++ b/src/main/java/org/drip/specialfunction/digamma/BinetFirstIntegral.java @@ -1,11 +1,18 @@ package org.drip.specialfunction.digamma; +import org.drip.function.definition.R1ToR1; +import org.drip.numerical.common.NumberUtil; +import org.drip.numerical.laplacian.LaplaceTransformGaussLegendre; + /* * -*- 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 @@ -78,7 +85,7 @@ /** * BinetFirstIntegral demonstrates the Estimation of the Digamma Function using the Binet's First - * Integral. The References are: + * Integral. The References are: * *

* + * + * It provides the following functionality: * - *

* * + *
+ * + * + * + * + * + * + * + *
Module Product Core Module
Library Fixed Income Analytics
Project Special Function Implementation and Analysis
Package Estimation Techniques for Digamma Function
+ * * @author Lakshmi Krishnamurthy */ @@ -118,37 +137,35 @@ public class BinetFirstIntegral extends org.drip.function.definition.R1ToR1 { /** - * BinetFirstIntegral Constructor + * BinetFirstIntegral Constructor * - * @param dc The Derivative Control + * @param derivativeControl The Derivative Control */ public BinetFirstIntegral ( - final org.drip.numerical.differentiation.DerivativeControl dc) + final org.drip.numerical.differentiation.DerivativeControl derivativeControl) { - super (dc); + super (derivativeControl); } @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 ("BinetFirstIntegral::evaluate => Invalid Inputs"); + if (!NumberUtil.IsValid (z)) { + throw new Exception ("BinetFirstIntegral::evaluate => Invalid Inputs"); } - return -1. * new org.drip.numerical.laplacian.LaplaceTransformGaussLegendre ( + return -1. * new LaplaceTransformGaussLegendre ( null, - new org.drip.function.definition.R1ToR1 (null) - { + new R1ToR1 (null) { @Override public double evaluate ( final double t) - throws java.lang.Exception + throws Exception { - return 0 == t ? 0. : 0.5 - (1. / t) + 1. / (java.lang.Math.exp (t) - 1.); + return 0 == t ? 0. : 0.5 - (1. / t) + 1. / (Math.exp (t) - 1.); } } - ).evaluate (z) + java.lang.Math.log (z) - 0.5 / z; + ).evaluate (z) + Math.log (z) - 0.5 / z; } } diff --git a/src/main/java/org/drip/specialfunction/digamma/CumulativeSeriesTerm.java b/src/main/java/org/drip/specialfunction/digamma/CumulativeSeriesTerm.java index e6e605c6caae..127fbb81da4d 100644 --- a/src/main/java/org/drip/specialfunction/digamma/CumulativeSeriesTerm.java +++ b/src/main/java/org/drip/specialfunction/digamma/CumulativeSeriesTerm.java @@ -6,6 +6,9 @@ */ /*! + * 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 @@ -78,7 +81,7 @@ /** * CumulativeSeriesTerm implements a Single Term in the Cumulative Series for Digamma Estimation. The - * References are: + * References are: * *

* + * + * It provides the following functionality: * - *

* * + *
+ * + * + * + * + * + * + * + *
Module Product Core Module
Library Fixed Income Analytics
Project Special Function Implementation and Analysis
Package Estimation Techniques for Digamma Function
+ * * @author Lakshmi Krishnamurthy */