mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-03-14 04:40:07 +01:00
[SPCA] Fix more typos
This commit is contained in:
@@ -83,8 +83,6 @@ in that they are passed by value and not by reference.
|
||||
You can of course pass it also by reference (like any other data type) by setting the argument to type \texttt{struct mystruct * name} and then calling the function using
|
||||
\texttt{func(\&test)} assuming \texttt{test} is the name of your struct
|
||||
|
||||
\newpage
|
||||
|
||||
\content{Typedef} To define a custom type using \texttt{typedef <type it represents> <name of the new type>}.
|
||||
|
||||
You may also use \texttt{typedef} on structs using \texttt{typedef struct <struct tag> <name of the new alias>},
|
||||
|
||||
@@ -11,7 +11,7 @@ and it can also be used to do a sort-of assertion that we have an arithmetic typ
|
||||
which will cause a compiler error if \texttt{x} is for example a pointer.
|
||||
Of course, the lower precedence \verb|+| and \verb|-| is addition and subtraction, respectively.
|
||||
|
||||
Very low precedence belongs to boolean operators \verb|&&| and \texttt{||}, as well as the ternary operator and assignment operators
|
||||
Very low precedence belongs to boolean operators \verb|&&| and \texttt{||}, as well as the ternary operator and assignment operators.
|
||||
\begin{table}[h!]
|
||||
\begin{tables}{ll}{Operator & Associativity}
|
||||
\texttt{() [] -> .} & Left-to-right \\
|
||||
@@ -33,8 +33,8 @@ Very low precedence belongs to boolean operators \verb|&&| and \texttt{||}, as w
|
||||
\caption{\lC\ operators ordered in descending order by precedence}
|
||||
\label{tab:c-operators}
|
||||
\end{table}
|
||||
In an expression like this
|
||||
\mint{c}|(expr1, expr2)|
|
||||
|
||||
In an expression like \texttt{x = (expr1, expr2)}
|
||||
the first expression is evaluated, its result is discarded, the second expression is executed and its result is returned.
|
||||
It is also possible to chain them, i.e. to use multiple without parenthesis, the last expression's value is ultimately returned.
|
||||
Of note is that the expressions have to be encased in parenthesis.
|
||||
|
||||
@@ -25,7 +25,8 @@ Single precision and Double precision floating point numbers store the $3$ param
|
||||
Bias: $1023$, Exponent range: $[-1022, 1023]$
|
||||
\end{center}
|
||||
|
||||
Most of the extra precision in $64$b floating point numbers is associated to the mantissa. Note how double precision is necessary to represent all $32$b signed Integers, and not all $64$b signed Integers can be represented in either format.
|
||||
Most of the extra precision in $64$b floating point numbers is associated to the mantissa. Note how double precision is necessary to represent all $32$b signed Integers,
|
||||
and not all $64$b signed Integers can be represented in either format.
|
||||
|
||||
\newpage
|
||||
|
||||
@@ -33,7 +34,8 @@ The way these bitfields are interpretd \textit{differs} based on the exponent fi
|
||||
|
||||
\begin{enumerate}
|
||||
\item \textbf{Normalized Values}: Exponent bit field $e$ is neither all $1$s nor all $0$s.\\
|
||||
In this case, $E$ is read in \textit{biased} form: $E = e - b$. The bias is $b=2^{k-1}-1$, where $k$ is the amount of bits reserved for $e$. This produces the exponent ranges $E \in [-(b-1), b]$.\\
|
||||
In this case, $E$ is read in \textit{biased} form: $E = e - b$. The bias is $b=2^{k-1}-1$, where $k$ is the number of bits reserved for $e$.
|
||||
This produces the exponent ranges $E \in [-(b-1), b]$.\\
|
||||
The mantissa field $m$ is interpreted as $M = 0.m_{n-1}\ldots m_1 m_0 + 1$, where $n$ is the amount of bits reserved for $m$
|
||||
\item \textbf{Denormalized Values}: Exponent bit field $e$ is all $0$s.\\
|
||||
In this case, $E$ is read in \textit{biased} form $E = 1 - b$. (Instead of $E = e - b$)\\
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user