tests/expr/math/math-3304a.xsl
changeset 1198 aacf3d6d8681
child 1211 226a4c4600fb
equal deleted inserted replaced
1197:d300f98a5bb8 1198:aacf3d6d8681
       
     1 <?xml version="1.0" encoding="ISO-8859-1"?>
       
     2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
       
     3 xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs">
       
     4 <?spec fo#func-round-half-to-even?>
       
     5 <!-- PURPOSE:  Test of round-half-to-even on floats. -->
       
     6     <!-- Variant forcing runtime evaluation -->
       
     7     
       
     8     <xsl:param name="p" select="1"/>
       
     9 
       
    10 <xsl:template match="doc">
       
    11 <out>;
       
    12 <a b="{round-half-to-even($p*xs:float(120.0e0))}" 
       
    13     c="{round-half-to-even($p*xs:float(0.0e0))}" 
       
    14     d="{round-half-to-even($p*xs:float(-3.0e0))}"/>;
       
    15 <a b="{round-half-to-even($p*xs:float(120.0e0), 2)}" 
       
    16     c="{round-half-to-even($p*xs:float(0.0e0), 2)}" 
       
    17     d="{round-half-to-even($p*xs:float(-3.0e0), 2)}"/>;
       
    18 <a b="{round-half-to-even($p*xs:float(120.0e0), -2)}" 
       
    19     c="{round-half-to-even($p*xs:float(0.0e0), -2)}" 
       
    20     d="{round-half-to-even($p*xs:float(-3.0e0), -2)}"/>;
       
    21 <a b="{round-half-to-even($p*xs:float(180.0e0), -2)}" 
       
    22     c="{round-half-to-even($p*xs:float(150.0e0), -2)}" 
       
    23     d="{round-half-to-even($p*xs:float(250.0e0), -2)}"/>;
       
    24 <a b="{round-half-to-even($p*xs:float(-120.0e0), -2)}" 
       
    25     c="{round-half-to-even($p*xs:float(-150.0e0), -2)}" 
       
    26     d="{round-half-to-even($p*xs:float(-250.0e0), -2)}"/>;
       
    27 <a b="{round-half-to-even($p*xs:float(180.0180e0), 2)}" 
       
    28     c="{round-half-to-even($p*xs:float(150.0150e0), 2)}" 
       
    29     d="{round-half-to-even($p*xs:float(250.0250e0), 2)}"/>;
       
    30 <a b="{round-half-to-even($p*xs:float(-120.0120e0), 2)}" 
       
    31     c="{round-half-to-even($p*xs:float(-150.0150e0), 2)}" 
       
    32     d="{round-half-to-even($p*xs:float(-250.0250e0), 2)}"/>;
       
    33 </out>
       
    34 </xsl:template>
       
    35 </xsl:stylesheet>