Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
Delphi-BCB
RTL
Delphi
Arithmetic
ConvUtils
Date - Time
DateUtils
File Management
Format + Float
Input/Output
Math Unit
Memory, Pointer, Address
Null-terminated strings
Other Classes
Other RTL
Pascal Strings
Regular Expressions
RTL Exceptions
Text Files
Thread support
Typed/Untyped Files
WinAPI
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/RTL/Delphi/Other RTL
[ Add a report in this area ]
Report #:
103106
Status:
Closed
[REGRESSION in XE2] BcdDivide(1, 3) returns Bcd value of up to 64 decimal places
Project:
Delphi
Build #:
16.0.4358.45540
Version:
16.3
Submitted By:
Chee Yang Chau
Report Type:
Crash / Data loss / Total failure
Date Reported:
2/2/2012 5:44:24 AM
Severity:
Serious / Highly visible problem
Last Updated:
12/19/2012 7:59:59 PM
Platform:
All platforms
Internal Tracking #:
289755
Resolution:
Fixed
(Resolution Comments)
Resolved in Build:
:
Update 4
Duplicate of:
None
Voting and Rating
Overall Rating:
No Ratings Yet
0.00 out of 5
Total Votes:
None
Description
Running the following code in Delphi XE2 console apps:
var A, B, C, D: TBcd;
begin
A := StrToBcd('1');
B := StrToBcd('3');
BcdDivide(A, B, C);
WriteLn(BcdToStr(C));
try
BcdMultiply(C, C, D);
WriteLn(BcdToStr(D));
except
on E: Exception do
WriteLn(E.Message);
end;
ReadLn;
end.
The output will be:
0.333333333333333333333333333333333333333333333333333333333333333
BCD overflow
The variable C contains a Bcd Value with decimal places of 63. Perform further BcdMultiply operation on variable C will cause Bcd overflow error.
However, running the same code in Delphi XE yields the following result without any exception prompt:
0.3333333333
0.11111111108888888889
Steps to Reproduce:
None
Workarounds
None
Attachment
None
Comments
None
View Your Reports
Search
Server Response from: ETNACODE01
Developer Tools
Blackfish SQL
C++Builder
Delphi
FireMonkey
Prism
InterBase
JBuilder
J Optimizer
HTML5 Builder
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us