Home | History | Annotate | Download | only in creals

Lines Matching refs:CR

36     private static void checkEq(CR x, CR y, String s) {
44 private static boolean isApprInt(CR x) {
49 final static CR ZERO = CR.valueOf(0);
50 final static CR ONE = CR.valueOf(1);
51 final static CR TWO = CR.valueOf(2);
52 final static CR BIG = CR.valueOf(200).exp();
53 final static CR SMALL = BIG.inverse();
54 final static CR HALF_PI = CR.PI.divide(CR.valueOf(2));
59 .monotoneDerivative(ZERO, CR.PI);
66 private static void checkTrig(CR x) {
95 CR v = CR.valueOf(i);
102 CR.valueOf(1),
107 CR xcos = x.cos();
108 CR tmp = xcos.acos();
111 check(isApprInt(tmp.subtract(x).divide(CR.PI))
112 || isApprInt(tmp.add(x).divide(CR.PI)),
114 CR xsin = x.sin();
116 CR tmp2 = xsin.asin();
120 check(isApprInt(tmp.subtract(x).divide(CR.PI))
121 || isApprInt(tmp.add(x).divide(CR.PI)),
125 private static void checkExpLn(CR x) {
133 checkEq(x.multiply(CR.valueOf(2)).exp(),
142 checkEq(x.ln().divide(CR.valueOf(2)), x.sqrt().ln(),
146 CR v = CR.valueOf(i);
155 private static void checkBasic(CR x) {
165 checkEq(ZERO.acos(), CR.PI.divide(TWO), "acos(0)");
167 checkEq(ONE.negate().acos(), CR.PI, "acos(-1)");
169 checkEq(ONE.asin(), CR.PI.divide(TWO), "asin(1)");
170 checkEq(ONE.negate().asin(), CR.PI.divide(TWO).negate(), "asin(-1)");
172 CR BIG = CR.valueOf(200).exp();
177 checkTrig(CR.PI);
178 checkTrig(CR.PI.subtract(SMALL));
179 checkTrig(CR.PI.add(SMALL));
180 checkTrig(CR.PI.negate());
181 checkTrig(CR.PI.negate().subtract(SMALL));
182 checkTrig(CR.PI.negate().add(SMALL));
187 final CR x = CR.valueOf(d);
194 final CR x = CR.valueOf(d);
200 checkEq(CR.valueOf(1).ln(), CR.valueOf(0), "ln(1) != 0");
201 checkExpLn(CR.valueOf(0));
202 CR BIG = CR.valueOf(200).exp();
207 checkExpLn(CR.PI);
215 final CR x = CR.valueOf(d);
222 final CR x = CR.valueOf(d);
234 final CR x = CR.valueOf(d);
241 final CR x = CR.valueOf(d);