From a69c9fb665459e2bfdbda1bf80741a0af31a7faf Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 20 Feb 2017 00:06:40 -0800 Subject: New upstream version 3b5 --- bytenumb.scm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) mode change 100644 => 100755 bytenumb.scm (limited to 'bytenumb.scm') diff --git a/bytenumb.scm b/bytenumb.scm old mode 100644 new mode 100755 index 053a433..4af40b6 --- 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)))) -- cgit v1.2.3