You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: text/main/basics/simpleDataTypesAndOperations/float/float.tex
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@
28
28
But how does it work in \python?
29
29
How can we deal with the fact that we cannot dynamically represent fractional numbers exactly even in typical everyday cases?
30
30
With \pythonilIdx{float}, \python\ offers us one type for fractional numbers.
31
-
This datatype represents numbers usually in the same internal structure as \pythonil{double}s in the \pgls{C}~programming language~\cite{PSF2024NTIFC}, which, in turn, internally have a 64~bit IEEE~Standard 754 floating point number layout~\cite{IEEE2019ISFFPA,H1997IS7FPN}.
31
+
This datatype represents numbers usually in the same internal structure as \pythonils{double} in the \pgls{C}~programming language~\cite{PSF2024NTIFC}, which, in turn, internally have a 64~bit IEEE~Standard 754 floating point number layout~\cite{IEEE2019ISFFPA,H1997IS7FPN}.
32
32
The idea behind this standard is to represent both very large numbers, like~$10^{300}$ and very small numbers, like~$10^{-300}$.
33
33
In order to achieve this, the 64~bits are divided into three pieces, as illustrated in \cref{fig:floatIEEEStructure}.
Copy file name to clipboardExpand all lines: text/main/basics/simpleDataTypesAndOperations/str/str.tex
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -456,7 +456,7 @@
456
456
They are basically lists of characters.
457
457
We can index them, i.e., extract portions of text, we can search inside a string to check whether and where it contains a certain substring, and we can manipulate strings, e.g., by replacing substrings.
458
458
459
-
It is also important that we can transform data such as \pythonil{int}s, \pythonil{float}s, or \pythonil{bool}s to strings.
459
+
It is also important that we can transform data such as \pythonils{int}, \pythonils{float}, or \pythonils{bool} to strings.
460
460
Because we actually \emph{always} print them as strings to the console.
461
461
The user cannot interpret the binary representation of such data, they only want text.
462
462
While the function \pythonil{str} can convert many different types of objects to strings, we often want to combine several different pieces of information to an output text.
0 commit comments