From c2e4cfccf4748a32dcb46a50bdacb59eab46b91f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johel=20Ernesto=20Guerrero=20Pe=C3=B1a?= Date: Mon, 4 Nov 2024 19:02:51 -0400 Subject: [PATCH] [qty.expr.temp.algo] Clarify position of `per` --- docs/api_reference/src/quantities.tex | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/api_reference/src/quantities.tex b/docs/api_reference/src/quantities.tex index 92e9515dc..679aba623 100644 --- a/docs/api_reference/src/quantities.tex +++ b/docs/api_reference/src/quantities.tex @@ -889,7 +889,7 @@ \item \tcode{OneType} is the neutral element\irefiev{102-01-19} of the operation, and \item -\tcode{Pred} is a total order for the mapped types. +\tcode{Pred} is a total order for the mapped types other than a specialization of \tcode{per}. \end{itemize} \pnum @@ -970,18 +970,22 @@ \item Otherwise, if $y$ is a symbolic constant, returns $y$. \item -Otherwise, returns \tcode{To<$y$>} -after applying the following mappings and -sorting the template argument lists of \tcode{To} and \tcode{per} according to \tcode{Pred}: +Otherwise, first applies the following mappings to the terms of $y$: \begin{itemize} \item $x^{n/d}$ is mapped to \tcode{power<$x$, $n$, $d$>}, and -$x^{n}$ is mapped to \tcode{power<$x$, $n$>}, +$x^{n}$ is mapped to \tcode{power<$x$, $n$>}, and \item -$1$ is mapped to \tcode{OneType\{\}}, and -\item -a denominator $x$ is mapped to \tcode{per<$x$>}. +$1$ is mapped to \tcode{OneType\{\}}. \end{itemize} +\item +Then, a denominator $x$ of $y$ (if any) is mapped to \tcode{per<$x$>}. +\item +Then, sorts $y$ without \tcode{per} (if any) and +the template arguments of \tcode{per} (if any) +according to \tcode{Pred}. +\item +Finally, returns \tcode{To<$y$>}, where \tcode{per} (if any) is the last argument. \end{itemize} \pnum