File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -241,7 +241,15 @@ template<arithmetic_float T>
241241int teju_jagua (T d, std::span<char >& buffer) {
242242 const auto fields = teju::traits_t <T>::teju (d);
243243 const bool sign = std::signbit (d);
244- return to_chars (fields.mantissa , fields.exponent , sign, buffer.data ());
244+ // return to_chars(fields.mantissa, fields.exponent, sign, buffer.data());
245+
246+ char * ptr = buffer.data ();
247+ if (sign) *ptr++ = ' -' ;
248+ using traits = jkj::dragonbox::default_float_traits<T>;
249+ using carrier_uint = typename traits::carrier_uint;
250+ const char * end = jkj::dragonbox::to_chars_detail::to_chars<T, traits>(
251+ static_cast <carrier_uint>(fields.mantissa ), fields.exponent , ptr);
252+ return end - buffer.data ();
245253}
246254
247255template <arithmetic_float T>
You can’t perform that action at this time.
0 commit comments