Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

10 million digits

2»

Comments

  • JBakerJBaker Posts: 197Member
    : [blue]So, by that logic, say, value of 0.728672933993887857487376E+4930 will have all the 4930 digits as a significant ones? I doubt that. Mantissa is still limited to some 71 bit or so... and it is not even close to 1000 digits even...[/blue]
    :

    [blue]
    I was answering shaolin007's comment;
    [/blue]
    [green]"I don't remember how it would be declared in C..."[/green]
    [blue]
    Meaning an 80bit variable. I think it was pretty clear that I was responding to his/her comment and not DarQ. I did not think my answer was going to close the thread or get DarQ any closer to solving his/her problem. I was only helping where I could.

    I was also pretty clear about using the borland compiler and the documentation is all I have to go by (I've never used variable that big before). So if your more knowledgeable about this compiler and the included documentation then the entire Borland team that put it together then I appologies to you but as you said so well [/blue][red]"...I doubt that..."[/red][blue]. My comment for shaolin007 was correct, deal with it.

    So, if shaolin007 wanted to initialize an 80bit variable now he/she knows how to do it.

    In closing, try to keep in mind that this message board is all about helping people with problems that relate to C/C++ programming. This is not a flaming board or a one-up you type of situation. Anyone who has been programming for longer then a week knows that there is almost always more then one way to get the job done. The end result is the most important thing to your employer.[/blue]
    [hr]
    [blue][size=4]JBaker[/size][/blue]

  • Ed HallEd Hall Posts: 395Member
    After having done some more playing it seems that 10 million is a bit out of my reach using the string method I mentioned. I was only able (with my setup) to create a string up to a little over 2 million digits long before I encountered a stack fault. Oh well, back to my play. . .

    BTW, 16609 is the maximum power of 2 that can fit in 5000 digits. . .:-)

    Take Care,
    Ed Hall

  • prathampratham Posts: 3Member
    just say __int64.
    to make it portable on linux just say
    #define long long __int64

    now declare the variable as

    long long

  • Ed HallEd Hall Posts: 395Member
    : just say __int64.
    : to make it portable on linux just say
    : #define long long __int64
    :
    : now declare the variable as
    :
    : long long
    :
    :
    Thanks for the reply Pratham,

    When I try this I get messages such as "long long long is too long" for the declaration statement. I had tried the long long approach without the __int64 part. I suspect my difficultiy is stemming from my individual machine perhaps (although it could be my code environment) because if I add code elsewhere the string size capability decreases. Also if I add a second string it shortens the first's capability. Is this possibly some sort of small, medium, large issue? I kind of thought that was not an issue with 32bits, but maybe I'm mixing Windows and Console thinking. . .

    Take Care,
    Ed Hall

2»
Sign In or Register to comment.