★ wanayoo — archive 1999 http://sourceware.cygnus.com/kawa/api/gnu/math/RealNum.htmlNouvelle recherche | Portail wanayoo

gnu.math
Class RealNum

java.lang.Object
  |
  +--java.lang.Number
        |
        +--gnu.math.Numeric
              |
              +--gnu.math.Quantity
                    |
                    +--gnu.math.Complex
                          |
                          +--gnu.math.RealNum
Direct Known Subclasses:
DFloNum, RatNum

public abstract class RealNum
extends Complex

See Also:
Serialized Form

Fields inherited from class gnu.math.Numeric
CEILING, FLOOR, ROUND, TRUNCATE
 
Constructor Summary
RealNum()
           
 
Method Summary
 Numeric abs()
           
abstract  Numeric add(java.lang.Object obj, int k)
           
static RealNum add(RealNum x, RealNum y, int k)
           
 RealNum angle()
           
abstract  Numeric div(java.lang.Object obj)
           
static RealNum div(RealNum x, RealNum y)
           
 Complex exp()
           
 RealNum im()
           
abstract  boolean isNegative()
           
 boolean isZero()
           
 Complex log()
           
 RealNum max(RealNum x)
           
 RealNum min(RealNum x)
           
abstract  Numeric mul(java.lang.Object obj)
           
static RealNum mul(RealNum x, RealNum y)
           
 RealNum re()
           
 RealNum rneg()
           
abstract  int sign()
          Return 1 if >0; 0 if ==0; -1 if <0; -2 if NaN.
 Complex sin()
           
 Complex sqrt()
           
 RatNum toExact()
          Convert to an exact number.
static IntNum toExactInt(double value)
          Converts an integral double (e.g.
static IntNum toExactInt(double value, int rounding_mode)
          Converts real to an exact integer, with specified rounding mode.
 IntNum toExactInt(int rounding_mode)
          Converts to an exact integer, with specified rounding mode.
static double toInt(double d, int rounding_mode)
          Converts a real to an integer, according to a specified rounding mode.
 RealNum toInt(int rounding_mode)
          Converts a real to an integer, according to a specified rounding mode.
 
Methods inherited from class gnu.math.Complex
add, addReversed, compare, compare, div, divReversed, doubleImagValue, doubleRealValue, doubleValue, equals, equals, imMinusOne, imOne, isExact, longValue, make, make, mul, mulReversed, neg, neg, number, polar, polar, power, toString
 
Methods inherited from class gnu.math.Quantity
add, compare, compareReversed, dimensions, div, imValue, make, make, make, mul, reValue, unit
 
Methods inherited from class gnu.math.Numeric
add, div_inv, floatValue, geq, grt, intValue, mul_ident, power, sub, toString
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RealNum

public RealNum()
Method Detail

re

public final RealNum re()
Overrides:
re in class Quantity

im

public final RealNum im()
Overrides:
im in class Quantity

isNegative

public abstract boolean isNegative()

sign

public abstract int sign()
Return 1 if >0; 0 if ==0; -1 if <0; -2 if NaN.

max

public RealNum max(RealNum x)

min

public RealNum min(RealNum x)

add

public static RealNum add(RealNum x,
                          RealNum y,
                          int k)

mul

public static RealNum mul(RealNum x,
                          RealNum y)

div

public static RealNum div(RealNum x,
                          RealNum y)

add

public abstract Numeric add(java.lang.Object obj,
                            int k)
Overrides:
add in class Complex

mul

public abstract Numeric mul(java.lang.Object obj)
Overrides:
mul in class Complex

div

public abstract Numeric div(java.lang.Object obj)
Overrides:
div in class Complex

angle

public RealNum angle()
Overrides:
angle in class Complex

abs

public Numeric abs()
Overrides:
abs in class Complex

rneg

public final RealNum rneg()

isZero

public boolean isZero()
Overrides:
isZero in class Complex

toExact

public RatNum toExact()
Convert to an exact number. Implements the Scheme inexact->exact (for real numbers).

toInt

public static double toInt(double d,
                           int rounding_mode)
Converts a real to an integer, according to a specified rounding mode. Note an inexact argument gives an inexact result, following Scheme. See also RatNum.toExactInt.

toInt

public RealNum toInt(int rounding_mode)
Converts a real to an integer, according to a specified rounding mode. Note an inexact argument gives an inexact result, following Scheme. See also toExactInt.

toExactInt

public IntNum toExactInt(int rounding_mode)
Converts to an exact integer, with specified rounding mode.

toExactInt

public static IntNum toExactInt(double value,
                                int rounding_mode)
Converts real to an exact integer, with specified rounding mode.

toExactInt

public static IntNum toExactInt(double value)
Converts an integral double (e.g. toInt result) to an IntNum.

exp

public Complex exp()
Overrides:
exp in class Complex

log

public Complex log()
Overrides:
log in class Complex

sin

public final Complex sin()

sqrt

public final Complex sqrt()
Overrides:
sqrt in class Complex