Home | History | Annotate | Download | only in creals

Lines Matching refs:CR

138 * and <TT>get_appr</tt>.  Such applications will treat <TT>CR</tt> as
140 * <TT>java.math.BigInteger</tt>. No subclasses of <TT>CR</tt>
148 * The requires the construction of a subclass of <TT>CR</tt> with
156 * be used for this purpose, since CR inherits from <TT>Number</tt>.)
164 public abstract class CR extends Number {
165 // CR is the basic representation of a number.
216 * Must be defined in subclasses of <TT>CR</tt>.
218 * not ever need to define a <TT>CR</tt> subclass.
225 * Called only with the lock on the <TT>CR</tt> object
263 public static CR valueOf(BigInteger n) {
271 public static CR valueOf(int n) {
279 public static CR valueOf(long n) {
288 public static CR valueOf(double n) {
301 CR result = valueOf(mantissa).shiftLeft(exp);
311 public static CR valueOf(float n) {
315 public static CR ZERO = valueOf(0);
316 public static CR ONE = valueOf(1);
426 CR simple_ln() {
429 static CR ten_ninths = valueOf(10).divide(valueOf(9));
430 static CR twentyfive_twentyfourths = valueOf(25).divide(valueOf(24));
431 static CR eightyone_eightyeths = valueOf(81).divide(valueOf(80));
432 static CR ln2_1 = valueOf(7).multiply(ten_ninths.simple_ln());
433 static CR ln2_2 =
435 static CR ln2_3 = valueOf(3).multiply(eightyone_eightyeths.simple_ln());
436 static CR ln2 = ln2_1.subtract(ln2_2).add(ln2_3);
440 static CR atan_reciprocal(int n) {
444 static CR four = valueOf(4);
458 public int compareTo(CR x, int r, int a) {
479 public int compareTo(CR x, int a) {
498 public int compareTo(CR x) {
507 * Equivalent to <TT>compareTo(CR.valueOf(0), a)</tt>
543 public static CR valueOf(String s, int radix)
560 return CR.valueOf(scaled_result).divide(CR.valueOf(divisor));
571 CR scaled_CR;
649 CR scale;
651 scale = CR.valueOf(big_radix.pow(scale_exp)).inverse();
653 scale = CR.valueOf(big_radix.pow(-scale_exp));
655 CR scaled_res = multiply(scale);
661 scaled_res = scaled_res.multiply(CR.valueOf(big_radix));
749 public CR add(CR x) {
757 public CR shiftLeft(int n) {
766 public CR shiftRight(int n) {
777 public CR assumeInt() {
784 public CR negate() {
791 public CR subtract(CR x) {
798 public CR multiply(CR x) {
804 * <TT>x.inverse()</tt> is equivalent to <TT>CR.valueOf(1).divide(x)</tt>.
806 public CR inverse() {
813 public CR divide(CR x) {
823 public CR select(CR x, CR y) {
830 public CR max(CR x) {
837 public CR min(CR x) {
845 public CR abs() {
852 public CR exp() {
857 CR square_root = shiftRight(1).exp();
864 static CR two = valueOf(2);
869 public static CR PI = four.multiply(four.multiply(atan_reciprocal(5))
872 static CR half_pi = PI.shiftRight(1);
877 public CR cos() {
883 CR adjustment = PI.multiply(CR.valueOf(pi_multiples));
891 CR cos_half = shiftRight(1).cos();
901 public CR sin() {
908 public CR asin() {
911 CR new_arg = ONE.subtract(multiply(this)).sqrt();
923 public CR acos() {
936 public CR ln() {
947 CR quarter = sqrt().sqrt().ln();
951 CR scaled_result = shiftRight(extra_bits).ln();
952 return scaled_result.add(CR.valueOf(extra_bits).multiply(ln2));
961 public CR sqrt() {
965 } // end of CR
969 // A specialization of CR for cases in which approximate() calls
978 abstract class slow_CR extends CR {
999 class int_CR extends CR {
1012 class assumed_int_CR extends CR {
1013 CR value;
1014 assumed_int_CR(CR x) {
1027 class add_CR extends CR {
1028 CR op1;
1029 CR op2;
1030 add_CR(CR x, CR y) {
1042 // Representation of a CR multiplied by 2**n
1043 class shifted_CR extends CR {
1044 CR op;
1046 shifted_CR(CR x, int n) {
1056 class neg_CR extends CR {
1057 CR op;
1058 neg_CR(CR x) {
1070 class select_CR extends CR {
1071 CR selector;
1073 CR op1;
1074 CR op2;
1075 select_CR(CR s, CR x, CR y) {
1104 class mult_CR extends CR {
1105 CR op1;
1106 CR op2;
1107 mult_CR(CR x, CR y) {
1125 CR tmp;
1151 class inv_CR extends CR {
1152 CR op;
1153 inv_CR(CR x) { op = x; }
1195 class prescaled_exp_CR extends CR {
1196 CR op;
1197 prescaled_exp_CR(CR x) { op = x; }
1236 CR op;
1237 prescaled_cos_CR(CR x) {
1326 CR op;
1327 prescaled_ln_CR(CR x) { op = x; }
1372 CR op;
1373 prescaled_asin_CR(CR x) {
1453 class sqrt_CR extends CR {
1454 CR op;
1455 sqrt_CR(CR x) { op = x; }