diff --git a/README.md b/README.md index 7521dd5..cf618f0 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ target_link_libraries(my_target dragonbox::dragonbox) # or dragonbox::dragonbox_ ``` # Language Standard -The library is targeting C++17 and actively using its features (e.g., `if constexpr`). +The library requires C++11 or higher. Since C++20, every function provided is `constexpr`. # Usage Examples (Simple string generation from `float/double`) @@ -98,6 +98,9 @@ By default, `jkj::dragonbox::to_decimal` returns a struct with three members (`s ***Important.*** `jkj::dragonbox::to_decimal` is designed to ***work only with finite nonzero*** inputs. The behavior of it when given with infinities/NaN's/`+0`/`-0` is undefined. `jkj::dragonbox::to_chars` and `jkj::dragonbox::to_chars_n` work fine for any inputs. +# To people wanting to port the algorithm +Those who want to port the algorithm into other languages or re-implement it from scratch are recommended to look at the [simpler implementation](https://github.com/jk-jeon/dragonbox/tree/master/subproject/simple) first rather than the main implementation, since the main implementation is riddled with template indirections obscuring the core logic of the algorithm. The simpler implementation offers less flexibility and somewhat slower performance, but is much more straightforward so it should be easier to understand. + # Policies Dragonbox provides several policies that the user can select. Most of the time the default policies will be sufficient, but for some situation this customizability might be useful. There are currently five different kinds of policies that you can specify: sign policy, trailing zero policy, decimal-to-binary (parsing) rounding policy, binary-to-decimal (formatting) rounding policy, and cache policy. Those policies live in the namespace `jkj::dragonbox::policy`. You can provide the policies as additional parameters to `jkj::dragonbox::to_decimal` or `jkj::dragonbox::to_chars` or `jkj::dragonbox::to_chars_n`. Here is an example usage: ```cpp