Re: decimal to binary
- From: "David Frank" <dave_frank@xxxxxxxxxxx>
- Date: Sun, 09 Oct 2005 06:42:41 GMT
"glen herrmannsfeldt" <gah@xxxxxxxxxxxxxxxx> wrote in message
news:8MednQ2nNeVrA9XeRVn-gQ@xxxxxxxxxxxxxx
> David Frank wrote:
>
> (snip)
>
>> Btw, I would like to see someone post a bits manipulation/formatting
>> challenge that they think cant be handled with such 1-liner unpack/pack
>> syntax I have shown.
>
> Print out the first 1000000 bits of the fractional part of e, as computed
> by programs described in this newsgroup.
>
> For extra credit, also the first 1000000 bits of the fractional
> part of pi.
>
> As you seem to believe that string lengths are a severe limitation of
> PL/I, and not of Fortran, a convenient solution to this problem would be
> to print a substring of a suitably initialized string. To convert any
> 32 bit integer to a binary string, concatenate all 2**32 strings of 32
> characters each into one CHARACTER variable, and print the appropriate
> substring.
>
> -- glen
>
This cross-posting originated by Vowels (and lifted in your reply to my to
reply to Gary Scott who thinks he is bits limited compared to what PL/I has
available in syntax and thus cant solve a complex bits problem.
So show us a PL/I bits solution for your "challenge" above or else I am
ignoring it since neither PL/I or Fortran can express a REAL with a million
bits precision using available REAL data types
Vowels says PL/I can declare string lengths > 32767 chars, as a PL/I
expert, what do you say?
.
- Follow-Ups:
- Re: decimal to binary
- From: Gary L. Scott
- Re: decimal to binary
- From: glen herrmannsfeldt
- Re: decimal to binary
- References:
- Re: decimal to binary
- From: glen herrmannsfeldt
- Re: decimal to binary
- Prev by Date: Re: how to use %val() ???
- Next by Date: Re: decimal to binary
- Previous by thread: Re: decimal to binary
- Next by thread: Re: decimal to binary
- Index(es):
Relevant Pages
|