source: trunk/hiptop/rpn/dgs/libs/hipfloat/hipfloatBadNum.java@ 484

Last change on this file since 484 was 207, checked in by Nicholas Riley, 19 years ago

rpn: Brian Swetland's RPN calculator using Dan Sachs's hipfloat
library. Changes for hiptop OS 2.3; some minor UI cleanups.

File size: 945 bytes
Line 
1package dgs.libs.hipfloat;
2
3// Copyright 2003, Daniel Grobe Sachs. All Rights Reserved.
4// See LICENSE for redistribution terms
5//
6// Some algorithms borrowed from GNU BC, but all code was rewritten.
7
8public class hipfloatBadNum extends hipfloat implements Comparable
9{
10 public hipfloat add(hipfloat a) { return this; }
11 public hipfloat sub(hipfloat a) { return this; }
12 public hipfloat mul(hipfloat a) { return this; }
13 public hipfloat div(hipfloat a) { return this; }
14 public hipfloat sqrt() { return this; }
15 public hipfloat exp() { return this; }
16 public hipfloat ln() { return this; }
17
18 public boolean isError() { return true; }
19
20 public static final hipfloatBadNum NAN = new hipfloatBadNum(1);
21 public static final hipfloatBadNum OVF = new hipfloatBadNum(2);
22 public static final hipfloatBadNum NoError = new hipfloatBadNum(0);
23
24 public hipfloatBadNum(int i)
25 {
26 super(0);
27 this.mantissa = 2000000000 + i;
28 this.exponent = 0;
29 }
30}
31
Note: See TracBrowser for help on using the repository browser.