]>
Dogcows Code - chaz/yoink/blob - src/stlplus/strings/print_float.hpp
1 #ifndef STLPLUS_PRINT_FLOAT
2 #define STLPLUS_PRINT_FLOAT
3 ////////////////////////////////////////////////////////////////////////////////
5 // Author: Andy Rushton
6 // Copyright: (c) Southampton University 1999-2004
7 // (c) Andy Rushton 2004-2009
8 // License: BSD License, see ../docs/license.html
10 // Convert a float/double to/from string
12 ////////////////////////////////////////////////////////////////////////////////
13 #include "strings_fixes.hpp"
14 #include "format_types.hpp"
22 ////////////////////////////////////////////////////////////////////////////////
23 // convert a real type to string
24 ////////////////////////////////////////////////////////////////////////////////
26 // Only decimal radix is supported
28 // The way in which the number is displayed is defined in radix_types.hpp
29 // Using any other value for the display type causes std::invalid_argument to be thrown
31 void print_float(std::ostream
& device
, float f
,
32 real_display_t display
= display_mixed
,
34 unsigned precision
= 6)
35 throw(std::invalid_argument
);
37 void print_double(std::ostream
& device
, double f
,
38 real_display_t display
= display_mixed
,
40 unsigned precision
= 6)
41 throw(std::invalid_argument
);
43 ////////////////////////////////////////////////////////////////////////////////
45 } // end namespace stlplus
This page took 0.03644 seconds and 4 git commands to generate.