⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 real.java

📁 利用开源的源码为一个朋友的V3手机手机写的科学计算器
💻 JAVA
字号:
package xcalc;/** * <b>Java integer implementation of 63-bit precision floating point.</b> * <br><i>Version 1.09</i> * * <p>Copyright 2003-2006 Roar Lauritzsen <roarl@pvv.org> * * <blockquote> * <p>This library is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * <p>This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * <p>The following link provides a copy of the GNU General Public License: * <br>&nbsp;&nbsp;&nbsp;&nbsp;<a * href="http://www.gnu.org/licenses/gpl.txt">http://www.gnu.org/licenses/gpl.txt</a> * <br>If you are unable to obtain the copy from this address, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307 USA * </blockquote> * * <p><b>General notes</b> * <ul> * *   <li><code>Real</code> objects are not immutable, like Java *   <code>Double</code> or <code>BigDecimal</code>. This means that *   you should not think of a <code>Real</code> object as a "number", *   but rather as a "register holding a number". This design choice *   is done to encourage object reuse and limit garbage production *   for more efficient execution on e.g. a limited MIDP device. The *   design choice is reflected in the API, where an operation like *   {@link #add(Real) add} does not return a new object containing *   the result (as with {@link *   java.math.BigDecimal#add(java.math.BigDecimal) BigDecimal}), but *   rather adds the argument to the object itself, and returns *   nothing. * *   <li>This library implements infinities and NaN (Not-a-Number) *   following the IEEE 754 logic. If an operation produces a result *   larger (in magnitude) than the largest representable number, a *   value representing positive or negative infinity is generated. If *   an operation produces a result smaller than the smallest *   representable number, a positive or negative zero is *   generated. If an operation is undefined, a NaN value is *   produced. Abnormal numbers are often fine to use in further *   calculations. In most cases where the final result would be *   meaningful, abnormal numbers accomplish this, *   e.g. atan(1/0)=&pi;/2. In most cases where the final result is *   not meaningful, a NaN will be produced. * *   <li>Error bounds listed under <a href="#method_detail">Method *   Detail</a> are calculated using William Rossi's <a *   href="http://dfp.sourceforge.net/">rossi.dfp.dfp</a> at 40 *   decimal digits accuracy. Error bounds may increase when results *   approach zero or infinity. The abbreviation {@link *   Math#ulp(double) ULP} means Unit in the Last Place. An error *   bound of 锟

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -