net.sourceforge.interval.ia_math
Class RMath

java.lang.Object
  |
  +--net.sourceforge.interval.ia_math.RMath

public class RMath
extends java.lang.Object

RMath.java -- classes implementing directed rounding of real numbers, as part of the "ia_math library" version 0.1beta1, 10/97

Copyright (C) 2000 Timothy J. Hickey

License: zlib/png

the class RoundedMath contains methods and constants for controling the rounding of the elementary arithmetic operations on floating point numbers.

The current Java 1.1 API does not contain any methods for performing rounded arithmetic besides the default (round toward nearest).

This version strikes a compromise between efficiency and accuracy.


Constructor Summary
RMath()
           
 
Method Summary
static double acos_hi(double x)
           
static double acos_lo(double x)
           
static double add_hi(double x, double y)
           
static double add_lo(double x, double y)
           
static double asin_hi(double x)
           
static double asin_lo(double x)
           
static double atan_hi(double x)
           
static double atan_lo(double x)
           
static double cos_hi(double x)
           
static double cos_lo(double x)
           
static double div_hi(double x, double y)
           
static double div_lo(double x, double y)
           
static double exp_hi(double x)
           
static double exp_lo(double x)
           
static double log_hi(double x)
           
static double log_lo(double x)
           
static void main(java.lang.String[] argv)
           
static double mul_hi(double x, double y)
           
static double mul_lo(double x, double y)
           
static double nextfp(double x)
          return the next larger double precision number
static double pow_hi(double x, double y)
          returns upper bound on x**y assuming x>0
static double pow_lo(double x, double y)
          returns lower bound on x**y assuming x>0
static double prevfp(double x)
           
static double sin_hi(double x)
           
static double sin_lo(double x)
           
static double sub_hi(double x, double y)
           
static double sub_lo(double x, double y)
           
static double tan_hi(double x)
           
static double tan_lo(double x)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RMath

public RMath()
Method Detail

nextfp

public static double nextfp(double x)
return the next larger double precision number

prevfp

public static double prevfp(double x)

add_lo

public static double add_lo(double x,
                            double y)

add_hi

public static double add_hi(double x,
                            double y)

sub_lo

public static double sub_lo(double x,
                            double y)

sub_hi

public static double sub_hi(double x,
                            double y)

mul_lo

public static double mul_lo(double x,
                            double y)

mul_hi

public static double mul_hi(double x,
                            double y)

div_lo

public static double div_lo(double x,
                            double y)

div_hi

public static double div_hi(double x,
                            double y)

exp_lo

public static double exp_lo(double x)

exp_hi

public static double exp_hi(double x)

log_lo

public static double log_lo(double x)

log_hi

public static double log_hi(double x)

sin_lo

public static double sin_lo(double x)

sin_hi

public static double sin_hi(double x)

cos_lo

public static double cos_lo(double x)

cos_hi

public static double cos_hi(double x)

tan_lo

public static double tan_lo(double x)

tan_hi

public static double tan_hi(double x)

asin_lo

public static double asin_lo(double x)

asin_hi

public static double asin_hi(double x)

acos_lo

public static double acos_lo(double x)

acos_hi

public static double acos_hi(double x)

atan_lo

public static double atan_lo(double x)

atan_hi

public static double atan_hi(double x)

pow_lo

public static double pow_lo(double x,
                            double y)
returns lower bound on x**y assuming x>0

pow_hi

public static double pow_hi(double x,
                            double y)
returns upper bound on x**y assuming x>0

main

public static void main(java.lang.String[] argv)