Jump to content

Read out full number, not scientific

Recommended Posts

I made a quick little code to do a simple math problem (exponential population growth), and had it output the answer into a text file, but it's giving me "4.72236648286965e+021." I would like to see the full number (despite how long it is), and I'm not sure how to do that. Any help would be appreciated, here is my code:

$COUNT = 0
$ADDER = 0

If $ADDER = 0 Then
        $ADDER = InputBox("Bio Calculator", "Enter Starting Population Size:")
While $COUNT < 72
    $COUNT = $COUNT + 1
FileOpen("bioresults.txt", 1)
FileWrite("bioresults.txt", $ADDER)
Link to post
Share on other sites

If you are using a 32-bit PC with MS Windows there is an architectural upper limit of approximately 15 decimal digits for numbers. The PC cannot handle more than this without going to a 64-bit architecture, but you will need new hardware and a 64-bit OS for this greater accuracy. There are some clever people who have written libraries of routines for C/C++ etc. which, effectively, provide in their software the capability to do arithmetic to far greater levels of precision, but these ops are done in the software rather than the hardware and so are much slower. If you want far more precison than 15 digits in your results you should look at specialised scientific and mathematical tools that provide this capability. It's just not available in AutoIt. If you do a Google search on "extended precision arithmetic" you will start to uncover some of the available resources. Hope this helps.

Computers don't solve problems, they just rearrange them.New string TRIM() functions for AutoIt3

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...