Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
What Is poi-5.2.3.jar?
What Is poi-5.2.3.jar?
✍: FYIcenter.com
poi-5.2.3.jar is one of the JAR files for Apache POI 5.2.3, which
provides an API for Microsoft document files of Word, Excel, PowerPoint, and Visio.
poi-5.2.3.jar supports Apache POI components that read and write Microsoft's OLE 2 Compound document format, which is used in early versions of Microsoft Office tools like Word 97, Excel 97, PowerPoint 97, etc.
poi-5.2.3.jar is distributed as part of the poi-bin-5.2.3-20220909.zip download file.
JAR File Size and Download Location:
JAR name: poi-5.2.3.jar Target JDK version: 9 File name: poi.jar, poi-5.2.3.jar File size: 2964641 bytes Release date: 09-09-2022 Download: Apache POI Website
Here are Java Source Code files for poi-5.2.3.jar:
⏎ org/apache/poi/ss/formula/functions/FinanceLib.java
/* ====================================================================
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.poi.ss.formula.functions;
/**
* This class is a functon library for common fiscal functions.
* <b>Glossary of terms/abbreviations:</b>
* <br>
* <ul>
* <li><em>FV:</em> Future Value</li>
* <li><em>PV:</em> Present Value</li>
* <li><em>NPV:</em> Net Present Value</li>
* <li><em>PMT:</em> (Periodic) Payment</li>
*
* </ul>
* For more info on the terms/abbreviations please use the references below
* (hyperlinks are subject to change):
* <p>
* Online References:
* <ol>
* <li>GNU Emacs Calc 2.02 Manual: http://theory.uwinnipeg.ca/gnu/calc/calc_203.html</li>
* <li>Yahoo Financial Glossary: http://biz.yahoo.com/f/g/nn.html#y</li>
* <li>MS Excel function reference: http://office.microsoft.com/en-us/assistance/CH062528251033.aspx</li>
* </ol>
*
* Implementation Notes:<p>
*
* Symbols used in the formulae that follow:<br>
* <ul>
* <li>p: present value</li>
* <li>f: future value</li>
* <li>n: number of periods</li>
* <li>y: payment (in each period)</li>
* <li>r: rate</li>
* <li>^: the power operator (NOT the java bitwise XOR operator!)</li>
* </ul>
* [From MS Excel function reference] Following are some of the key formulas
* that are used in this implementation:
* <pre>
* p(1+r)^n + y(1+rt)((1+r)^n-1)/r + f=0 ...{when r!=0}
* ny + p + f=0 ...{when r=0}
* </pre>
*/
public final class FinanceLib {
private FinanceLib() {
// no instances of this class
}
/**
* Future value of an amount given the number of payments, rate, amount
* of individual payment, present value and boolean value indicating whether
* payments are due at the beginning of period
* (false => payments are due at end of period)
* @param r rate
* @param n num of periods
* @param y pmt per period
* @param p present value
* @param t type (true=pmt at beginning of period, false=pmt at end of period)
*/
public static double fv(double r, double n, double y, double p, boolean t) {
if (r == 0) {
return -1*(p+(n*y));
} else {
double r1 = r + 1;
return ((1-Math.pow(r1, n)) * (t ? r1 : 1) * y ) / r
-
p*Math.pow(r1, n);
}
}
/**
* Present value of an amount given the number of future payments, rate, amount
* of individual payment, future value and boolean value indicating whether
* payments are due at the beginning of period
* (false => payments are due at end of period)
* @param r rate
* @param n num of periods
* @param y pmt per period
* @param f future value
* @param t type (true=pmt at beginning of period, false=pmt at end of period)
*/
public static double pv(double r, double n, double y, double f, boolean t) {
if (r == 0) {
return -1*((n*y)+f);
} else {
double r1 = r + 1;
return (( ( 1 - Math.pow(r1, n) ) / r ) * (t ? r1 : 1) * y - f)
/
Math.pow(r1, n);
}
}
/**
* calculates the Net Present Value of a principal amount
* given the discount rate and a sequence of cash flows
* (supplied as an array). If the amounts are income the value should
* be positive, else if they are payments and not income, the
* value should be negative.
* @param r rate
* @param cfs cashflow amounts
*/
public static double npv(double r, double[] cfs) {
double npv = 0;
double r1 = r + 1;
double trate = r1;
for (double cf : cfs) {
npv += cf / trate;
trate *= r1;
}
return npv;
}
/**
*
* @param r rate
* @param n num of periods
* @param p present value
* @param f future value
* @param t type (true=pmt at beginning of period, false=pmt at end of period)
*/
public static double pmt(double r, double n, double p, double f, boolean t) {
if (r == 0) {
return -1*(f+p)/n;
} else {
double r1 = r + 1;
return ( f + p * Math.pow(r1, n) ) * r
/
((t ? r1 : 1) * (1 - Math.pow(r1, n)));
}
}
/**
*
* @param r rate
* @param y pmt per period
* @param p present value
* @param f future value
* @param t type (true=pmt at beginning of period, false=pmt at end of period)
*/
public static double nper(double r, double y, double p, double f, boolean t) {
if (r == 0) {
return -1 * (f + p) / y;
} else {
double r1 = r + 1;
double ryr = (t ? r1 : 1) * y / r;
double a1 = ((ryr - f) < 0)
? Math.log(f - ryr)
: Math.log(ryr - f);
double a2 = ((ryr - f) < 0)
? Math.log(-p - ryr)
: Math.log(p + ryr);
double a3 = Math.log(r1);
return (a1 - a2) / a3;
}
}
}
⏎ org/apache/poi/ss/formula/functions/FinanceLib.java
Or download all of them as a single archive file:
File name: poi-5.2.3-src.zip File size: 2479830 bytes Release date: 2022-09-09 Download
⇒ What Is poi-ooxml-5.2.3.jar?
⇐ What Is poi-bin-5.2.3-20220909.zip?
2017-04-04, ≈312🔥, 0💬
Popular Posts:
How to perform XML Schema validation with dom\Writer.java provided in the Apache Xerces package? You...
What Is jaxb-api-2.1.6.jar? Java Architecture for XML Binding (JAXB) is a Java API that allows Java ...
JDK 11 java.naming.jmod is the JMOD file for JDK 11 Naming module. JDK 11 Naming module compiled cla...
What Is log4j-1.2.15.jar? I got the JAR file from apache-log4j-1.2.15.zip. log4j-1.2.15.jar is the v...
What Is poi-examples-5.2.3.jar? poi-examples-5.2.3.jar is one of the JAR files for Apache POI 5.2.3,...