std.cfg: Improved configuration of some math functions and added more regression tests

This commit is contained in:
orbitcowboy 2022-07-09 16:32:21 +02:00
parent c2e132b1a3
commit a8816a2d2f
2 changed files with 31 additions and 3 deletions

View File

@ -155,7 +155,7 @@
<function name="acosh,std::acosh">
<use-retval/>
<pure/>
<returnValue type="double"/>
<returnValue type="double">acosh(arg1)</returnValue>
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1" direction="in">
@ -167,7 +167,7 @@
<function name="acoshf,std::acoshf">
<use-retval/>
<pure/>
<returnValue type="float"/>
<returnValue type="float">acosh(arg1)</returnValue>
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1" direction="in">
@ -179,7 +179,7 @@
<function name="acoshl,std::acoshl">
<use-retval/>
<pure/>
<returnValue type="long double"/>
<returnValue type="long double">acosh(arg1)</returnValue>
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1" direction="in">

View File

@ -43,6 +43,13 @@ int zerodiv_sqrt()
return 42 / i;
}
int zerodiv_acos()
{
int i = std::acos(1);
// cppcheck-suppress zerodiv
return 42 / i;
}
int zerodiv_asinh()
{
int i = std::asinh(0);
@ -50,6 +57,27 @@ int zerodiv_asinh()
return 42 / i;
}
int zerodiv_acosh()
{
int i = std::acosh(1);
// cppcheck-suppress zerodiv
return 42 / i;
}
int zerodiv_sinh()
{
int i = std::sinh(0);
// cppcheck-suppress zerodiv
return 42 / i;
}
int zerodiv_tanh()
{
int i = std::tanh(0);
// cppcheck-suppress zerodiv
return 42 / i;
}
int zerodiv_sin()
{
int i = std::sin(0)+std::sin(M_PI)+std::sin(2*M_PI);