Interval cosine function broken
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
Research direction
Inspect boost/numeric/interval/transc.hpp at the cos implementation and the rounded_math policy named in the compiler error. Run the supplied C++ reproducer to confirm the compilation failure; done means interval cosine compiles and the regression is covered by an appropriate test.
Written by the indexing model from the issue text.
Description
Code to reproduce:
#include <boost/numeric/interval.hpp>
using boost::numeric::interval;
using namespace boost::numeric::interval_lib;
int main()
{
auto x = cos(interval<double>(2.3));
return 0;
}
Error message:
g++-7 -Wall -Wextra -Wfatal-errors -fext-numeric-literals main.cpp -o main.x -pthread
main.cpp: In function 'int main()':
main.cpp:8:10: warning: variable 'x' set but not used [-Wunused-but-set-variable]
auto x = cos(interval<double>(2.3));
^
In file included from ../numeric/interval/include/boost/numeric/interval.hpp:30:0,
from main.cpp:1:
../numeric/interval/include/boost/numeric/interval/transc.hpp: In instantiation of 'boost::numeric::interval<T, Policies> boost::numeric::cos(const boost::numeric::interval<T, Policies>&) [with T = double; Policies = boost::numeric::interval_lib::policies<boost::numeric::interval_lib::rounded_math<double>, boost::numeric::interval_lib::checking_strict<double> >]':
main.cpp:8:39: required from here
../numeric/interval/include/boost/numeric/interval/transc.hpp:73:18: error: 'boost::numeric::interval_lib::policies<boost::numeric::interval_lib::rounded_math<double>, boost::numeric::interval_lib::checking_strict<double> >::rounding {aka struct boost::numeric::interval_lib::rounded_math<double>}' has no member named 'cos_down'; did you mean 'conv_down'?
return I(rnd.cos_down(u), rnd.cos_up(l), true);
~~~~^~~~~~~~
conv_down
compilation terminated due to -Wfatal-errors.
make: *** [main.x] Error 1
Compiled against a fresh clone.
- Dominant language
- C++
- Stars
- 31
- Forks
- 48
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/interval
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in boostorg/interval
Similar issues
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 88/100
QuantStack/git2cpp#187 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
mlcommons/mobile_app_open#1182 ·
-
Needs-Triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/winget-cli#6547 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·