Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. Replies
    4
    Views
    1,482

    Re: Need help with my double return function.

    The compiler looks at the data types used in a computation and uses the arithmetic that matches those values.
    If there are mixed data types, there are rules the compiler uses to chose which type of...
  2. Replies
    4
    Views
    1,482

    Re: Need help with my double return function.

    Check that your code is NOT doing integer arithmetic. For example 5/6 = 0 vs 5.0/6 = 0.833333
    To force the compiler to use floating point arithmetic multiply a value by by 1.0 before dividing.
Results 1 to 2 of 2