Community
Participate
Working Groups
Float values not displayed correctly in hex and decimal formats. The data itself should not be changed. If you value is 55.55 and you want to display the decimal or hexidecimal representation of that value it should not just convert it to decimal 55. It should show the decimal or hex value of the underlying 4 bytes of the float.
Created attachment 46393 [details] patch file
It looks like view as binary has been added since I created the patch. Adding the following at the end of getFloatValueString() should do the trick: else if ( CVariableFormat.BINARY.equals( format ) ) { StringBuffer sb = new StringBuffer( "0b" ); //$NON-NLS-1$ String stringValue = Long.toBinaryString( longValue ); sb.append( (stringValue.length() > 32) ? stringValue.substring( stringValue.length() - 32 ) : stringValue ); return sb.toString(); }
Warren, could you generate this patch again against the HEAD sources. It is close but doesn't apply cleanly and I want to make sure I get it right.
Hmm, having trouble creating a patch. The changes are isolated to one method. Just replace the getFloatValueString method with the one attached.
Created attachment 65972 [details] should replace existing method
Got it, committed patch to HEAD.