Re: decimal to binary




"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?


.



Relevant Pages

  • Re: PL/I CANT handle strings
    ... Hey maroon, cant you read? ... " Why cant someone show PL/I syntax can write one? ...
    (comp.lang.pl1)
  • Reduce Blanks challenge
    ... Since its obvious there is NO PL/I solution to translate my 1-line ... and as usual Vowels will not admit it the PL/I syntax is ... by output of a null char after just 1 trailing blank char is output. ...
    (comp.lang.pl1)
  • Re: PL/I is doomed
    ... >> PL/I hasn't needed major upgrades like Fortran ... They don't have to continually "upgrade" the language syntax, ...
    (comp.lang.pl1)
  • RE: Do we need a DCL debugger?
    ... since you are working on the parser you could support both the ... > C and the PL/I like syntax with little effort, ... IMHO PL/I doesn't look all that much like C, ...
    (comp.os.vms)
  • Re: decimal to binary
    ... > neither PL/I or Fortran can express a REAL with a million ... >bits precision using available REAL data types ... dcl xfloat; ... is the representation of 3.0 with more than 1,000,000 bits. ...
    (comp.lang.fortran)