📄 mathfp.html
字号:
<HR><A NAME="mul(int, int)"><!-- --></A><H3>mul</H3><PRE>public static int <B>mul</B>(int n, int m)</PRE><DL><DD>Multiplies two fixed-point integers. <p> See net.jscience.math.MathFP for more details.<DD><DL><DT><B>Parameters:</B><DD><CODE>n</CODE> - the fixed-point integer to be multiplied.<DD><CODE>m</CODE> - the fixed-point integer multiplier<DT><B>Returns:</B><DD>an new fixed point integer representing n multiplied by m.<DT><B>Throws:</B><DD><CODE>Nothing</CODE> - but sets err_no flag<DT><B>Since: </B><DD>MathFP 1.0.0</DD></DL></DD></DL><HR><A NAME="div(int, int)"><!-- --></A><H3>div</H3><PRE>public static int <B>div</B>(int n, int m)</PRE><DL><DD>Divides two fixed-point integers. <p> See net.jscience.math.MathFP for more details.<DD><DL><DT><B>Parameters:</B><DD><CODE>n</CODE> - the dividend fixed-point integer.<DD><CODE>m</CODE> - the divider fixed-point integer.<DT><B>Returns:</B><DD>an new fixed point integer representing n divided by m.<DT><B>Since: </B><DD>MathFP 1.0.0</DD></DL></DD></DL><HR><A NAME="add(int, int)"><!-- --></A><H3>add</H3><PRE>public static int <B>add</B>(int n, int m)</PRE><DL><DD>Adds two fixed-point integers. <p> See net.jscience.math.MathFP for more details.<DD><DL><DT><B>Parameters:</B><DD><CODE>n</CODE> - the fixed-point integer to add to.<DD><CODE>m</CODE> - the fixed-point integer to be added.<DT><B>Returns:</B><DD>an new fixed point integer representing the addition of n and m.<DT><B>Since: </B><DD>MathFP 1.0.0</DD></DL></DD></DL><HR><A NAME="sub(int, int)"><!-- --></A><H3>sub</H3><PRE>public static int <B>sub</B>(int n, int m)</PRE><DL><DD>Subtracts two fixed-point integers. <p> See net.jscience.math.MathFP for more details.<DD><DL><DT><B>Parameters:</B><DD><CODE>n</CODE> - the fixed-point integer to subtract from.<DD><CODE>m</CODE> - the fixed-point integer to be subtracted.<DT><B>Returns:</B><DD>an new fixed point integer representing the subtraction of n and m.<DT><B>Since: </B><DD>MathFP 1.0.0</DD></DL></DD></DL><HR><A NAME="abs(int)"><!-- --></A><H3>abs</H3><PRE>public static int <B>abs</B>(int n)</PRE><DL><DD>Returns the absolute value of the fixed-point integer. <p> See net.jscience.math.MathFP for more details.<DD><DL><DT><B>Parameters:</B><DD><CODE>n</CODE> - the fixed-point integer to get the absolute value of.<DT><B>Returns:</B><DD>an new fixed point integer representing the absolute value of n.<DT><B>Since: </B><DD>KVM-DR4.1</DD></DL></DD></DL><HR><A NAME="sqrt(int, int)"><!-- --></A><H3>sqrt</H3><PRE>public static int <B>sqrt</B>(int n, int r)</PRE><DL><DD>Returns the square root of the the fixed-point integer. <p> See net.jscience.math.MathFP for more details. However the value for r would normally not have to be bigger then 16. <p> This method uses the Newton method to extract the root.<DD><DL><DT><B>Parameters:</B><DD><CODE>n</CODE> - the fixed-point integer to extract the root from.<DD><CODE>r</CODE> - an integer that specifies the number of iterations.<DT><B>Returns:</B><DD>the fixed-point integer sqrt of n.<DT><B>Throws:</B><DD><CODE>Nothing</CODE> - but sets err_no flag<DT><B>Since: </B><DD>MathFP 1.1.0</DD></DL></DD></DL><HR><A NAME="sqrt(int)"><!-- --></A><H3>sqrt</H3><PRE>public static int <B>sqrt</B>(int n)</PRE><DL><DD>Returns the square root of the the fixed-point integer. <p> See net.jscience.math.MathFP for more details.<DD><DL><DT><B>Parameters:</B><DD><CODE>n</CODE> - the fixed-point integer to extract the root from.<DT><B>Returns:</B><DD>the fixed-point integer sqrt of n.<DT><B>Throws:</B><DD><CODE>Nothing</CODE> - but sets err_no flag<DT><B>Since: </B><DD>MathFP 1.0.1</DD></DL></DD></DL><HR><A NAME="sin(int)"><!-- --></A><H3>sin</H3><PRE>public static int <B>sin</B>(int r)</PRE><DL><DD>Returns the sine of the radian fixed-point integer. <p> See net.jscience.math.MathFP for more details.<DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the radian fixed-point integer to get the sine value of.<DT><B>Returns:</B><DD>the sine for the radian n as a fixed-point integer.<DT><B>Since: </B><DD>MathFP 1.0.2</DD></DL></DD></DL><HR><A NAME="asin(int)"><!-- --></A><H3>asin</H3><PRE>public static int <B>asin</B>(int x)</PRE><DL><DD>Returns the arc sine of the fixed-point integer. <p> See net.jscience.math.MathFP for more details.<DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - a fixed-point integer to get the arc sine of.<DT><B>Returns:</B><DD>the arc sine of the fixed-point integer s.<DT><B>Throws:</B><DD><CODE>ArithmeticException</CODE> - if the input is < -1 and > 1.<DT><B>Since: </B><DD>MathFP 1.0.3</DD></DL></DD></DL><HR><A NAME="cos(int)"><!-- --></A><H3>cos</H3><PRE>public static int <B>cos</B>(int r)</PRE><DL><DD>Returns the cosine of the radian fixed-point integer. <p> See net.jscience.math.MathFP for more details.<DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the radian fixed-point integer to get the cosine value of.<DT><B>Returns:</B><DD>the cosine for the radian r as a fixed-point integer.<DT><B>Since: </B><DD>MathFP 1.0.2</DD></DL></DD></DL><HR><A NAME="acos(int)"><!-- --></A><H3>acos</H3><PRE>public static int <B>acos</B>(int r)</PRE><DL><DD>Returns the arc cosine of the fixed-point integer. <p> See net.jscience.math.MathFP for more details.<DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - a fixed-point integer to get the arc sine of.<DT><B>Returns:</B><DD>the arc sine of the fixed-point integer s.<DT><B>Throws:</B><DD><CODE>ArithmeticException</CODE> - if the input is < -1 and > 1.<DT><B>Since: </B><DD>MathFP 1.0.2</DD></DL></DD></DL><HR><A NAME="tan(int)"><!-- --></A><H3>tan</H3><PRE>public static int <B>tan</B>(int r)</PRE><DL><DD>Returns the tangent of the radian fixed-point integer. <p> See net.jscience.math.MathFP for more details.<DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the radian fixed-point integer to get the tangent value of.<DT><B>Returns:</B><DD>the tangent of the radian r as a fixed-point integer.<DT><B>Throws:</B><DD><CODE>ArithmeticException</CODE> - if the input is PI/2 or any multplication of it.<DT><B>Since: </B><DD>MathFP 1.0.2</DD></DL></DD></DL><HR><A NAME="cot(int)"><!-- --></A><H3>cot</H3><PRE>public static int <B>cot</B>(int r)</PRE><DL><DD>Returns the cotangent of the radian fixed-point integer. <p> See net.jscience.math.MathFP for more details.<DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the radian fixed-point integer to get the tangent value of.<DT><B>Returns:</B><DD>the cotangent of the radian r as a fixed-point integer.<DT><B>Throws:</B><DD><CODE>ArithmeticException</CODE> - if the input is 0, PI or any multplication of it.<DT><B>Since: </B><DD>MathFP 1.1.2</DD></DL></DD></DL><HR><A NAME="atan(int)"><!-- --></A><H3>atan</H3><PRE>public static int <B>atan</B>(int r)</PRE><DL><DD>Returns the arc tangent of the radian fixed-point integer. <p> See net.jscience.math.MathFP for more details.<DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the radian fixed-point integer to get the tangent value of.<DT><B>Returns:</B><DD>the arc tangent of the radian r as a fixed-point integer.<DT><B>Throws:</B><DD><CODE>ArithmeticException.</CODE> - <DT><B>Since: </B><DD>MathFP 2.0.0</DD></DL></DD></DL><HR><A NAME="exp(int)"><!-- --></A><H3>exp</H3><PRE>public static int <B>exp</B>(int x)</PRE><DL><DD>The natural number raised to the power of a fixed-point integer. <p> See net.jscience.math.MathFP for more details.<DD><DL><DT><B>Parameters:</B><DD><CODE>x</CODE> - the fixed-point integer exponent.<DT><B>Returns:</B><DD>the natural number e raised to the power of x.<DT><B>Throws:</B><DD><CODE>ArithmeticException</CODE> - if the function overflows<DT><B>Since: </B><DD>MathFP 1.2.0</DD></DL></DD></DL><HR><A NAME="log(int)"><!-- --></A><H3>log</H3><PRE>public static int <B>log</B>(int s)</PRE><DL><DD>Returns the natural logarithm of a fixed-point integer. <p> See net.jscience.math.MathFP for more details.<DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - the fixed-point integer to get the logarithm of.<DT><B>Returns:</B><DD>the logarithm of s.<DT><B>Throws:</B><DD><CODE>ArithmeticException</CODE> - if the input is <= 0.<DT><B>Since: </B><DD>MathFP 1.2.0</DD></DL></DD></DL><HR><A NAME="pow(int, int)"><!-- --></A><H3>pow</H3><PRE>public static int <B>pow</B>(int b, int e)</PRE><DL><DD>Returns a fixed-point integer raised to a fixed-point integer <p> See net.jscience.math.MathFP for more details.<DD><DL><DT><B>Parameters:</B><DD><CODE>b</CODE> - the fixed-point integer base.<DD><CODE>e</CODE> - the fixed-point integer exponent.<DT><B>Returns:</B><DD>the natural number s raised to the power of e.<DT><B>Throws:</B><DD><CODE>ArithmeticException</CODE> - if the function overflows.<DT><B>Since: </B><DD>MathFP 1.2.0</DD></DL></DD></DL><HR><A NAME="stat()"><!-- --></A><H3>stat</H3><PRE>public static int <B>stat</B>()</PRE><DL><DD>Returns the internal overflow value if any <p> An err_no equal to 0 means no bad input or overflow. A value of 1 means bad input argument A value of 2 means overflow detected<DD><DL><DT><B>Returns:</B><DD>the internal overflow or bad input detector.<DT><B>Since: </B><DD>MathFP 1.2.0</DD></DL></DD></DL><HR><A NAME="atan2(int, int)"><!-- --></A><H3>atan2</H3><PRE>public static int <B>atan2</B>(int y, int x)</PRE><DL><DD>Returns the pricipal value of the arc tangent of y/x <p> Compute the principal value of the arc tangent of y/x, using the signs of both parameters to determine the quadrant of the return value or inother words computes elementwise the angle in radian between the positive part of the x-axis and the line with origin in (0,0) which contains the point (x, y).<DD><DL><DT><B>Parameters:</B><DD><CODE>y</CODE> - the fixed-point integer<DD><CODE>x</CODE> - the fixed-point integer<DT><B>Returns:</B><DD>the pricipal value of the arctangent y/x<DT><B>Since: </B><DD>MathFP2.0.5</DD></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="MathFP.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -