\hypertarget{class_qore_1_1zzz8floatzzz9}{}\section{Qore\+:\+:zzz8floatzzz9 Class Reference}
\label{class_qore_1_1zzz8floatzzz9}\index{Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}}


Methods in this pseudo-\/class can be executed on \hyperlink{basic_data_types_float}{floating-\/point values}.  




Inheritance diagram for Qore\+:\+:zzz8floatzzz9\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=140pt]{class_qore_1_1zzz8floatzzz9__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__type__conversion__functions_ga113d18216af1bdb70545081b6a9892ef}{float} \hyperlink{class_qore_1_1zzz8floatzzz9_a2adeb1fcae50106e1a3ed4506d5b12ea}{abs} ()
\begin{DoxyCompactList}\small\item\em Returns the absolute value of the number. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \hyperlink{class_qore_1_1zzz8floatzzz9_a456f92c6ee27c0c772223745f918bcbc}{format} (\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} fmt)
\begin{DoxyCompactList}\small\item\em Returns a string of a formatted number according to a format string. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \hyperlink{class_qore_1_1zzz8floatzzz9_a0a1ed20b3cbe9a7d99681b2ee1b4802b}{format} (\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} prec=2, \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} decimal\+\_\+sep=\char`\"{}.\char`\"{}, \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} thousands\+\_\+sep=\char`\"{}\char`\"{})
\begin{DoxyCompactList}\small\item\em Returns a formatted string of the floating-\/point number according to format arguments. \end{DoxyCompactList}\item 
bool \hyperlink{class_qore_1_1zzz8floatzzz9_aea0691501b3c4e0325034bd7a77f83fb}{infp} ()
\begin{DoxyCompactList}\small\item\em Returns \hyperlink{basic_data_types_True}{True} if the number is infinity (+ or -\/) \end{DoxyCompactList}\item 
bool \hyperlink{class_qore_1_1zzz8floatzzz9_a1e40df6b7e6d5cd5022081fbf0e6f446}{intp} ()
\begin{DoxyCompactList}\small\item\em Returns \hyperlink{basic_data_types_True}{True} because float values can be converted to integers. \end{DoxyCompactList}\item 
bool \hyperlink{class_qore_1_1zzz8floatzzz9_af592f928a4c796aeb82be290b7973f91}{nanp} ()
\begin{DoxyCompactList}\small\item\em Returns \hyperlink{basic_data_types_True}{True} if the number is NaN (not a number) \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \hyperlink{class_qore_1_1zzz8floatzzz9_ab12fc9ef4d1d45cbad74ac1558ec754e}{sign} ()
\begin{DoxyCompactList}\small\item\em Returns -\/1 if the number is negative, 0 if it is zero, or 1 if it is positive. \end{DoxyCompactList}\item 
bool \hyperlink{class_qore_1_1zzz8floatzzz9_afb5c987609e1c65a363ad5252970da37}{strp} ()
\begin{DoxyCompactList}\small\item\em Returns \hyperlink{basic_data_types_True}{True} because float values can be converted to strings. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \hyperlink{class_qore_1_1zzz8floatzzz9_a138a6d9c7f0c10546c96a875bc29d242}{to\+Base} (\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} base=10)
\begin{DoxyCompactList}\small\item\em Converts the number to a different {\bfseries base} (and returns it as a string). \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \hyperlink{class_qore_1_1zzz8floatzzz9_a24f3f33fcd172c04cff733cc4f7628b5}{type\+Code} ()
\begin{DoxyCompactList}\small\item\em Returns \hyperlink{group__type__code__constants_ga8ac3e62bba7e8b878017533c2ac2f20f}{Qore\+::\+N\+T\+\_\+\+F\+L\+O\+AT}. \end{DoxyCompactList}\item 
bool \hyperlink{class_qore_1_1zzz8floatzzz9_a082fc22123e2519a8f6593a9683787ed}{val} ()
\begin{DoxyCompactList}\small\item\em Returns \hyperlink{basic_data_types_True}{True} if the float is non-\/zero, \hyperlink{basic_data_types_False}{False} if zero. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Methods in this pseudo-\/class can be executed on \hyperlink{basic_data_types_float}{floating-\/point values}. 

\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_qore_1_1zzz8floatzzz9_a2adeb1fcae50106e1a3ed4506d5b12ea}\label{class_qore_1_1zzz8floatzzz9_a2adeb1fcae50106e1a3ed4506d5b12ea}} 
\index{Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}!abs@{abs}}
\index{abs@{abs}!Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}}
\subsubsection{\texorpdfstring{abs()}{abs()}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_ga113d18216af1bdb70545081b6a9892ef}{float} Qore\+::zzz8floatzzz9\+::abs (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the absolute value of the number. 

\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
f = f.abs();
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the absolute value of the number
\end{DoxyReturn}
\begin{DoxyNote}{Note}
equivalent to abs(float)
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+8 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1zzz8floatzzz9_a456f92c6ee27c0c772223745f918bcbc}\label{class_qore_1_1zzz8floatzzz9_a456f92c6ee27c0c772223745f918bcbc}} 
\index{Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}!format@{format}}
\index{format@{format}!Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}}
\subsubsection{\texorpdfstring{format()}{format()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} Qore\+::zzz8floatzzz9\+::format (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{fmt }\end{DoxyParamCaption})}



Returns a string of a formatted number according to a format string. 

\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em fmt} & the format string has the following format\+:~\newline
 {\itshape $<$thousands\+\_\+separator$>$}{\ttfamily \mbox{[}}{\itshape $<$decimal\+\_\+separator$>$\mbox{[}$<$decimals$>$\mbox{]}}{\ttfamily \mbox{]}}~\newline
 where\+:~\newline

\begin{DoxyItemize}
\item {\itshape thousands\+\_\+separator} and {\itshape decimal\+\_\+separator} are single characters defining the thousands and decimal separator characters respectively, and
\item {\itshape decimals} is one or more digits defining how may decimals should appear after the decimal point; a negative number means to round that number of digits before the decimal place
\end{DoxyItemize}\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a string of a formatted number according to a format string; if the format string does not follow the given format, then the number without formatting is returned
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
float f = -48392093894.2349;
string nstr = f.format(\textcolor{stringliteral}{".,3"}); \textcolor{comment}{# returns "-48.392.093.894,235"}
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
equivalent to \hyperlink{group__string__functions_ga33bb08516773ed10def16bb42d6b8159}{format\+\_\+number(string, softfloat)}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \hyperlink{class_qore_1_1zzz8intzzz9_a4f4b203fef4e2ae785f838c98e5995be}{Qore\+::zzz8intzzz9\+::format(string)}
\item \hyperlink{class_qore_1_1zzz8numberzzz9_acdcee3a4130b680892d915f3956f8199}{Qore\+::zzz8numberzzz9\+::format(string)}
\item \hyperlink{class_qore_1_1zzz8intzzz9_a52e3a4df1cf57a32686d651666a9643a}{Qore\+::zzz8intzzz9\+::format(int, string, string)}
\item \hyperlink{class_qore_1_1zzz8floatzzz9_a0a1ed20b3cbe9a7d99681b2ee1b4802b}{Qore\+::zzz8floatzzz9\+::format(int, string, string)}
\item \hyperlink{class_qore_1_1zzz8numberzzz9_a31013414002c3808718a217d8d488f7b}{Qore\+::zzz8numberzzz9\+::format(int, string, string)}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1zzz8floatzzz9_a0a1ed20b3cbe9a7d99681b2ee1b4802b}\label{class_qore_1_1zzz8floatzzz9_a0a1ed20b3cbe9a7d99681b2ee1b4802b}} 
\index{Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}!format@{format}}
\index{format@{format}!Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}}
\subsubsection{\texorpdfstring{format()}{format()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} Qore\+::zzz8floatzzz9\+::format (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}]{prec = {\ttfamily 2},  }\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{decimal\+\_\+sep = {\ttfamily \char`\"{}.\char`\"{}},  }\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{thousands\+\_\+sep = {\ttfamily \char`\"{}\char`\"{}} }\end{DoxyParamCaption})}



Returns a formatted string of the floating-\/point number according to format arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em prec} & the number of digits after the decimal point; a negative value means to round that number of digits before the decimal place, whereas the special constant \hyperlink{group__number__string__formatting__constants_gab4b7a40f77ac14951ab6f04229a7bb6b}{S\+N\+F\+\_\+\+All\+Digits} means to include all possible digits after the decimal point \\
\hline
{\em decimal\+\_\+sep} & a single character that defines the decimal separator; an empty string means no decimal separator \\
\hline
{\em thousands\+\_\+sep} & a single character that defines the thousands and further separators every three digits before the decimal point; an empty string means no thousands separator\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a string representing the floating-\/point number according to the format arguments as described above
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
number n = -48392093894.2349n;
string nstr = n.format(3, \textcolor{stringliteral}{"."}, \textcolor{stringliteral}{","}); \textcolor{comment}{# returns "-48.392.093.894,235"}
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \hyperlink{class_qore_1_1zzz8numberzzz9_a31013414002c3808718a217d8d488f7b}{Qore\+::zzz8numberzzz9\+::format(int, string, string)}
\item \hyperlink{class_qore_1_1zzz8intzzz9_a52e3a4df1cf57a32686d651666a9643a}{Qore\+::zzz8intzzz9\+::format(int, string, string)}
\item \hyperlink{class_qore_1_1zzz8numberzzz9_acdcee3a4130b680892d915f3956f8199}{Qore\+::zzz8numberzzz9\+::format(string)}
\item \hyperlink{class_qore_1_1zzz8floatzzz9_a456f92c6ee27c0c772223745f918bcbc}{Qore\+::zzz8floatzzz9\+::format(string)}
\item \hyperlink{class_qore_1_1zzz8intzzz9_a4f4b203fef4e2ae785f838c98e5995be}{Qore\+::zzz8intzzz9\+::format(string)}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1zzz8floatzzz9_aea0691501b3c4e0325034bd7a77f83fb}\label{class_qore_1_1zzz8floatzzz9_aea0691501b3c4e0325034bd7a77f83fb}} 
\index{Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}!infp@{infp}}
\index{infp@{infp}!Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}}
\subsubsection{\texorpdfstring{infp()}{infp()}}
{\footnotesize\ttfamily bool Qore\+::zzz8floatzzz9\+::infp (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns \hyperlink{basic_data_types_True}{True} if the number is infinity (+ or -\/) 

\begin{DoxyReturn}{Returns}
\hyperlink{basic_data_types_True}{True} if the number is infinity (+ or -\/)
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{keywordflow}{if} (f.infp())
    \hyperlink{group__string__functions_ga996c5d1686fbc245f0bc7a02012e6a33}{print}(\textcolor{stringliteral}{"the operation resulted in infinity\(\backslash\)n"});
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1zzz8floatzzz9_a1e40df6b7e6d5cd5022081fbf0e6f446}\label{class_qore_1_1zzz8floatzzz9_a1e40df6b7e6d5cd5022081fbf0e6f446}} 
\index{Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}!intp@{intp}}
\index{intp@{intp}!Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}}
\subsubsection{\texorpdfstring{intp()}{intp()}}
{\footnotesize\ttfamily bool Qore\+::zzz8floatzzz9\+::intp (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns \hyperlink{basic_data_types_True}{True} because float values can be converted to integers. 

\begin{DoxyReturn}{Returns}
\hyperlink{basic_data_types_True}{True} because float values can be converted to integers
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{keywordflow}{if} (n.intp())
    \hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}(\textcolor{stringliteral}{"%y: can be converted to an integer: %d\(\backslash\)n"}, n, \hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}(n));
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1zzz8floatzzz9_af592f928a4c796aeb82be290b7973f91}\label{class_qore_1_1zzz8floatzzz9_af592f928a4c796aeb82be290b7973f91}} 
\index{Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}!nanp@{nanp}}
\index{nanp@{nanp}!Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}}
\subsubsection{\texorpdfstring{nanp()}{nanp()}}
{\footnotesize\ttfamily bool Qore\+::zzz8floatzzz9\+::nanp (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns \hyperlink{basic_data_types_True}{True} if the number is NaN (not a number) 

\begin{DoxyReturn}{Returns}
\hyperlink{basic_data_types_True}{True} if the number is NaN (not a number)
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{keywordflow}{if} (f.nanp())
    \hyperlink{group__string__functions_ga996c5d1686fbc245f0bc7a02012e6a33}{print}(\textcolor{stringliteral}{"the operation resulted in NaN\(\backslash\)n"});
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+12 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1zzz8floatzzz9_ab12fc9ef4d1d45cbad74ac1558ec754e}\label{class_qore_1_1zzz8floatzzz9_ab12fc9ef4d1d45cbad74ac1558ec754e}} 
\index{Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}!sign@{sign}}
\index{sign@{sign}!Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}}
\subsubsection{\texorpdfstring{sign()}{sign()}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} Qore\+::zzz8floatzzz9\+::sign (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns -\/1 if the number is negative, 0 if it is zero, or 1 if it is positive. 

\begin{DoxyReturn}{Returns}
-\/1 if the number is negative, 0 if it is zero, or 1 if it is positive
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}(\textcolor{stringliteral}{"sign: %d\(\backslash\)n"}, f.sign());
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1zzz8floatzzz9_afb5c987609e1c65a363ad5252970da37}\label{class_qore_1_1zzz8floatzzz9_afb5c987609e1c65a363ad5252970da37}} 
\index{Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}!strp@{strp}}
\index{strp@{strp}!Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}}
\subsubsection{\texorpdfstring{strp()}{strp()}}
{\footnotesize\ttfamily bool Qore\+::zzz8floatzzz9\+::strp (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns \hyperlink{basic_data_types_True}{True} because float values can be converted to strings. 

\begin{DoxyReturn}{Returns}
\hyperlink{basic_data_types_True}{True} because float values can be converted to strings
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{keywordflow}{if} (n.strp())
    \hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}(\textcolor{stringliteral}{"%y: can be converted to a string: '%s'\(\backslash\)n"}, n, \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}(n));
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1zzz8floatzzz9_a138a6d9c7f0c10546c96a875bc29d242}\label{class_qore_1_1zzz8floatzzz9_a138a6d9c7f0c10546c96a875bc29d242}} 
\index{Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}!to\+Base@{to\+Base}}
\index{to\+Base@{to\+Base}!Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}}
\subsubsection{\texorpdfstring{to\+Base()}{toBase()}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} Qore\+::zzz8floatzzz9\+::to\+Base (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}]{base = {\ttfamily 10} }\end{DoxyParamCaption})}



Converts the number to a different {\bfseries base} (and returns it as a string). 

\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em base} & the base to convert the number to; this value must be 2 -\/ 36 inclusive or an {\ttfamily I\+N\+V\+A\+L\+I\+D-\/\+B\+A\+SE} exception will be thrown\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the converted value as a string
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
 (15.5).toBase(20));   // returns \textcolor{stringliteral}{"F.A"}
(-13.8).toBase(20));   // returns \textcolor{stringliteral}{"-D.G"}
(21.48).toBase(15));   // returns \textcolor{stringliteral}{"16.73"}
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em I\+N\+V\+A\+L\+I\+D-\/\+B\+A\+SE} & the base is invalid; must be 2 -\/ 36 inclusive\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\hyperlink{class_qore_1_1zzz8intzzz9_a1a7c8f41ba26bec22c1a0f485d90a48a}{Qore\+::zzz8intzzz9\+::to\+Base(int base)} 

\hyperlink{class_qore_1_1zzz8numberzzz9_ae6d52cb434c6eef372ef064852038f8a}{Qore\+::zzz8numberzzz9\+::to\+Base(int base)}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1zzz8floatzzz9_a24f3f33fcd172c04cff733cc4f7628b5}\label{class_qore_1_1zzz8floatzzz9_a24f3f33fcd172c04cff733cc4f7628b5}} 
\index{Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}!type\+Code@{type\+Code}}
\index{type\+Code@{type\+Code}!Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}}
\subsubsection{\texorpdfstring{type\+Code()}{typeCode()}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} Qore\+::zzz8floatzzz9\+::type\+Code (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns \hyperlink{group__type__code__constants_ga8ac3e62bba7e8b878017533c2ac2f20f}{Qore\+::\+N\+T\+\_\+\+F\+L\+O\+AT}. 

\begin{DoxyReturn}{Returns}
\hyperlink{group__type__code__constants_ga8ac3e62bba7e8b878017533c2ac2f20f}{Qore\+::\+N\+T\+\_\+\+F\+L\+O\+AT}
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
switch (f.typeCode()) \{
    case NT\_FLOAT:
        \hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}(\textcolor{stringliteral}{"%y: is a float\(\backslash\)n"}, f);
        \textcolor{keywordflow}{break};
\}
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1zzz8floatzzz9_a082fc22123e2519a8f6593a9683787ed}\label{class_qore_1_1zzz8floatzzz9_a082fc22123e2519a8f6593a9683787ed}} 
\index{Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}!val@{val}}
\index{val@{val}!Qore\+::zzz8floatzzz9@{Qore\+::zzz8floatzzz9}}
\subsubsection{\texorpdfstring{val()}{val()}}
{\footnotesize\ttfamily bool Qore\+::zzz8floatzzz9\+::val (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns \hyperlink{basic_data_types_True}{True} if the float is non-\/zero, \hyperlink{basic_data_types_False}{False} if zero. 

\begin{DoxyReturn}{Returns}
\hyperlink{basic_data_types_True}{True} if the float is non-\/zero, \hyperlink{basic_data_types_False}{False} if zero
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
bool b = f.val();
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \hyperlink{parse_directives_perl-bool-eval}{\%perl-\/bool-\/eval}
\item \hyperlink{parse_directives_strict-bool-eval}{\%strict-\/bool-\/eval} 
\end{DoxyItemize}
\end{DoxySeeAlso}
