X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmath%2Fgen%2Fmplibm.c;h=fffed5464a9094995dd143611d89316e40ea36e4;hb=ddfb9f92381086ef0b29f6fdddee3f7e51fb82e1;hp=05462020e5afbaf305ddbd0d31f51a93f1f9cf28;hpb=2146d5e12aa52cb97f0a151e2611967f0653a07a;p=libc-test diff --git a/src/math/gen/mplibm.c b/src/math/gen/mplibm.c index 0546202..fffed54 100644 --- a/src/math/gen/mplibm.c +++ b/src/math/gen/mplibm.c @@ -150,6 +150,22 @@ int mpnearbyintl(struct t *t) { return mpl1(t, nearbyintl); } int mpnextafter(struct t *t) { return mpd2(t, nextafter); } int mpnextafterf(struct t *t) { return mpf2(t, nextafterf); } int mpnextafterl(struct t *t) { return mpl2(t, nextafterl); } +int mpnexttoward(struct t *t) +{ + feclearexcept(FE_ALL_EXCEPT); + t->y = nexttoward(t->x, t->x2); + t->e = getexcept(); + t->dy = 0; + return 0; +} +int mpnexttowardf(struct t *t) +{ + feclearexcept(FE_ALL_EXCEPT); + t->y = nexttowardf(t->x, t->x2); + t->e = getexcept(); + t->dy = 0; + return 0; +} int mpnexttowardl(struct t *t) { return mpl2(t, nexttowardl); } int mppow(struct t *t) { return mpd2(t, pow); } int mppowf(struct t *t) { return mpf2(t, powf); }