mirror of
https://github.com/louisrubet/rpn
synced 2025-01-16 03:41:28 +01:00
#34: debug tests on MPRF
This commit is contained in:
parent
d24739734b
commit
fd88844f4b
1 changed files with 4 additions and 4 deletions
|
@ -97,8 +97,8 @@ void test_and(void)
|
|||
number* right = (number*)_stack->pop_back();
|
||||
number* left = (number*)_stack->back();
|
||||
|
||||
if ((mpfr_cmp_si(left->_value.mpfr, 0) == 0)
|
||||
&& (mpfr_cmp_si(right->_value.mpfr, 0) == 0))
|
||||
if ((mpfr_cmp_si(left->_value.mpfr, 0) != 0)
|
||||
&& (mpfr_cmp_si(right->_value.mpfr, 0) != 0))
|
||||
mpfr_set_si(left->_value.mpfr, 1, s_mpfr_rnd);
|
||||
else
|
||||
mpfr_set_si(left->_value.mpfr, 0, s_mpfr_rnd);
|
||||
|
@ -113,8 +113,8 @@ void test_or(void)
|
|||
number* right = (number*)_stack->pop_back();
|
||||
number* left = (number*)_stack->back();
|
||||
|
||||
if ((mpfr_cmp_si(left->_value.mpfr, 0) == 0)
|
||||
|| (mpfr_cmp_si(right->_value.mpfr, 0) == 0))
|
||||
if ((mpfr_cmp_si(left->_value.mpfr, 0) != 0)
|
||||
|| (mpfr_cmp_si(right->_value.mpfr, 0) != 0))
|
||||
mpfr_set_si(left->_value.mpfr, 1, s_mpfr_rnd);
|
||||
else
|
||||
mpfr_set_si(left->_value.mpfr, 0, s_mpfr_rnd);
|
||||
|
|
Loading…
Reference in a new issue