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