Home
last modified time | relevance | path

Searched refs:d (Results 1 – 25 of 258) sorted by relevance

1234567891011

/libcore/benchmarks/src/benchmarks/regression/
DMathBenchmark.java24 private final double d = 1.2; field in MathBenchmark
35 double result = d; in timeAbsD()
37 result = Math.abs(d); in timeAbsD()
67 double result = d; in timeAcos()
69 result = Math.acos(d); in timeAcos()
75 double result = d; in timeAsin()
77 result = Math.asin(d); in timeAsin()
83 double result = d; in timeAtan()
85 result = Math.atan(d); in timeAtan()
91 double result = d; in timeAtan2()
[all …]
DStrictMathBenchmark.java24 private final double d = 1.2; field in StrictMathBenchmark
61 StrictMath.abs(d); in timeAbsD()
85 StrictMath.acos(d); in timeAcos()
91 StrictMath.asin(d); in timeAsin()
97 StrictMath.atan(d); in timeAtan()
109 StrictMath.cbrt(d); in timeCbrt()
123 StrictMath.copySign(d, d); in timeCopySignD()
135 StrictMath.cos(d); in timeCos()
141 StrictMath.cosh(d); in timeCosh()
147 StrictMath.exp(d); in timeExp()
[all …]
/libcore/ojluni/src/main/native/
DMath.c30 Math_cos(jdouble d) { in Math_cos() argument
31 return cos(d); in Math_cos()
35 Math_sin(jdouble d) { in Math_sin() argument
36 return sin(d); in Math_sin()
40 Math_tan(jdouble d) { in Math_tan() argument
41 return tan(d); in Math_tan()
45 Math_asin(jdouble d) { in Math_asin() argument
46 return asin(d); in Math_asin()
50 Math_acos(jdouble d) { in Math_acos() argument
51 return acos(d); in Math_acos()
[all …]
DStrictMath.c36 StrictMath_cos(JNIEnv *env, jclass unused, jdouble d) in StrictMath_cos() argument
38 return (jdouble) ieee_cos((double)d); in StrictMath_cos()
42 StrictMath_sin(JNIEnv *env, jclass unused, jdouble d) in StrictMath_sin() argument
44 return (jdouble) ieee_sin((double)d); in StrictMath_sin()
48 StrictMath_tan(JNIEnv *env, jclass unused, jdouble d) in StrictMath_tan() argument
50 return (jdouble) ieee_tan((double)d); in StrictMath_tan()
54 StrictMath_asin(JNIEnv *env, jclass unused, jdouble d) in StrictMath_asin() argument
56 return (jdouble) ieee_asin((double)d); in StrictMath_asin()
60 StrictMath_acos(JNIEnv *env, jclass unused, jdouble d) in StrictMath_acos() argument
62 return (jdouble) ieee_acos((double)d); in StrictMath_acos()
[all …]
/libcore/ojluni/src/main/java/sun/util/calendar/
DCalendarUtils.java70 public static final long floorDivide(long n, long d) { in floorDivide() argument
72 (n / d) : (((n + 1L) / d) - 1L)); in floorDivide()
84 public static final int floorDivide(int n, int d) { in floorDivide() argument
86 (n / d) : (((n + 1) / d) - 1)); in floorDivide()
102 public static final int floorDivide(int n, int d, int[] r) { in floorDivide() argument
104 r[0] = n % d; in floorDivide()
105 return n / d; in floorDivide()
107 int q = ((n + 1) / d) - 1; in floorDivide()
108 r[0] = n - (q * d); in floorDivide()
125 public static final int floorDivide(long n, int d, int[] r) { in floorDivide() argument
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DDoubleTest.java200 Double d = new Double(dd); in test_toString() local
201 assertEquals(answer, Double.toString(d.doubleValue())); in test_toString()
202 assertEquals(answer, d.toString()); in test_toString()
209 Double d = new Double(39089.88888888888888888888888888888888); in test_ConstructorD() local
210 assertEquals("Created incorrect double", 39089.88888888888888888888888888888888, d in test_ConstructorD()
218 Double d = new Double("39089.88888888888888888888888888888888"); in test_ConstructorLjava_lang_String() local
219 assertEquals("Created incorrect double", 39089.88888888888888888888888888888888, d in test_ConstructorLjava_lang_String()
224 d = new Double("1E+-20"); in test_ConstructorLjava_lang_String()
231d = Double.parseDouble("-1.23399999999999996511673809963093681727585202138420992908181304283780288… in test_ConstructorLjava_lang_String()
232 assertEquals("Failed to parse long string", -1.234E-112D, d.doubleValue(), 0D); in test_ConstructorLjava_lang_String()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DDateTest.java205 Date d = new GregorianCalendar(1998, Calendar.OCTOBER, 13, 19, 9) in test_getDate() local
207 assertEquals("Returned incorrect date", 13, d.getDate()); in test_getDate()
215 Date d = new GregorianCalendar(1998, Calendar.OCTOBER, 13, 19, 9) in test_getDay() local
217 assertEquals("Returned incorrect day", 2, d.getDay()); in test_getDay()
225 Date d = new GregorianCalendar(1998, Calendar.OCTOBER, 13, 19, 9) in test_getHours() local
227 assertEquals("Returned incorrect hours", 19, d.getHours()); in test_getHours()
235 Date d = new GregorianCalendar(1998, Calendar.OCTOBER, 13, 19, 9) in test_getMinutes() local
237 assertEquals("Returned incorrect minutes", 9, d.getMinutes()); in test_getMinutes()
245 Date d = new GregorianCalendar(1998, Calendar.OCTOBER, 13, 19, 9) in test_getMonth() local
247 assertEquals("Returned incorrect month", 9, d.getMonth()); in test_getMonth()
[all …]
DTimerTest.java315 Date d = new Date(System.currentTimeMillis() + 100); in test_scheduleLjava_util_TimerTaskLjava_util_Date() local
318 t.schedule(testTask, d); in test_scheduleLjava_util_TimerTaskLjava_util_Date()
327 d = new Date(System.currentTimeMillis() + 100); in test_scheduleLjava_util_TimerTaskLjava_util_Date()
330 t.schedule(testTask, d); in test_scheduleLjava_util_TimerTaskLjava_util_Date()
340 d = new Date(-100); in test_scheduleLjava_util_TimerTaskLjava_util_Date()
342 t.schedule(testTask, d); in test_scheduleLjava_util_TimerTaskLjava_util_Date()
350 d = new Date(System.currentTimeMillis() + 100); in test_scheduleLjava_util_TimerTaskLjava_util_Date()
352 t.schedule(null, d); in test_scheduleLjava_util_TimerTaskLjava_util_Date()
370 d = new Date(-100); in test_scheduleLjava_util_TimerTaskLjava_util_Date()
372 t.schedule(null, d); in test_scheduleLjava_util_TimerTaskLjava_util_Date()
[all …]
/libcore/ojluni/src/main/java/sun/misc/
DFpUtils.java139 public static int getExponent(double d){ in getExponent() argument
140 return Math.getExponent(d); in getExponent()
208 public static boolean isFinite(double d) { in isFinite() argument
209 return Double.isFinite(d); in isFinite()
239 public static boolean isInfinite(double d) { in isInfinite() argument
240 return Double.isInfinite(d); in isInfinite()
271 public static boolean isNaN(double d) { in isNaN() argument
272 return Double.isNaN(d); in isNaN()
341 public static int ilogb(double d) { in ilogb() argument
342 int exponent = getExponent(d); in ilogb()
[all …]
/libcore/ojluni/src/main/java/java/util/
DJapaneseImperialCalendar.java250 CalendarDate d = e.getSinceDate();
251 sinceFixedDates[index] = gcal.getFixedDate(d);
421 LocalGregorianCalendar.Date d = (LocalGregorianCalendar.Date) jdate.clone(); in add() local
422 d.addYear(amount); in add()
423 pinDayOfMonth(d); in add()
424 set(ERA, getEraIndex(d)); in add()
425 set(YEAR, d.getYear()); in add()
426 set(MONTH, d.getMonth() - 1); in add()
427 set(DAY_OF_MONTH, d.getDayOfMonth()); in add()
429 LocalGregorianCalendar.Date d = (LocalGregorianCalendar.Date) jdate.clone(); in add() local
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/xml/parsers/
DDocumentBuilderTest.java169 Document d; in testNewDocument() local
172 d = dbf.newDocumentBuilder().newDocument(); in testNewDocument()
177 assertNotNull(d); in testNewDocument()
178 assertNull(d.getDoctype()); in testNewDocument()
179 assertNull(d.getDocumentElement()); in testNewDocument()
180 assertNull(d.getNamespaceURI()); in testNewDocument()
184 DOMImplementation d; in testGetImplementation() local
187 d = dbf.newDocumentBuilder().getDOMImplementation(); in testGetImplementation()
192 assertNotNull(d); in testGetImplementation()
229 Document d = db.parse(f); in testGetBaseURI() local
[all …]
/libcore/ojluni/src/test/java/lang/Math/
DExpm1Tests.java84 double d = Math.scalb(2, i); in testExpm1() local
85 testExpm1Case(d, d); in testExpm1()
86 testExpm1Case(-d, -d); in testExpm1()
96 for (double d = 37.5; d <= 709.5; d += 1.0) { in testExpm1()
97 testExpm1CaseWithUlpDiff(d, StrictMath.exp(d), 2, null); in testExpm1()
102 double d = Math.scalb(2, i); in testExpm1() local
103 testExpm1Case(d, infinityD); in testExpm1()
113 for (double d = -36.75; d >= -127.75; d -= 1.0) { in testExpm1()
114 testExpm1CaseWithUlpDiff(d, -1.0, 1, reachedLimit); in testExpm1()
118 double d = -Math.scalb(2, i); in testExpm1() local
[all …]
DCeilAndFloorTests.java112 double d = (double) i; in nearIntegerTests() local
113 double neighborDown = Math.nextDown(d); in nearIntegerTests()
114 double neighborUp = Math.nextUp(d); in nearIntegerTests()
116 testCeilCase(d, d); in nearIntegerTests()
117 testCeilCase(-d, -d); in nearIntegerTests()
119 testFloorCase(d, d); in nearIntegerTests()
120 testFloorCase(-d, -d); in nearIntegerTests()
122 if (Math.abs(d) > 1.0) { in nearIntegerTests()
123 testCeilCase(neighborDown, d); in nearIntegerTests()
124 testCeilCase(-neighborDown, -d + 1); in nearIntegerTests()
[all …]
DLog1pTests.java98 double d = Math.scalb(2, i); in testLog1p() local
99 testLog1pCase(d, d); in testLog1p()
100 testLog1pCase(-d, -d); in testLog1p()
105 double d = Math.scalb(2, i); in testLog1p() local
106 testLog1pCaseWithUlpDiff(d, StrictMath.log(d), 2.001); in testLog1p()
113 double d = rand.nextDouble(); in testLog1p() local
115 d = Math.scalb(d, -53 - Tests.ilogb(d)); in testLog1p()
118 testLog1pCaseWithUlpDiff(d, hp15cLogp(d), 5); in testLog1p()
120 d *= 2.0; // increase exponent by 1 in testLog1p()
DCubeRootTests.java98 double d = i; in testCubeRoot() local
99 testCubeRootCase(d * d * d, (double) i); in testCubeRoot()
176 double d = 1.0 + rand.nextDouble(); in testCubeRoot() local
179 double y1 = Math.cbrt(d); in testCubeRoot()
180 double y2 = StrictMath.cbrt(d); in testCubeRoot()
182 err = d - StrictMath.pow(y1, 3); in testCubeRoot()
185 Assert.fail("Encountered unexpected NaN value: d = " + d + in testCubeRoot()
189 err_adjacent = StrictMath.pow(Math.nextUp(y1), 3) - d; in testCubeRoot()
191 err_adjacent = StrictMath.pow(Math.nextAfter(y1, 0.0), 3) - d; in testCubeRoot()
195 Assert.fail("For Math.cbrt(" + d + "), returned result " + in testCubeRoot()
[all …]
DHyperbolicTests.java265 double d = Math.scalb(2.0, i); in testSinh() local
268 testSinhCaseWithUlpDiff(d, d, 2.5); in testSinh()
285 double d = Double.longBitsToDouble(i); in testSinh() local
288 testSinhCaseWithUlpDiff(d, StrictMath.exp(d) * 0.5, 3.5); in testSinh()
343 double d = Math.scalb(2.0, i); in testSinh() local
346 testSinhCaseWithUlpDiff(d, Double.POSITIVE_INFINITY, 0.0); in testSinh()
612 double d = Math.scalb(2.0, i); in testCosh() local
615 testCoshCaseWithUlpDiff(d, 1.0, 2.5); in testCosh()
632 double d = Double.longBitsToDouble(i); in testCosh() local
635 testCoshCaseWithUlpDiff(d, StrictMath.exp(d) * 0.5, 3.5); in testCosh()
[all …]
/libcore/ojluni/src/main/java/java/util/concurrent/
DCompletableFuture.java477 CompletableFuture<?> d; Completion t; in postComplete() local
486 f = (d = h.tryFire(NESTED)) == null ? this : d; in postComplete()
604 CompletableFuture<V> d; CompletableFuture<T> a; in tryFire() local
607 || (d = dep) == null || (f = fn) == null) in tryFire()
609 tryComplete: if (d.result == null) { in tryFire()
612 d.completeThrowable(x, r); in tryFire()
622 d.completeValue(f.apply(t)); in tryFire()
625 d.completeThrowable(ex); in tryFire()
629 return d.postFire(a, mode); in tryFire()
639 CompletableFuture<V> d = newIncompleteFuture(); in uniApplyStage()
[all …]
/libcore/tools/checkstyle/
Dw3c-copyright.pattern2 Copyright \([Cc]\) \d\d\d\d(-\d\d\d\d)? World Wide Web Consortium.*
/libcore/ojluni/src/test/java/lang/Float/
DNaNInfinityParsingTest.java128 float d; in main() local
134 float d = Float.parseFloat(naNString); in testValidNaNStrings() local
135 Assert.assertTrue(Float.isNaN(d), "NaN string ``" + naNString in testValidNaNStrings()
137 d + " instead."); in testValidNaNStrings() local
144 float d = Float.parseFloat(infinityString); in testValidInfinityStrings() local
145 Assert.assertTrue(Float.isInfinite(d), "Infinity string ``" + in testValidInfinityStrings()
148 d + "instead."); in testValidInfinityStrings() local
152 Assert.assertEquals(d, (negative ? Float.NEGATIVE_INFINITY : in testValidInfinityStrings()
163 float d = Float.parseFloat(invalidString); in testAlmostValidStrings() local
164 Assert.fail("Invalid string ``" + invalidString + "'' parsed as " + d + "."); in testAlmostValidStrings()
/libcore/ojluni/src/test/java/lang/Double/
DNaNInfinityParsingTest.java129 double d = Double.parseDouble(naNString); in testValidNaNStrings() local
130 Assert.assertTrue(Double.isNaN(d), "NaN string ``" + naNString in testValidNaNStrings()
132 d + " instead."); in testValidNaNStrings() local
139 double d = Double.parseDouble(infinityString); in testValidInfinityStrings() local
140 Assert.assertTrue(Double.isInfinite(d), "Infinity string ``" + in testValidInfinityStrings()
143 d + "instead."); in testValidInfinityStrings() local
147 Assert.assertEquals(d, (negative ? Double.NEGATIVE_INFINITY : in testValidInfinityStrings()
158 double d = Double.parseDouble(invalidString); in testAlmostValidStrings() local
159 Assert.fail("Invalid string ``" + invalidString + "'' parsed as " + d + "."); in testAlmostValidStrings()
/libcore/support/src/test/java/tests/resources/x509/
Dcreate.sh27 …" -days 3650 -extensions usr_cert -req -signkey "$DIR/privkey.pem" -outform d -set_serial -9999999…
30 openssl asn1parse -in "$DIR/cert-rsa.der" -inform d -out "$DIR/cert-rsa-tbs.der" -noout -strparse 4
31 SIG_OFFSET=$(openssl asn1parse -in "$DIR/cert-rsa.der" -inform d | tail -1 | cut -f1 -d:)
32 openssl asn1parse -in "$DIR/cert-rsa.der" -inform d -strparse "$SIG_OFFSET" -noout -out "$DIR/cert-…
35 openssl x509 -in "$DIR/cert-rsa.der" -inform d -noout -startdate -enddate > "$DIR/cert-rsa-dates.tx…
38 openssl x509 -in "$DIR/cert-rsa.der" -inform d -noout -serial > "$DIR/cert-rsa-serial.txt"
40 …xtensions keyUsage_extraLong_cert -req -signkey "$DIR/privkey.pem" -outform d > "$DIR/cert-keyUsag…
42 …-extensions extendedKeyUsage_cert -req -signkey "$DIR/privkey.pem" -outform d > "$DIR/cert-extende…
44 …R/default.cnf" -extensions ca_cert -req -signkey "$DIR/privkey.pem" -outform d > "$DIR/cert-ca.der"
46 … -extensions userWithPathLen_cert -req -signkey "$DIR/privkey.pem" -outform d > "$DIR/cert-userWit…
[all …]
/libcore/ojluni/src/main/java/java/lang/
DDouble.java320 public static String toString(double d) { in toString() argument
321 return FloatingDecimal.toJavaFormatString(d); in toString()
402 public static String toHexString(double d) { in toHexString() argument
408 if (!isFinite(d) ) in toHexString()
410 return Double.toString(d); in toHexString()
415 if (Math.copySign(1.0, d) == -1.0) // value is negative, in toHexString()
420 d = Math.abs(d); in toHexString()
422 if(d == 0.0) { in toHexString()
425 boolean subnormal = (d < Double.MIN_NORMAL); in toHexString()
430 long signifBits = (Double.doubleToLongBits(d) in toHexString()
[all …]
/libcore/luni/src/test/java/libcore/highmemorytest/libcore/icu/
DSimpleDateFormatDataTest.java43 SimpleDateFormatData d = SimpleDateFormatData.getInstance(locale); in testLongDateTimeFormat() local
45 assertNotEquals(0, d.getDateFormat(DateFormat.FULL).length()); in testLongDateTimeFormat()
46 assertNotEquals(0, d.getDateFormat(DateFormat.LONG).length()); in testLongDateTimeFormat()
47 assertNotEquals(0, d.getDateFormat(DateFormat.MEDIUM).length()); in testLongDateTimeFormat()
48 assertNotEquals(0, d.getDateFormat(DateFormat.SHORT).length()); in testLongDateTimeFormat()
50 assertNotEquals(0, d.getTimeFormat(DateFormat.FULL).length()); in testLongDateTimeFormat()
51 assertNotEquals(0, d.getTimeFormat(DateFormat.LONG).length()); in testLongDateTimeFormat()
52 assertNotEquals(0, d.getTimeFormat(DateFormat.MEDIUM).length()); in testLongDateTimeFormat()
53 assertNotEquals(0, d.getTimeFormat(DateFormat.SHORT).length()); in testLongDateTimeFormat()
/libcore/ojluni/annotations/hiddenapi/sun/misc/
DFpUtils.java36 public static int getExponent(double d) { in getExponent() argument
57 public static boolean isFinite(double d) { in isFinite() argument
66 public static boolean isInfinite(double d) { in isInfinite() argument
74 public static boolean isNaN(double d) { in isNaN() argument
90 public static int ilogb(double d) { in ilogb() argument
99 public static double scalb(double d, int scale_factor) { in scalb() argument
119 public static double nextUp(double d) { in nextUp() argument
129 public static double nextDown(double d) { in nextDown() argument
149 public static double ulp(double d) { in ulp() argument
159 public static double signum(double d) { in signum() argument
/libcore/ojluni/src/test/java/util/regex/
DTestCases.txt179 [^a-d[0-9][m-p]]
183 [^a-d[0-9][m-p]]
187 [^[a-c]&&[d-f]]
191 [^a-c&&d-f]
203 [^a-cd-f&&[d-f]]
207 [^[a-c][d-f]&&abc]
211 [^[a-c][d-f]&&abc]
212 d
213 true d 0
215 [^[a-c][d-f]&&abc[def]]
[all …]

1234567891011