Search:

Type: Posts; User: helloworld922

Search: Search took 0.07 seconds.

  1. Replies
    9
    Views
    1,910

    Re: Simple problem...

    Does it need to be (i.e. external constraint), or you don't want to change it?

    It's possible to convert between the double and integer formats, though as the compiler's warning you against, you...
  2. Replies
    9
    Views
    1,910

    Re: Simple problem...

    It's due to how floating points are represented. The math is rather involved, but if you're interested, see IEEE 754-2008 - Wikipedia, the free encyclopedia.

    One solution is to replace everywhere...
  3. Replies
    9
    Views
    1,910

    Re: Simple problem...

    This is a problem with using floating points and truncation errors. The simplest solution is to represent the money amount using integers for cents. You can then get the dollar amounts back using...
Results 1 to 3 of 3