MT Core (C++)
Core library for replacing C++ standard in project usage
Loading...
Searching...
No Matches
floats.hpp File Reference
#include "mtcore/io/writer.hpp"
#include <array>
#include <cmath>
#include <limits>
Include dependency graph for floats.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mtcore::io::floats::dragonbox::FloatDec64
 
struct  mtcore::io::floats::dragonbox::DragonboxFormatOptions
 

Namespaces

namespace  mtcore
 Core library for C++ with Zig-related functionality.
 
namespace  mtcore::io
 
namespace  mtcore::io::floats
 
namespace  mtcore::io::floats::dragonbox
 Implementation of the dragonbox algorithm to convert floats to strings Uses slices and writers rather than raw char pointers Also, allows for more control over formatting Don't use this namespace directly.
 

Functions

template<WriterImpl WI>
Result< size_t, typename Writer< WI >::ErrType > mtcore::io::floats::dragonbox::format_float (Writer< WI > &writer, f64 f, Slice< const char > opts={nullptr, 0})
 
auto mtcore::io::floats::dragonbox::compute_pow10 (i32 p) -> impl::U128
 
auto mtcore::io::floats::dragonbox::multiple_of_pow2 (u64 val, i32 exp)
 
auto mtcore::io::floats::dragonbox::multiple_of_pow5 (u64 val, i32 exp) -> bool
 
void mtcore::io::floats::dragonbox::unsigned_to_ascii_2digs (Slice< char > buff, u32 digits)
 
auto mtcore::io::floats::dragonbox::trailing_zeros_2digs (u32 digits) -> i8
 
auto mtcore::io::floats::dragonbox::unsigned_to_ascii_8digits_skip_trailing_zeros (Slice< char > buff, u32 digits) -> i32
 
auto mtcore::io::floats::dragonbox::print_dec_digs_reversed (Slice< char > buff, u64 out) -> i32
 
auto mtcore::io::floats::dragonbox::round_compute_pow10_double (size_t d) -> double
 
auto mtcore::io::floats::dragonbox::format_digits (Slice< char > buff, u64 digits, i32 decExp, DragonboxFormatOptions={}) -> Slice< char >
 
auto mtcore::io::floats::dragonbox::to_chars (Slice< char > buff, double val, DragonboxFormatOptions={}) -> Result< Slice< char >, SliceWriteError >