<?xml version="1.0" encoding="UTF-8"?>
<test id="wmlscript/core/variables/float/size/2" class="C" scope="wmlscript:float" testtype="application" type="auto" source="wmls11#6.2.7.2" device="both">
  <assertion>If an operation results in a floating-point number outside the range of supported floating-point values then the result is 'invalid'.
</assertion>
  <notes>Don't test for devices that don't support floating-point operations.  var x = 1/0; var y = 2 * Float.maxFloat();</notes>
  <results>
    <result>
      <name>test</name>
      <value>pass</value>
    </result>
  </results>
  <method>
    <![CDATA[<card newcontext="true" id="main">
<onevent type="onenterforward">
<go href="<script1>#main('test','card1')"/>
</onevent>
<auto_failed>
</card>]]>
  </method>
  <cards>
    <card id="1">
      <![CDATA[<card id="card1">
<onevent type="onenterforward">
<go href="<resulturl>">
<postfield name="test" value="$test"/>
<sessionvars>
</go>
</onevent>
<auto_failed>
</card>
]]>
    </card>
  </cards>
  <scripts>
    <script id="1">
      <![CDATA[extern function main(myvar,next) {
	var result = 'fail';
	var lowvalue = 1/0;
	var highvalue = 2 * Float.maxFloat();

	if (!isvalid(lowvalue) && !isvalid(highvalue)) {
		result = 'pass';
	}
	WMLBrowser.setVar(myvar, result);
	WMLBrowser.go('#' + next);
	return 1;
}
]]>
    </script>
  </scripts>
</test>

