Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359304 - Conversion from float to decimal doesn't give expected results
Summary: Conversion from float to decimal doesn't give expected results
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-28 16:48 EDT by Kathy Carroll CLA
Modified: 2017-02-23 14:19 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kathy Carroll CLA 2011-09-28 16:48:43 EDT
This works in RBD.  I expect to see works twice in console

program driver type BasicProgram {}
	function main()
		actual float = 2.539E7;
		actualDec decimal(15,2) = actual;
		expectedDec decimal(15,2) = 25390000;
		if (actualDec == expectedDec)
			syslib.writestdout("works");
		else
			syslib.writestdout("doesnt");
		end
		actualDec = actual as decimal(15,2);
		if (actualDec == expectedDec)
			syslib.writestdout("works");
		else
			syslib.writestdout("doesnt");
		end		
	end
end
Comment 1 Justin Spadea CLA 2011-09-28 19:57:29 EDT
Reassigning to JavaGen.
Comment 2 Jeff Douglas CLA 2011-09-29 08:19:09 EDT
fixed
Comment 3 Kathy Carroll CLA 2011-10-12 13:36:02 EDT
verified build 201110120952