Changes between Initial Version and Version 1 of Ticket #16881


Ignore:
Timestamp:
09/22/11 08:13:55 (3 years ago)
Author:
aaugustin
Comment:

Improved formatting.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16881

    • Property Needs documentation unset
    • Property Needs tests unset
    • Property Patch needs improvement unset
  • Ticket #16881 – Description

    initial v1  
    1 We see the error "quantize result has too many digits for current context" when using a DecimalField with max_digits=7 decimal_places=2 ie the following call fails
     1We see the error "quantize result has too many digits for current context" when using a !DecimalField with max_digits=7 decimal_places=2 ie the following call fails
    22
     3{{{
    34format_number(Decimal('914123.22'), 7, 2)
    4 
     5}}}
    56I believe this is due to the statement
    6 
     7{{{
    78context.prec = max_digits
    8 
     9}}}
    910whereas I think it should be
    10 
    11 context.prec = max_digits+decimal_places
    12 
     11{{{
     12context.prec = max_digits + decimal_places
     13}}}
    1314but I am not sure.
Back to Top