| Summary: | myString = stringLib.format(mySmallFloat.. gives wrong string | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | broy2 |
| Component: | EDT | Assignee: | Project Inbox <edt.javagen-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jeffdouglas, svihovec |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
The number formatter method in the runtime only supports bigdecimal and so the smallfloat is being converted to a bigdecimal, causing an imprecise value. The runtime needs to have additional logic for floating point numbers. My belief is that this is not a P1 level item, so reducing it to P3. If you disagree, then we can discuss. fixed Verified in 20111114 build. |
program formatSmallFloat type BasicProgram {} mySmallFloat smallFloat; myString string; function main() mySmallFloat = 2.345678; myString = stringLib.format(mySmallFloat, "***.**********"); SysLib.writeStdout("Should be **2.3456780000 > " + myString); end end myString should be **2.3456780000 instead, it's **2.3456780910