tests/expr/math/math-3304a.xsl
changeset 1198 aacf3d6d8681
child 1211 226a4c4600fb
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/expr/math/math-3304a.xsl	Mon Jan 11 11:27:29 2016 +0000
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
+xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs">
+<?spec fo#func-round-half-to-even?>
+<!-- PURPOSE:  Test of round-half-to-even on floats. -->
+    <!-- Variant forcing runtime evaluation -->
+    
+    <xsl:param name="p" select="1"/>
+
+<xsl:template match="doc">
+<out>;
+<a b="{round-half-to-even($p*xs:float(120.0e0))}" 
+    c="{round-half-to-even($p*xs:float(0.0e0))}" 
+    d="{round-half-to-even($p*xs:float(-3.0e0))}"/>;
+<a b="{round-half-to-even($p*xs:float(120.0e0), 2)}" 
+    c="{round-half-to-even($p*xs:float(0.0e0), 2)}" 
+    d="{round-half-to-even($p*xs:float(-3.0e0), 2)}"/>;
+<a b="{round-half-to-even($p*xs:float(120.0e0), -2)}" 
+    c="{round-half-to-even($p*xs:float(0.0e0), -2)}" 
+    d="{round-half-to-even($p*xs:float(-3.0e0), -2)}"/>;
+<a b="{round-half-to-even($p*xs:float(180.0e0), -2)}" 
+    c="{round-half-to-even($p*xs:float(150.0e0), -2)}" 
+    d="{round-half-to-even($p*xs:float(250.0e0), -2)}"/>;
+<a b="{round-half-to-even($p*xs:float(-120.0e0), -2)}" 
+    c="{round-half-to-even($p*xs:float(-150.0e0), -2)}" 
+    d="{round-half-to-even($p*xs:float(-250.0e0), -2)}"/>;
+<a b="{round-half-to-even($p*xs:float(180.0180e0), 2)}" 
+    c="{round-half-to-even($p*xs:float(150.0150e0), 2)}" 
+    d="{round-half-to-even($p*xs:float(250.0250e0), 2)}"/>;
+<a b="{round-half-to-even($p*xs:float(-120.0120e0), 2)}" 
+    c="{round-half-to-even($p*xs:float(-150.0150e0), 2)}" 
+    d="{round-half-to-even($p*xs:float(-250.0250e0), 2)}"/>;
+</out>
+</xsl:template>
+</xsl:stylesheet>
\ No newline at end of file