aboutsummaryrefslogtreecommitdiffstats
path: root/bytenumb.scm
diff options
context:
space:
mode:
Diffstat (limited to 'bytenumb.scm')
-rwxr-xr-x[-rw-r--r--]bytenumb.scm7
1 files changed, 3 insertions, 4 deletions
diff --git a/bytenumb.scm b/bytenumb.scm
index 053a433..4af40b6 100644..100755
--- a/bytenumb.scm
+++ b/bytenumb.scm
@@ -174,6 +174,7 @@
;;(bytes->ieee-double (bytes 0 4 0 0 0 0 0 0)) @result{} 5.562684646268003e-309
;;(bytes->ieee-double (bytes 0 0 0 0 0 0 0 1)) @result{} 4.0e-324
;;
+;;(bytes->ieee-double (list->bytes '(127 239 255 255 255 255 255 255))) 179.76931348623157e306
;;(bytes->ieee-double (bytes #xFF #xF0 0 0 0 0 0 0)) @result{} -inf.0
;;(bytes->ieee-double (bytes #x7F #xF0 0 0 0 0 0 0)) @result{} +inf.0
;;(bytes->ieee-double (bytes #x7F #xF8 0 0 0 0 0 0)) @result{} 0/0
@@ -183,8 +184,7 @@
;;Returns a 4-element byte-array encoding the IEEE single-precision
;;floating-point of @1.
(define ieee-float->bytes
- (let ((zero (or (string->number "0.0") 0))
- (exactify (if (provided? 'inexact) inexact->exact identity)))
+ (let ((exactify (if (provided? 'inexact) inexact->exact identity)))
(lambda (flt)
(define byts (make-bytes 4 0))
(define S (and (real? flt) (negative? (if (zero? flt) (/ flt) flt))))
@@ -241,8 +241,7 @@
;;Returns a 8-element byte-array encoding the IEEE double-precision
;;floating-point of @1.
(define ieee-double->bytes
- (let ((zero (or (string->number "0.0") 0))
- (exactify (if (provided? 'inexact) inexact->exact identity)))
+ (let ((exactify (if (provided? 'inexact) inexact->exact identity)))
(lambda (flt)
(define byts (make-bytes 8 0))
(define S (and (real? flt) (negative? (if (zero? flt) (/ flt) flt))))