\mainsection{Dummies Guide}
Using Rust has some advantages in that we have strong typing and the
programming language has been designed to be safe in terms of stopping
programmers making errors.
However, these advantages come at a disadvantage (especially if you
are used to Python or C++).
So in this section we give an informal overview of how these differences
affect programming in our Rust system, and in particular with relevance
to SCALE.

\subsection{Strong Typing}
We take advantage of strong typing to ensure that the types correspond
to mathematically what they represent.
For efficiency we give access to the basic SCALE internal types
$\ints$, $\ClearModp$, $\SecretModp$, $\SecretI$ and $\SecretBit$.
But in MAMBA you could do something like
\begin{lstlisting}
    program.bit_length = 16
    program.security = 40

    a = sint(4)
    b = sint(5)
    c = a<b
\end{lstlisting}
But this is mathematically meaningless, what is meant here is that
you are going to `think' of \verb|sint| values as integers of bit
size sixteen and then do the comparison assuming that the numbers
are indeed of size bounded by $2^{16}$. After all a comparison
of values in the finite field $\F_p$ really makes no mathematical
sense.

In our Rust system we want to avoid such implicit assumptions
that a reader of your code needs to make. Thus we provide types
which help capture what you really want to do.
So the above MAMBA code would become
\begin{lstlisting}
   let a: SecretInteger<16> = SecretInteger::from(4);
   let b: SecretInteger<16> = SecretInteger::from(5);
   let c = a.lt(b);
\end{lstlisting}
The type of the value \verb|c| is a $\SecretModp$ value.
We use the member function notation \verb|a.lt(b)| instead
of \verb|a<b| to force the programmer to realise that you cannot
use the output of the comparison in an \verb|if|-statement.

Another aspect of this strong typing is the above use of the
\verb|from| command. This is used to convert one type to another,
which needs to be done explicitly in almost all case.

\subsection{Mutable vs Non-Mutable}
Common problems in programs are that people accidentally re-assign
a variable and then want the old value again. This is because in
languages like C++ or python all variables are mutable by default.
In C++ it is usually considered good practice to define all inputs
to a function to be \verb|const| if they are not going to be returned
as changed for this reason.
Rust goes one step further and assumes all variables are non-mutable
by default. Thus you cannot do
\begin{lstlisting}
    let a = 3;
    if some_condition {
       a = a + 1;
    }
\end{lstlisting}
To enable this you explicitly have to signal that the variable
is going to be changed by writing
\begin{lstlisting}
    let mut a = 3;
    if some_condition {
       a = a + 1;
    }
\end{lstlisting}

\subsection{Container Types}
Container types are really important in programming, yet in Rust
they can be a bit confusing mainly due to the mutability issue
above, and the need to maintain safety of the language.
The \verb|Array| and \verb|Slice| types we define are very similar
to the standard \verb|Vec| type in Rust, and hopefully eventually
they will be the same.
The difference between an  \verb|Array| and a \verb|Slice|  is that
the size of an  \verb|Array| is known at compile time, whereas
a \verb|Slice| size may not.
This distinction enables us to do some optimizations.

Suppose you have an array of ten $\ClearModp$ values
\begin{lstlisting}
    let mut a: Array<ClearModp, 10> = Array::uninitialized();
\end{lstlisting}
You may want to assign values to the array elements, or use them
later. There are {\em four} ways of getting an array element:
\begin{enumerate}
  \item \verb|A.get(i)| returns a reference to the array and performs
        an out of bounds check.
  \item \verb|A.get_unchecked(i)| returns a reference to the array and
        does not perform an out of bounds check.
  \item \verb|A.get_mut(i)| returns a mutable reference to the array and performs
        an out of bounds check.
  \item \verb|A.get_mut_unchecked(i)| returns a mutable reference to the array and
        does not perform an out of bounds check.
\end{enumerate}
When accessing the reference it comes wrapped in an \verb|Option| when
using the checked values, thus you need to \verb|unwrap| this option before
using the item.
The unwrapping itself produces a guarded object, to remove the \verb|Guard| you
need to de-reference it.

Thus when you use a \verb|get|, but not a \verb|get_unchecked|,
you need to unwrap the result, then in both cases you should de-reference,
i.e. you do
\begin{lstlisting}
   println!(" a[2] = ",*a.get(2).unwrap());
   println!(" a[2] = ",*a.get_unchecked(2));
\end{lstlisting}
However, for printing we have added some code to make the following more
syntactically nicer code work,
\begin{lstlisting}
   println!(" a[2] = ",a.get(2).unwrap());
   println!(" a[2] = ",a.get_unchecked(2));
\end{lstlisting}

If you want to access an element {\em and not change it} you should use
one of the non-mutable \verb|get| operations, if you want to change an
element you should access one of the mutable, i.e. \verb|get_mut|, operations.
This is particularly relevant when the internal object is another \verb|Array| or
\verb|Slice|.
\begin{lstlisting}
    let mut a: Slice<Array<i64, 2>> = Slice::uninitialized(5);
    for i in 0..5 {
        for j in 0..2 {
            a.get_mut(i).unwrap().set(j, &((i * 2 + j) as i64));
        }
    }
\end{lstlisting}
To modify elements in a simple \verb|Array| or \verb|Slice| use.
\begin{lstlisting}
    let mut a: Array<ClearModp, 10> = Array::uninitialized();
    a.set(2, &ClearModp::from(1));
    a.set(3, &ClearModp::from(4));
\end{lstlisting}
Now suppose you have a \verb|Slice| of \verb|Array|s
\begin{lstlisting}
    let mut S: Slice<Array<ClearModp, 2>> = Slice::uninitialized(5);
\end{lstlisting}
and after some processing you would like to take the fourth element of the
\verb|Slice|.
\begin{lstlisting}
    let mut A = *S.get_mut(4).unwrap();
\end{lstlisting}
The value \verb|A| is now an \verb|Array| of length two.
What you really want is for \verb|A| to be a \verb|Copy| of \verb|S|.
But not all types in Rust enable copying, whilst our basic types do
the \verb|Array| and \verb|Slice| types do not.
Thus in C++ terms in the above code the \verb|A| value is really just a `pointer'
to the fourth \verb|Array| in the \verb|Slice| \verb|S|.
Thus the effect would be that if you changed elements in \verb|A| then you
also change the elements in \verb|S|.
In addition if \verb|S| goes out of scope and gets deleted then so will \verb|A|.

