Lines Matching refs:t
45 static int adjust_round(mpfr_t y, mpfr_t x, int t, int r) in adjust_round() argument
53 if (yp >= xp || r != MPFR_RNDN || t == 0 || !mpfr_number_p(x) || mpfr_zero_p(x)) { in adjust_round()
55 return t2 ? t2 : t; in adjust_round()
62 return t2 ? t2 : t; in adjust_round()
64 if (t > 0) in adjust_round()
71 static int adjust(mpfr_t mr, mpfr_t my, int t, int r, int type) in adjust() argument
76 t = adjust_round(mr, my, t, r); in adjust()
82 t = mpfr_check_range(mr, t, r); in adjust()
83 t = mpfr_subnormalize(mr, t, r); in adjust()
95 return t; in adjust()
118 static void genf(struct t *p, mpfr_t my, int t, int r) in genf() argument
123 t = adjust(mr, my, t, r, FLT); in genf()
141 static int mpf1(struct t *p, int (*fmp)(mpfr_t, const mpfr_t, mpfr_rnd_t)) in mpf1()
156 static int mpf2(struct t *p, int (*fmp)(mpfr_t, const mpfr_t, const mpfr_t, mpfr_rnd_t)) in mpf2()
172 static void gend(struct t *p, mpfr_t my, int t, int r) in gend() argument
177 t = adjust(mr, my, t, r, DBL); in gend()
195 static int mpd1(struct t *p, int (*fmp)(mpfr_t, const mpfr_t, mpfr_rnd_t)) in mpd1()
210 static int mpd2(struct t *p, int (*fmp)(mpfr_t, const mpfr_t, const mpfr_t, mpfr_rnd_t)) in mpd2()
227 static void genl(struct t *p, mpfr_t my, int t, int r) in genl() argument
232 t = adjust(mr, my, t, r, LDBL); in genl()
251 static int mpl1(struct t *p, int (*fmp)(mpfr_t, const mpfr_t, mpfr_rnd_t)) in mpl1()
272 static int mpl2(struct t *p, int (*fmp)(mpfr_t, const mpfr_t, const mpfr_t, mpfr_rnd_t)) in mpl2()
350 int mpsinpi(struct t *t) { return mpd1(t, wrap_sinpi); } in mpsinpi() argument
352 int mpadd(struct t *t) { return mpd2(t, mpfr_add); } in mpadd() argument
353 int mpaddf(struct t *t) { return mpf2(t, mpfr_add); } in mpaddf() argument
354 int mpaddl(struct t *t) { return mpl2(t, mpfr_add); } in mpaddl() argument
355 int mpmul(struct t *t) { return mpd2(t, mpfr_mul); } in mpmul() argument
356 int mpmulf(struct t *t) { return mpf2(t, mpfr_mul); } in mpmulf() argument
357 int mpmull(struct t *t) { return mpl2(t, mpfr_mul); } in mpmull() argument
358 int mpdiv(struct t *t) { return mpd2(t, mpfr_div); } in mpdiv() argument
359 int mpdivf(struct t *t) { return mpf2(t, mpfr_div); } in mpdivf() argument
360 int mpdivl(struct t *t) { return mpl2(t, mpfr_div); } in mpdivl() argument
362 int mpacos(struct t *t) { return mpd1(t, mpfr_acos); } in mpacos() argument
363 int mpacosf(struct t *t) { return mpf1(t, mpfr_acos); } in mpacosf() argument
364 int mpacosl(struct t *t) { return mpl1(t, mpfr_acos); } in mpacosl() argument
365 int mpacosh(struct t *t) { return mpd1(t, mpfr_acosh); } in mpacosh() argument
366 int mpacoshf(struct t *t) { return mpf1(t, mpfr_acosh); } in mpacoshf() argument
367 int mpacoshl(struct t *t) { return mpl1(t, mpfr_acosh); } in mpacoshl() argument
368 int mpasin(struct t *t) { return mpd1(t, mpfr_asin); } in mpasin() argument
369 int mpasinf(struct t *t) { return mpf1(t, mpfr_asin); } in mpasinf() argument
370 int mpasinl(struct t *t) { return mpl1(t, mpfr_asin); } in mpasinl() argument
371 int mpasinh(struct t *t) { return mpd1(t, mpfr_asinh); } in mpasinh() argument
372 int mpasinhf(struct t *t) { return mpf1(t, mpfr_asinh); } in mpasinhf() argument
373 int mpasinhl(struct t *t) { return mpl1(t, mpfr_asinh); } in mpasinhl() argument
374 int mpatan(struct t *t) { return mpd1(t, mpfr_atan); } in mpatan() argument
375 int mpatanf(struct t *t) { return mpf1(t, mpfr_atan); } in mpatanf() argument
376 int mpatanl(struct t *t) { return mpl1(t, mpfr_atan); } in mpatanl() argument
377 int mpatan2(struct t *t) { return mpd2(t, mpfr_atan2); } in mpatan2() argument
378 int mpatan2f(struct t *t) { return mpf2(t, mpfr_atan2); } in mpatan2f() argument
379 int mpatan2l(struct t *t) { return mpl2(t, mpfr_atan2); } in mpatan2l() argument
380 int mpatanh(struct t *t) { return mpd1(t, mpfr_atanh); } in mpatanh() argument
381 int mpatanhf(struct t *t) { return mpf1(t, mpfr_atanh); } in mpatanhf() argument
382 int mpatanhl(struct t *t) { return mpl1(t, mpfr_atanh); } in mpatanhl() argument
383 int mpcbrt(struct t *t) { return mpd1(t, mpfr_cbrt); } in mpcbrt() argument
384 int mpcbrtf(struct t *t) { return mpf1(t, mpfr_cbrt); } in mpcbrtf() argument
385 int mpcbrtl(struct t *t) { return mpl1(t, mpfr_cbrt); } in mpcbrtl() argument
386 int mpceil(struct t *t) { return mpd1(t, wrap_ceil); } in mpceil() argument
387 int mpceilf(struct t *t) { return mpf1(t, wrap_ceil); } in mpceilf() argument
388 int mpceill(struct t *t) { return mpl1(t, wrap_ceil); } in mpceill() argument
389 int mpcopysign(struct t *t) { return mpd2(t, mpfr_copysign); } in mpcopysign() argument
390 int mpcopysignf(struct t *t) { return mpf2(t, mpfr_copysign); } in mpcopysignf() argument
391 int mpcopysignl(struct t *t) { return mpl2(t, mpfr_copysign); } in mpcopysignl() argument
392 int mpcos(struct t *t) { return mpd1(t, mpfr_cos); } in mpcos() argument
393 int mpcosf(struct t *t) { return mpf1(t, mpfr_cos); } in mpcosf() argument
394 int mpcosl(struct t *t) { return mpl1(t, mpfr_cos); } in mpcosl() argument
395 int mpcosh(struct t *t) { return mpd1(t, mpfr_cosh); } in mpcosh() argument
396 int mpcoshf(struct t *t) { return mpf1(t, mpfr_cosh); } in mpcoshf() argument
397 int mpcoshl(struct t *t) { return mpl1(t, mpfr_cosh); } in mpcoshl() argument
398 int mperf(struct t *t) { return mpd1(t, mpfr_erf); } in mperf() argument
399 int mperff(struct t *t) { return mpf1(t, mpfr_erf); } in mperff() argument
400 int mperfl(struct t *t) { return mpl1(t, mpfr_erf); } in mperfl() argument
401 int mperfc(struct t *t) { return mpd1(t, mpfr_erfc); } in mperfc() argument
402 int mperfcf(struct t *t) { return mpf1(t, mpfr_erfc); } in mperfcf() argument
403 int mperfcl(struct t *t) { return mpl1(t, mpfr_erfc); } in mperfcl() argument
404 int mpexp(struct t *t) { return mpd1(t, mpfr_exp); } in mpexp() argument
405 int mpexpf(struct t *t) { return mpf1(t, mpfr_exp); } in mpexpf() argument
406 int mpexpl(struct t *t) { return mpl1(t, mpfr_exp); } in mpexpl() argument
407 int mpexp2(struct t *t) { return mpd1(t, mpfr_exp2); } in mpexp2() argument
408 int mpexp2f(struct t *t) { return mpf1(t, mpfr_exp2); } in mpexp2f() argument
409 int mpexp2l(struct t *t) { return mpl1(t, mpfr_exp2); } in mpexp2l() argument
410 int mpexpm1(struct t *t) { return mpd1(t, mpfr_expm1); } in mpexpm1() argument
411 int mpexpm1f(struct t *t) { return mpf1(t, mpfr_expm1); } in mpexpm1f() argument
412 int mpexpm1l(struct t *t) { return mpl1(t, mpfr_expm1); } in mpexpm1l() argument
413 int mpfabs(struct t *t) { return mpd1(t, mpfr_abs); } in mpfabs() argument
414 int mpfabsf(struct t *t) { return mpf1(t, mpfr_abs); } in mpfabsf() argument
415 int mpfabsl(struct t *t) { return mpl1(t, mpfr_abs); } in mpfabsl() argument
416 int mpfdim(struct t *t) { return mpd2(t, mpfr_dim); } in mpfdim() argument
417 int mpfdimf(struct t *t) { return mpf2(t, mpfr_dim); } in mpfdimf() argument
418 int mpfdiml(struct t *t) { return mpl2(t, mpfr_dim); } in mpfdiml() argument
419 int mpfloor(struct t *t) { return mpd1(t, wrap_floor); } in mpfloor() argument
420 int mpfloorf(struct t *t) { return mpf1(t, wrap_floor); } in mpfloorf() argument
421 int mpfloorl(struct t *t) { return mpl1(t, wrap_floor); } in mpfloorl() argument
422 int mpfmax(struct t *t) { return mpd2(t, mpfr_max); } in mpfmax() argument
423 int mpfmaxf(struct t *t) { return mpf2(t, mpfr_max); } in mpfmaxf() argument
424 int mpfmaxl(struct t *t) { return mpl2(t, mpfr_max); } in mpfmaxl() argument
425 int mpfmin(struct t *t) { return mpd2(t, mpfr_min); } in mpfmin() argument
426 int mpfminf(struct t *t) { return mpf2(t, mpfr_min); } in mpfminf() argument
427 int mpfminl(struct t *t) { return mpl2(t, mpfr_min); } in mpfminl() argument
428 int mpfmod(struct t *t) { return mpd2(t, mpfr_fmod); } in mpfmod() argument
429 int mpfmodf(struct t *t) { return mpf2(t, mpfr_fmod); } in mpfmodf() argument
430 int mpfmodl(struct t *t) { return mpl2(t, mpfr_fmod); } in mpfmodl() argument
431 int mphypot(struct t *t) { return mpd2(t, mpfr_hypot); } in mphypot() argument
432 int mphypotf(struct t *t) { return mpf2(t, mpfr_hypot); } in mphypotf() argument
433 int mphypotl(struct t *t) { return mpl2(t, mpfr_hypot); } in mphypotl() argument
434 int mplgamma(struct t *t) { return mpd1(t, wrap_lgamma) || (t->i = mplgamma_sign, 0); } in mplgamma() argument
435 int mplgammaf(struct t *t) { return mpf1(t, wrap_lgamma) || (t->i = mplgamma_sign, 0); } in mplgammaf() argument
436 int mplgammal(struct t *t) { return mpl1(t, wrap_lgamma) || (t->i = mplgamma_sign, 0); } in mplgammal() argument
437 int mplog(struct t *t) { return mpd1(t, mpfr_log); } in mplog() argument
438 int mplogf(struct t *t) { return mpf1(t, mpfr_log); } in mplogf() argument
439 int mplogl(struct t *t) { return mpl1(t, mpfr_log); } in mplogl() argument
440 int mplog10(struct t *t) { return mpd1(t, mpfr_log10); } in mplog10() argument
441 int mplog10f(struct t *t) { return mpf1(t, mpfr_log10); } in mplog10f() argument
442 int mplog10l(struct t *t) { return mpl1(t, mpfr_log10); } in mplog10l() argument
443 int mplog1p(struct t *t) { return mpd1(t, mpfr_log1p); } in mplog1p() argument
444 int mplog1pf(struct t *t) { return mpf1(t, mpfr_log1p); } in mplog1pf() argument
445 int mplog1pl(struct t *t) { return mpl1(t, mpfr_log1p); } in mplog1pl() argument
446 int mplog2(struct t *t) { return mpd1(t, mpfr_log2); } in mplog2() argument
447 int mplog2f(struct t *t) { return mpf1(t, mpfr_log2); } in mplog2f() argument
448 int mplog2l(struct t *t) { return mpl1(t, mpfr_log2); } in mplog2l() argument
449 int mplogb(struct t *t) in mplogb() argument
453 t->dy = 0; in mplogb()
454 t->e = 0; in mplogb()
455 if (t->x == 0) { in mplogb()
456 t->y = -INFINITY; in mplogb()
457 t->e |= DIVBYZERO; in mplogb()
460 if (isinf(t->x)) { in mplogb()
461 t->y = INFINITY; in mplogb()
464 if (isnan(t->x)) { in mplogb()
465 t->y = t->x; in mplogb()
468 mpfr_set_d(mx, t->x, MPFR_RNDN); in mplogb()
469 t->y = mpfr_get_exp(mx) - 1; in mplogb()
472 int mplogbf(struct t *t) in mplogbf() argument
476 t->dy = 0; in mplogbf()
477 t->e = 0; in mplogbf()
478 if (t->x == 0) { in mplogbf()
479 t->y = -INFINITY; in mplogbf()
480 t->e |= DIVBYZERO; in mplogbf()
483 if (isinf(t->x)) { in mplogbf()
484 t->y = INFINITY; in mplogbf()
487 if (isnan(t->x)) { in mplogbf()
488 t->y = t->x; in mplogbf()
491 mpfr_set_flt(mx, t->x, MPFR_RNDN); in mplogbf()
492 t->y = mpfr_get_exp(mx) - 1; in mplogbf()
495 int mplogbl(struct t *t) in mplogbl() argument
499 t->dy = 0; in mplogbl()
500 t->e = 0; in mplogbl()
501 if (t->x == 0) { in mplogbl()
502 t->y = -INFINITY; in mplogbl()
503 t->e |= DIVBYZERO; in mplogbl()
506 if (isinf(t->x)) { in mplogbl()
507 t->y = INFINITY; in mplogbl()
510 if (isnan(t->x)) { in mplogbl()
511 t->y = t->x; in mplogbl()
514 mpfr_set_ld(mx, t->x, MPFR_RNDN); in mplogbl()
515 t->y = mpfr_get_exp(mx) - 1; in mplogbl()
518 int mpnearbyint(struct t *t) { return mpd1(t, wrap_nearbyint) || (t->e&=~INEXACT, 0); } in mpnearbyint() argument
519 int mpnearbyintf(struct t *t) { return mpf1(t, wrap_nearbyint) || (t->e&=~INEXACT, 0); } in mpnearbyintf() argument
520 int mpnearbyintl(struct t *t) { return mpl1(t, wrap_nearbyint) || (t->e&=~INEXACT, 0); } in mpnearbyintl() argument
522 int mpnextafter(struct t *t) in mpnextafter() argument
525 t->y = nextafter(t->x, t->x2); in mpnextafter()
526 t->e = getexcept(); in mpnextafter()
527 t->dy = 0; in mpnextafter()
530 int mpnextafterf(struct t *t) in mpnextafterf() argument
533 t->y = nextafterf(t->x, t->x2); in mpnextafterf()
534 t->e = getexcept(); in mpnextafterf()
535 t->dy = 0; in mpnextafterf()
538 int mpnextafterl(struct t *t) in mpnextafterl() argument
541 t->y = nextafterl(t->x, t->x2); in mpnextafterl()
542 t->e = getexcept(); in mpnextafterl()
543 t->dy = 0; in mpnextafterl()
546 int mpnexttoward(struct t *t) in mpnexttoward() argument
549 t->y = nexttoward(t->x, t->x2); in mpnexttoward()
550 t->e = getexcept(); in mpnexttoward()
551 t->dy = 0; in mpnexttoward()
554 int mpnexttowardf(struct t *t) in mpnexttowardf() argument
557 t->y = nexttowardf(t->x, t->x2); in mpnexttowardf()
558 t->e = getexcept(); in mpnexttowardf()
559 t->dy = 0; in mpnexttowardf()
562 int mpnexttowardl(struct t *t) { return mpnextafterl(t); } in mpnexttowardl() argument
563 int mppow(struct t *t) { return mpd2(t, mpfr_pow); } in mppow() argument
564 int mppowf(struct t *t) { return mpf2(t, mpfr_pow); } in mppowf() argument
565 int mppowl(struct t *t) { return mpl2(t, mpfr_pow); } in mppowl() argument
566 int mpremainder(struct t *t) { return mpd2(t, mpfr_remainder); } in mpremainder() argument
567 int mpremainderf(struct t *t) { return mpf2(t, mpfr_remainder); } in mpremainderf() argument
568 int mpremainderl(struct t *t) { return mpl2(t, mpfr_remainder); } in mpremainderl() argument
569 int mprint(struct t *t) { return mpd1(t, mpfr_rint); } in mprint() argument
570 int mprintf(struct t *t) { return mpf1(t, mpfr_rint); } in mprintf() argument
571 int mprintl(struct t *t) { return mpl1(t, mpfr_rint); } in mprintl() argument
572 int mpround(struct t *t) { return mpd1(t, wrap_round); } in mpround() argument
573 int mproundf(struct t *t) { return mpf1(t, wrap_round); } in mproundf() argument
574 int mproundl(struct t *t) { return mpl1(t, wrap_round); } in mproundl() argument
575 int mpsin(struct t *t) { return mpd1(t, mpfr_sin); } in mpsin() argument
576 int mpsinf(struct t *t) { return mpf1(t, mpfr_sin); } in mpsinf() argument
577 int mpsinl(struct t *t) { return mpl1(t, mpfr_sin); } in mpsinl() argument
578 int mpsinh(struct t *t) { return mpd1(t, mpfr_sinh); } in mpsinh() argument
579 int mpsinhf(struct t *t) { return mpf1(t, mpfr_sinh); } in mpsinhf() argument
580 int mpsinhl(struct t *t) { return mpl1(t, mpfr_sinh); } in mpsinhl() argument
581 int mpsqrt(struct t *t) { return mpd1(t, mpfr_sqrt); } in mpsqrt() argument
582 int mpsqrtf(struct t *t) { return mpf1(t, mpfr_sqrt); } in mpsqrtf() argument
583 int mpsqrtl(struct t *t) { return mpl1(t, mpfr_sqrt); } in mpsqrtl() argument
584 int mptan(struct t *t) { return mpd1(t, mpfr_tan); } in mptan() argument
585 int mptanf(struct t *t) { return mpf1(t, mpfr_tan); } in mptanf() argument
586 int mptanl(struct t *t) { return mpl1(t, mpfr_tan); } in mptanl() argument
587 int mptanh(struct t *t) { return mpd1(t, mpfr_tanh); } in mptanh() argument
588 int mptanhf(struct t *t) { return mpf1(t, mpfr_tanh); } in mptanhf() argument
589 int mptanhl(struct t *t) { return mpl1(t, mpfr_tanh); } in mptanhl() argument
591 int mptgamma(struct t *t) { return mpd1(t, mpfr_gamma); } in mptgamma() argument
592 int mptgammaf(struct t *t) { return mpf1(t, mpfr_gamma); } in mptgammaf() argument
593 int mptgammal(struct t *t) { return mpl1(t, mpfr_gamma); } in mptgammal() argument
594 int mptrunc(struct t *t) { return mpd1(t, wrap_trunc); } in mptrunc() argument
595 int mptruncf(struct t *t) { return mpf1(t, wrap_trunc); } in mptruncf() argument
596 int mptruncl(struct t *t) { return mpl1(t, wrap_trunc); } in mptruncl() argument
597 int mpj0(struct t *t) { return mpd1(t, mpfr_j0); } in mpj0() argument
598 int mpj1(struct t *t) { return mpd1(t, mpfr_j1); } in mpj1() argument
599 int mpy0(struct t *t) { return mpd1(t, mpfr_y0); } in mpy0() argument
600 int mpy1(struct t *t) { return mpd1(t, mpfr_y1); } in mpy1() argument
602 int mpscalb(struct t *t) in mpscalb() argument
604 setupfenv(t->r); in mpscalb()
605 t->y = scalb(t->x, t->x2); in mpscalb()
606 t->e = getexcept(); in mpscalb()
607 t->dy = 0; // wrong in mpscalb()
610 int mpscalbf(struct t *t) in mpscalbf() argument
612 setupfenv(t->r); in mpscalbf()
613 t->y = scalbf(t->x, t->x2); in mpscalbf()
614 t->e = getexcept(); in mpscalbf()
615 t->dy = 0; // wrong in mpscalbf()
618 int mpj0f(struct t *t) { return mpf1(t, mpfr_j0); } in mpj0f() argument
619 int mpj0l(struct t *t) { return mpl1(t, mpfr_j0); } in mpj0l() argument
620 int mpj1f(struct t *t) { return mpf1(t, mpfr_j1); } in mpj1f() argument
621 int mpj1l(struct t *t) { return mpl1(t, mpfr_j1); } in mpj1l() argument
622 int mpy0f(struct t *t) { return mpf1(t, mpfr_y0); } in mpy0f() argument
623 int mpy0l(struct t *t) { return mpl1(t, mpfr_y0); } in mpy0l() argument
624 int mpy1f(struct t *t) { return mpf1(t, mpfr_y1); } in mpy1f() argument
625 int mpy1l(struct t *t) { return mpl1(t, mpfr_y1); } in mpy1l() argument
626 int mpexp10(struct t *t) { return mpd1(t, wrap_pow10); } in mpexp10() argument
627 int mpexp10f(struct t *t) { return mpf1(t, wrap_pow10); } in mpexp10f() argument
628 int mpexp10l(struct t *t) { return mpl1(t, wrap_pow10); } in mpexp10l() argument
629 int mppow10(struct t *t) { return mpd1(t, wrap_pow10); } in mppow10() argument
630 int mppow10f(struct t *t) { return mpf1(t, wrap_pow10); } in mppow10f() argument
631 int mppow10l(struct t *t) { return mpl1(t, wrap_pow10); } in mppow10l() argument
633 int mpfrexp(struct t *t) in mpfrexp() argument
639 t->dy = 0; in mpfrexp()
640 t->y = 0; in mpfrexp()
642 mpfr_set_d(mx, t->x, MPFR_RNDN); in mpfrexp()
643 k = mpfr_frexp(&e, mx, mx, t->r); in mpfrexp()
644 t->y = mpfr_get_d(mx, MPFR_RNDN); in mpfrexp()
645 t->i = e; in mpfrexp()
646 t->e = eflags(isnan(t->x)); in mpfrexp()
650 int mpfrexpf(struct t *t) in mpfrexpf() argument
656 t->dy = 0; in mpfrexpf()
657 t->y = 0; in mpfrexpf()
659 mpfr_set_flt(mx, t->x, MPFR_RNDN); in mpfrexpf()
660 k = mpfr_frexp(&e, mx, mx, t->r); in mpfrexpf()
661 t->y = mpfr_get_flt(mx, MPFR_RNDN); in mpfrexpf()
662 t->i = e; in mpfrexpf()
663 t->e = eflags(isnan(t->x)); in mpfrexpf()
667 int mpfrexpl(struct t *t) in mpfrexpl() argument
673 t->dy = 0; in mpfrexpl()
674 t->y = 0; in mpfrexpl()
676 mpfr_set_ld(mx, t->x, MPFR_RNDN); in mpfrexpl()
677 k = mpfr_frexp(&e, mx, mx, t->r); in mpfrexpl()
678 t->y = mpfr_get_ld(mx, MPFR_RNDN); in mpfrexpl()
679 t->i = e; in mpfrexpl()
680 t->e = eflags(isnan(t->x)); in mpfrexpl()
684 int mpldexp(struct t *t) in mpldexp() argument
689 t->dy = 0; in mpldexp()
690 t->y = 0; in mpldexp()
692 mpfr_set_d(mx, t->x, MPFR_RNDN); in mpldexp()
693 k = mpfr_mul_2si(mx, mx, t->i, t->r); in mpldexp()
694 adjust(mx, mx, k, t->r, DBL); in mpldexp()
695 t->y = mpfr_get_d(mx, MPFR_RNDN); in mpldexp()
696 t->e = eflags(isnan(t->x)); in mpldexp()
700 int mpldexpf(struct t *t) in mpldexpf() argument
705 t->dy = 0; in mpldexpf()
706 t->y = 0; in mpldexpf()
708 mpfr_set_flt(mx, t->x, MPFR_RNDN); in mpldexpf()
709 k = mpfr_mul_2si(mx, mx, t->i, t->r); in mpldexpf()
710 adjust(mx, mx, k, t->r, FLT); in mpldexpf()
711 t->y = mpfr_get_flt(mx, MPFR_RNDN); in mpldexpf()
712 t->e = eflags(isnan(t->x)); in mpldexpf()
716 int mpldexpl(struct t *t) in mpldexpl() argument
721 t->dy = 0; in mpldexpl()
722 t->y = 0; in mpldexpl()
724 mpfr_set_ld(mx, t->x, MPFR_RNDN); in mpldexpl()
725 k = mpfr_mul_2si(mx, mx, t->i, t->r); in mpldexpl()
726 adjust(mx, mx, k, t->r, LDBL); in mpldexpl()
727 t->y = mpfr_get_ld(mx, MPFR_RNDN); in mpldexpl()
728 t->e = eflags(isnan(t->x)); in mpldexpl()
732 int mpscalbn(struct t *t) { return mpldexp(t); } in mpscalbn() argument
733 int mpscalbnf(struct t *t) { return mpldexpf(t); } in mpscalbnf() argument
734 int mpscalbnl(struct t *t) { return mpldexpl(t); } in mpscalbnl() argument
735 int mpscalbln(struct t *t) { return mpldexp(t); } in mpscalbln() argument
736 int mpscalblnf(struct t *t) { return mpldexpf(t); } in mpscalblnf() argument
737 int mpscalblnl(struct t *t) { return mpldexpl(t); } in mpscalblnl() argument
739 int mplgamma_r(struct t *t) { return mplgamma(t); } in mplgamma_r() argument
740 int mplgammaf_r(struct t *t) { return mplgammaf(t); } in mplgammaf_r() argument
741 int mplgammal_r(struct t *t) { return mplgammal(t); } in mplgammal_r() argument
743 int mpilogb(struct t *t) in mpilogb() argument
747 mpfr_set_d(mx, t->x, MPFR_RNDN); in mpilogb()
748 t->i = mpfr_get_exp(mx) - 1; in mpilogb()
749 t->e = 0; in mpilogb()
750 if (isinf(t->x) || isnan(t->x) || t->x == 0) in mpilogb()
751 t->e = INVALID; in mpilogb()
754 int mpilogbf(struct t *t) in mpilogbf() argument
758 mpfr_set_flt(mx, t->x, MPFR_RNDN); in mpilogbf()
759 t->i = mpfr_get_exp(mx) - 1; in mpilogbf()
760 t->e = 0; in mpilogbf()
761 if (isinf(t->x) || isnan(t->x) || t->x == 0) in mpilogbf()
762 t->e = INVALID; in mpilogbf()
765 int mpilogbl(struct t *t) in mpilogbl() argument
769 mpfr_set_ld(mx, t->x, MPFR_RNDN); in mpilogbl()
770 t->i = mpfr_get_exp(mx) - 1; in mpilogbl()
771 t->e = 0; in mpilogbl()
772 if (isinf(t->x) || isnan(t->x) || t->x == 0) in mpilogbl()
773 t->e = INVALID; in mpilogbl()
779 int mp##n(struct t *t) \
781 setupfenv(t->r); \
782 t->i = n(t->x); \
783 t->e = getexcept(); \
784 if (t->e & INVALID) \
785 t->i = 0; \
802 int mpmodf(struct t *t) in mp_f_i()
806 r = mpd1(t, wrap_trunc); in mp_f_i()
809 t->y2 = t->y; in mp_f_i()
810 t->dy2 = t->dy; in mp_f_i()
811 e = t->e & ~INEXACT; in mp_f_i()
812 r = mpd1(t, mpfr_frac); in mp_f_i()
813 t->e |= e; in mp_f_i()
817 int mpmodff(struct t *t) in mpmodff() argument
821 r = mpf1(t, wrap_trunc); in mpmodff()
824 t->y2 = t->y; in mpmodff()
825 t->dy2 = t->dy; in mpmodff()
826 e = t->e & ~INEXACT; in mpmodff()
827 r = mpf1(t, mpfr_frac); in mpmodff()
828 t->e |= e; in mpmodff()
832 int mpmodfl(struct t *t) in mpmodfl() argument
836 r = mpl1(t, wrap_trunc); in mpmodfl()
839 t->y2 = t->y; in mpmodfl()
840 t->dy2 = t->dy; in mpmodfl()
841 e = t->e & ~INEXACT; in mpmodfl()
842 r = mpl1(t, mpfr_frac); in mpmodfl()
843 t->e |= e; in mpmodfl()
847 int mpsincos(struct t *t) in mpsincos() argument
851 r = mpd1(t, mpfr_cos); in mpsincos()
854 t->y2 = t->y; in mpsincos()
855 t->dy2 = t->dy; in mpsincos()
856 e = t->e; in mpsincos()
857 r = mpd1(t, mpfr_sin); in mpsincos()
858 t->e |= e; in mpsincos()
862 int mpsincosf(struct t *t) in mpsincosf() argument
866 r = mpf1(t, mpfr_cos); in mpsincosf()
869 t->y2 = t->y; in mpsincosf()
870 t->dy2 = t->dy; in mpsincosf()
871 e = t->e; in mpsincosf()
872 r = mpf1(t, mpfr_sin); in mpsincosf()
873 t->e |= e; in mpsincosf()
877 int mpsincosl(struct t *t) in mpsincosl() argument
881 r = mpl1(t, mpfr_cos); in mpsincosl()
884 t->y2 = t->y; in mpsincosl()
885 t->dy2 = t->dy; in mpsincosl()
886 e = t->e; in mpsincosl()
887 r = mpl1(t, mpfr_sin); in mpsincosl()
888 t->e |= e; in mpsincosl()
892 int mpremquo(struct t *t) { return mpd2(t, wrap_remquo) || (t->i = mpremquo_q, 0); } in mpremquo() argument
893 int mpremquof(struct t *t) { return mpf2(t, wrap_remquo) || (t->i = mpremquo_q, 0); } in mpremquof() argument
894 int mpremquol(struct t *t) { return mpl2(t, wrap_remquo) || (t->i = mpremquo_q, 0); } in mpremquol() argument
896 int mpfma(struct t *t) in mpfma() argument
899 int r = rmap(t->r); in mpfma()
906 mpfr_set_d(mx, t->x, MPFR_RNDN); in mpfma()
907 mpfr_set_d(mx2, t->x2, MPFR_RNDN); in mpfma()
908 mpfr_set_d(mx3, t->x3, MPFR_RNDN); in mpfma()
910 gend(t, my, tn, r); in mpfma()
914 int mpfmaf(struct t *t) in mpfmaf() argument
917 int r = rmap(t->r); in mpfmaf()
924 mpfr_set_flt(mx, t->x, MPFR_RNDN); in mpfmaf()
925 mpfr_set_flt(mx2, t->x2, MPFR_RNDN); in mpfmaf()
926 mpfr_set_flt(mx3, t->x3, MPFR_RNDN); in mpfmaf()
928 genf(t, my, tn, r); in mpfmaf()
932 int mpfmal(struct t *t) in mpfmal() argument
935 return mpfma(t); in mpfmal()
938 int r = rmap(t->r); in mpfmal()
945 mpfr_set_ld(mx, t->x, MPFR_RNDN); in mpfmal()
946 mpfr_set_ld(mx2, t->x2, MPFR_RNDN); in mpfmal()
947 mpfr_set_ld(mx3, t->x3, MPFR_RNDN); in mpfmal()
949 genl(t, my, tn, r); in mpfmal()
956 int mpjn(struct t *t) { mpbessel_n = t->i; return mpd1(t, wrap_jn); } in mpjn() argument
957 int mpjnf(struct t *t) { mpbessel_n = t->i; return mpf1(t, wrap_jn); } in mpjnf() argument
958 int mpjnl(struct t *t) { mpbessel_n = t->i; return mpl1(t, wrap_jn); } in mpjnl() argument
959 int mpyn(struct t *t) { mpbessel_n = t->i; return mpd1(t, wrap_yn); } in mpyn() argument
960 int mpynf(struct t *t) { mpbessel_n = t->i; return mpf1(t, wrap_yn); } in mpynf() argument
961 int mpynl(struct t *t) { mpbessel_n = t->i; return mpl1(t, wrap_yn); } in mpynl() argument