Add div:rd, div:fl, and jet.

Also fix rnd:fl (by fixing rne:fl).
This commit is contained in:
Jared Hance 2014-06-03 11:41:25 -04:00
parent f50d3322b3
commit 7cc45edad5

View File

@ -13,6 +13,7 @@ union doub {
/* declarations /* declarations
*/ */
extern u2_ho_jet j2_mcj(Pt5, rd, mul)[]; extern u2_ho_jet j2_mcj(Pt5, rd, mul)[];
extern u2_ho_jet j2_mcj(Pt5, rd, div)[];
extern u2_ho_jet j2_mcj(Pt5, rd, add)[]; extern u2_ho_jet j2_mcj(Pt5, rd, add)[];
extern u2_ho_jet j2_mcj(Pt5, rd, sub)[]; extern u2_ho_jet j2_mcj(Pt5, rd, sub)[];
@ -50,7 +51,37 @@ union doub {
} }
} }
/* div
*/
u2_weak
j2_mcd(Pt5, rd, div)(u2_wire wir_r,
u2_atom a,
u2_atom b)
{
union doub c, d, e;
c.c = u2_chub(0, a);
d.c = u2_chub(0, b);
e.d = c.d / d.d;
return u2_ci_chubs(1, &e.c);
}
u2_weak
j2_mc(Pt5, rd, div)(u2_wire wir_r,
u2_noun cor)
{
u2_noun a, b;
if ( u2_no == u2_mean(cor, u2_cv_sam_2, &a, u2_cv_sam_3, &b, 0) ||
u2_no == u2_stud(a) ||
u2_no == u2_stud(b) )
{
return u2_bl_bail(wir_r, c3__exit);
}
else {
return j2_mcd(Pt5, rd, div)(wir_r, a, b);
}
}
/* add /* add
*/ */
@ -124,6 +155,11 @@ union doub {
{ } { }
}; };
u2_ho_jet u2_ho_jet
j2_mcj(Pt5, rd, div)[] = {
{ ".2", c3__lite, j2_mc(Pt5, rd, div), Tier5_test, u2_none, u2_none },
{ }
};
u2_ho_jet
j2_mcj(Pt5, rd, add)[] = { j2_mcj(Pt5, rd, add)[] = {
{ ".2", c3__lite, j2_mc(Pt5, rd, add), Tier5_test, u2_none, u2_none }, { ".2", c3__lite, j2_mc(Pt5, rd, add), Tier5_test, u2_none, u2_none },
{ } { }
@ -137,6 +173,7 @@ union doub {
u2_ho_driver u2_ho_driver
j2_mbd(Pt5, rd)[] = { j2_mbd(Pt5, rd)[] = {
{ j2_sc(Pt5, rd, mul), j2_mcj(Pt5, rd, mul), 0, 0, u2_none }, { j2_sc(Pt5, rd, mul), j2_mcj(Pt5, rd, mul), 0, 0, u2_none },
{ j2_sc(Pt5, rd, div), j2_mcj(Pt5, rd, div), 0, 0, u2_none },
{ j2_sc(Pt5, rd, add), j2_mcj(Pt5, rd, add), 0, 0, u2_none }, { j2_sc(Pt5, rd, add), j2_mcj(Pt5, rd, add), 0, 0, u2_none },
{ j2_sc(Pt5, rd, sub), j2_mcj(Pt5, rd, sub), 0, 0, u2_none }, { j2_sc(Pt5, rd, sub), j2_mcj(Pt5, rd, sub), 0, 0, u2_none },
{ } { }