Skip to content

Commit

Permalink
[qty.expr.temp.algo] Detail first step example
Browse files Browse the repository at this point in the history
  • Loading branch information
JohelEGP committed Nov 5, 2024
1 parent 096c699 commit 20a6081
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions docs/api_reference/src/quantities.tex
Original file line number Diff line number Diff line change
Expand Up @@ -916,8 +916,19 @@
Otherwise, a type $x$ is an input symbolic constant.
\end{itemize}
\begin{example}
The input of \tcode{derived_unit<si::kilo_<si::metre>, per<power<non_si::hour, 2>>>}
is $\tcode{km}/\tcode{h}^2$.
Item by item, this algorithm step goes from the \Cpp{} parameter type
\tcode{derived_unit<si::kilo_<si::metre>, per<power<non_si::hour, 2>>}
\begin{itemize}
\item
to $\tcode{si::kilo_<si::metre>} \times \tcode{per<power<non_si::hour, 2>}$ (product of \tcode{To}'s arguments),
\item
to $\tcode{si::kilo_<si::metre>} \times 1/\tcode{power<non_si::hour, 2>}$ (product of \tcode{per}'s arguments as denominator),
\item
to $\tcode{si::kilo_<si::metre>} \times 1/\tcode{non_si::hour}^2$ (\tcode{power}s as powers),
\item
to $x \times 1/y^2$ where $x = \tcode{si::kilo_<si::metre>}$ and $y = \tcode{non_si::hour}$ (symbolic substitution)
in the mathematical domain.
\end{itemize}
\end{example}

\pnum
Expand Down

0 comments on commit 20a6081

Please sign in to comment.