Path: blob/main/tools/regression/include/tgmath/tgmath.c
48249 views
/*-1* Copyright (c) 2004 Stefan Farfeleder <[email protected]>2* All rights reserved.3*4* Redistribution and use in source and binary forms, with or without5* modification, are permitted provided that the following conditions6* are met:7* 1. Redistributions of source code must retain the above copyright8* notice, this list of conditions and the following disclaimer.9* 2. Redistributions in binary form must reproduce the above copyright10* notice, this list of conditions and the following disclaimer in the11* documentation and/or other materials provided with the distribution.12*13* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND14* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE15* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE16* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE17* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL18* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS19* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)20* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT21* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY22* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF23* SUCH DAMAGE.24*/2526#include <sys/cdefs.h>27/* All of our functions have side effects, __pure2 causes functions calls to28* be optimised away. Stop that. */29#undef __pure230#define __pure23132#include <assert.h>33#include <stdio.h>34#include <tgmath.h>3536int n_float, n_double, n_long_double;37int n_float_complex, n_double_complex, n_long_double_complex;3839int currtest = 0;4041#define TGMACRO(FNC) \42TGMACRO_REAL(FNC) \43TGMACRO_COMPLEX(c ## FNC)4445#define TGMACRO_REAL(FNC) \46float (FNC ## f)(float x) { n_float++; } \47double (FNC)(double x) { n_double++; } \48long double (FNC ## l)(long double x) { n_long_double++; }4950#define TGMACRO_REAL_REAL(FNC) \51float (FNC ## f)(float x, float y) { n_float++; } \52double (FNC)(double x, double y) { n_double++; } \53long double \54(FNC ## l)(long double x, long double y) { n_long_double++; }5556#define TGMACRO_REAL_FIXED_RET(FNC, TYPE) \57TYPE (FNC ## f)(float x) { n_float++; } \58TYPE (FNC)(double x) { n_double++; } \59TYPE (FNC ## l)(long double x) { n_long_double++; }6061#define TGMACRO_COMPLEX(FNC) \62float complex (FNC ## f)(float complex x) { n_float_complex++; }\63double complex (FNC)(double complex x) { n_double_complex++; } \64long double complex \65(FNC ## l)(long double complex x) { n_long_double_complex++; }6667#define TGMACRO_COMPLEX_REAL_RET(FNC) \68float (FNC ## f)(float complex x) { n_float_complex++; } \69double (FNC)(double complex x) { n_double_complex++; } \70long double \71(FNC ## l)(long double complex x) { n_long_double_complex++; }727374/* 7.22#4 */75TGMACRO(acos)76TGMACRO(asin)77TGMACRO(atan)78TGMACRO(acosh)79TGMACRO(asinh)80TGMACRO(atanh)81TGMACRO(cos)82TGMACRO(sin)83TGMACRO(tan)84TGMACRO(cosh)85TGMACRO(sinh)86TGMACRO(tanh)87TGMACRO(exp)88TGMACRO(log)89TGMACRO_REAL_REAL(pow)90float complex (cpowf)(float complex x, float complex y) { n_float_complex++; }91double complex92(cpow)(double complex x, double complex y) { n_double_complex++; }93long double complex94(cpowl)(long double complex x, long double complex y)95{ n_long_double_complex++; }96TGMACRO(sqrt)97TGMACRO_REAL(fabs)98TGMACRO_COMPLEX_REAL_RET(cabs)99100/* 7.22#5 */101TGMACRO_REAL_REAL(atan2)102TGMACRO_REAL(cbrt)103TGMACRO_REAL(ceil)104TGMACRO_REAL_REAL(copysign)105TGMACRO_REAL(erf)106TGMACRO_REAL(erfc)107TGMACRO_REAL(exp2)108TGMACRO_REAL(expm1)109TGMACRO_REAL_REAL(fdim)110TGMACRO_REAL(floor)111float (fmaf)(float x, float y, float z) { n_float++; }112double (fma)(double x, double y, double z) { n_double++; }113long double114(fmal)(long double x, long double y, long double z) { n_long_double++; }115TGMACRO_REAL_REAL(fmax)116TGMACRO_REAL_REAL(fmin)117TGMACRO_REAL_REAL(fmod)118float (frexpf)(float x, int *e) { n_float++; }119double (frexp)(double x, int *e) { n_double++; }120long double (frexpl)(long double x, int *e) { n_long_double++; }121TGMACRO_REAL_REAL(hypot)122TGMACRO_REAL_FIXED_RET(ilogb, int)123float (ldexpf)(float x, int e) { n_float++; }124double (ldexp)(double x, int e) { n_double++; }125long double (ldexpl)(long double x, int e) { n_long_double++; }126TGMACRO_REAL(lgamma)127TGMACRO_REAL_FIXED_RET(llrint, long long)128TGMACRO_REAL_FIXED_RET(llround, long long)129TGMACRO_REAL(log10)130TGMACRO_REAL(log1p)131TGMACRO_REAL(log2)132TGMACRO_REAL(logb)133TGMACRO_REAL_FIXED_RET(lrint, long)134TGMACRO_REAL_FIXED_RET(lround, long)135TGMACRO_REAL(nearbyint)136TGMACRO_REAL_REAL(nextafter)137float (nexttowardf)(float x, long double y) { n_float++; }138double (nexttoward)(double x, long double y) { n_double++; }139long double (nexttowardl)(long double x, long double y) { n_long_double++; }140TGMACRO_REAL_REAL(remainder)141float (remquof)(float x, float y, int *q) { n_float++; }142double (remquo)(double x, double y, int *q) { n_double++; }143long double (remquol)(long double x, long double y, int *q) { n_long_double++; }144TGMACRO_REAL(rint)145TGMACRO_REAL(round)146float (scalbnf)(float x, int n) { n_float++; }147double (scalbn)(double x, int n) { n_double++; }148long double (scalbnl)(long double x, int n) { n_long_double++; }149float (scalblnf)(float x, long n) { n_float++; }150double (scalbln)(double x, long n) { n_double++; }151long double (scalblnl)(long double x, long n) { n_long_double++; }152TGMACRO_REAL(tgamma)153TGMACRO_REAL(trunc)154155/* 7.22#6 */156TGMACRO_COMPLEX_REAL_RET(carg)157TGMACRO_COMPLEX_REAL_RET(cimag)158TGMACRO_COMPLEX(conj)159TGMACRO_COMPLEX(cproj)160TGMACRO_COMPLEX_REAL_RET(creal)161162163long double ld;164double d;165float f;166long double complex ldc;167double complex dc;168float complex fc;169unsigned long long ull;170int i;171_Bool b;172173#define SAMETYPE(EXP, TYPE) \174__builtin_types_compatible_p(__typeof__(EXP), TYPE)175176#define CLEAR_COUNTERS \177(n_float = n_double = n_long_double = 0, \178n_float_complex = n_double_complex = n_long_double_complex = 0, 1)179180#define RUN_TEST(EXP, TYPE) (EXP, SAMETYPE(EXP, TYPE))181182#define PASS_REAL_ARG_REAL_RET(FNC) PASS_REAL_ARG_REAL_RET_(FNC,)183184#define PASS_REAL_ARG_REAL_RET_(FNC, SUFFIX) \185CLEAR_COUNTERS && \186RUN_TEST(FNC(1.l), long double) && \187RUN_TEST(FNC(ld), long double) && \188n_long_double ## SUFFIX == 2 && \189RUN_TEST(FNC(1.), double) && \190RUN_TEST(FNC(d), double) && \191RUN_TEST(FNC(1ull), double) && \192RUN_TEST(FNC(ull), double) && \193RUN_TEST(FNC(1), double) && \194RUN_TEST(FNC(i), double) && \195RUN_TEST(FNC((_Bool)0), double) && \196RUN_TEST(FNC(b), double) && \197n_double ## SUFFIX == 8 && \198RUN_TEST(FNC(1.f), float) && \199RUN_TEST(FNC(f), float) && \200n_float ## SUFFIX == 2201202#define PASS_REAL_ARG_FIXED_RET(FNC, RET) \203CLEAR_COUNTERS && \204RUN_TEST(FNC(1.l), RET) && \205RUN_TEST(FNC(ld), RET) && \206n_long_double == 2 && \207RUN_TEST(FNC(1.), RET) && \208RUN_TEST(FNC(d), RET) && \209RUN_TEST(FNC(1ull), RET) && \210RUN_TEST(FNC(ull), RET) && \211RUN_TEST(FNC(1), RET) && \212RUN_TEST(FNC(i), RET) && \213RUN_TEST(FNC((_Bool)0), RET) && \214RUN_TEST(FNC(b), RET) && \215n_double == 8 && \216RUN_TEST(FNC(1.f), RET) && \217RUN_TEST(FNC(f), RET) && \218n_float == 2219220#define PASS_REAL_FIXED_ARG_REAL_RET(FNC, ARG2) \221CLEAR_COUNTERS && \222RUN_TEST(FNC(1.l, ARG2), long double) && \223RUN_TEST(FNC(ld, ARG2), long double) && \224n_long_double == 2 && \225RUN_TEST(FNC(1., ARG2), double) && \226RUN_TEST(FNC(d, ARG2), double) && \227RUN_TEST(FNC(1ull, ARG2), double) && \228RUN_TEST(FNC(ull, ARG2), double) && \229RUN_TEST(FNC(1, ARG2), double) && \230RUN_TEST(FNC(i, ARG2), double) && \231RUN_TEST(FNC((_Bool)0, ARG2), double) && \232RUN_TEST(FNC(b, ARG2), double) && \233n_double == 8 && \234RUN_TEST(FNC(1.f, ARG2), float) && \235RUN_TEST(FNC(f, ARG2), float) && \236n_float == 2237238#define PASS_REAL_REAL_ARG_REAL_RET(FNC) \239CLEAR_COUNTERS && \240RUN_TEST(FNC(1.l, 1.l), long double) && \241RUN_TEST(FNC(1.l, 1.), long double) && \242RUN_TEST(FNC(1.l, 1.f), long double) && \243RUN_TEST(FNC(1.l, 1), long double) && \244RUN_TEST(FNC(1.l, (_Bool)0), long double) && \245RUN_TEST(FNC(1.l, ld), long double) && \246RUN_TEST(FNC(1., ld), long double) && \247RUN_TEST(FNC(1.f, ld), long double) && \248RUN_TEST(FNC(1, ld), long double) && \249RUN_TEST(FNC((_Bool)0, ld), long double) && \250n_long_double == 10 && \251RUN_TEST(FNC(d, 1.), double) && \252RUN_TEST(FNC(d, 1.f), double) && \253RUN_TEST(FNC(d, 1l), double) && \254RUN_TEST(FNC(d, (_Bool)0), double) && \255RUN_TEST(FNC(1., 1.), double) && \256RUN_TEST(FNC(1.f, 1.), double) && \257RUN_TEST(FNC(1l, 1.), double) && \258RUN_TEST(FNC((_Bool)0, 1.), double) && \259RUN_TEST(FNC(1ull, f), double) && \260RUN_TEST(FNC(1.f, ull), double) && \261RUN_TEST(FNC(1, 1l), double) && \262RUN_TEST(FNC(1u, i), double) && \263RUN_TEST(FNC((_Bool)0, 1.f), double) && \264RUN_TEST(FNC(1.f, b), double) && \265n_double == 14 && \266RUN_TEST(FNC(1.f, 1.f), float) && \267RUN_TEST(FNC(1.f, 1.f), float) && \268RUN_TEST(FNC(f, 1.f), float) && \269RUN_TEST(FNC(f, f), float) && \270n_float == 4271272#define PASS_REAL_REAL_FIXED_ARG_REAL_RET(FNC, ARG3) \273CLEAR_COUNTERS && \274RUN_TEST(FNC(1.l, 1.l, ARG3), long double) && \275RUN_TEST(FNC(1.l, 1., ARG3), long double) && \276RUN_TEST(FNC(1.l, 1.f, ARG3), long double) && \277RUN_TEST(FNC(1.l, 1, ARG3), long double) && \278RUN_TEST(FNC(1.l, (_Bool)0, ARG3), long double) && \279RUN_TEST(FNC(1.l, ld, ARG3), long double) && \280RUN_TEST(FNC(1., ld, ARG3), long double) && \281RUN_TEST(FNC(1.f, ld, ARG3), long double) && \282RUN_TEST(FNC(1, ld, ARG3), long double) && \283RUN_TEST(FNC((_Bool)0, ld, ARG3), long double) && \284n_long_double == 10 && \285RUN_TEST(FNC(d, 1., ARG3), double) && \286RUN_TEST(FNC(d, 1.f, ARG3), double) && \287RUN_TEST(FNC(d, 1l, ARG3), double) && \288RUN_TEST(FNC(d, (_Bool)0, ARG3), double) && \289RUN_TEST(FNC(1., 1., ARG3), double) && \290RUN_TEST(FNC(1.f, 1., ARG3), double) && \291RUN_TEST(FNC(1l, 1., ARG3), double) && \292RUN_TEST(FNC((_Bool)0, 1., ARG3), double) && \293RUN_TEST(FNC(1ull, f, ARG3), double) && \294RUN_TEST(FNC(1.f, ull, ARG3), double) && \295RUN_TEST(FNC(1, 1l, ARG3), double) && \296RUN_TEST(FNC(1u, i, ARG3), double) && \297RUN_TEST(FNC((_Bool)0, 1.f, ARG3), double) && \298RUN_TEST(FNC(1.f, b, ARG3), double) && \299n_double == 14 && \300RUN_TEST(FNC(1.f, 1.f, ARG3), float) && \301RUN_TEST(FNC(1.f, 1.f, ARG3), float) && \302RUN_TEST(FNC(f, 1.f, ARG3), float) && \303RUN_TEST(FNC(f, f, ARG3), float) && \304n_float == 4305306#define PASS_REAL_REAL_REAL_ARG_REAL_RET(FNC) \307CLEAR_COUNTERS && \308RUN_TEST(FNC(ld, d, f), long double) && \309RUN_TEST(FNC(1, ld, ld), long double) && \310RUN_TEST(FNC(1, d, ld), long double) && \311n_long_double == 3 && \312RUN_TEST(FNC(1, f, 1.f), double) && \313RUN_TEST(FNC(f, d, 1.f), double) && \314RUN_TEST(FNC(f, 1.f, 1.), double) && \315n_double == 3 && \316RUN_TEST(FNC(f, 1.f, f), float) && \317n_float == 1318319#define PASS_REAL_ARG_COMPLEX_RET(FNC) \320CLEAR_COUNTERS && \321RUN_TEST(FNC(1.l), long double complex) && \322RUN_TEST(FNC(ld), long double complex) && \323n_long_double_complex == 2 && \324RUN_TEST(FNC(1.), double complex) && \325RUN_TEST(FNC(d), double complex) && \326RUN_TEST(FNC(1l), double complex) && \327RUN_TEST(FNC(i), double complex) && \328RUN_TEST(FNC(b), double complex) && \329n_double_complex == 5 && \330RUN_TEST(FNC(1.f), float complex) && \331RUN_TEST(FNC(f), float complex) && \332n_float_complex == 2333334#define PASS_COMPLEX_ARG_COMPLEX_RET(FNC) \335CLEAR_COUNTERS && \336RUN_TEST(FNC(ldc), long double complex) && \337n_long_double_complex == 1 && \338RUN_TEST(FNC(dc), double complex) && \339n_double_complex == 1 && \340RUN_TEST(FNC(fc), float complex) && \341RUN_TEST(FNC(I), float complex) && \342n_float_complex == 2343344#define PASS_COMPLEX_ARG_REAL_RET(FNC) \345CLEAR_COUNTERS && \346RUN_TEST(FNC(ldc), long double) && \347n_long_double_complex == 1 && \348RUN_TEST(FNC(dc), double) && \349n_double_complex == 1 && \350RUN_TEST(FNC(fc), float) && \351RUN_TEST(FNC(I), float) && \352n_float_complex == 2353354#define PASS_COMPLEX_COMPLEX_ARG_COMPLEX_RET(FNC) \355CLEAR_COUNTERS && \356RUN_TEST(FNC(ldc, ldc), long double complex) && \357RUN_TEST(FNC(ldc, dc), long double complex) && \358RUN_TEST(FNC(ldc, fc), long double complex) && \359RUN_TEST(FNC(ldc, ld), long double complex) && \360RUN_TEST(FNC(ldc, d), long double complex) && \361RUN_TEST(FNC(ldc, f), long double complex) && \362RUN_TEST(FNC(ldc, i), long double complex) && \363RUN_TEST(FNC(dc, ldc), long double complex) && \364RUN_TEST(FNC(I, ldc), long double complex) && \365RUN_TEST(FNC(1.l, ldc), long double complex) && \366RUN_TEST(FNC(1., ldc), long double complex) && \367RUN_TEST(FNC(1.f, ldc), long double complex) && \368RUN_TEST(FNC(1, ldc), long double complex) && \369RUN_TEST(FNC(ld, dc), long double complex) && \370RUN_TEST(FNC(ld, fc), long double complex) && \371RUN_TEST(FNC(I, 1.l), long double complex) && \372RUN_TEST(FNC(dc, 1.l), long double complex) && \373n_long_double_complex == 17 && \374RUN_TEST(FNC(dc, dc), double complex) && \375RUN_TEST(FNC(dc, fc), double complex) && \376RUN_TEST(FNC(dc, d), double complex) && \377RUN_TEST(FNC(dc, f), double complex) && \378RUN_TEST(FNC(dc, ull), double complex) && \379RUN_TEST(FNC(I, dc), double complex) && \380RUN_TEST(FNC(1., dc), double complex) && \381RUN_TEST(FNC(1, dc), double complex) && \382RUN_TEST(FNC(fc, d), double complex) && \383RUN_TEST(FNC(1, I), double complex) && \384n_double_complex == 10 && \385RUN_TEST(FNC(fc, fc), float complex) && \386RUN_TEST(FNC(fc, I), float complex) && \387RUN_TEST(FNC(1.f, fc), float complex) && \388n_float_complex == 3389390int failed = 0;391#define PRINT(STR, X) do { \392currtest++; \393int result = (X); \394if (!result) \395failed = 1; \396printf("%s %d - %s\n", result ? "ok" : "not ok", currtest, (STR)); \397fflush(stdout); \398} while (0)399400int401main(void)402{403printf("1..60\n");404405/* 7.22#4 */406PRINT("acos",407PASS_REAL_ARG_REAL_RET(acos) &&408PASS_COMPLEX_ARG_COMPLEX_RET(acos));409410PRINT("asin",411PASS_REAL_ARG_REAL_RET(asin) &&412PASS_COMPLEX_ARG_COMPLEX_RET(asin));413414PRINT("atan",415PASS_REAL_ARG_REAL_RET(atan) &&416PASS_COMPLEX_ARG_COMPLEX_RET(atan));417418PRINT("acosh",419PASS_REAL_ARG_REAL_RET(acosh) &&420PASS_COMPLEX_ARG_COMPLEX_RET(acosh));421422PRINT("asinh",423PASS_REAL_ARG_REAL_RET(asinh) &&424PASS_COMPLEX_ARG_COMPLEX_RET(asinh));425426PRINT("atanh",427PASS_REAL_ARG_REAL_RET(atanh) &&428PASS_COMPLEX_ARG_COMPLEX_RET(atanh));429430PRINT("cos",431PASS_REAL_ARG_REAL_RET(cos) &&432PASS_COMPLEX_ARG_COMPLEX_RET(cos));433434PRINT("sin",435PASS_REAL_ARG_REAL_RET(sin) &&436PASS_COMPLEX_ARG_COMPLEX_RET(sin));437438PRINT("tan",439PASS_REAL_ARG_REAL_RET(tan) &&440PASS_COMPLEX_ARG_COMPLEX_RET(tan));441442PRINT("cosh",443PASS_REAL_ARG_REAL_RET(cosh) &&444PASS_COMPLEX_ARG_COMPLEX_RET(cosh));445446PRINT("sinh",447PASS_REAL_ARG_REAL_RET(sinh) &&448PASS_COMPLEX_ARG_COMPLEX_RET(sinh));449450PRINT("tanh",451PASS_REAL_ARG_REAL_RET(tanh) &&452PASS_COMPLEX_ARG_COMPLEX_RET(tanh));453454PRINT("exp",455PASS_REAL_ARG_REAL_RET(exp) &&456PASS_COMPLEX_ARG_COMPLEX_RET(exp));457458PRINT("log",459PASS_REAL_ARG_REAL_RET(log) &&460PASS_COMPLEX_ARG_COMPLEX_RET(log));461462PRINT("pow",463PASS_REAL_REAL_ARG_REAL_RET(pow) &&464PASS_COMPLEX_COMPLEX_ARG_COMPLEX_RET(pow));465466PRINT("sqrt",467PASS_REAL_ARG_REAL_RET(sqrt) &&468PASS_COMPLEX_ARG_COMPLEX_RET(sqrt));469470PRINT("fabs",471PASS_REAL_ARG_REAL_RET(fabs) &&472PASS_COMPLEX_ARG_REAL_RET(fabs));473474/* 7.22#5 */475PRINT("atan2",476PASS_REAL_REAL_ARG_REAL_RET(atan2));477478PRINT("cbrt",479PASS_REAL_ARG_REAL_RET(cbrt));480481PRINT("ceil",482PASS_REAL_ARG_REAL_RET(ceil));483484PRINT("copysign",485PASS_REAL_REAL_ARG_REAL_RET(copysign));486487PRINT("erf",488PASS_REAL_ARG_REAL_RET(erf));489490PRINT("erfc",491PASS_REAL_ARG_REAL_RET(erfc));492493PRINT("exp2",494PASS_REAL_ARG_REAL_RET(exp2));495496PRINT("expm1",497PASS_REAL_ARG_REAL_RET(expm1));498499PRINT("fdim",500PASS_REAL_REAL_ARG_REAL_RET(fdim));501502PRINT("floor",503PASS_REAL_ARG_REAL_RET(floor));504505PRINT("fma",506PASS_REAL_REAL_REAL_ARG_REAL_RET(fma));507508PRINT("fmax",509PASS_REAL_REAL_ARG_REAL_RET(fmax));510511PRINT("fmin",512PASS_REAL_REAL_ARG_REAL_RET(fmin));513514PRINT("fmod",515PASS_REAL_REAL_ARG_REAL_RET(fmod));516517PRINT("frexp",518PASS_REAL_FIXED_ARG_REAL_RET(frexp, &i));519520PRINT("hypot",521PASS_REAL_REAL_ARG_REAL_RET(hypot));522523PRINT("ilogb",524PASS_REAL_ARG_FIXED_RET(ilogb, int));525526PRINT("ldexp",527PASS_REAL_FIXED_ARG_REAL_RET(ldexp, 1) &&528PASS_REAL_FIXED_ARG_REAL_RET(ldexp, ld) &&529PASS_REAL_FIXED_ARG_REAL_RET(ldexp, ldc));530531PRINT("lgamma",532PASS_REAL_ARG_REAL_RET(lgamma));533534PRINT("llrint",535PASS_REAL_ARG_FIXED_RET(llrint, long long));536537PRINT("llround",538PASS_REAL_ARG_FIXED_RET(llround, long long));539540PRINT("log10",541PASS_REAL_ARG_REAL_RET(log10));542543PRINT("log1p",544PASS_REAL_ARG_REAL_RET(log1p));545546PRINT("log2",547PASS_REAL_ARG_REAL_RET(log2));548549PRINT("logb",550PASS_REAL_ARG_REAL_RET(logb));551552PRINT("lrint",553PASS_REAL_ARG_FIXED_RET(lrint, long));554555PRINT("lround",556PASS_REAL_ARG_FIXED_RET(lround, long));557558PRINT("nearbyint",559PASS_REAL_ARG_REAL_RET(nearbyint));560561PRINT("nextafter",562PASS_REAL_REAL_ARG_REAL_RET(nextafter));563564PRINT("nexttoward",565PASS_REAL_FIXED_ARG_REAL_RET(nexttoward, 1) &&566PASS_REAL_FIXED_ARG_REAL_RET(nexttoward, ull) &&567PASS_REAL_FIXED_ARG_REAL_RET(nexttoward, d) &&568PASS_REAL_FIXED_ARG_REAL_RET(nexttoward, fc));569570PRINT("remainder",571PASS_REAL_REAL_ARG_REAL_RET(remainder));572573PRINT("remquo",574PASS_REAL_REAL_FIXED_ARG_REAL_RET(remquo, &i));575576PRINT("rint",577PASS_REAL_ARG_REAL_RET(rint));578579PRINT("round",580PASS_REAL_ARG_REAL_RET(round));581582PRINT("scalbn",583PASS_REAL_FIXED_ARG_REAL_RET(scalbn, 1) &&584PASS_REAL_FIXED_ARG_REAL_RET(scalbn, b) &&585PASS_REAL_FIXED_ARG_REAL_RET(scalbn, I));586587PRINT("scalbln",588PASS_REAL_FIXED_ARG_REAL_RET(scalbln, i) &&589PASS_REAL_FIXED_ARG_REAL_RET(scalbln, 1.l) &&590PASS_REAL_FIXED_ARG_REAL_RET(scalbln, dc));591592PRINT("tgamma",593PASS_REAL_ARG_REAL_RET(tgamma));594595PRINT("trunc",596PASS_REAL_ARG_REAL_RET(trunc));597598/* 7.22#6 */599PRINT("carg",600PASS_REAL_ARG_REAL_RET_(carg, _complex) &&601PASS_COMPLEX_ARG_REAL_RET(carg));602603PRINT("cimag",604PASS_REAL_ARG_REAL_RET_(cimag, _complex) &&605PASS_COMPLEX_ARG_REAL_RET(cimag));606607PRINT("conj",608PASS_REAL_ARG_COMPLEX_RET(conj) &&609PASS_COMPLEX_ARG_COMPLEX_RET(conj));610611PRINT("cproj",612PASS_REAL_ARG_COMPLEX_RET(cproj) &&613PASS_COMPLEX_ARG_COMPLEX_RET(cproj));614615PRINT("creal",616PASS_REAL_ARG_REAL_RET_(creal, _complex) &&617PASS_COMPLEX_ARG_REAL_RET(creal));618}619620621