\doxysection{ratio.\+h}
\hypertarget{ratio_8h_source}{}\label{ratio_8h_source}\index{workspace/post-\/scarcity/src/arith/ratio.h@{workspace/post-\/scarcity/src/arith/ratio.h}}
\mbox{\hyperlink{ratio_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00001}00001\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00002}00002\ \textcolor{comment}{\ *\ ratio.h}}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00003}00003\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00004}00004\ \textcolor{comment}{\ *\ functions\ for\ rational\ number\ cells.}}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00005}00005\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00006}00006\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00007}00007\ \textcolor{comment}{\ *\ (c)\ 2017\ Simon\ Brooke\ <simon@journeyman.cc>}}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00008}00008\ \textcolor{comment}{\ *\ Licensed\ under\ GPL\ version\ 2.0,\ or,\ at\ your\ option,\ any\ later\ version.}}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00009}00009\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00010}00010\ }
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00011}00011\ \textcolor{preprocessor}{\#ifndef\ \_\_ratio\_h}}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00012}00012\ \textcolor{preprocessor}{\#define\ \_\_ratio\_h}}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00013}00013\ }
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00014}00014\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{ratio_8h_a0a0daf24710922f57cc34d20e8bd9dca}{simplify\_ratio}}(\ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ arg\ );}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00015}00015\ }
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00016}00016\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{ratio_8h_a5bb772b5fbc470c30659b61ac2f0ebf5}{add\_ratio\_ratio}}(\ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ arg1,}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00017}00017\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ arg2\ );}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00018}00018\ }
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00019}00019\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{ratio_8h_a970e02ec84fab27b4d33150eb50bdc8e}{add\_integer\_ratio}}(\ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ intarg,}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00020}00020\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ ratarg\ );}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00021}00021\ }
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00022}00022\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{ratio_8h_a6edf067028767b399bdc4181b0b808d4}{divide\_ratio\_ratio}}(\ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ arg1,}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00023}00023\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ arg2\ );}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00024}00024\ }
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00025}00025\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{ratio_8h_a60ef7247767c19d1ec458406366561fb}{multiply\_ratio\_ratio}}(\ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ arg1,\ struct}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00026}00026\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ arg2\ );}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00027}00027\ }
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00028}00028\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{ratio_8h_a921ee5ce45e59014688c02bca2397b98}{multiply\_integer\_ratio}}(\ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ intarg,}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00029}00029\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ ratarg\ );}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00030}00030\ }
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00031}00031\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{ratio_8h_ac58f726144640d5bce62d7e5e3eaae45}{subtract\_ratio\_ratio}}(\ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ arg1,}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00032}00032\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ arg2\ );}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00033}00033\ }
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00034}00034\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{ratio_8h_ad2832e83566ce131e54397c3e165899c}{make\_ratio}}(\ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ dividend,}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00035}00035\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ divisor,}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00036}00036\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ bool\ simplify\ );}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00037}00037\ }
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00038}00038\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{ratio_8h_a63c0888d86fd97b087a259dd507b618c}{equal\_ratio\_ratio}}(\ \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{ratio_8h_source_l00039}00039\ }
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00040}00040\ \textcolor{keywordtype}{long}\ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{ratio_8h_a0fe47053f1b1b94101748d354c1a76be}{c\_ratio\_to\_ld}}(\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ rat\ );}
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00041}00041\ }
\DoxyCodeLine{\Hypertarget{ratio_8h_source_l00042}00042\ \textcolor{preprocessor}{\#endif}}

\end{DoxyCode}
