Ignore:
Timestamp:
Jan 18, 2011 2:05:26 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
ff520b7
Parents:
18119890
Message:

remove nativeDoubleValue(), update jbigi README

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/c/jbigi/jbigi/src/jbigi.c

    r18119890 r08d24b0  
    5656
    5757        return jresult;
    58 }
    59 
    60 /******** nativeDoubleValue() */
    61 /*
    62  * Class:     net_i2p_util_NativeBigInteger
    63  * Method:    nativeDoubleValue
    64  * Signature: ([B)D
    65  *
    66  * From the Javadoc:
    67  *
    68  * Converts a BigInteger byte-array to a 'double'
    69  * @param ba Big endian twos complement representation of the BigInteger to convert to a double
    70  * @return The plain double-value represented by 'ba'
    71  */
    72 JNIEXPORT jdouble JNICALL Java_net_i2p_util_NativeBigInteger_nativeDoubleValue
    73 (JNIEnv * env, jclass cls, jbyteArray jba){
    74             /* 1) Convert the bytearray BigInteger value into the format libgmp understands
    75          * 2) Call libgmp's mpz_get_d.
    76          * 3) Convert libgmp's result into a big endian twos complement number.
    77          */
    78         mpz_t mval;
    79                 jdouble retval;
    80         convert_j2mp(env, jba, &mval);
    81 
    82                 retval = mpz_get_d(mval);
    83                 mpz_clear(mval);
    84                 return retval;
    8558}
    8659
Note: See TracChangeset for help on using the changeset viewer.