2013-12-26 21:12:07 +04:00
|
|
|
/* j/6/bull.c
|
|
|
|
**
|
|
|
|
** This file is in the public domain.
|
|
|
|
*/
|
|
|
|
#include "all.h"
|
2014-09-04 07:10:43 +04:00
|
|
|
|
2013-12-26 21:12:07 +04:00
|
|
|
|
|
|
|
/* functions
|
|
|
|
*/
|
2014-09-06 00:13:24 +04:00
|
|
|
u3_noun
|
2014-11-06 22:13:57 +03:00
|
|
|
u3qf_bull(
|
2014-09-06 00:13:24 +04:00
|
|
|
u3_noun bid,
|
|
|
|
u3_noun der)
|
2013-12-26 21:12:07 +04:00
|
|
|
{
|
2014-01-02 00:47:18 +04:00
|
|
|
if ( (c3__void == der) ||
|
2014-09-06 00:13:24 +04:00
|
|
|
(c3__void == u3t(u3t(u3t(bid)))) )
|
2014-01-02 00:47:18 +04:00
|
|
|
{
|
2013-12-26 21:12:07 +04:00
|
|
|
return c3__void;
|
|
|
|
}
|
2014-09-06 00:13:24 +04:00
|
|
|
else return u3nt
|
|
|
|
(c3__bull, u3k(bid), u3k(der));
|
2013-12-26 21:12:07 +04:00
|
|
|
}
|
2014-09-06 00:13:24 +04:00
|
|
|
u3_noun
|
2014-11-06 22:13:57 +03:00
|
|
|
u3wf_bull(
|
2014-09-06 00:13:24 +04:00
|
|
|
u3_noun cor)
|
2013-12-26 21:12:07 +04:00
|
|
|
{
|
2014-09-06 00:13:24 +04:00
|
|
|
u3_noun bid, der;
|
2013-12-26 21:12:07 +04:00
|
|
|
|
2014-11-18 00:56:51 +03:00
|
|
|
if ( c3n == u3r_mean(cor, u3x_sam_2, &bid, u3x_sam_3, &der, 0) ) {
|
2014-11-06 03:20:01 +03:00
|
|
|
return u3m_bail(c3__fail);
|
2013-12-26 21:12:07 +04:00
|
|
|
} else {
|
2014-11-06 22:13:57 +03:00
|
|
|
return u3qf_bull(bid, der);
|
2013-12-26 21:12:07 +04:00
|
|
|
}
|
|
|
|
}
|