div function

master
Mike Gerwitz 2021-01-25 12:09:13 -05:00
parent fc96880b85
commit db88f6aba5
2 changed files with 8 additions and 1 deletions

View File

@ -817,9 +817,11 @@
-->
<template match="c:quotient" mode="compile-calc">
<!-- we only accept a numerator and a denominator -->
<text>div(</text>
<apply-templates select="./c:*[1]" mode="compile" />
<text> / </text>
<text>,</text>
<apply-templates select="./c:*[2]" mode="compile" />
<text>)</text>
</template>

View File

@ -1740,6 +1740,11 @@
return m.some(E);
}
function div(x, y)
{
return x / y;
}
// types
function Tf(x) { return 1; }