Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > decimal.Decimal formatting

Thread Tools

decimal.Decimal formatting
Posts: n/a
I have various decimals which eventually are written to an XML file.
Requirements indicate a precision of 11. I am currently having some
'issues' with Decimal("0"). When using
quantize(decimal.Decimal("1e-11")) the result is not 0.00000000000, but

Personally I agree 1e-11 is a better notation than 0.00000000000, but I
currently need the long one. Is there a way to overwrite the switch to
the scientific notation? Apparently there is a switch in notation
'between' 1e-6 and 1e-7.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird formatting problems appearing only in Linux version of FireFox Firefox 5 12-30-2004 03:40 PM
Formatting Question Markus Firefox 13 10-23-2004 08:17 PM
Need formatting options menu for formatting hard drive Mark T. Computer Support 3 11-24-2003 11:50 PM
Re: Formatting string in WHERE clause Lee Simpson ASP .Net 0 07-18-2003 04:21 PM
Code formatting rules in editor thaneesh ASP .Net 0 07-02-2003 09:04 AM