Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. [SOLVED] Re: Why is my float automatically rounding and how do i get it to stop

    Those values would each fit in a byte, why use a short?


    This is the part we've been asking about. What are the "adjustment"s you are talking about?


    Half of a long can hold 4B, vs the 900M...
  2. [SOLVED] Re: Why is my float automatically rounding and how do i get it to stop

    You can't. A char has 2 bytes with 64K possible values. A byte has 256 values.


    No, a double will be more precise. It depends on how many significant digits you need.


    Why do they both need...
  3. [SOLVED] Re: Why is my float automatically rounding and how do i get it to stop

    Its hard to offer advice if we don't know What you are trying to do?
    You're coding a lot without explaining the objective.
    As helloworld922 said:

    Are you trying to pack two numbers with 500K...
  4. [SOLVED] Re: Why is my float automatically rounding and how do i get it to stop

    If 333333 is the max for one value and 100000 for the other, you could pack them into a long (8 bytes) with no loss of precision.
    Your data appears to require 5 bytes to hold the two values.
    Pack...
  5. [SOLVED] Re: Why is my float automatically rounding and how do i get it to stop

    Can you explain the program requirement for all that? What is it you are trying to do?
    It looks like you are trying to store 3 data values in one variable of type double.
    What are the ranges in...
  6. [SOLVED] Re: Why is my float automatically rounding and how do i get it to stop

    Do you mean an array holding a million int? For example:
    int[] bigArray = new int[1000000000];
  7. [SOLVED] Re: Why is my float automatically rounding and how do i get it to stop

    How much memory are you worried about?

    How many decimal places can a float hold? Is it enough for your app?
Results 1 to 7 of 7