ctrig_test.c revision 251241
1/*- 2 * Copyright (c) 2008-2011 David Schultz <das@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27/* 28 * Tests for csin[h](), ccos[h](), and ctan[h](). 29 */ 30 31#include <sys/cdefs.h> 32__FBSDID("$FreeBSD: head/tools/regression/lib/msun/test-ctrig.c 251241 2013-06-02 04:30:03Z das $"); 33 34#include <assert.h> 35#include <complex.h> 36#include <fenv.h> 37#include <float.h> 38#include <math.h> 39#include <stdio.h> 40 41#include "test-utils.h" 42 43#pragma STDC FENV_ACCESS ON 44#pragma STDC CX_LIMITED_RANGE OFF 45 46/* 47 * Test that a function returns the correct value and sets the 48 * exception flags correctly. The exceptmask specifies which 49 * exceptions we should check. We need to be lenient for several 50 * reasons, but mainly because on some architectures it's impossible 51 * to raise FE_OVERFLOW without raising FE_INEXACT. 52 * 53 * These are macros instead of functions so that assert provides more 54 * meaningful error messages. 55 * 56 * XXX The volatile here is to avoid gcc's bogus constant folding and work 57 * around the lack of support for the FENV_ACCESS pragma. 58 */ 59#define test_p(func, z, result, exceptmask, excepts, checksign) do { \ 60 volatile long double complex _d = z; \ 61 debug(" testing %s(%Lg + %Lg I) == %Lg + %Lg I\n", #func, \ 62 creall(_d), cimagl(_d), creall(result), cimagl(result)); \ 63 assert(feclearexcept(FE_ALL_EXCEPT) == 0); \ 64 assert(cfpequal_cs((func)(_d), (result), (checksign))); \ 65 assert(((void)(func), fetestexcept(exceptmask) == (excepts))); \ 66} while (0) 67 68/* 69 * Test within a given tolerance. The tolerance indicates relative error 70 * in ulps. If result is 0, however, it measures absolute error in units 71 * of <format>_EPSILON. 72 */ 73#define test_p_tol(func, z, result, tol) do { \ 74 volatile long double complex _d = z; \ 75 debug(" testing %s(%Lg + %Lg I) ~= %Lg + %Lg I\n", #func, \ 76 creall(_d), cimagl(_d), creall(result), cimagl(result)); \ 77 assert(cfpequal_tol((func)(_d), (result), (tol), FPE_ABS_ZERO)); \ 78} while (0) 79 80/* These wrappers apply the identities f(conj(z)) = conj(f(z)). */ 81#define test(func, z, result, exceptmask, excepts, checksign) do { \ 82 test_p(func, z, result, exceptmask, excepts, checksign); \ 83 test_p(func, conjl(z), conjl(result), exceptmask, excepts, checksign); \ 84} while (0) 85#define test_tol(func, z, result, tol) do { \ 86 test_p_tol(func, z, result, tol); \ 87 test_p_tol(func, conjl(z), conjl(result), tol); \ 88} while (0) 89 90/* Test the given function in all precisions. */ 91#define testall(func, x, result, exceptmask, excepts, checksign) do { \ 92 test(func, x, result, exceptmask, excepts, checksign); \ 93 test(func##f, x, result, exceptmask, excepts, checksign); \ 94} while (0) 95#define testall_odd(func, x, result, exceptmask, excepts, checksign) do { \ 96 testall(func, x, result, exceptmask, excepts, checksign); \ 97 testall(func, -x, -result, exceptmask, excepts, checksign); \ 98} while (0) 99#define testall_even(func, x, result, exceptmask, excepts, checksign) do { \ 100 testall(func, x, result, exceptmask, excepts, checksign); \ 101 testall(func, -x, result, exceptmask, excepts, checksign); \ 102} while (0) 103 104/* 105 * Test the given function in all precisions, within a given tolerance. 106 * The tolerance is specified in ulps. 107 */ 108#define testall_tol(func, x, result, tol) do { \ 109 test_tol(func, x, result, tol * DBL_ULP()); \ 110 test_tol(func##f, x, result, tol * FLT_ULP()); \ 111} while (0) 112#define testall_odd_tol(func, x, result, tol) do { \ 113 test_tol(func, x, result, tol * DBL_ULP()); \ 114 test_tol(func, -x, -result, tol * DBL_ULP()); \ 115} while (0) 116#define testall_even_tol(func, x, result, tol) do { \ 117 test_tol(func, x, result, tol * DBL_ULP()); \ 118 test_tol(func, -x, result, tol * DBL_ULP()); \ 119} while (0) 120 121 122/* Tests for 0 */ 123void 124test_zero(void) 125{ 126 long double complex zero = CMPLXL(0.0, 0.0); 127 128 /* csinh(0) = ctanh(0) = 0; ccosh(0) = 1 (no exceptions raised) */ 129 testall_odd(csinh, zero, zero, ALL_STD_EXCEPT, 0, CS_BOTH); 130 testall_odd(csin, zero, zero, ALL_STD_EXCEPT, 0, CS_BOTH); 131 testall_even(ccosh, zero, 1.0, ALL_STD_EXCEPT, 0, CS_BOTH); 132 testall_even(ccos, zero, CMPLXL(1.0, -0.0), ALL_STD_EXCEPT, 0, CS_BOTH); 133 testall_odd(ctanh, zero, zero, ALL_STD_EXCEPT, 0, CS_BOTH); 134 testall_odd(ctan, zero, zero, ALL_STD_EXCEPT, 0, CS_BOTH); 135} 136 137/* 138 * Tests for NaN inputs. 139 */ 140void 141test_nan() 142{ 143 long double complex nan_nan = CMPLXL(NAN, NAN); 144 long double complex z; 145 146 /* 147 * IN CSINH CCOSH CTANH 148 * NaN,NaN NaN,NaN NaN,NaN NaN,NaN 149 * finite,NaN NaN,NaN [inval] NaN,NaN [inval] NaN,NaN [inval] 150 * NaN,finite NaN,NaN [inval] NaN,NaN [inval] NaN,NaN [inval] 151 * NaN,Inf NaN,NaN [inval] NaN,NaN [inval] NaN,NaN [inval] 152 * Inf,NaN +-Inf,NaN Inf,NaN 1,+-0 153 * 0,NaN +-0,NaN NaN,+-0 NaN,NaN [inval] 154 * NaN,0 NaN,0 NaN,+-0 NaN,0 155 */ 156 z = nan_nan; 157 testall_odd(csinh, z, nan_nan, ALL_STD_EXCEPT, 0, 0); 158 testall_even(ccosh, z, nan_nan, ALL_STD_EXCEPT, 0, 0); 159 testall_odd(ctanh, z, nan_nan, ALL_STD_EXCEPT, 0, 0); 160 testall_odd(csin, z, nan_nan, ALL_STD_EXCEPT, 0, 0); 161 testall_even(ccos, z, nan_nan, ALL_STD_EXCEPT, 0, 0); 162 testall_odd(ctan, z, nan_nan, ALL_STD_EXCEPT, 0, 0); 163 164 z = CMPLXL(42, NAN); 165 testall_odd(csinh, z, nan_nan, OPT_INVALID, 0, 0); 166 testall_even(ccosh, z, nan_nan, OPT_INVALID, 0, 0); 167 /* XXX We allow a spurious inexact exception here. */ 168 testall_odd(ctanh, z, nan_nan, OPT_INVALID & ~FE_INEXACT, 0, 0); 169 testall_odd(csin, z, nan_nan, OPT_INVALID, 0, 0); 170 testall_even(ccos, z, nan_nan, OPT_INVALID, 0, 0); 171 testall_odd(ctan, z, nan_nan, OPT_INVALID, 0, 0); 172 173 z = CMPLXL(NAN, 42); 174 testall_odd(csinh, z, nan_nan, OPT_INVALID, 0, 0); 175 testall_even(ccosh, z, nan_nan, OPT_INVALID, 0, 0); 176 testall_odd(ctanh, z, nan_nan, OPT_INVALID, 0, 0); 177 testall_odd(csin, z, nan_nan, OPT_INVALID, 0, 0); 178 testall_even(ccos, z, nan_nan, OPT_INVALID, 0, 0); 179 /* XXX We allow a spurious inexact exception here. */ 180 testall_odd(ctan, z, nan_nan, OPT_INVALID & ~FE_INEXACT, 0, 0); 181 182 z = CMPLXL(NAN, INFINITY); 183 testall_odd(csinh, z, nan_nan, OPT_INVALID, 0, 0); 184 testall_even(ccosh, z, nan_nan, OPT_INVALID, 0, 0); 185 testall_odd(ctanh, z, nan_nan, OPT_INVALID, 0, 0); 186 testall_odd(csin, z, CMPLXL(NAN, INFINITY), ALL_STD_EXCEPT, 0, 0); 187 testall_even(ccos, z, CMPLXL(INFINITY, NAN), ALL_STD_EXCEPT, 0, 188 CS_IMAG); 189 testall_odd(ctan, z, CMPLXL(0, 1), ALL_STD_EXCEPT, 0, CS_IMAG); 190 191 z = CMPLXL(INFINITY, NAN); 192 testall_odd(csinh, z, CMPLXL(INFINITY, NAN), ALL_STD_EXCEPT, 0, 0); 193 testall_even(ccosh, z, CMPLXL(INFINITY, NAN), ALL_STD_EXCEPT, 0, 194 CS_REAL); 195 testall_odd(ctanh, z, CMPLXL(1, 0), ALL_STD_EXCEPT, 0, CS_REAL); 196 testall_odd(csin, z, nan_nan, OPT_INVALID, 0, 0); 197 testall_even(ccos, z, nan_nan, OPT_INVALID, 0, 0); 198 testall_odd(ctan, z, nan_nan, OPT_INVALID, 0, 0); 199 200 z = CMPLXL(0, NAN); 201 testall_odd(csinh, z, CMPLXL(0, NAN), ALL_STD_EXCEPT, 0, 0); 202 testall_even(ccosh, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, 0); 203 testall_odd(ctanh, z, nan_nan, OPT_INVALID, 0, 0); 204 testall_odd(csin, z, CMPLXL(0, NAN), ALL_STD_EXCEPT, 0, CS_REAL); 205 testall_even(ccos, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, 0); 206 testall_odd(ctan, z, CMPLXL(0, NAN), ALL_STD_EXCEPT, 0, CS_REAL); 207 208 z = CMPLXL(NAN, 0); 209 testall_odd(csinh, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, CS_IMAG); 210 testall_even(ccosh, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, 0); 211 testall_odd(ctanh, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, CS_IMAG); 212 testall_odd(csin, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, 0); 213 testall_even(ccos, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, 0); 214 testall_odd(ctan, z, nan_nan, OPT_INVALID, 0, 0); 215} 216 217void 218test_inf(void) 219{ 220 static const long double finites[] = { 221 0, M_PI / 4, 3 * M_PI / 4, 5 * M_PI / 4, 222 }; 223 long double complex z, c, s; 224 int i; 225 226 /* 227 * IN CSINH CCOSH CTANH 228 * Inf,Inf +-Inf,NaN inval +-Inf,NaN inval 1,+-0 229 * Inf,finite Inf cis(finite) Inf cis(finite) 1,0 sin(2 finite) 230 * 0,Inf +-0,NaN inval NaN,+-0 inval NaN,NaN inval 231 * finite,Inf NaN,NaN inval NaN,NaN inval NaN,NaN inval 232 */ 233 z = CMPLXL(INFINITY, INFINITY); 234 testall_odd(csinh, z, CMPLXL(INFINITY, NAN), 235 ALL_STD_EXCEPT, FE_INVALID, 0); 236 testall_even(ccosh, z, CMPLXL(INFINITY, NAN), 237 ALL_STD_EXCEPT, FE_INVALID, 0); 238 testall_odd(ctanh, z, CMPLXL(1, 0), ALL_STD_EXCEPT, 0, CS_REAL); 239 testall_odd(csin, z, CMPLXL(NAN, INFINITY), 240 ALL_STD_EXCEPT, FE_INVALID, 0); 241 testall_even(ccos, z, CMPLXL(INFINITY, NAN), 242 ALL_STD_EXCEPT, FE_INVALID, 0); 243 testall_odd(ctan, z, CMPLXL(0, 1), ALL_STD_EXCEPT, 0, CS_REAL); 244 245 /* XXX We allow spurious inexact exceptions here (hard to avoid). */ 246 for (i = 0; i < sizeof(finites) / sizeof(finites[0]); i++) { 247 z = CMPLXL(INFINITY, finites[i]); 248 c = INFINITY * cosl(finites[i]); 249 s = finites[i] == 0 ? finites[i] : INFINITY * sinl(finites[i]); 250 testall_odd(csinh, z, CMPLXL(c, s), OPT_INEXACT, 0, CS_BOTH); 251 testall_even(ccosh, z, CMPLXL(c, s), OPT_INEXACT, 0, CS_BOTH); 252 testall_odd(ctanh, z, CMPLXL(1, 0 * sin(finites[i] * 2)), 253 OPT_INEXACT, 0, CS_BOTH); 254 z = CMPLXL(finites[i], INFINITY); 255 testall_odd(csin, z, CMPLXL(s, c), OPT_INEXACT, 0, CS_BOTH); 256 testall_even(ccos, z, CMPLXL(c, -s), OPT_INEXACT, 0, CS_BOTH); 257 testall_odd(ctan, z, CMPLXL(0 * sin(finites[i] * 2), 1), 258 OPT_INEXACT, 0, CS_BOTH); 259 } 260 261 z = CMPLXL(0, INFINITY); 262 testall_odd(csinh, z, CMPLXL(0, NAN), ALL_STD_EXCEPT, FE_INVALID, 0); 263 testall_even(ccosh, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, FE_INVALID, 0); 264 testall_odd(ctanh, z, CMPLXL(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0); 265 z = CMPLXL(INFINITY, 0); 266 testall_odd(csin, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, FE_INVALID, 0); 267 testall_even(ccos, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, FE_INVALID, 0); 268 testall_odd(ctan, z, CMPLXL(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0); 269 270 z = CMPLXL(42, INFINITY); 271 testall_odd(csinh, z, CMPLXL(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0); 272 testall_even(ccosh, z, CMPLXL(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0); 273 /* XXX We allow a spurious inexact exception here. */ 274 testall_odd(ctanh, z, CMPLXL(NAN, NAN), OPT_INEXACT, FE_INVALID, 0); 275 z = CMPLXL(INFINITY, 42); 276 testall_odd(csin, z, CMPLXL(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0); 277 testall_even(ccos, z, CMPLXL(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0); 278 /* XXX We allow a spurious inexact exception here. */ 279 testall_odd(ctan, z, CMPLXL(NAN, NAN), OPT_INEXACT, FE_INVALID, 0); 280} 281 282/* Tests along the real and imaginary axes. */ 283void 284test_axes(void) 285{ 286 static const long double nums[] = { 287 M_PI / 4, M_PI / 2, 3 * M_PI / 4, 288 5 * M_PI / 4, 3 * M_PI / 2, 7 * M_PI / 4, 289 }; 290 long double complex z; 291 int i; 292 293 for (i = 0; i < sizeof(nums) / sizeof(nums[0]); i++) { 294 /* Real axis */ 295 z = CMPLXL(nums[i], 0.0); 296 testall_odd_tol(csinh, z, CMPLXL(sinh(nums[i]), 0), 0); 297 testall_even_tol(ccosh, z, CMPLXL(cosh(nums[i]), 0), 0); 298 testall_odd_tol(ctanh, z, CMPLXL(tanh(nums[i]), 0), 1); 299 testall_odd_tol(csin, z, CMPLXL(sin(nums[i]), 300 copysign(0, cos(nums[i]))), 0); 301 testall_even_tol(ccos, z, CMPLXL(cos(nums[i]), 302 -copysign(0, sin(nums[i]))), 0); 303 testall_odd_tol(ctan, z, CMPLXL(tan(nums[i]), 0), 1); 304 305 /* Imaginary axis */ 306 z = CMPLXL(0.0, nums[i]); 307 testall_odd_tol(csinh, z, CMPLXL(copysign(0, cos(nums[i])), 308 sin(nums[i])), 0); 309 testall_even_tol(ccosh, z, CMPLXL(cos(nums[i]), 310 copysign(0, sin(nums[i]))), 0); 311 testall_odd_tol(ctanh, z, CMPLXL(0, tan(nums[i])), 1); 312 testall_odd_tol(csin, z, CMPLXL(0, sinh(nums[i])), 0); 313 testall_even_tol(ccos, z, CMPLXL(cosh(nums[i]), -0.0), 0); 314 testall_odd_tol(ctan, z, CMPLXL(0, tanh(nums[i])), 1); 315 } 316} 317 318void 319test_small(void) 320{ 321 /* 322 * z = 0.5 + i Pi/4 323 * sinh(z) = (sinh(0.5) + i cosh(0.5)) * sqrt(2)/2 324 * cosh(z) = (cosh(0.5) + i sinh(0.5)) * sqrt(2)/2 325 * tanh(z) = (2cosh(0.5)sinh(0.5) + i) / (2 cosh(0.5)**2 - 1) 326 * z = -0.5 + i Pi/2 327 * sinh(z) = cosh(0.5) 328 * cosh(z) = -i sinh(0.5) 329 * tanh(z) = -coth(0.5) 330 * z = 1.0 + i 3Pi/4 331 * sinh(z) = (-sinh(1) + i cosh(1)) * sqrt(2)/2 332 * cosh(z) = (-cosh(1) + i sinh(1)) * sqrt(2)/2 333 * tanh(z) = (2cosh(1)sinh(1) - i) / (2cosh(1)**2 - 1) 334 */ 335 static const struct { 336 long double a, b; 337 long double sinh_a, sinh_b; 338 long double cosh_a, cosh_b; 339 long double tanh_a, tanh_b; 340 } tests[] = { 341 { 0.5L, 342 0.78539816339744830961566084581987572L, 343 0.36847002415910435172083660522240710L, 344 0.79735196663945774996093142586179334L, 345 0.79735196663945774996093142586179334L, 346 0.36847002415910435172083660522240710L, 347 0.76159415595576488811945828260479359L, 348 0.64805427366388539957497735322615032L }, 349 { -0.5L, 350 1.57079632679489661923132169163975144L, 351 0.0L, 352 1.12762596520638078522622516140267201L, 353 0.0L, 354 -0.52109530549374736162242562641149156L, 355 -2.16395341373865284877000401021802312L, 356 0.0L }, 357 { 1.0L, 358 2.35619449019234492884698253745962716L, 359 -0.83099273328405698212637979852748608L, 360 1.09112278079550143030545602018565236L, 361 -1.09112278079550143030545602018565236L, 362 0.83099273328405698212637979852748609L, 363 0.96402758007581688394641372410092315L, 364 -0.26580222883407969212086273981988897L } 365 }; 366 long double complex z; 367 int i; 368 369 for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) { 370 z = CMPLXL(tests[i].a, tests[i].b); 371 testall_odd_tol(csinh, z, 372 CMPLXL(tests[i].sinh_a, tests[i].sinh_b), 1.1); 373 testall_even_tol(ccosh, z, 374 CMPLXL(tests[i].cosh_a, tests[i].cosh_b), 1.1); 375 testall_odd_tol(ctanh, z, 376 CMPLXL(tests[i].tanh_a, tests[i].tanh_b), 1.1); 377 } 378} 379 380/* Test inputs that might cause overflow in a sloppy implementation. */ 381void 382test_large(void) 383{ 384 long double complex z; 385 386 /* tanh() uses a threshold around x=22, so check both sides. */ 387 z = CMPLXL(21, 0.78539816339744830961566084581987572L); 388 testall_odd_tol(ctanh, z, 389 CMPLXL(1.0, 1.14990445285871196133287617611468468e-18L), 1); 390 z++; 391 testall_odd_tol(ctanh, z, 392 CMPLXL(1.0, 1.55622644822675930314266334585597964e-19L), 1); 393 394 z = CMPLXL(355, 0.78539816339744830961566084581987572L); 395 testall_odd_tol(ctanh, z, 396 CMPLXL(1.0, 8.95257245135025991216632140458264468e-309L), 1); 397 z = CMPLXL(30, 0x1p1023L); 398 testall_odd_tol(ctanh, z, 399 CMPLXL(1.0, -1.62994325413993477997492170229268382e-26L), 1); 400 z = CMPLXL(1, 0x1p1023L); 401 testall_odd_tol(ctanh, z, 402 CMPLXL(0.878606311888306869546254022621986509L, 403 -0.225462792499754505792678258169527424L), 1); 404 405 z = CMPLXL(710.6, 0.78539816339744830961566084581987572L); 406 testall_odd_tol(csinh, z, 407 CMPLXL(1.43917579766621073533185387499658944e308L, 408 1.43917579766621073533185387499658944e308L), 1); 409 testall_even_tol(ccosh, z, 410 CMPLXL(1.43917579766621073533185387499658944e308L, 411 1.43917579766621073533185387499658944e308L), 1); 412 413 z = CMPLXL(1500, 0.78539816339744830961566084581987572L); 414 testall_odd(csinh, z, CMPLXL(INFINITY, INFINITY), OPT_INEXACT, 415 FE_OVERFLOW, CS_BOTH); 416 testall_even(ccosh, z, CMPLXL(INFINITY, INFINITY), OPT_INEXACT, 417 FE_OVERFLOW, CS_BOTH); 418} 419 420int 421main(int argc, char *argv[]) 422{ 423 424 printf("1..6\n"); 425 426 test_zero(); 427 printf("ok 1 - ctrig zero\n"); 428 429 test_nan(); 430 printf("ok 2 - ctrig nan\n"); 431 432 test_inf(); 433 printf("ok 3 - ctrig inf\n"); 434 435 test_axes(); 436 printf("ok 4 - ctrig axes\n"); 437 438 test_small(); 439 printf("ok 5 - ctrig small\n"); 440 441 test_large(); 442 printf("ok 6 - ctrig large\n"); 443 444 return (0); 445} 446