complex_result_from_scalar for the built-in floating-point types
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 62/100
Hướng nghiên cứu
Start by locating complex_result_from_scalar and its existing multiprecision specializations in Boost.Multiprecision, then check how nearby traits and tests are organized. Add the built-in floating-point mappings proposed in the issue and verify the trait resolves to the matching std::complex type for float, double and long double; the issue does not name a test file.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
complex_result_from_scalar<T> maps a multiprecision real type to its complex counterpart (cpp_bin_float_50 to cpp_complex_50, mpfr_float to mpc_complex, ...), but the primary template is left undefined, so it has no answer for the built-in types:
boost::multiprecision::complex_result_from_scalar<double>::type // error: incomplete type
Generic code that works for both, like Boost.Math's FFT, Chebyshev transform and polynomial root finders, therefore needs a second trait for the built-in half. Boost.Math currently carries one, tools::detail::complex_from_real, which picks std::complex<Real> for float, double and long double and forwards everything else to complex_result_from_scalar.
Could Multiprecision provide it instead?
template <> struct complex_result_from_scalar<float> { using type = std::complex<float>; };
template <> struct complex_result_from_scalar<double> { using type = std::complex<double>; };
template <> struct complex_result_from_scalar<long double> { using type = std::complex<long double>; };
template <class T>
using complex_result_from_scalar_t = typename complex_result_from_scalar<T>::type;
The primary template is currently incomplete, so these specialisations can't change the meaning of any code that compiles today. Boost.Math would then drop complex_from_real and use the Multiprecision trait directly.
🤖 Generated with Claude Code
- Ngôn ngữ chính
- C++
- Star
- 268
- Fork
- 130
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của boostorg/multiprecision
-
cpp_bin_float fma rounds the product before the addition instead of fusingCó thể đã có người làm @NAThompson đã nhận 43 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
boostorg/multiprecision#777 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
boostorg/multiprecision#775 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
boostorg/multiprecision#768 · 4 bình luận ·
-
Eigen NumTraits specialisation doesn't define max_digits10()Có thể đã có người làm @trestoncuzzort đã nhận 28 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
boostorg/multiprecision#744 ·
-
`cpp_double_fp_backend` optimized single-limb operationsCó thể làm lại được @ckormanyos đã nhận 462 ngày trước và không có pull request nào đang mở. Đang mởenhancement optimization
boostorg/multiprecision#728 · 1 người được giao ·
Tất cả issue của boostorg/multiprecision
Issue tương tự
-
agent:WSL code-review linux pri:medium refactoring
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
psi29a/d2decomped#691 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
CachyOS/packageinstaller#144 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
(S1 - Need confirmation)
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
CleverRaven/Cataclysm-DDA#89715 ·
Maintainer thường phản hồi trong vòng 1 ngày