[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: srfi-56@xxxxxxxxxxxxxxxxx*Subject*: Implementation of read-ieee-float64*From*: Bradley Lucier <lucier@xxxxxxxxxxxxxxx>*Date*: Tue, 6 Dec 2005 23:01:37 -0600*Cc*: Bradley Lucier <lucier@xxxxxxxxxxxxxxx>, alexshinn@xxxxxxxxx, Marc Feeley <feeley@xxxxxxxxxxxxxxxx>, Gambit List <Gambit-list@xxxxxxxxxxxxxxxx>*Delivered-to*: srfi-56@xxxxxxxxxxxxxxxxx

(define (mantissa expn b2 b3 b4 b5 b6 b7 b8) (case expn ; recognize special literal exponents ((255) #f) ; won't handle NaN and +/- Inf ((0) ; denormalized (exact->inexact (* (expt 2.0 (- 1 (+ 1023 52))) (combine b2 b3 b4 b5 b6 b7 b8)))) (else (exact->inexact (* (expt 2.0 (- expn (+ 1023 52))) (combine (+ b2 16) b3 b4 b5 b6 b7 b8))))))

(expt 2.0 -1074) as (/ (expt 2.0 1074))

Brad

**Follow-Ups**:**Re: Implementation of read-ieee-float64***From:*Alex Shinn

- Prev by Date:
**Withdrawn SRFI 56: Binary I/O** - Next by Date:
**Re: Implementation of read-ieee-float64** - Previous by thread:
**Withdrawn SRFI 56: Binary I/O** - Next by thread:
**Re: Implementation of read-ieee-float64** - Index(es):