| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> |
| <title>BigFraction (Apache Commons Math 3.3 API)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="BigFraction (Apache Commons Math 3.3 API)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/BigFraction.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/commons/math3/fraction/AbstractFormat.html" title="class in org.apache.commons.math3.fraction"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/commons/math3/fraction/BigFractionField.html" title="class in org.apache.commons.math3.fraction"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/commons/math3/fraction/BigFraction.html" target="_top">Frames</a></li> |
| <li><a href="BigFraction.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field_summary">Field</a> | </li> |
| <li><a href="#constructor_summary">Constr</a> | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field_detail">Field</a> | </li> |
| <li><a href="#constructor_detail">Constr</a> | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.commons.math3.fraction</div> |
| <h2 title="Class BigFraction" class="title">Class BigFraction</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">java.lang.Number</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.commons.math3.fraction.BigFraction</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><a href="http://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a><<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a>>, <a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a>></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public class <span class="strong">BigFraction</span> |
| extends <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a> |
| implements <a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a>>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a><<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a>>, <a href="http://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre> |
| <div class="block">Representation of a rational number without any overflow. This class is |
| immutable.</div> |
| <dl><dt><span class="strong">Since:</span></dt> |
| <dd>2.0</dd> |
| <dt><span class="strong">Version:</span></dt> |
| <dd>$Id: BigFraction.java 1547633 2013-12-03 23:03:06Z tn $</dd> |
| <dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../serialized-form.html#org.apache.commons.math3.fraction.BigFraction">Serialized Form</a></dd></dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field_summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#FOUR_FIFTHS">FOUR_FIFTHS</a></strong></code> |
| <div class="block">A fraction representing "4/5".</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#MINUS_ONE">MINUS_ONE</a></strong></code> |
| <div class="block">A fraction representing "-1 / 1".</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#ONE">ONE</a></strong></code> |
| <div class="block">A fraction representing "1".</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#ONE_FIFTH">ONE_FIFTH</a></strong></code> |
| <div class="block">A fraction representing "1/5".</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#ONE_HALF">ONE_HALF</a></strong></code> |
| <div class="block">A fraction representing "1/2".</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#ONE_QUARTER">ONE_QUARTER</a></strong></code> |
| <div class="block">A fraction representing "1/4".</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#ONE_THIRD">ONE_THIRD</a></strong></code> |
| <div class="block">A fraction representing "1/3".</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#THREE_FIFTHS">THREE_FIFTHS</a></strong></code> |
| <div class="block">A fraction representing "3/5".</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#THREE_QUARTERS">THREE_QUARTERS</a></strong></code> |
| <div class="block">A fraction representing "3/4".</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#TWO">TWO</a></strong></code> |
| <div class="block">A fraction representing "2 / 1".</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#TWO_FIFTHS">TWO_FIFTHS</a></strong></code> |
| <div class="block">A fraction representing "2/5".</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#TWO_QUARTERS">TWO_QUARTERS</a></strong></code> |
| <div class="block">A fraction representing "2/4".</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#TWO_THIRDS">TWO_THIRDS</a></strong></code> |
| <div class="block">A fraction representing "2/3".</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#ZERO">ZERO</a></strong></code> |
| <div class="block">A fraction representing "0".</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor_summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#BigFraction(java.math.BigInteger)">BigFraction</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> num)</code> |
| <div class="block"> |
| Create a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> equivalent to the passed <tt>BigInteger</tt>, ie |
| "num / 1".</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#BigFraction(java.math.BigInteger, java.math.BigInteger)">BigFraction</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> num, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> den)</code> |
| <div class="block">Create a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> given the numerator and denominator as |
| <code>BigInteger</code>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#BigFraction(double)">BigFraction</a></strong>(double value)</code> |
| <div class="block">Create a fraction given the double value.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#BigFraction(double, double, int)">BigFraction</a></strong>(double value, |
| double epsilon, |
| int maxIterations)</code> |
| <div class="block">Create a fraction given the double value and maximum error allowed.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#BigFraction(double, int)">BigFraction</a></strong>(double value, |
| int maxDenominator)</code> |
| <div class="block">Create a fraction given the double value and maximum denominator.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#BigFraction(int)">BigFraction</a></strong>(int num)</code> |
| <div class="block"> |
| Create a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> equivalent to the passed <tt>int</tt>, ie |
| "num / 1".</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#BigFraction(int, int)">BigFraction</a></strong>(int num, |
| int den)</code> |
| <div class="block"> |
| Create a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> given the numerator and denominator as simple |
| <tt>int</tt>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#BigFraction(long)">BigFraction</a></strong>(long num)</code> |
| <div class="block"> |
| Create a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> equivalent to the passed long, ie "num / 1".</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#BigFraction(long, long)">BigFraction</a></strong>(long num, |
| long den)</code> |
| <div class="block"> |
| Create a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> given the numerator and denominator as simple |
| <tt>long</tt>.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#abs()">abs</a></strong>()</code> |
| <div class="block"> |
| Returns the absolute value of this <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#add(org.apache.commons.math3.fraction.BigFraction)">add</a></strong>(<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> fraction)</code> |
| <div class="block"> |
| Adds the value of this fraction to another, returning the result in |
| reduced form.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#add(java.math.BigInteger)">add</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> bg)</code> |
| <div class="block"> |
| Adds the value of this fraction to the passed <a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math"><code>BigInteger</code></a>, |
| returning the result in reduced form.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#add(int)">add</a></strong>(int i)</code> |
| <div class="block"> |
| Adds the value of this fraction to the passed <tt>integer</tt>, returning |
| the result in reduced form.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#add(long)">add</a></strong>(long l)</code> |
| <div class="block"> |
| Adds the value of this fraction to the passed <tt>long</tt>, returning |
| the result in reduced form.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#bigDecimalValue()">bigDecimalValue</a></strong>()</code> |
| <div class="block"> |
| Gets the fraction as a <code>BigDecimal</code>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#bigDecimalValue(int)">bigDecimalValue</a></strong>(int roundingMode)</code> |
| <div class="block"> |
| Gets the fraction as a <code>BigDecimal</code> following the passed |
| rounding mode.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#bigDecimalValue(int, int)">bigDecimalValue</a></strong>(int scale, |
| int roundingMode)</code> |
| <div class="block"> |
| Gets the fraction as a <code>BigDecimal</code> following the passed scale |
| and rounding mode.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#compareTo(org.apache.commons.math3.fraction.BigFraction)">compareTo</a></strong>(<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> object)</code> |
| <div class="block"> |
| Compares this object to another based on size.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#divide(org.apache.commons.math3.fraction.BigFraction)">divide</a></strong>(<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> fraction)</code> |
| <div class="block"> |
| Divide the value of this fraction by another, returning the result in |
| reduced form.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#divide(java.math.BigInteger)">divide</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> bg)</code> |
| <div class="block"> |
| Divide the value of this fraction by the passed <code>BigInteger</code>, |
| ie <code>this * 1 / bg</code>, returning the result in reduced form.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#divide(int)">divide</a></strong>(int i)</code> |
| <div class="block"> |
| Divide the value of this fraction by the passed <code>int</code>, ie |
| <code>this * 1 / i</code>, returning the result in reduced form.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#divide(long)">divide</a></strong>(long l)</code> |
| <div class="block"> |
| Divide the value of this fraction by the passed <code>long</code>, ie |
| <code>this * 1 / l</code>, returning the result in reduced form.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#doubleValue()">doubleValue</a></strong>()</code> |
| <div class="block"> |
| Gets the fraction as a <tt>double</tt>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#equals(java.lang.Object)">equals</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> other)</code> |
| <div class="block"> |
| Test for the equality of two fractions.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>float</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#floatValue()">floatValue</a></strong>()</code> |
| <div class="block"> |
| Gets the fraction as a <tt>float</tt>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#getDenominator()">getDenominator</a></strong>()</code> |
| <div class="block"> |
| Access the denominator as a <code>BigInteger</code>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#getDenominatorAsInt()">getDenominatorAsInt</a></strong>()</code> |
| <div class="block"> |
| Access the denominator as a <tt>int</tt>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#getDenominatorAsLong()">getDenominatorAsLong</a></strong>()</code> |
| <div class="block"> |
| Access the denominator as a <tt>long</tt>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFractionField.html" title="class in org.apache.commons.math3.fraction">BigFractionField</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#getField()">getField</a></strong>()</code> |
| <div class="block">Get the <a href="../../../../../org/apache/commons/math3/Field.html" title="interface in org.apache.commons.math3"><code>Field</code></a> to which the instance belongs.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#getNumerator()">getNumerator</a></strong>()</code> |
| <div class="block"> |
| Access the numerator as a <code>BigInteger</code>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#getNumeratorAsInt()">getNumeratorAsInt</a></strong>()</code> |
| <div class="block"> |
| Access the numerator as a <tt>int</tt>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#getNumeratorAsLong()">getNumeratorAsLong</a></strong>()</code> |
| <div class="block"> |
| Access the numerator as a <tt>long</tt>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#getReducedFraction(int, int)">getReducedFraction</a></strong>(int numerator, |
| int denominator)</code> |
| <div class="block"> |
| Creates a <code>BigFraction</code> instance with the 2 parts of a fraction |
| Y/Z.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#hashCode()">hashCode</a></strong>()</code> |
| <div class="block"> |
| Gets a hashCode for the fraction.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#intValue()">intValue</a></strong>()</code> |
| <div class="block"> |
| Gets the fraction as an <tt>int</tt>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#longValue()">longValue</a></strong>()</code> |
| <div class="block"> |
| Gets the fraction as a <tt>long</tt>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#multiply(org.apache.commons.math3.fraction.BigFraction)">multiply</a></strong>(<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> fraction)</code> |
| <div class="block"> |
| Multiplies the value of this fraction by another, returning the result in |
| reduced form.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#multiply(java.math.BigInteger)">multiply</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> bg)</code> |
| <div class="block"> |
| Multiplies the value of this fraction by the passed |
| <code>BigInteger</code>, returning the result in reduced form.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#multiply(int)">multiply</a></strong>(int i)</code> |
| <div class="block"> |
| Multiply the value of this fraction by the passed <tt>int</tt>, returning |
| the result in reduced form.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#multiply(long)">multiply</a></strong>(long l)</code> |
| <div class="block"> |
| Multiply the value of this fraction by the passed <tt>long</tt>, |
| returning the result in reduced form.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#negate()">negate</a></strong>()</code> |
| <div class="block"> |
| Return the additive inverse of this fraction, returning the result in |
| reduced form.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#percentageValue()">percentageValue</a></strong>()</code> |
| <div class="block"> |
| Gets the fraction percentage as a <tt>double</tt>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#pow(java.math.BigInteger)">pow</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> exponent)</code> |
| <div class="block"> |
| Returns a <code>BigFraction</code> whose value is |
| <tt>(this<sup>exponent</sup>)</tt>, returning the result in reduced form.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#pow(double)">pow</a></strong>(double exponent)</code> |
| <div class="block"> |
| Returns a <code>double</code> whose value is |
| <tt>(this<sup>exponent</sup>)</tt>, returning the result in reduced form.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#pow(int)">pow</a></strong>(int exponent)</code> |
| <div class="block"> |
| Returns a <code>BigFraction</code> whose value is |
| <code>(this<sup>exponent</sup>)</code>, returning the result in reduced form.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#pow(long)">pow</a></strong>(long exponent)</code> |
| <div class="block"> |
| Returns a <code>BigFraction</code> whose value is |
| <tt>(this<sup>exponent</sup>)</tt>, returning the result in reduced form.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#reciprocal()">reciprocal</a></strong>()</code> |
| <div class="block"> |
| Return the multiplicative inverse of this fraction.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#reduce()">reduce</a></strong>()</code> |
| <div class="block"> |
| Reduce this <code>BigFraction</code> to its lowest terms.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#subtract(org.apache.commons.math3.fraction.BigFraction)">subtract</a></strong>(<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> fraction)</code> |
| <div class="block"> |
| Subtracts the value of another fraction from the value of this one, |
| returning the result in reduced form.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#subtract(java.math.BigInteger)">subtract</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> bg)</code> |
| <div class="block"> |
| Subtracts the value of an <a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math"><code>BigInteger</code></a> from the value of this |
| <code>BigFraction</code>, returning the result in reduced form.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#subtract(int)">subtract</a></strong>(int i)</code> |
| <div class="block"> |
| Subtracts the value of an <code>integer</code> from the value of this |
| <code>BigFraction</code>, returning the result in reduced form.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#subtract(long)">subtract</a></strong>(long l)</code> |
| <div class="block"> |
| Subtracts the value of a <code>long</code> from the value of this |
| <code>BigFraction</code>, returning the result in reduced form.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#toString()">toString</a></strong>()</code> |
| <div class="block"> |
| Returns the <code>String</code> representing this fraction, ie |
| "num / dem" or just "num" if the denominator is one.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods_inherited_from_class_java.lang.Number"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a></h3> |
| <code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Number.html?is-external=true#byteValue()" title="class or interface in java.lang">byteValue</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Number.html?is-external=true#shortValue()" title="class or interface in java.lang">shortValue</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field_detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="TWO"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>TWO</h4> |
| <pre>public static final <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> TWO</pre> |
| <div class="block">A fraction representing "2 / 1".</div> |
| </li> |
| </ul> |
| <a name="ONE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ONE</h4> |
| <pre>public static final <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> ONE</pre> |
| <div class="block">A fraction representing "1".</div> |
| </li> |
| </ul> |
| <a name="ZERO"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ZERO</h4> |
| <pre>public static final <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> ZERO</pre> |
| <div class="block">A fraction representing "0".</div> |
| </li> |
| </ul> |
| <a name="MINUS_ONE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>MINUS_ONE</h4> |
| <pre>public static final <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> MINUS_ONE</pre> |
| <div class="block">A fraction representing "-1 / 1".</div> |
| </li> |
| </ul> |
| <a name="FOUR_FIFTHS"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>FOUR_FIFTHS</h4> |
| <pre>public static final <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> FOUR_FIFTHS</pre> |
| <div class="block">A fraction representing "4/5".</div> |
| </li> |
| </ul> |
| <a name="ONE_FIFTH"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ONE_FIFTH</h4> |
| <pre>public static final <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> ONE_FIFTH</pre> |
| <div class="block">A fraction representing "1/5".</div> |
| </li> |
| </ul> |
| <a name="ONE_HALF"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ONE_HALF</h4> |
| <pre>public static final <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> ONE_HALF</pre> |
| <div class="block">A fraction representing "1/2".</div> |
| </li> |
| </ul> |
| <a name="ONE_QUARTER"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ONE_QUARTER</h4> |
| <pre>public static final <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> ONE_QUARTER</pre> |
| <div class="block">A fraction representing "1/4".</div> |
| </li> |
| </ul> |
| <a name="ONE_THIRD"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ONE_THIRD</h4> |
| <pre>public static final <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> ONE_THIRD</pre> |
| <div class="block">A fraction representing "1/3".</div> |
| </li> |
| </ul> |
| <a name="THREE_FIFTHS"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>THREE_FIFTHS</h4> |
| <pre>public static final <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> THREE_FIFTHS</pre> |
| <div class="block">A fraction representing "3/5".</div> |
| </li> |
| </ul> |
| <a name="THREE_QUARTERS"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>THREE_QUARTERS</h4> |
| <pre>public static final <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> THREE_QUARTERS</pre> |
| <div class="block">A fraction representing "3/4".</div> |
| </li> |
| </ul> |
| <a name="TWO_FIFTHS"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>TWO_FIFTHS</h4> |
| <pre>public static final <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> TWO_FIFTHS</pre> |
| <div class="block">A fraction representing "2/5".</div> |
| </li> |
| </ul> |
| <a name="TWO_QUARTERS"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>TWO_QUARTERS</h4> |
| <pre>public static final <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> TWO_QUARTERS</pre> |
| <div class="block">A fraction representing "2/4".</div> |
| </li> |
| </ul> |
| <a name="TWO_THIRDS"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>TWO_THIRDS</h4> |
| <pre>public static final <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> TWO_THIRDS</pre> |
| <div class="block">A fraction representing "2/3".</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor_detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="BigFraction(java.math.BigInteger)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>BigFraction</h4> |
| <pre>public BigFraction(<a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> num)</pre> |
| <div class="block"><p> |
| Create a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> equivalent to the passed <tt>BigInteger</tt>, ie |
| "num / 1". |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>num</code> - the numerator.</dd></dl> |
| </li> |
| </ul> |
| <a name="BigFraction(java.math.BigInteger, java.math.BigInteger)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>BigFraction</h4> |
| <pre>public BigFraction(<a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> num, |
| <a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> den)</pre> |
| <div class="block">Create a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> given the numerator and denominator as |
| <code>BigInteger</code>. The <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> is reduced to lowest terms.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>num</code> - the numerator, must not be <code>null</code>.</dd><dd><code>den</code> - the denominator, must not be <code>null</code>.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/ZeroException.html" title="class in org.apache.commons.math3.exception">ZeroException</a></code> - if the denominator is zero.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if either of the arguments is null</dd></dl> |
| </li> |
| </ul> |
| <a name="BigFraction(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>BigFraction</h4> |
| <pre>public BigFraction(double value) |
| throws <a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre> |
| <div class="block">Create a fraction given the double value. |
| <p> |
| This constructor behaves <em>differently</em> from |
| <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#BigFraction(double, double, int)"><code>BigFraction(double, double, int)</code></a>. It converts the double value |
| exactly, considering its internal bits representation. This works for all |
| values except NaN and infinities and does not requires any loop or |
| convergence threshold. |
| </p> |
| <p> |
| Since this conversion is exact and since double numbers are sometimes |
| approximated, the fraction created may seem strange in some cases. For example, |
| calling <code>new BigFraction(1.0 / 3.0)</code> does <em>not</em> create |
| the fraction 1/3, but the fraction 6004799503160661 / 18014398509481984 |
| because the double number passed to the constructor is not exactly 1/3 |
| (this number cannot be stored exactly in IEEE754). |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - the double value to convert to a fraction.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if value is NaN or infinite</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#BigFraction(double, double, int)"><code>BigFraction(double, double, int)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="BigFraction(double, double, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>BigFraction</h4> |
| <pre>public BigFraction(double value, |
| double epsilon, |
| int maxIterations) |
| throws <a href="../../../../../org/apache/commons/math3/fraction/FractionConversionException.html" title="class in org.apache.commons.math3.fraction">FractionConversionException</a></pre> |
| <div class="block">Create a fraction given the double value and maximum error allowed. |
| <p> |
| References: |
| <ul> |
| <li><a href="http://mathworld.wolfram.com/ContinuedFraction.html"> |
| Continued Fraction</a> equations (11) and (22)-(26)</li> |
| </ul> |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - the double value to convert to a fraction.</dd><dd><code>epsilon</code> - maximum error allowed. The resulting fraction is within |
| <code>epsilon</code> of <code>value</code>, in absolute terms.</dd><dd><code>maxIterations</code> - maximum number of convergents.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/fraction/FractionConversionException.html" title="class in org.apache.commons.math3.fraction">FractionConversionException</a></code> - if the continued fraction failed to converge.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html#BigFraction(double)"><code>BigFraction(double)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="BigFraction(double, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>BigFraction</h4> |
| <pre>public BigFraction(double value, |
| int maxDenominator) |
| throws <a href="../../../../../org/apache/commons/math3/fraction/FractionConversionException.html" title="class in org.apache.commons.math3.fraction">FractionConversionException</a></pre> |
| <div class="block">Create a fraction given the double value and maximum denominator. |
| <p> |
| References: |
| <ul> |
| <li><a href="http://mathworld.wolfram.com/ContinuedFraction.html"> |
| Continued Fraction</a> equations (11) and (22)-(26)</li> |
| </ul> |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - the double value to convert to a fraction.</dd><dd><code>maxDenominator</code> - The maximum allowed value for denominator.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/fraction/FractionConversionException.html" title="class in org.apache.commons.math3.fraction">FractionConversionException</a></code> - if the continued fraction failed to converge.</dd></dl> |
| </li> |
| </ul> |
| <a name="BigFraction(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>BigFraction</h4> |
| <pre>public BigFraction(int num)</pre> |
| <div class="block"><p> |
| Create a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> equivalent to the passed <tt>int</tt>, ie |
| "num / 1". |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>num</code> - the numerator.</dd></dl> |
| </li> |
| </ul> |
| <a name="BigFraction(int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>BigFraction</h4> |
| <pre>public BigFraction(int num, |
| int den)</pre> |
| <div class="block"><p> |
| Create a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> given the numerator and denominator as simple |
| <tt>int</tt>. The <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> is reduced to lowest terms. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>num</code> - the numerator.</dd><dd><code>den</code> - the denominator.</dd></dl> |
| </li> |
| </ul> |
| <a name="BigFraction(long)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>BigFraction</h4> |
| <pre>public BigFraction(long num)</pre> |
| <div class="block"><p> |
| Create a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> equivalent to the passed long, ie "num / 1". |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>num</code> - the numerator.</dd></dl> |
| </li> |
| </ul> |
| <a name="BigFraction(long, long)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>BigFraction</h4> |
| <pre>public BigFraction(long num, |
| long den)</pre> |
| <div class="block"><p> |
| Create a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> given the numerator and denominator as simple |
| <tt>long</tt>. The <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> is reduced to lowest terms. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>num</code> - the numerator.</dd><dd><code>den</code> - the denominator.</dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getReducedFraction(int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getReducedFraction</h4> |
| <pre>public static <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> getReducedFraction(int numerator, |
| int denominator)</pre> |
| <div class="block"><p> |
| Creates a <code>BigFraction</code> instance with the 2 parts of a fraction |
| Y/Z. |
| </p> |
| |
| <p> |
| Any negative signs are resolved to be on the numerator. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>numerator</code> - the numerator, for example the three in 'three sevenths'.</dd><dd><code>denominator</code> - the denominator, for example the seven in 'three sevenths'.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a new fraction instance, with the numerator and denominator |
| reduced.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang">ArithmeticException</a></code> - if the denominator is <code>zero</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="abs()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>abs</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> abs()</pre> |
| <div class="block"><p> |
| Returns the absolute value of this <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a>. |
| </p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the absolute value as a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a>.</dd></dl> |
| </li> |
| </ul> |
| <a name="add(java.math.BigInteger)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>add</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> add(<a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> bg) |
| throws <a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></pre> |
| <div class="block"><p> |
| Adds the value of this fraction to the passed <a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math"><code>BigInteger</code></a>, |
| returning the result in reduced form. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>bg</code> - the <a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math"><code>BigInteger</code></a> to add, must'nt be <code>null</code>.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a <code>BigFraction</code> instance with the resulting values.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if the <a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math"><code>BigInteger</code></a> is <code>null</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="add(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>add</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> add(int i)</pre> |
| <div class="block"><p> |
| Adds the value of this fraction to the passed <tt>integer</tt>, returning |
| the result in reduced form. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - the <tt>integer</tt> to add.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a <code>BigFraction</code> instance with the resulting values.</dd></dl> |
| </li> |
| </ul> |
| <a name="add(long)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>add</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> add(long l)</pre> |
| <div class="block"><p> |
| Adds the value of this fraction to the passed <tt>long</tt>, returning |
| the result in reduced form. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>l</code> - the <tt>long</tt> to add.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a <code>BigFraction</code> instance with the resulting values.</dd></dl> |
| </li> |
| </ul> |
| <a name="add(org.apache.commons.math3.fraction.BigFraction)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>add</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> add(<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> fraction)</pre> |
| <div class="block"><p> |
| Adds the value of this fraction to another, returning the result in |
| reduced form. |
| </p></div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/FieldElement.html#add(T)">add</a></code> in interface <code><a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a>></code></dd> |
| <dt><span class="strong">Parameters:</span></dt><dd><code>fraction</code> - the <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> to add, must not be <code>null</code>.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> instance with the resulting values.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if the <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> is <code>null</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="bigDecimalValue()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bigDecimalValue</h4> |
| <pre>public <a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a> bigDecimalValue()</pre> |
| <div class="block"><p> |
| Gets the fraction as a <code>BigDecimal</code>. This calculates the |
| fraction as the numerator divided by denominator. |
| </p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the fraction as a <code>BigDecimal</code>.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ArithmeticException.html?is-external=true" title="class or interface in java.lang">ArithmeticException</a></code> - if the exact quotient does not have a terminating decimal |
| expansion.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="bigDecimalValue(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bigDecimalValue</h4> |
| <pre>public <a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a> bigDecimalValue(int roundingMode)</pre> |
| <div class="block"><p> |
| Gets the fraction as a <code>BigDecimal</code> following the passed |
| rounding mode. This calculates the fraction as the numerator divided by |
| denominator. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>roundingMode</code> - rounding mode to apply. see <a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a> constants.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the fraction as a <code>BigDecimal</code>.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <tt>roundingMode</tt> does not represent a valid rounding |
| mode.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="bigDecimalValue(int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bigDecimalValue</h4> |
| <pre>public <a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a> bigDecimalValue(int scale, |
| int roundingMode)</pre> |
| <div class="block"><p> |
| Gets the fraction as a <code>BigDecimal</code> following the passed scale |
| and rounding mode. This calculates the fraction as the numerator divided |
| by denominator. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>scale</code> - scale of the <code>BigDecimal</code> quotient to be returned. |
| see <a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a> for more information.</dd><dd><code>roundingMode</code> - rounding mode to apply. see <a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a> constants.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the fraction as a <code>BigDecimal</code>.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="compareTo(org.apache.commons.math3.fraction.BigFraction)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>compareTo</h4> |
| <pre>public int compareTo(<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> object)</pre> |
| <div class="block"><p> |
| Compares this object to another based on size. |
| </p></div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true#compareTo(T)" title="class or interface in java.lang">compareTo</a></code> in interface <code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a><<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a>></code></dd> |
| <dt><span class="strong">Parameters:</span></dt><dd><code>object</code> - the object to compare to, must not be <code>null</code>.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>-1 if this is less than <tt>object</tt>, +1 if this is greater |
| than <tt>object</tt>, 0 if they are equal.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true#compareTo(T)" title="class or interface in java.lang"><code>Comparable.compareTo(java.lang.Object)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="divide(java.math.BigInteger)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>divide</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> divide(<a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> bg)</pre> |
| <div class="block"><p> |
| Divide the value of this fraction by the passed <code>BigInteger</code>, |
| ie <code>this * 1 / bg</code>, returning the result in reduced form. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>bg</code> - the <code>BigInteger</code> to divide by, must not be <code>null</code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> instance with the resulting values</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if the <code>BigInteger</code> is <code>null</code></dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</a></code> - if the fraction to divide by is zero</dd></dl> |
| </li> |
| </ul> |
| <a name="divide(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>divide</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> divide(int i)</pre> |
| <div class="block"><p> |
| Divide the value of this fraction by the passed <code>int</code>, ie |
| <code>this * 1 / i</code>, returning the result in reduced form. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - the <code>int</code> to divide by</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> instance with the resulting values</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</a></code> - if the fraction to divide by is zero</dd></dl> |
| </li> |
| </ul> |
| <a name="divide(long)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>divide</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> divide(long l)</pre> |
| <div class="block"><p> |
| Divide the value of this fraction by the passed <code>long</code>, ie |
| <code>this * 1 / l</code>, returning the result in reduced form. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>l</code> - the <code>long</code> to divide by</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> instance with the resulting values</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</a></code> - if the fraction to divide by is zero</dd></dl> |
| </li> |
| </ul> |
| <a name="divide(org.apache.commons.math3.fraction.BigFraction)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>divide</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> divide(<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> fraction)</pre> |
| <div class="block"><p> |
| Divide the value of this fraction by another, returning the result in |
| reduced form. |
| </p></div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/FieldElement.html#divide(T)">divide</a></code> in interface <code><a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a>></code></dd> |
| <dt><span class="strong">Parameters:</span></dt><dd><code>fraction</code> - Fraction to divide by, must not be <code>null</code>.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> instance with the resulting values.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if the <code>fraction</code> is <code>null</code>.</dd> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/MathArithmeticException.html" title="class in org.apache.commons.math3.exception">MathArithmeticException</a></code> - if the fraction to divide by is zero</dd></dl> |
| </li> |
| </ul> |
| <a name="doubleValue()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>doubleValue</h4> |
| <pre>public double doubleValue()</pre> |
| <div class="block"><p> |
| Gets the fraction as a <tt>double</tt>. This calculates the fraction as |
| the numerator divided by denominator. |
| </p></div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Number.html?is-external=true#doubleValue()" title="class or interface in java.lang">doubleValue</a></code> in class <code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the fraction as a <tt>double</tt></dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Number.html?is-external=true#doubleValue()" title="class or interface in java.lang"><code>Number.doubleValue()</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="equals(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>equals</h4> |
| <pre>public boolean equals(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> other)</pre> |
| <div class="block"><p> |
| Test for the equality of two fractions. If the lowest term numerator and |
| denominators are the same for both fractions, the two fractions are |
| considered to be equal. |
| </p></div> |
| <dl> |
| <dt><strong>Overrides:</strong></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a></code> in class <code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> |
| <dt><span class="strong">Parameters:</span></dt><dd><code>other</code> - fraction to test for equality to this fraction, can be |
| <code>null</code>.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>true if two fractions are equal, false if object is |
| <code>null</code>, not an instance of <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a>, or not |
| equal to this fraction instance.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang"><code>Object.equals(java.lang.Object)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="floatValue()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>floatValue</h4> |
| <pre>public float floatValue()</pre> |
| <div class="block"><p> |
| Gets the fraction as a <tt>float</tt>. This calculates the fraction as |
| the numerator divided by denominator. |
| </p></div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Number.html?is-external=true#floatValue()" title="class or interface in java.lang">floatValue</a></code> in class <code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the fraction as a <tt>float</tt>.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Number.html?is-external=true#floatValue()" title="class or interface in java.lang"><code>Number.floatValue()</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="getDenominator()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDenominator</h4> |
| <pre>public <a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> getDenominator()</pre> |
| <div class="block"><p> |
| Access the denominator as a <code>BigInteger</code>. |
| </p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the denominator as a <code>BigInteger</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="getDenominatorAsInt()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDenominatorAsInt</h4> |
| <pre>public int getDenominatorAsInt()</pre> |
| <div class="block"><p> |
| Access the denominator as a <tt>int</tt>. |
| </p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the denominator as a <tt>int</tt>.</dd></dl> |
| </li> |
| </ul> |
| <a name="getDenominatorAsLong()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDenominatorAsLong</h4> |
| <pre>public long getDenominatorAsLong()</pre> |
| <div class="block"><p> |
| Access the denominator as a <tt>long</tt>. |
| </p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the denominator as a <tt>long</tt>.</dd></dl> |
| </li> |
| </ul> |
| <a name="getNumerator()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNumerator</h4> |
| <pre>public <a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> getNumerator()</pre> |
| <div class="block"><p> |
| Access the numerator as a <code>BigInteger</code>. |
| </p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the numerator as a <code>BigInteger</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="getNumeratorAsInt()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNumeratorAsInt</h4> |
| <pre>public int getNumeratorAsInt()</pre> |
| <div class="block"><p> |
| Access the numerator as a <tt>int</tt>. |
| </p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the numerator as a <tt>int</tt>.</dd></dl> |
| </li> |
| </ul> |
| <a name="getNumeratorAsLong()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNumeratorAsLong</h4> |
| <pre>public long getNumeratorAsLong()</pre> |
| <div class="block"><p> |
| Access the numerator as a <tt>long</tt>. |
| </p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the numerator as a <tt>long</tt>.</dd></dl> |
| </li> |
| </ul> |
| <a name="hashCode()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hashCode</h4> |
| <pre>public int hashCode()</pre> |
| <div class="block"><p> |
| Gets a hashCode for the fraction. |
| </p></div> |
| <dl> |
| <dt><strong>Overrides:</strong></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a></code> in class <code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a hash code value for this object.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang"><code>Object.hashCode()</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="intValue()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>intValue</h4> |
| <pre>public int intValue()</pre> |
| <div class="block"><p> |
| Gets the fraction as an <tt>int</tt>. This returns the whole number part |
| of the fraction. |
| </p></div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Number.html?is-external=true#intValue()" title="class or interface in java.lang">intValue</a></code> in class <code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the whole number fraction part.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Number.html?is-external=true#intValue()" title="class or interface in java.lang"><code>Number.intValue()</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="longValue()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>longValue</h4> |
| <pre>public long longValue()</pre> |
| <div class="block"><p> |
| Gets the fraction as a <tt>long</tt>. This returns the whole number part |
| of the fraction. |
| </p></div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Number.html?is-external=true#longValue()" title="class or interface in java.lang">longValue</a></code> in class <code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the whole number fraction part.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Number.html?is-external=true#longValue()" title="class or interface in java.lang"><code>Number.longValue()</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="multiply(java.math.BigInteger)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>multiply</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> multiply(<a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> bg)</pre> |
| <div class="block"><p> |
| Multiplies the value of this fraction by the passed |
| <code>BigInteger</code>, returning the result in reduced form. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>bg</code> - the <code>BigInteger</code> to multiply by.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a <code>BigFraction</code> instance with the resulting values.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if <code>bg</code> is <code>null</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="multiply(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>multiply</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> multiply(int i)</pre> |
| <div class="block"><p> |
| Multiply the value of this fraction by the passed <tt>int</tt>, returning |
| the result in reduced form. |
| </p></div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/FieldElement.html#multiply(int)">multiply</a></code> in interface <code><a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a>></code></dd> |
| <dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - the <tt>int</tt> to multiply by.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> instance with the resulting values.</dd></dl> |
| </li> |
| </ul> |
| <a name="multiply(long)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>multiply</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> multiply(long l)</pre> |
| <div class="block"><p> |
| Multiply the value of this fraction by the passed <tt>long</tt>, |
| returning the result in reduced form. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>l</code> - the <tt>long</tt> to multiply by.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> instance with the resulting values.</dd></dl> |
| </li> |
| </ul> |
| <a name="multiply(org.apache.commons.math3.fraction.BigFraction)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>multiply</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> multiply(<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> fraction)</pre> |
| <div class="block"><p> |
| Multiplies the value of this fraction by another, returning the result in |
| reduced form. |
| </p></div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/FieldElement.html#multiply(T)">multiply</a></code> in interface <code><a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a>></code></dd> |
| <dt><span class="strong">Parameters:</span></dt><dd><code>fraction</code> - Fraction to multiply by, must not be <code>null</code>.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> instance with the resulting values.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if <code>fraction</code> is <code>null</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="negate()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>negate</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> negate()</pre> |
| <div class="block"><p> |
| Return the additive inverse of this fraction, returning the result in |
| reduced form. |
| </p></div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/FieldElement.html#negate()">negate</a></code> in interface <code><a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a>></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the negation of this fraction.</dd></dl> |
| </li> |
| </ul> |
| <a name="percentageValue()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>percentageValue</h4> |
| <pre>public double percentageValue()</pre> |
| <div class="block"><p> |
| Gets the fraction percentage as a <tt>double</tt>. This calculates the |
| fraction as the numerator divided by denominator multiplied by 100. |
| </p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the fraction percentage as a <tt>double</tt>.</dd></dl> |
| </li> |
| </ul> |
| <a name="pow(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>pow</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> pow(int exponent)</pre> |
| <div class="block"><p> |
| Returns a <code>BigFraction</code> whose value is |
| <code>(this<sup>exponent</sup>)</code>, returning the result in reduced form. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>exponent</code> - exponent to which this <code>BigFraction</code> is to be |
| raised.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><tt>this<sup>exponent</sup></tt>.</dd></dl> |
| </li> |
| </ul> |
| <a name="pow(long)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>pow</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> pow(long exponent)</pre> |
| <div class="block"><p> |
| Returns a <code>BigFraction</code> whose value is |
| <tt>(this<sup>exponent</sup>)</tt>, returning the result in reduced form. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>exponent</code> - exponent to which this <code>BigFraction</code> is to be raised.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><tt>this<sup>exponent</sup></tt> as a <code>BigFraction</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="pow(java.math.BigInteger)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>pow</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> pow(<a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> exponent)</pre> |
| <div class="block"><p> |
| Returns a <code>BigFraction</code> whose value is |
| <tt>(this<sup>exponent</sup>)</tt>, returning the result in reduced form. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>exponent</code> - exponent to which this <code>BigFraction</code> is to be raised.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><tt>this<sup>exponent</sup></tt> as a <code>BigFraction</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="pow(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>pow</h4> |
| <pre>public double pow(double exponent)</pre> |
| <div class="block"><p> |
| Returns a <code>double</code> whose value is |
| <tt>(this<sup>exponent</sup>)</tt>, returning the result in reduced form. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>exponent</code> - exponent to which this <code>BigFraction</code> is to be raised.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd><tt>this<sup>exponent</sup></tt>.</dd></dl> |
| </li> |
| </ul> |
| <a name="reciprocal()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>reciprocal</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> reciprocal()</pre> |
| <div class="block"><p> |
| Return the multiplicative inverse of this fraction. |
| </p></div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/FieldElement.html#reciprocal()">reciprocal</a></code> in interface <code><a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a>></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the reciprocal fraction.</dd></dl> |
| </li> |
| </ul> |
| <a name="reduce()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>reduce</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> reduce()</pre> |
| <div class="block"><p> |
| Reduce this <code>BigFraction</code> to its lowest terms. |
| </p></div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the reduced <code>BigFraction</code>. It doesn't change anything if |
| the fraction can be reduced.</dd></dl> |
| </li> |
| </ul> |
| <a name="subtract(java.math.BigInteger)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>subtract</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> subtract(<a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math">BigInteger</a> bg)</pre> |
| <div class="block"><p> |
| Subtracts the value of an <a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math"><code>BigInteger</code></a> from the value of this |
| <code>BigFraction</code>, returning the result in reduced form. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>bg</code> - the <a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math"><code>BigInteger</code></a> to subtract, cannot be <code>null</code>.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a <code>BigFraction</code> instance with the resulting values.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if the <a href="http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math"><code>BigInteger</code></a> is <code>null</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="subtract(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>subtract</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> subtract(int i)</pre> |
| <div class="block"><p> |
| Subtracts the value of an <code>integer</code> from the value of this |
| <code>BigFraction</code>, returning the result in reduced form. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - the <code>integer</code> to subtract.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a <code>BigFraction</code> instance with the resulting values.</dd></dl> |
| </li> |
| </ul> |
| <a name="subtract(long)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>subtract</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> subtract(long l)</pre> |
| <div class="block"><p> |
| Subtracts the value of a <code>long</code> from the value of this |
| <code>BigFraction</code>, returning the result in reduced form. |
| </p></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>l</code> - the <code>long</code> to subtract.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a <code>BigFraction</code> instance with the resulting values.</dd></dl> |
| </li> |
| </ul> |
| <a name="subtract(org.apache.commons.math3.fraction.BigFraction)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>subtract</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> subtract(<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a> fraction)</pre> |
| <div class="block"><p> |
| Subtracts the value of another fraction from the value of this one, |
| returning the result in reduced form. |
| </p></div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/FieldElement.html#subtract(T)">subtract</a></code> in interface <code><a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a>></code></dd> |
| <dt><span class="strong">Parameters:</span></dt><dd><code>fraction</code> - <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> to subtract, must not be <code>null</code>.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a <a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction"><code>BigFraction</code></a> instance with the resulting values</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if the <code>fraction</code> is <code>null</code>.</dd></dl> |
| </li> |
| </ul> |
| <a name="toString()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre>public <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> toString()</pre> |
| <div class="block"><p> |
| Returns the <code>String</code> representing this fraction, ie |
| "num / dem" or just "num" if the denominator is one. |
| </p></div> |
| <dl> |
| <dt><strong>Overrides:</strong></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a></code> in class <code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a string representation of the fraction.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang"><code>Object.toString()</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="getField()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getField</h4> |
| <pre>public <a href="../../../../../org/apache/commons/math3/fraction/BigFractionField.html" title="class in org.apache.commons.math3.fraction">BigFractionField</a> getField()</pre> |
| <div class="block">Get the <a href="../../../../../org/apache/commons/math3/Field.html" title="interface in org.apache.commons.math3"><code>Field</code></a> to which the instance belongs.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../../org/apache/commons/math3/FieldElement.html#getField()">getField</a></code> in interface <code><a href="../../../../../org/apache/commons/math3/FieldElement.html" title="interface in org.apache.commons.math3">FieldElement</a><<a href="../../../../../org/apache/commons/math3/fraction/BigFraction.html" title="class in org.apache.commons.math3.fraction">BigFraction</a>></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd><a href="../../../../../org/apache/commons/math3/Field.html" title="interface in org.apache.commons.math3"><code>Field</code></a> to which the instance belongs</dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar_bottom"> |
| <!-- --> |
| </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/BigFraction.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/commons/math3/fraction/AbstractFormat.html" title="class in org.apache.commons.math3.fraction"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/commons/math3/fraction/BigFractionField.html" title="class in org.apache.commons.math3.fraction"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/commons/math3/fraction/BigFraction.html" target="_top">Frames</a></li> |
| <li><a href="BigFraction.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field_summary">Field</a> | </li> |
| <li><a href="#constructor_summary">Constr</a> | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field_detail">Field</a> | </li> |
| <li><a href="#constructor_detail">Constr</a> | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2003–2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |