\(\newcommand{\W}[1]{ \; #1 \; }\) \(\newcommand{\R}[1]{ {\rm #1} }\) \(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} }\) \(\newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} }\) \(\newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} }\) \(\newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }\)
to_string¶
Convert Certain Types to a String¶
Purpose¶
This routine is similar to the C++11 routine std::to_string
with the following differences:
It works with C++98.
It has been extended to the fundamental floating point types.
It has specifications for extending to an arbitrary type; see base_to_string .
If
<cppad/cppad.hpp>
is included, and it has been extended to a Base type, it automatically extends to the AD types above Base .For integer types, conversion to a string is exact. For floating point types, conversion to a string yields a value that has relative error within machine epsilon.