ETSI's Bug Tracker - Part 06: TTCN-3 Control Interface
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0006639 | Part 06: TTCN-3 Control Interface | Technical | public | 10-10-2013 09:20 | 23-12-2013 14:05

Reporter | Tomas Urban |
Assigned To | Ina Schieferdecker |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v4.5.1 (published 2013-04) |
Target Version | v4.6.1 (published 2014-06) | Fixed in Version | v4.6.1 (published 2014-06) |
Clause Reference(s) | 8.3.4.3
Source (company - Author) | Elvior

Summary | 0006639: Single precision of float value in java mapping

Description

The java mapping of the methods for getting and setting float values (FloatValue.getFloat, FloatValue.setFloat) use single precision numbers. All other mappings use double precision and C# mapping supports lossless (text-based) conversion in addition to that.
The precision loss connected with converting to 32-bit floats has a negative implact on test case results, especially in complex and repeated calculations and as such, it is not acceptable in some testing environments. Quite recently, we had two cases from airspace and transport industry, when we had to implement XTRI adapters in C# rather than in java because of this limitation.
Proposal:
Change the parameter and return type from float to double in FloatValue.setFloat and FloatValue.getFloat of java mapping. This change is simple, but it might cause backwards compatibility issues.
Alternative proposal:
Add new methods to the FloatValue interface:
public void setDouble(double value);
public double getDouble();
This change doesn't cause any backwards compatibility issues, but the interface won't be as nice as the other interfaces.
Additional recommendation:
Add methods for setting values without precision loss for testing systems where rounding to 64-bit double precision is not acceptable (if internally supported by the tool):
public void setStringValue(string value);
public string getStringValue();
Similar methods are described in the C# mapping section.

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | CR6639.doc (367,104) 26-11-2013 12:58 http://oldforge.etsi.org/mantis/file_download.php?file_id=2940&type=bug

Issue History
Date Modified | Username | Field | Change
10-10-2013 09:20 | Tomas Urban | New Issue |
10-10-2013 09:20 | Tomas Urban | Clause Reference(s) | => 8.3.4.3
10-10-2013 09:20 | Tomas Urban | Source (company - Author) | => Elvior
10-10-2013 09:47 | Gyorgy Rethy | Assigned To | => Jacob Wieland - Spirent
10-10-2013 09:47 | Gyorgy Rethy | Status | new => assigned
10-10-2013 09:47 | Gyorgy Rethy | Target Version | => v4.6.1 (published 2014-06)
10-10-2013 16:02 | Jacob Wieland - Spirent | Note Added: 0011758 |
26-11-2013 12:58 | Jacob Wieland - Spirent | File Added: CR6639.doc |
26-11-2013 12:58 | Jacob Wieland - Spirent | Note Added: 0011833 |
26-11-2013 12:58 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Ina Schieferdecker
26-11-2013 12:58 | Jacob Wieland - Spirent | Status | assigned => confirmed
23-12-2013 14:05 | Ina Schieferdecker | Note Added: 0011891 |
23-12-2013 14:05 | Ina Schieferdecker | Status | confirmed => resolved
23-12-2013 14:05 | Ina Schieferdecker | Resolution | open => fixed
23-12-2013 14:05 | Ina Schieferdecker | Fixed in Version | => v4.6.1 (published 2014-06)
23-12-2013 14:05 | Ina Schieferdecker | Status | resolved => closed

Notes

(0011758)
Jacob Wieland - Spirent
10-10-2013 16:02

I think adding getDouble()/setDouble() is the viable way to go. I also would add getBigDecimal()/setBigDecimal() for arbitrary precision using java.math.BigDecimal (which allows all decimal operations and easy conversions from/to double and float).

(0011833)
Jacob Wieland - Spirent
26-11-2013 12:58

please review

(0011891)
Ina Schieferdecker
23-12-2013 14:05

as proposed