Bug 277564 - [xpath2] XSFloat is not return formatted values correctly
Summary: [xpath2] XSFloat is not return formatted values correctly
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xpath (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.2 M1   Edit
Assignee: David Carver CLA
QA Contact: David Carver CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 262765
  Show dependency tree
 
Reported: 2009-05-22 23:46 EDT by David Carver CLA
Modified: 2010-08-11 17:08 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Carver CLA 2009-05-22 23:46:03 EDT
The W3C Tests are expecting float to return 7 decimal places before returning the exponent value.  Also fload 0E0 should return 0 for compatibility.

Use of DecimalFormat with the following pattern can be used to obtain the desired results:

0.#######E0
Comment 1 David Carver CLA 2009-05-22 23:55:45 EDT
Also need to update the Zero comparison.
Comment 2 David Carver CLA 2009-05-23 09:23:48 EDT
This has been fixed, also changed code to use Float methods for comparison of NaN and if the value returned is zero.