Convert to string using current locale settings.
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cpp
調査の方向性
detail/number_base の format_float_string から詳しく調査を始め、レポートにある2つの stringstream の例で問題を再現してください。cpp_dec_float_50 が locale を imbue した場合のフォーマット処理を確認してください。完了条件は、その出力が通常の double の例と同様に、現在の locale の桁区切りと小数記号に従うことです。
索引モデルが issue の本文から書いたものです。
説明
I can't find how to convert a cpp_dec_float_50 to a string with the current regional settings (in my case: '.' for digit grouping symbol and ',' for decimal symbol). Looking through the format_float_string function in detail/number_base it seems like it always inserts '.' as a decimal symbol.
Also posted this to StackOverflow.
This is what I get with a regular double:
double d = 1494.33;
std::stringstream ss;
ss.imbue(std::locale(""));
ss << std::fixed << std::setprecision(6) << d;
std::cout << ss.str() << std::endl;
outputs 1.494,330000
Trying the same with dec_float:
boost::multiprecision::cpp_dec_float_50 df = 1494.33;
std::stringstream ss;
ss.imbue(std::locale(""));
ss << std::fixed << std::setprecision(6) << df;
std::cout << ss.str() << std::endl;
outputs 1494.330000
Is there any way to get a regional string out of a boost::multiprecision?
- 主要言語
- C++
- スター
- 268
- フォーク
- 130
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
boostorg/multiprecision のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
boostorg/multiprecision#779 · コメント 1 件 ·
-
cpp_bin_float fma rounds the product before the addition instead of fusing対応中かも @NAThompson が 43 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
boostorg/multiprecision#777 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
boostorg/multiprecision#775 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
boostorg/multiprecision#768 · コメント 4 件 ·
-
Eigen NumTraits specialisation doesn't define max_digits10()対応中かも @trestoncuzzort が 28 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
boostorg/multiprecision#744 ·
boostorg/multiprecision の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
sav-oss-org/ptusa_main#1610 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
open-astro/AlpacaBridge#2606 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Refactor force_torque_system integration test to use EcmScope対応中かも @patelshivani2283-lab が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Niko1221/Strata#6731 · コメント 2 件 ·
メンテナーはふだん 6 日以内に返信
-
good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100