2 * Javolution - Java(TM) Solution for Real-Time and Embedded Systems
3 * Copyright (C) 2006 - Javolution (http://javolution.org/)
6 * Permission to use, copy, modify, and distribute this software is
7 * freely granted, provided that this notice is preserved.
10 public final class PR31264
12 public static long fubar(double d
, int n
)
14 long bits
= Double
.doubleToRawLongBits(d
);
15 int exp
= ((int)(bits
>> 52)) & 0x7FF;
16 long m
= bits
& 0x000fffffffffffffL
;
19 if (m
== 0) return 0L;
20 return fubar(d
* 18014398509481984L, n
- 54); // 2^54 Exact.
25 public static void main(String
[] argv
)