[racket] numbers/bytes in r6rs

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sun Dec 26 12:04:23 EST 2010

Whoops looks like I was wrong there. Please disregard.

Robby

On Sunday, December 26, 2010, Robby Findler <robby at eecs.northwestern.edu> wrote:
> In racket you'd use this function, fwiw:
>
>   (λ (n) (bytes-length (string->bytes/utf-8 (format "~s" n))))
>
> (or possibly a variant of it depending on the encoding you were using).
>
> Robby
>
> On Sun, Dec 26, 2010 at 2:52 AM, Wolfgang De Meuter <wdmeuter at vub.ac.be> wrote:
>> Hello
>>
>> I'm struggling with chapter 2 of the R6RS libraries (relation between Scheme data objects and bytevectors). Does anyone know a clean&simple way for
>> - determining the number of bytes needed to push an arbitrary-sized number in a bytevector;  (log nbr 256) is not good enough :-)
>> - determining whether a floating point number is a double or a single.
>>
>> I guess that I must be lacking knowledge about some of the primitives.
>>
>> Thx
>>
>> Wolf
>> _________________________________________________
>>  For list-related administrative tasks:
>>  http://lists.racket-lang.org/listinfo/users
>>
>


Posted on the users mailing list.