| Summary: | Javascript is rounding rather than truncating when converting float to decimal | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | broy2 |
| Component: | EDT | Assignee: | Project Inbox <edt.javascriptgen-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | carrollk, jqian |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
This causes the mathLib functions to fail running api.systemTypes in EUnit. verified on 201111210901's build, it's successful for both java and javascript Brenda, if this is not in eunit.test project in cvs, please add to it, so it can be used everytime we run eunit tests. Done. |
Javascript is rounding when converting float to decimal. It should be truncating. Use EUnit to run: library truncate myFloat float; myDecimal decimal(12,6); function functionName() {@Test} myFloat = 1.5663225538310885; myDecimal = myFloat; LogResult.assertDecimalEqual1(1.566322, myDecimal); end end Runs OK in Java. myDecimal = 1.566322 Gets failure in Javascript. myDecimal = 1.566323 See 362834.