CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2007
    Posts
    17

    Question Re: How large of a #can I use geometry

    Hello everybody c:

    if I have a number like the example below will visual studio 5 pro and the <math> or <cmath> library allow it to work and if I code it correctly (my function) will it deliver radians like 0.->15 decimal places long?
    Example#: 463526353645364747845758748753629578458295748943889
    using atan or tan or even * or /?

    Thanks so much, I appreciate any advice.

    PCB

  2. #2
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: How large of a #can I use geometry

    If you use 64 bit integers, you are limited to 64 bit numbers.
    If you want longer numbers you need a BigInt class. Search the articles on www.codeguru.com, I'm sure there is a BigInt class somewhere.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  3. #3
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: How large of a #can I use geometry

    If you want longer numbers you need a BigInt class.
    One such library is the GMP.

    EDIT:
    Oh wait, GMP does not support those trigo functions, so you would need to use it with the MPFR add-on library.
    Last edited by laserlight; February 28th, 2008 at 08:49 AM.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured