OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [PR31264.java] - Blame information for rev 772

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 765 jeremybenn
/*
2
 * Javolution - Java(TM) Solution for Real-Time and Embedded Systems
3
 * Copyright (C) 2006 - Javolution (http://javolution.org/)
4
 * All rights reserved.
5
 *
6
 * Permission to use, copy, modify, and distribute this software is
7
 * freely granted, provided that this notice is preserved.
8
 */
9
 
10
public final class PR31264
11
{
12
  public static long fubar(double d, int n)
13
  {
14
    long bits = Double.doubleToRawLongBits(d);
15
    int exp = ((int)(bits >> 52)) & 0x7FF;
16
    long m = bits & 0x000fffffffffffffL;
17
    if (exp == 0)
18
      {
19
        if (m == 0) return 0L;
20
        return fubar(d * 18014398509481984L, n - 54); // 2^54 Exact.
21
      }
22
    return m;
23
  }
24
 
25
  public static void main(String[] argv)
26
  {
27
  }
28
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.