Announcement

Collapse
No announcement yet.

Problem with Calculation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with Calculation

    Having a problem converting the following number (bytes) into MB. The number is 8068508441. The results I get are as follows:
    KB,s = -509295
    MB,s = -497

    If I use the number 475397672, I get
    KB,s = 464255
    MB,s = 453

    The way I am converting is:

    %bytes%=8068508441
    %KB%=%bytes%/1024
    %MB%=%KB%/1024

    I will attach my script so you can look at it and tell me where I am going wrong. Seems the lower number is working. Thanks

    10421-Test.sf6

  • #2
    Re: Problem with Calculation

    The problem there is that you have exceeded the maximum value for a 32 bit integer (2 ^ 32). It simply won't fit. Internally, for disk space calculations and such, Setup Factory 6.0 uses unsigned 64 bit integers, but they are non-standard on Pentium/Windows systems.

    Perhaps give us an example of what you are doing and why and we can suggest another way of doing it.

    Sincerely,

    Colin Adams
    Indigo Rose Software
    http://www.indigorose.com

    Comment

    Working...
    X