complex_result_from_scalar for the built-in floating-point types
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 62/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- C++
- Estrellas
- 268
- Forks
- 130
- Merge medio
- 1 d 15 h
- PR fusionados (30 d)
- 2
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de boostorg/multiprecision
-
cpp_bin_float fma rounds the product before the addition instead of fusingPosiblemente ocupada @NAThompson la tomó hace 43 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
boostorg/multiprecision#777 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
boostorg/multiprecision#775 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
boostorg/multiprecision#768 · 4 comentarios ·
-
Eigen NumTraits specialisation doesn't define max_digits10()Posiblemente ocupada @trestoncuzzort la tomó hace 28 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
boostorg/multiprecision#744 ·
-
`cpp_double_fp_backend` optimized single-limb operationsQuizá libre de nuevo @ckormanyos la tomó hace 462 días y no hay ningún pull request abierto. Abiertoenhancement optimization
boostorg/multiprecision#728 · 1 asignado ·
Todos los issues de boostorg/multiprecision
Issues similares
-
agent:WSL code-review linux pri:medium refactoring
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
kind/enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 82/100
psi29a/d2decomped#691 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
CachyOS/packageinstaller#144 ·
Los mantenedores suelen responder en 1 día
-
(S1 - Need confirmation)
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
CleverRaven/Cataclysm-DDA#89715 ·
Los mantenedores suelen responder en 1 día