Skip to content

Commit

Permalink
[qty.expr.temp.algo] Clarify position of per
Browse files Browse the repository at this point in the history
  • Loading branch information
JohelEGP committed Nov 5, 2024
1 parent 20a6081 commit c2e4cfc
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions docs/api_reference/src/quantities.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c2e4cfc

Please sign in to comment.