k-user AT lists.cs.illinois.edu
Subject: K-user mailing list
List archive
- From: Sandeep Dasgupta <sdasgup3 AT illinois.edu>
- To: "Park, Daejun" <dpark69 AT illinois.edu>
- Cc: <sdasgup3 AT illinois.edu>, "k-user AT lists.cs.illinois.edu" <k-user AT lists.cs.illinois.edu>
- Subject: Re: [[K-user] ] Help: Interpreting a bit string as Float or Double
- Date: Sat, 9 Dec 2017 18:16:29 -0600
- Authentication-results: illinois.edu; spf=pass smtp.mailfrom=sdasgup3 AT illinois.edu
Hello Daejun, Thanks for the reply. A. I have implemented 2 hooks 1. float2mint(Float F, Int W): Converts a float point value F(single or double precision) to a BitVector or MInt of bitwidth W. 2. mint2float(MInt MI, Int Precision, Int Exponent): Converts a Bitvector or MInt to an single or double precision float point value. B. Both are heavily tested. Soon sending the pull request. Thanks again, Sandeep On 12/07/2017 01:38 PM, Park, Daejun
wrote:
You can implement a new hook using `mpfr-java` library,
specifically the following `BigFloat` constructor:
where (for single-precision case):
@param `sign`:
true/false depending on the sign bit
@param
`exponent`: `uint(e1...e8) - 127` where `e1...e8` are the
exponent bits.
@param
`significand`: `uint(1 s1...s23)` where `s1...s23` are the
significant bits (note that the prepended bit `1`).
or
`unit(0 s1...s23)` if `uint(e1...e8) == 0`.
(for double-precision, replace 8 by 11, and 23 by 52 in the
above)
Best,
Daejun
On Dec 7, 2017, at 10:22 AM, Sandeep Dasgupta <sdasgup3 AT illinois.edu>
wrote:
|
- [[K-user] ] Help: Interpreting a bit string as Float or Double, Sandeep Dasgupta, 12/07/2017
- Re: [[K-user] ] Help: Interpreting a bit string as Float or Double, Park, Daejun, 12/07/2017
- Re: [[K-user] ] Help: Interpreting a bit string as Float or Double, Sandeep Dasgupta, 12/09/2017
- Re: [[K-user] ] Help: Interpreting a bit string as Float or Double, Park, Daejun, 12/07/2017
Archive powered by MHonArc 2.6.19.