\doxysection{integer.\+h}
\hypertarget{integer_8h_source}{}\label{integer_8h_source}\index{workspace/post-\/scarcity/src/arith/integer.h@{workspace/post-\/scarcity/src/arith/integer.h}}
\mbox{\hyperlink{integer_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00001}00001\ \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00002}00002\ \textcolor{comment}{\ *\ integer.h}}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00003}00003\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00004}00004\ \textcolor{comment}{\ *\ functions\ for\ integer\ cells.}}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00005}00005\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00006}00006\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00007}00007\ \textcolor{comment}{\ *\ (c)\ 2017\ Simon\ Brooke\ <simon@journeyman.cc>}}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00008}00008\ \textcolor{comment}{\ *\ Licensed\ under\ GPL\ version\ 2.0,\ or,\ at\ your\ option,\ any\ later\ version.}}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00009}00009\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00010}00010\ }
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00011}00011\ \textcolor{preprocessor}{\#ifndef\ \_\_integer\_h}}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00012}00012\ \textcolor{preprocessor}{\#define\ \_\_integer\_h}}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00013}00013\ }
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00014}00014\ \textcolor{preprocessor}{\#include\ <stdbool.h>}}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00015}00015\ \textcolor{preprocessor}{\#include\ <stdint.h>}}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00016}00016\ }
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00017}\mbox{\hyperlink{integer_8h_a440ee14fe90f597a6845c227e1420c0f}{00017}}\ \textcolor{preprocessor}{\#define\ replace\_integer\_i(p,i)\ \{struct\ cons\_pointer\ \_\_p\ =\ acquire\_integer(i,NIL);\ release\_integer(p);\ p\ =\ \_\_p;\}}}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00018}\mbox{\hyperlink{integer_8h_abd52227553bbbee425221af07e95700e}{00018}}\ \textcolor{preprocessor}{\#define\ replace\_integer\_p(p,q)\ \{struct\ cons\_pointer\ \_\_p\ =\ p;\ release\_integer(\ p);\ \ p\ =\ q;\}}}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00019}00019\ }
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00020}00020\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{integer_8h_afff1d31bb49e1be78395b0803b0b2514}{make\_integer}}(\ int64\_t\ value,\ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ more\ );}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00021}00021\ }
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00022}00022\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{integer_8h_adda818b0d598bdb572e371cb6d4123b4}{acquire\_integer}}(\ int64\_t\ value,\ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ more\ );}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00023}00023\ }
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00024}00024\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{integer_8h_a6888967abc1be479f518354bb802d01d}{release\_integer}}(\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ p\ );}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00025}00025\ }
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00026}00026\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{integer_8h_a8b6e93c44eca207d8f88a71d90142bb9}{add\_integers}}(\ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ a,}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00027}00027\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ b\ );}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00028}00028\ }
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00029}00029\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{integer_8h_a3f0fcaa092a0c6830aa0bf7303ed1f7c}{multiply\_integers}}(\ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ a,}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00030}00030\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ b\ );}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00031}00031\ }
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00032}00032\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{integer_8h_aa9d39b6446057bc1edc01113f67db026}{integer\_to\_string}}(\ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ int\_pointer,}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00033}00033\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int\ base\ );}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00034}00034\ }
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00035}00035\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{integer_8h_a10c7e3258f3c46d3271301a7092fc52e}{equal\_integer\_integer}}(\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ a,\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ b\ );}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00036}00036\ }
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00037}00037\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{integer_8h_a24e33b5a4598eee932af379418e8c02b}{equal\_integer\_real}}(\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ a,\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ b\ );}
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00038}00038\ }
\DoxyCodeLine{\Hypertarget{integer_8h_source_l00039}00039\ \textcolor{preprocessor}{\#endif}}

\end{DoxyCode}