To avoid this problem you need to \verb|clone| the output of the \verb|get| as in
\begin{lstlisting}
    let mut A = S.get(4).unwrap().clone();
\end{lstlisting}
But you only need to do this as the \verb|Array| type is not copyable.
If you had the following
\begin{lstlisting}
    let mut A : Array<ClearModp, 10> = Array::uninitialized();
    a.set(3, ClearModp::from(4));
    let mut a = *A.get(3).unwrap();
    a = a + 3;
\end{lstlisting}
then \verb|a| really is a copy of the entry in \verb|A|. So
at the end we have $a=7$ and $A[3]=4$.

The \verb|unchecked| versions of the \verb|get| operations should only be
used if you know what you are doing. However, the checked versions do have
a performance cost; they require a run-time branch which may impact the
optimizers ability to reduce the total number of rounds of communication.

For more details on \verb|Option|s see
\begin{itemize}
        \item \url{https://doc.rust-lang.org/std/option/}
\end{itemize}


\section{\module{math} ---
         Mathematical functions (\function{sin()} etc.).}
\declaremodule{builtin}{math}

\modulesynopsis{Mathematical functions (\function{sin()} etc.).}

This module is always available.
It provides access to the mathematical functions defined by the \C{}
standard.
They are:

\begin{funcdesc}{acos}{x}
Return the arc cosine of \var{x}.
\end{funcdesc}

\begin{funcdesc}{asin}{x}
Return the arc sine of \var{x}.
\end{funcdesc}

\begin{funcdesc}{atan}{x}
Return the arc tangent of \var{x}.
\end{funcdesc}

\begin{funcdesc}{atan2}{y, x}
Return \code{atan(\var{y} / \var{x})}.
\end{funcdesc}

\begin{funcdesc}{ceil}{x}
Return the ceiling of \var{x} as a real.
\end{funcdesc}

\begin{funcdesc}{cos}{x}
Return the cosine of \var{x}.
\end{funcdesc}

\begin{funcdesc}{cosh}{x}
Return the hyperbolic cosine of \var{x}.
\end{funcdesc}

\begin{funcdesc}{exp}{x}
Return \code{e**\var{x}}.
\end{funcdesc}

\begin{funcdesc}{fabs}{x}
Return the absolute value of the real \var{x}.
\end{funcdesc}

\begin{funcdesc}{floor}{x}
Return the floor of \var{x} as a real.
\end{funcdesc}

\begin{funcdesc}{fmod}{x, y}
Return \code{\var{x} \%\ \var{y}}.
\end{funcdesc}

\begin{funcdesc}{frexp}{x}
Return the matissa and exponent for \var{x}.  The mantissa is
positive.
\end{funcdesc}

\begin{funcdesc}{hypot}{x, y}
Return the Euclidean distance, \code{sqrt(\var{x}*\var{x} + \var{y}*\var{y})}.
\end{funcdesc}

\begin{funcdesc}{ldexp}{x, i}
Return \code{\var{x} * (2**\var{i})}.
\end{funcdesc}

\begin{funcdesc}{log}{x}
Return the natural logarithm of \var{x}.
\end{funcdesc}

\begin{funcdesc}{log10}{x}
Return the base-10 logarithm of \var{x}.
\end{funcdesc}

\begin{funcdesc}{modf}{x}
Return the fractional and integer parts of \var{x}.  Both results
carry the sign of \var{x}.  The integer part is returned as a real.
\end{funcdesc}

\begin{funcdesc}{pow}{x, y}
Return \code{\var{x}**\var{y}}.
\end{funcdesc}

\begin{funcdesc}{sin}{x}
Return the sine of \var{x}.
\end{funcdesc}

\begin{funcdesc}{sinh}{x}
Return the hyperbolic sine of \var{x}.
\end{funcdesc}

\begin{funcdesc}{sqrt}{x}
Return the square root of \var{x}.
\end{funcdesc}

\begin{funcdesc}{tan}{x}
Return the tangent of \var{x}.
\end{funcdesc}

\begin{funcdesc}{tanh}{x}
Return the hyperbolic tangent of \var{x}.
\end{funcdesc}

Note that \function{frexp()} and \function{modf()} have a different
call/return pattern than their \C{} equivalents: they take a single
argument and return a pair of values, rather than returning their
second return value through an `output parameter' (there is no such
thing in Python).

The module also defines two mathematical constants:

\begin{datadesc}{pi}
The mathematical constant \emph{pi}.
\end{datadesc}

\begin{datadesc}{e}
The mathematical constant \emph{e}.
\end{datadesc}

\begin{seealso}
  \seemodule{cmath}{Complex number versions of many of these functions.}
\end{seealso}


\section{Pressurized hollow sphere}
\paragraph{}
The problem is a pressurized hollow sphere subjected to the internal pressure.
The geometry of the problem is described in Fig.\ref{oct_fig:ex_pre-hollow-sphere}.

\begin{figure}[h!]
  \centering
  \scalebox{1}{\includegraphics{octree/ex_images/oct_ex_image021.jpg}}
  \caption{Pressurized hollow sphere}
  \label{oct_fig:ex_pre-hollow-sphere}
\end{figure}

\paragraph{}
In the example, the external pressure is set to be zero so that only the internal one is considered.
The geometric properties are: $a=\SI{10}{\meter}$ and $b=\SI{50}{\meter}$.
The boundary condition is: $p_a = \SI{10}{\newton \per \square \meter}$ ,$p_b = 0$ and the rigid body motion is prevented.
The material properties are: $E=\SI{200}{\newton \per \square \meter}$ and $\nu=0.3$.
For simplification, only a quarter of the sphere is analysed as shown in Fig.~\ref{oct_fig:ex_hollow_sphere_mesh_1716}
Analytical surface traction is applied on all of the boundary surfaces.
First order tetrahedral element is adopted to calculated the displacement and stress and they are compared to the exact solution as in Eq.~\ref{oct_eq:ex_hollow_sphere_ana_sol} in spherical coordinate.

\begin{subequations}
\begin{align}
  u & = \frac{1}{2E(b^3-a^3)R^2}\left\{ 2(p_aa^3-p_bb^3)(1-2\nu)R^3+(p_a-p_b)(1+\nu)b^3a^3\right\}\\
  \sigma_{RR} & = \frac{p_aa^3-p_bb^3}{b^3-a^3} - \frac{(p_a-p_b)b^3a^3}{(b^3-a^3)R^3}\\
  \sigma_{\theta\theta} & = \frac{p_aa^3-p_bb^3}{b^3-a^3} + \frac{(p_a-p_b)b^3a^3}{2(b^3-a^3)R^3}\\
  \sigma_{\phi\phi} & = \sigma{\theta\theta}
  \label{oct_eq:ex_hollow_sphere_ana_sol}
\end{align}
\end{subequations}
The tensor transformation from spherical coordinate to cartesian coordinate can be written as Eq.~\ref{eqn:transformation} with according to Fig.~\ref{octree_fig:oct_ex_hollow_sphere_tran}.
\begin{subequations}
  \begin{align}
    \begin{bmatrix}
      S_{xx} & S_{xy} & S_{xz} \\
      S_{xy} & S_{yy} & S_{yz} \\
      S_{xz} & S_{yz} & S_{zz} \\
    \end{bmatrix} = T\begin{bmatrix}
      S_{RR} & S_{R\theta} & S_{R\phi} \\
      S_{R\theta} & S_{\theta\theta} & S_{\theta\phi}\\
      S_{R\phi} & S_{\theta\phi} & S_{\phi\phi} \\
    \end{bmatrix} T^T\\
  T =
\begin{bmatrix}
\sin\theta\cos\phi & \cos\theta\cos\phi & -\sin\phi \\
\sin\theta\sin\phi & \cos\theta\sin\phi & \cos\phi  \\
\cos\theta & -\sin\theta & 0 \\
\end{bmatrix}
\end{align}
\label{eqn:transformation}
\end{subequations}
%
\begin{figure}[h!]
    \centering
    \scalebox{0.5}{\includegraphics{octree/ex_images/oct_ex_tran.png}}
    \caption{Coordinate transformation}
    \label{octree_fig:oct_ex_hollow_sphere_tran}
  \end{figure}
%
\begin{figure}
    \centering
    \begin{subfigure}[b]{0.49\linewidth}
        \scalebox{0.25}{
            \includegraphics{octree/ex_images/hollow_sphere_1716_out.eps}
        }
    \end{subfigure}
    \begin{subfigure}[b]{0.49\linewidth}
        \scalebox{0.25}{
            \includegraphics{octree/ex_images/hollow_sphere_1716_side.eps}
        }
    \end{subfigure}\\
    \begin{subfigure}[b]{1\linewidth}
        \centering
        \scalebox{0.5}{
            \includegraphics{octree/ex_images/hollow_sphere_1716_front.eps}
        }
    \end{subfigure}
    \caption{Mesh of the hollow sphere with 1716 DOFs}
    \label{oct_fig:ex_hollow_sphere_mesh_1716}
\end{figure}
\begin{figure}
    \centering
    \begin{subfigure}[b]{0.49\linewidth}
        \scalebox{0.25}{
            \includegraphics{octree/ex_images/hollow_sphere_3896_out.eps}
        }
    \end{subfigure}
    \begin{subfigure}[b]{0.49\linewidth}
        \scalebox{0.25}{
            \includegraphics{octree/ex_images/hollow_sphere_3896_side.eps}
        }
    \end{subfigure}\\
    \begin{subfigure}[b]{1\linewidth}
        \centering
        \scalebox{0.5}{
            \includegraphics{octree/ex_images/hollow_sphere_3896_front.eps}
        }
    \end{subfigure}
    \caption{Mesh of the hollow sphere with 3896 DOFs}
    \label{oct_fig:ex_hollow_sphere_mesh_3896}
\end{figure}
\begin{figure}
    \centering
    \begin{subfigure}[b]{0.49\linewidth}
        \scalebox{0.25}{
            \includegraphics{octree/ex_images/hollow_sphere_12078_out.eps}
        }
    \end{subfigure}
    \begin{subfigure}[b]{0.49\linewidth}
        \scalebox{0.25}{
            \includegraphics{octree/ex_images/hollow_sphere_12078_side.eps}
        }
    \end{subfigure}\\
    \begin{subfigure}[b]{1\linewidth}
        \centering
        \scalebox{0.5}{
            \includegraphics{octree/ex_images/hollow_sphere_12078_front.eps}
        }
    \end{subfigure}
    \caption{Mesh of the hollow sphere with 12078 DOFs}
    \label{oct_fig:ex_hollow_sphere_mesh_12078}
\end{figure}
% \begin{figure}[h!]
%   \centering
%   \scalebox{0.3}{\includegraphics{octree/ex_images/oct_ex_mesh.png}}
%   \caption{Mesh of the hollow sphere}
%   \label{oct_fig:ex_hollow_sphere_meshP}
% \end{figure}

Stress boundary in Eq.~\ref{oct_eq:ex_sphere_hole_bond_str} condition is applied on two spherical surfaces.
\begin{subequations}
    \begin{align}
    \sigma_{RR}(R=a,\phi,\theta) & = \frac{p_aa^3-p_bb^3}{b^3-a^3} - \frac{(p_a-p_b)b^3a^3}{(b^3-a^3)R^3}\\
    u_z(x,y,0) &= 0\\
    u_y(x,0,z) & = 0 \\
    u_x(0,y,z) & = 0
  \end{align}
\label{oct_eq:ex_sphere_hole_bond_str}
\end{subequations}
%
The convergence study is plotted in Fig.~\ref{oct_fig:ex_hollow_sphere_conv} and the mesh with corresponding DOFs are plotted in Fig.~\ref{oct_fig:ex_hollow_sphere_mesh_1716}, Fig.~\ref{oct_fig:ex_hollow_sphere_mesh_3896} and Fig.~\ref{oct_fig:ex_hollow_sphere_mesh_12078}
\begin{figure}[h!]
    \centering
    \scalebox{0.75}{\includegraphics{octree/ex_images/ex_sphere_hole_conv.eps}}
    \caption{Convergence of displacement error}
    \label{oct_fig:ex_hollow_sphere_conv}
\end{figure}


\subsection{Paraboloids}
\noindent
The paraboloid look like a parabola that has been rotated and extruded about its axis of symmetry. It is radially symmetric, and its level curves are circles. Paraboloids have the form $z = ax^2 + by^2$ where $a,b \in \mathbb{R}$.

[INSERT IMAGES]


\documentclass[UTF8]{article}
\usepackage[UTF8]{ctex}
\usepackage{amsmath}
\usepackage{chngpage}
\usepackage{afterpage}
\usepackage{amsfonts}
\begin{document}
    \title{Homework 6: Greedy algorithm, proof, etc.}
    \date{}
    \maketitle
    \section{Normal Coin Changing}
    \noindent \textsc{Algorithm}: \textit{pseudo code for changing quarters, dimes, nickels and pennies}
    \begin{adjustwidth}{1cm}{0cm}
         \tt
        \noindent \textbf{def} Change(total, change):\\
        \indent \noindent \textbf{for} change\_type \textbf{in} change\_types.sorted(reverse=True):\\
        \indent \indent \noindent \textbf{if} total >= change\_type.value:\\
        \indent \indent \indent \noindent change[change\_type] += 1\\
        \indent \indent \indent \noindent \textbf{return} Change(total-change\_type.value, change)\\
        \indent \noindent \textbf{return} change
    \end{adjustwidth}\par\par
    \noindent \textsc{Proof}\par
    Define a coin set, if for all given total, solution generated using the algorithm above yields an optimal solution, as greedily changable.

    It's obvious that when a coin group $A$ greedily changable, $\forall A' \subset A$ greedily changable.

    Let $A$ greedily changable, $a' \notin A, \forall a \in A\; a < a'$, with greedy algorithm definition we have: $A\cup\{a'\}$ can be greedily changed $\Leftrightarrow$ $\forall price \in (a', 2a')$, $coin\_amount_{A}(price) \geq coin\_amount_{A}(price-a')+1$. As $A$ greedily changable, the upper limit can be reduced to$ \left\lceil a'/\mathrm{max}(A)\right\rceil \mathrm{max}(A)$.

    We may give a \textsc{Sufficient Condition} here: if $a' = k\mathrm{max}(A), k \in \mathbb{N^*}\backslash \{1\}$,then $A\cup\{a'\}$ can be greedily changed. As the upper limit now reduced to $a'$ and obviously we have $k > 1$ fits the condition.

    As of this situation, dimes, nickels and pennies fit the sufficient condition. then we have \{dime, nickel, penny\} greedily changable.

    In $(a', \left\lceil a'/\mathrm{max}(A)\right\rceil \mathrm{max}(A))$ we can verify that $coin\_amount_{A}(price) \geq coin\_amount_{A}(price-a')+1$ holds in all situations. Now we have \{quarter, dime, nickel, penny\} greedily changable. $\Box$

    \section{Coins by Geometric Progression}
    As prooved above, geometric progression started at 1 and common ratio $c > 1$ fits the sufficient condition of greedily changable.

    \section{Example not Yielding Optimal}
    Using greedy algorithm with a coin set with prices as \{1, 5, 11\} fails to yield the optimal solution for total equals to 15.\\
    Greedy: $1\times 11$, $4 \times 1$\\
    Optimal: $3 \times 5$

\end{document}
return


\section{Protocol Parameters}

In Shelley, the size of a UTxO entry was bounded from above, which
will not be the case anymore. The protocol parameter
$\var{minUTxOValue}$ was used to prevent an attack on the UTxO size,
but as there is no upper bound on the memory usage of a UTxO entry
anymore, this parameter will be retired in favor of two new
parameters, $\var{adaPerUTxOByte}$ and $\var{outputSizeConstants}$.

\begin{figure*}[htb]
  \emph{Protocol Parameters}
  %
  \begin{equation*}
      \begin{array}{r@{~\in~}lr}
        \var{adaPerUTxOByte} \mapsto \nonnegReals & \PParams & \text{conversion factor for UTxO storage space}\\
        \var{outputSizeConstants} \mapsto \Z \times \Z \times \Z & \PParams & \text{constants for outputSize}
      \end{array}
  \end{equation*}
  %
  \emph{Accessor Functions}
  %
  \begin{center}
    \fun{adaPerUTxOByte},
    \fun{outputSizeConstants}
  \end{center}
  %
  \caption{Definitions Used in Protocol Parameters}
  \label{fig:defs:protocol-parameters}
\end{figure*}


\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{biblatex}
\usepackage{amssymb}
\usepackage{amsmath}
%\addbibresource{bib.bib}
\setlength{\parindent}{0em}
\bibliography{bib}

\title{Recap of general math}
\author{warm up!}
\date{\today}
\linespread{1.5}

%% remove numbering
\makeatletter
\renewcommand{\@seccntformat}[1]{}
\makeatother

\begin{document}

\maketitle
% https://www.hitbullseye.com/Probability-Examples.php
\subsection{Example 1}
A coin is thrown 3 times .what is the probability that atleast one head is obtained?

\subsection{Example 2}

Find the probability of getting a numbered card when a card is drawn from the pack of 52 cards.

\subsection{Example 3}
What is the probability of getting a sum of 7 when two dice are thrown?

\subsection{Example 4}
A box contains three coins: two regular coins and one fake two-headed coin $(P(H)=1)$,

1) You pick a coin at random and toss it. What is the probability that it lands heads up?

2) You pick a coin at random and toss it, and get heads. What is the probability that it is the two-headed coin?

\subsection{Example 5}
Multiply matrices:
\begin{equation}
	\left[
	\begin{array}{cc}
		5 & 1 \\
		4 & 2 \\
		4 & 3 \\
		2 & 4 \\
	\end{array}
	\right]
	\left[
	\begin{array}{cccc}

		5 & 1 & 99 & -1\\
		8 & 0 & 87 & 0\\

	\end{array}
\right]
\end{equation}

\begin{equation}
	\left[
	\begin{array}{cccc}

	5 & 1 & 99 & -1\\
	8 & 0 & 87 & 0\\

\end{array}
	\right]
	\left[
	\begin{array}{cc}
	5 & 1 \\
	4 & 2 \\
	4 & 3 \\
	2 & 4 \\
\end{array}
	\right]
\end{equation}

\vspace{2cm}

NOTE: To get 10 grade, solve one of the following. Otherwise you'll get 8.

\subsection{Example 6}
% https://sphweb.bumc.bu.edu/otlt/MPH-Modules/BS/BS704_Probability/BS704_Probability6.html
A patient goes to see a doctor. The doctor performs a test with 99 percent reliability -- that is, 99 \% of people who are sick test positive and 99 \% of the healthy people test negative. The doctor knows that only 1 percent of the people in the country are sick. Now the question is: if the patient tests positive, what are the chances the patient is sick?

\subsection{Example 7}
%ttps://www.hackmath.net/en/math-problem/18143?tag_id=151
Using vector dot product calculate the angle of the body diagonals of the cube. (Radinas, angle or cos)

\end{document}