1*1212f9a0SAndroid Build Coastguard Worker<?xml version="1.0"?> 2*1212f9a0SAndroid Build Coastguard Worker<xsl:stylesheet version="1.0" 3*1212f9a0SAndroid Build Coastguard Worker xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4*1212f9a0SAndroid Build Coastguard Worker xmlns:math="http://exslt.org/math" 5*1212f9a0SAndroid Build Coastguard Worker extension-element-prefixes="math"> 6*1212f9a0SAndroid Build Coastguard Worker 7*1212f9a0SAndroid Build Coastguard Worker<!-- Test math:constant() --> 8*1212f9a0SAndroid Build Coastguard Worker 9*1212f9a0SAndroid Build Coastguard Worker<xsl:variable name="cstant1" select='"PI"'/> 10*1212f9a0SAndroid Build Coastguard Worker<xsl:variable name="cstant2" select='"E"'/> 11*1212f9a0SAndroid Build Coastguard Worker<xsl:variable name="cstant3" select='"SQRRT2"'/> 12*1212f9a0SAndroid Build Coastguard Worker<xsl:variable name="cstant4" select='"LN2"'/> 13*1212f9a0SAndroid Build Coastguard Worker<xsl:variable name="cstant5" select='"LN10"'/> 14*1212f9a0SAndroid Build Coastguard Worker<xsl:variable name="cstant6" select='"LOG2E"'/> 15*1212f9a0SAndroid Build Coastguard Worker<xsl:variable name="cstant7" select='"SQRT1_2"'/> 16*1212f9a0SAndroid Build Coastguard Worker 17*1212f9a0SAndroid Build Coastguard Worker<xsl:variable name="precision1" select="0"/> 18*1212f9a0SAndroid Build Coastguard Worker<xsl:variable name="precision2" select="1"/> 19*1212f9a0SAndroid Build Coastguard Worker<xsl:variable name="precision3" select="2"/> 20*1212f9a0SAndroid Build Coastguard Worker<xsl:variable name="precision4" select="3"/> 21*1212f9a0SAndroid Build Coastguard Worker<xsl:variable name="precision5" select="10"/> 22*1212f9a0SAndroid Build Coastguard Worker<xsl:variable name="precision6" select="25"/> 23*1212f9a0SAndroid Build Coastguard Worker<xsl:variable name="precision7" select="50"/> 24*1212f9a0SAndroid Build Coastguard Worker 25*1212f9a0SAndroid Build Coastguard Worker<xsl:variable name="precision8" select="number(//number[1])"/> 26*1212f9a0SAndroid Build Coastguard Worker<xsl:variable name="precision9" select="number(//number[2])"/> 27*1212f9a0SAndroid Build Coastguard Worker<xsl:variable name="precision10" select="$precision8 div $precision1"/> 28*1212f9a0SAndroid Build Coastguard Worker 29*1212f9a0SAndroid Build Coastguard Worker<xsl:template match="/"> 30*1212f9a0SAndroid Build Coastguard Worker <group1> 31*1212f9a0SAndroid Build Coastguard Worker These are for PI: 32*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant1,$precision1)"/>, 33*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant1,$precision2)"/>, 34*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant1,$precision3)"/>, 35*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant1,$precision4)"/>, 36*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant1,$precision5)"/>, 37*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant1,$precision6)"/>, 38*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant1,$precision7)"/>, 39*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant1,$precision8)"/>, 40*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant1,$precision9)"/>, 41*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant1,$precision10)"/> 42*1212f9a0SAndroid Build Coastguard Worker 43*1212f9a0SAndroid Build Coastguard Worker </group1> 44*1212f9a0SAndroid Build Coastguard Worker <group2> 45*1212f9a0SAndroid Build Coastguard Worker These are for E: 46*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant2,$precision1)"/>, 47*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant2,$precision2)"/>, 48*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant2,$precision3)"/>, 49*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant2,$precision4)"/>, 50*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant2,$precision5)"/>, 51*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant2,$precision6)"/>, 52*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant2,$precision7)"/>, 53*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant2,$precision8)"/>, 54*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant2,$precision9)"/>, 55*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant2,$precision10)"/>, 56*1212f9a0SAndroid Build Coastguard Worker 57*1212f9a0SAndroid Build Coastguard Worker </group2> 58*1212f9a0SAndroid Build Coastguard Worker <group3> 59*1212f9a0SAndroid Build Coastguard Worker These are for SQRRT2 60*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant3,$precision1)"/>, 61*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant3,$precision2)"/>, 62*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant3,$precision3)"/>, 63*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant3,$precision4)"/>, 64*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant3,$precision5)"/>, 65*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant3,$precision6)"/>, 66*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant3,$precision7)"/>, 67*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant3,$precision8)"/>, 68*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant3,$precision9)"/>, 69*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant3,$precision10)"/>, 70*1212f9a0SAndroid Build Coastguard Worker 71*1212f9a0SAndroid Build Coastguard Worker </group3> 72*1212f9a0SAndroid Build Coastguard Worker <group4> 73*1212f9a0SAndroid Build Coastguard Worker These are for LN2 74*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant4,$precision1)"/>, 75*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant4,$precision2)"/>, 76*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant4,$precision3)"/>, 77*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant4,$precision4)"/>, 78*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant4,$precision5)"/>, 79*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant4,$precision6)"/>, 80*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant4,$precision7)"/>, 81*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant4,$precision8)"/>, 82*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant4,$precision9)"/>, 83*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant4,$precision10)"/>, 84*1212f9a0SAndroid Build Coastguard Worker 85*1212f9a0SAndroid Build Coastguard Worker </group4> 86*1212f9a0SAndroid Build Coastguard Worker <group5> 87*1212f9a0SAndroid Build Coastguard Worker These are for LN10 88*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant5,$precision1)"/>, 89*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant5,$precision2)"/>, 90*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant5,$precision3)"/>, 91*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant5,$precision4)"/>, 92*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant5,$precision5)"/>, 93*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant5,$precision6)"/>, 94*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant5,$precision7)"/>, 95*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant5,$precision8)"/>, 96*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant5,$precision9)"/>, 97*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant5,$precision10)"/>, 98*1212f9a0SAndroid Build Coastguard Worker 99*1212f9a0SAndroid Build Coastguard Worker </group5> 100*1212f9a0SAndroid Build Coastguard Worker <group6> 101*1212f9a0SAndroid Build Coastguard Worker These are for LOG2E 102*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant6,$precision1)"/>, 103*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant6,$precision2)"/>, 104*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant6,$precision3)"/>, 105*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant6,$precision4)"/>, 106*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant6,$precision5)"/>, 107*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant6,$precision6)"/>, 108*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant6,$precision7)"/>, 109*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant6,$precision8)"/>, 110*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant6,$precision9)"/>, 111*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant6,$precision10)"/>, 112*1212f9a0SAndroid Build Coastguard Worker 113*1212f9a0SAndroid Build Coastguard Worker </group6> 114*1212f9a0SAndroid Build Coastguard Worker 115*1212f9a0SAndroid Build Coastguard Worker <group7> 116*1212f9a0SAndroid Build Coastguard Worker These are for SQRT1_2 117*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant7,$precision1)"/>, 118*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant7,$precision2)"/>, 119*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant7,$precision3)"/>, 120*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant7,$precision4)"/>, 121*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant7,$precision5)"/>, 122*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant7,$precision6)"/>, 123*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant7,$precision7)"/>, 124*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant7,$precision8)"/>, 125*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant7,$precision9)"/>, 126*1212f9a0SAndroid Build Coastguard Worker <xsl:value-of select="math:constant($cstant7,$precision10)"/>, 127*1212f9a0SAndroid Build Coastguard Worker 128*1212f9a0SAndroid Build Coastguard Worker </group7> 129*1212f9a0SAndroid Build Coastguard Worker 130*1212f9a0SAndroid Build Coastguard Worker</xsl:template> 131*1212f9a0SAndroid Build Coastguard Worker 132*1212f9a0SAndroid Build Coastguard Worker 133*1212f9a0SAndroid Build Coastguard Worker <!-- 134*1212f9a0SAndroid Build Coastguard Worker * Licensed to the Apache Software Foundation (ASF) under one 135*1212f9a0SAndroid Build Coastguard Worker * or more contributor license agreements. See the NOTICE file 136*1212f9a0SAndroid Build Coastguard Worker * distributed with this work for additional information 137*1212f9a0SAndroid Build Coastguard Worker * regarding copyright ownership. The ASF licenses this file 138*1212f9a0SAndroid Build Coastguard Worker * to you under the Apache License, Version 2.0 (the "License"); 139*1212f9a0SAndroid Build Coastguard Worker * you may not use this file except in compliance with the License. 140*1212f9a0SAndroid Build Coastguard Worker * You may obtain a copy of the License at 141*1212f9a0SAndroid Build Coastguard Worker * 142*1212f9a0SAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0 143*1212f9a0SAndroid Build Coastguard Worker * 144*1212f9a0SAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software 145*1212f9a0SAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS, 146*1212f9a0SAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 147*1212f9a0SAndroid Build Coastguard Worker * See the License for the specific language governing permissions and 148*1212f9a0SAndroid Build Coastguard Worker * limitations under the License. 149*1212f9a0SAndroid Build Coastguard Worker --> 150*1212f9a0SAndroid Build Coastguard Worker 151*1212f9a0SAndroid Build Coastguard Worker</xsl:stylesheet> 152