Search:

Type: Posts; User: Eric Cheong

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    4,181

    yup, You can prove the floating point has a...

    yup, You can prove the floating point has a trucation issue. But I need to prove the array will have different sum if it adds the first one to the last one and vice versa. I just want to find out the...
  2. Replies
    8
    Views
    4,181

    The question is what is the value for a[i] that...

    The question is what is the value for a[i] that can make the result different from the two loops.
  3. Replies
    8
    Views
    4,181

    floating point question

    I have a floating point question. The following is the source code:

    double sum, a[3];
    int i;

    sum = 0.0;

    for (i=0; i < 3; i++)
    sum += a[i];
    printf("%e\n", sum);
Results 1 to 3 of 3