Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. Replies
    21
    Views
    2,372

    [SOLVED] Re: working with BigDecimal and MathContext

    You're welcome.
  2. Replies
    21
    Views
    2,372

    [SOLVED] Re: working with BigDecimal and MathContext

    I have no answers other than try different combinations of methods and values until you get the one you want.
  3. Replies
    21
    Views
    2,372

    [SOLVED] Re: working with BigDecimal and MathContext

    That's strange. When I ran it I get the following from different tests:

    System.out.println("f1="+formatted_1 + " f2="+formatted_2 +", mf="+ money_formatted);
    ...
  4. Replies
    21
    Views
    2,372

    [SOLVED] Re: working with BigDecimal and MathContext

    Did you try different rounding modes?
  5. Replies
    21
    Views
    2,372

    [SOLVED] Re: working with BigDecimal and MathContext

    What do the scale methods do?
  6. Replies
    21
    Views
    2,372

    [SOLVED] Re: working with BigDecimal and MathContext

    Try some of the other methods of the BigDecimal class. I'm sure one of them will do what you want.
  7. Replies
    21
    Views
    2,372

    [SOLVED] Re: working with BigDecimal and MathContext

    The javac and java programs should answer that for you.
  8. Replies
    21
    Views
    2,372

    [SOLVED] Re: working with BigDecimal and MathContext

    Did you try using the value returned by the round() method?
  9. Replies
    21
    Views
    2,372

    [SOLVED] Re: working with BigDecimal and MathContext

    What are you doing with the value returned by the round() method?
Results 1 to 9 of 9