| 1 | /* CIVL model of math.h. Part of functions have optional assumption
|
|---|
| 2 | * models which are controlled by two macros:
|
|---|
| 3 | * 1. MATH_ELABORATE_ASSUMPTIONS: replacing a complicated assumption
|
|---|
| 4 | * expression which includes implications with a "if..else" statement.
|
|---|
| 5 | * This option reduces the complicity of the assumption expression but
|
|---|
| 6 | * increase the number of branches.
|
|---|
| 7 | * 2. MATH_NO_ASSUMPTIONS: for some cases that the return value is not
|
|---|
| 8 | * important, it's no need to add any assumption.
|
|---|
| 9 | */
|
|---|
| 10 |
|
|---|
| 11 | #ifndef __CIVL_MATH__
|
|---|
| 12 | #define __CIVL_MATH__
|
|---|
| 13 | #include <civlc.cvh>
|
|---|
| 14 | #include <math.h>
|
|---|
| 15 |
|
|---|
| 16 | double acos(double x) {
|
|---|
| 17 | $abstract double ACOS(double X);
|
|---|
| 18 | double result;
|
|---|
| 19 |
|
|---|
| 20 | $assert(-1 <= x && x <=1, "Argument x should be in interval[-1, 1]");
|
|---|
| 21 | result = ACOS(x);
|
|---|
| 22 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 23 | if(x == 1)
|
|---|
| 24 | return 0;
|
|---|
| 25 | else {
|
|---|
| 26 | $assume(result > 0);
|
|---|
| 27 | return result;
|
|---|
| 28 | }
|
|---|
| 29 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 30 | return result;
|
|---|
| 31 | #else
|
|---|
| 32 | $assume(((x == 1 => result == 0) && (x != 1 => result > 0)));
|
|---|
| 33 | return result;
|
|---|
| 34 | #endif
|
|---|
| 35 | }
|
|---|
| 36 |
|
|---|
| 37 | float acosf(float x) {
|
|---|
| 38 | $abstract float ACOSF(float X);
|
|---|
| 39 | double result;
|
|---|
| 40 |
|
|---|
| 41 | $assert(-1 <= x && x <=1, "Argument x should be in interval[-1, 1]");
|
|---|
| 42 | result = ACOSF(x);
|
|---|
| 43 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 44 | if(x == 1)
|
|---|
| 45 | return 0;
|
|---|
| 46 | else {
|
|---|
| 47 | $assume(result > 0);
|
|---|
| 48 | return result;
|
|---|
| 49 | }
|
|---|
| 50 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 51 | return result;
|
|---|
| 52 | #else
|
|---|
| 53 | $assume(((x == 1 => result == 0) && (x != 1 => result > 0)));
|
|---|
| 54 | return result;
|
|---|
| 55 | #endif
|
|---|
| 56 | }
|
|---|
| 57 |
|
|---|
| 58 | long double acosl(long double x) {
|
|---|
| 59 | $abstract long double ACOSL(long double X);
|
|---|
| 60 | double result;
|
|---|
| 61 |
|
|---|
| 62 | $assert(-1 <= x && x <=1, "Argument x should be in interval[-1, 1]");
|
|---|
| 63 | result = ACOSL(x);
|
|---|
| 64 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 65 | if(x == 1)
|
|---|
| 66 | return 0;
|
|---|
| 67 | else {
|
|---|
| 68 | $assume(result > 0);
|
|---|
| 69 | return result;
|
|---|
| 70 | }
|
|---|
| 71 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 72 | return result;
|
|---|
| 73 | #else
|
|---|
| 74 | $assume(((x == 1 => result == 0) && (x != 1 => result > 0)));
|
|---|
| 75 | return result;
|
|---|
| 76 | #endif
|
|---|
| 77 | }
|
|---|
| 78 |
|
|---|
| 79 | double asin(double x) {
|
|---|
| 80 | $abstract double ASIN(double X);
|
|---|
| 81 |
|
|---|
| 82 | $assert(-1 <= x && x <= 1);
|
|---|
| 83 | "Argument x should be in interval[-1, 1]";
|
|---|
| 84 | return ASIN(x);
|
|---|
| 85 | }
|
|---|
| 86 |
|
|---|
| 87 | float asinf(float x) {
|
|---|
| 88 | $abstract float ASINF(float X);
|
|---|
| 89 |
|
|---|
| 90 | $assert(-1 <= x && x <= 1);
|
|---|
| 91 | "Argument x should be in interval[-1, 1]";
|
|---|
| 92 | return ASINF(x);
|
|---|
| 93 | }
|
|---|
| 94 |
|
|---|
| 95 | long double asinl(long double x) {
|
|---|
| 96 | $abstract long double ASINL(long double X);
|
|---|
| 97 |
|
|---|
| 98 | $assert(-1 <= x && x <= 1);
|
|---|
| 99 | "Argument x should be in interval[-1, 1]";
|
|---|
| 100 | return ASINL(x);
|
|---|
| 101 | }
|
|---|
| 102 |
|
|---|
| 103 | double atan(double x) {
|
|---|
| 104 | $abstract double ATAN(double X);
|
|---|
| 105 | return ATAN(x);
|
|---|
| 106 | }
|
|---|
| 107 |
|
|---|
| 108 | float atanf(float x) {
|
|---|
| 109 | $abstract float ATANF(float X);
|
|---|
| 110 | return ATANF(x);
|
|---|
| 111 | }
|
|---|
| 112 |
|
|---|
| 113 | long double atanl(long double x) {
|
|---|
| 114 | $abstract long double ATANL(long double X);
|
|---|
| 115 | return ATANL(x);
|
|---|
| 116 | }
|
|---|
| 117 |
|
|---|
| 118 | double atan2(double x, double y) {
|
|---|
| 119 | $abstract double ATAN2(double X, double Y);
|
|---|
| 120 |
|
|---|
| 121 | $assert(x!=0 || y !=0, "Arguments x and y"
|
|---|
| 122 | "should not be both 0");
|
|---|
| 123 | return ATAN2(x, y);
|
|---|
| 124 | }
|
|---|
| 125 |
|
|---|
| 126 | float atan2f(float x, float y) {
|
|---|
| 127 | $abstract float ATAN2F(float X, float Y);
|
|---|
| 128 |
|
|---|
| 129 | $assert(x!=0.0 || y !=0.0, "Arguments x and y should not be both 0");
|
|---|
| 130 | return ATAN2F(x, y);
|
|---|
| 131 | }
|
|---|
| 132 |
|
|---|
| 133 | long double atan2l(long double x, long double y) {
|
|---|
| 134 | $abstract long double ATAN2L(long double X,
|
|---|
| 135 | long double Y);
|
|---|
| 136 |
|
|---|
| 137 | $assert(x!=0.0 || y !=0.0, "Arguments x and y should not be both 0");
|
|---|
| 138 | return ATAN2L(x, y);
|
|---|
| 139 | }
|
|---|
| 140 |
|
|---|
| 141 | double cos(double x) {
|
|---|
| 142 | $abstract double COS(double X);
|
|---|
| 143 |
|
|---|
| 144 | return COS(x);
|
|---|
| 145 | }
|
|---|
| 146 |
|
|---|
| 147 | float cosf(float x) {
|
|---|
| 148 | $abstract float COSF(float X);
|
|---|
| 149 |
|
|---|
| 150 | return COSF(x);
|
|---|
| 151 | }
|
|---|
| 152 |
|
|---|
| 153 | long double cosl(long double x) {
|
|---|
| 154 | $abstract long double COSL(long double X);
|
|---|
| 155 |
|
|---|
| 156 | return COSL(x);
|
|---|
| 157 | }
|
|---|
| 158 |
|
|---|
| 159 | double sin(double x) {
|
|---|
| 160 | $abstract double SIN(double X);
|
|---|
| 161 |
|
|---|
| 162 | return SIN(x);
|
|---|
| 163 | }
|
|---|
| 164 |
|
|---|
| 165 | float sinf(float x) {
|
|---|
| 166 | $abstract float SINF(float X);
|
|---|
| 167 |
|
|---|
| 168 | return SINF(x);
|
|---|
| 169 | }
|
|---|
| 170 |
|
|---|
| 171 | long double sinl(long double x) {
|
|---|
| 172 | $abstract long double SINL(long double X);
|
|---|
| 173 |
|
|---|
| 174 | return SINL(x);
|
|---|
| 175 | }
|
|---|
| 176 |
|
|---|
| 177 | double tan(double x) {
|
|---|
| 178 | $abstract double TAN(double X);
|
|---|
| 179 |
|
|---|
| 180 | return TAN(x);
|
|---|
| 181 | }
|
|---|
| 182 |
|
|---|
| 183 | float tanf(float x) {
|
|---|
| 184 | $abstract float TANF(float X);
|
|---|
| 185 |
|
|---|
| 186 | return TANF(x);
|
|---|
| 187 | }
|
|---|
| 188 |
|
|---|
| 189 | long double tanl(long double x) {
|
|---|
| 190 | $abstract long double TANL(long double X);
|
|---|
| 191 |
|
|---|
| 192 | return TANL(x);
|
|---|
| 193 | }
|
|---|
| 194 |
|
|---|
| 195 | double acosh(double x) {
|
|---|
| 196 | $abstract double ACOSH(double X);
|
|---|
| 197 |
|
|---|
| 198 | $assert(x >= 1, "Argument x should not less than 1.");
|
|---|
| 199 | return ACOSH(x);
|
|---|
| 200 | }
|
|---|
| 201 |
|
|---|
| 202 | float acoshf(float x) {
|
|---|
| 203 | $abstract float ACOSHF(float X);
|
|---|
| 204 |
|
|---|
| 205 | $assert(x >= 1, "Argument x should not less than 1.");
|
|---|
| 206 | return ACOSHF(x);
|
|---|
| 207 | }
|
|---|
| 208 |
|
|---|
| 209 | long double acoshl(long double x) {
|
|---|
| 210 | $abstract long double ACOSHL(long double X);
|
|---|
| 211 |
|
|---|
| 212 | $assert(x >= 1, "Argument x should not less than 1.");
|
|---|
| 213 | return ACOSHL(x);
|
|---|
| 214 | }
|
|---|
| 215 |
|
|---|
| 216 | double asinh(double x) {
|
|---|
| 217 | $abstract double ASINH(double X);
|
|---|
| 218 |
|
|---|
| 219 | return ASINH(x);
|
|---|
| 220 | }
|
|---|
| 221 |
|
|---|
| 222 | float asinhf(float x) {
|
|---|
| 223 | $abstract float ASINHF(float X);
|
|---|
| 224 |
|
|---|
| 225 | return ASINHF(x);
|
|---|
| 226 | }
|
|---|
| 227 |
|
|---|
| 228 | long double asinhl(long double x) {
|
|---|
| 229 | $abstract long double ASINHL(long double X);
|
|---|
| 230 |
|
|---|
| 231 | return ASINHL(x);
|
|---|
| 232 | }
|
|---|
| 233 |
|
|---|
| 234 | double atanh(double x) {
|
|---|
| 235 | $abstract double ATANH(double X);
|
|---|
| 236 |
|
|---|
| 237 | $assert(-1 < x && x < 1, "Argument x should be in the interval (-1, 1)");
|
|---|
| 238 | return ATANH(x);
|
|---|
| 239 | }
|
|---|
| 240 |
|
|---|
| 241 | float atanhf(float x) {
|
|---|
| 242 | $abstract float ATANHF(float X);
|
|---|
| 243 |
|
|---|
| 244 | $assert(-1 < x && x < 1, "Argument x should be in the interval (-1, 1)");
|
|---|
| 245 | return ATANHF(x);
|
|---|
| 246 | }
|
|---|
| 247 |
|
|---|
| 248 | long double atanhl(long double x) {
|
|---|
| 249 | $abstract long double ATANHL(long double X);
|
|---|
| 250 |
|
|---|
| 251 | $assert(-1 < x && x < 1, "Argument x should be in the interval (-1, 1)");
|
|---|
| 252 | return ATANHL(x);
|
|---|
| 253 | }
|
|---|
| 254 |
|
|---|
| 255 | double cosh(double x) {
|
|---|
| 256 | $abstract double COSH(double X);
|
|---|
| 257 |
|
|---|
| 258 | return COSH(x);
|
|---|
| 259 | }
|
|---|
| 260 |
|
|---|
| 261 | float coshf(float x) {
|
|---|
| 262 | $abstract float COSHF(float X);
|
|---|
| 263 |
|
|---|
| 264 | return COSHF(x);
|
|---|
| 265 | }
|
|---|
| 266 |
|
|---|
| 267 | long double coshl(long double x) {
|
|---|
| 268 | $abstract long double COSHL(long double X);
|
|---|
| 269 |
|
|---|
| 270 | return COSHL(x);
|
|---|
| 271 | }
|
|---|
| 272 |
|
|---|
| 273 | double sinh(double x) {
|
|---|
| 274 | $abstract double SINH(double X);
|
|---|
| 275 |
|
|---|
| 276 | return SINH(x);
|
|---|
| 277 | }
|
|---|
| 278 |
|
|---|
| 279 | float sinhf(float x) {
|
|---|
| 280 | $abstract float SINHF(float X);
|
|---|
| 281 |
|
|---|
| 282 | return SINHF(x);
|
|---|
| 283 | }
|
|---|
| 284 |
|
|---|
| 285 | long double sinhl(long double x) {
|
|---|
| 286 | $abstract long double SINHL(long double X);
|
|---|
| 287 |
|
|---|
| 288 | return SINHL(x);
|
|---|
| 289 | }
|
|---|
| 290 |
|
|---|
| 291 | double tanh(double x) {
|
|---|
| 292 | $abstract double TANH(double X);
|
|---|
| 293 |
|
|---|
| 294 | return TANH(x);
|
|---|
| 295 | }
|
|---|
| 296 |
|
|---|
| 297 | float tanhf(float x) {
|
|---|
| 298 | $abstract float TANHF(float X);
|
|---|
| 299 |
|
|---|
| 300 | return TANHF(x);
|
|---|
| 301 | }
|
|---|
| 302 |
|
|---|
| 303 | long double tanhl(long double x) {
|
|---|
| 304 | $abstract long double TANHL(long double X);
|
|---|
| 305 |
|
|---|
| 306 | return TANHL(x);
|
|---|
| 307 | }
|
|---|
| 308 |
|
|---|
| 309 | double exp(double x) {
|
|---|
| 310 | $abstract double EXP(double X);
|
|---|
| 311 | double result = EXP(x);
|
|---|
| 312 |
|
|---|
| 313 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 314 | if(x == 0)
|
|---|
| 315 | return 1;
|
|---|
| 316 | else {
|
|---|
| 317 | $assume(result > 0);
|
|---|
| 318 | return result;
|
|---|
| 319 | }
|
|---|
| 320 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 321 | return result;
|
|---|
| 322 | #else
|
|---|
| 323 | $assume(((x==0 => result == 1) && (x!=0 => result > 0)));
|
|---|
| 324 | return result;
|
|---|
| 325 | #endif
|
|---|
| 326 | }
|
|---|
| 327 |
|
|---|
| 328 | float expf(float x) {
|
|---|
| 329 | $abstract float EXPF(float X);
|
|---|
| 330 | double result = EXPF(x);
|
|---|
| 331 |
|
|---|
| 332 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 333 | if(x == 0)
|
|---|
| 334 | return 1;
|
|---|
| 335 | else {
|
|---|
| 336 | $assume(result > 0 );
|
|---|
| 337 | return result;
|
|---|
| 338 | }
|
|---|
| 339 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 340 | return result;
|
|---|
| 341 | #else
|
|---|
| 342 | $assume(((x==0 => result == 1) && (x!=0 => result > 0)));
|
|---|
| 343 | return result;
|
|---|
| 344 | #endif
|
|---|
| 345 | }
|
|---|
| 346 |
|
|---|
| 347 | long double expl(long double x) {
|
|---|
| 348 | $abstract long double EXPL(long double X);
|
|---|
| 349 | double result = EXPL(x);
|
|---|
| 350 |
|
|---|
| 351 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 352 | if(x == 0)
|
|---|
| 353 | return 1;
|
|---|
| 354 | else {
|
|---|
| 355 | $assume(result > 0 );
|
|---|
| 356 | return result;
|
|---|
| 357 | }
|
|---|
| 358 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 359 | return result;
|
|---|
| 360 | #else
|
|---|
| 361 | $assume(((x==0 => result == 1) && (x!=0 => result > 0)));
|
|---|
| 362 | return result;
|
|---|
| 363 | #endif
|
|---|
| 364 | }
|
|---|
| 365 |
|
|---|
| 366 | double exp2(double x) {
|
|---|
| 367 | $abstract double EXP2(double X);
|
|---|
| 368 | double result = EXP2(x);
|
|---|
| 369 |
|
|---|
| 370 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 371 | if(x == 0)
|
|---|
| 372 | return 1;
|
|---|
| 373 | else {
|
|---|
| 374 | $assume(result > 0 );
|
|---|
| 375 | return result;
|
|---|
| 376 | }
|
|---|
| 377 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 378 | return result;
|
|---|
| 379 | #else
|
|---|
| 380 | $assume(((x==0 => result == 1) && (x!=0 => result > 0)));
|
|---|
| 381 | return result;
|
|---|
| 382 | #endif
|
|---|
| 383 | }
|
|---|
| 384 |
|
|---|
| 385 | float exp2f(float x) {
|
|---|
| 386 | $abstract float EXP2F(float X);
|
|---|
| 387 | double result = EXP2F(x);
|
|---|
| 388 |
|
|---|
| 389 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 390 | if(x == 0)
|
|---|
| 391 | return 1;
|
|---|
| 392 | else {
|
|---|
| 393 | $assume(result > 0 );
|
|---|
| 394 | return result;
|
|---|
| 395 | }
|
|---|
| 396 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 397 | return result;
|
|---|
| 398 | #else
|
|---|
| 399 | $assume(((x==0 => result == 1) && (x!=0 => result > 0)));
|
|---|
| 400 | return result;
|
|---|
| 401 | #endif
|
|---|
| 402 | }
|
|---|
| 403 |
|
|---|
| 404 | long double exp2l(long double x) {
|
|---|
| 405 | $abstract long double EXP2L(long double X);
|
|---|
| 406 | double result = EXP2L(x);
|
|---|
| 407 |
|
|---|
| 408 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 409 | if(x == 0)
|
|---|
| 410 | return 1;
|
|---|
| 411 | else {
|
|---|
| 412 | $assume(result > 0 );
|
|---|
| 413 | return result;
|
|---|
| 414 | }
|
|---|
| 415 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 416 | return result;
|
|---|
| 417 | #else
|
|---|
| 418 | $assume(((x==0 => result == 1) && (x!=0 => result > 0)));
|
|---|
| 419 | return result;
|
|---|
| 420 | #endif
|
|---|
| 421 | }
|
|---|
| 422 |
|
|---|
| 423 | double expm1(double x) {
|
|---|
| 424 | $abstract double EXPM1(double X);
|
|---|
| 425 | double result = EXPM1(x);
|
|---|
| 426 |
|
|---|
| 427 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 428 | if(x == 0)
|
|---|
| 429 | return 0;
|
|---|
| 430 | else {
|
|---|
| 431 | $assume(result > -1);
|
|---|
| 432 | return result;
|
|---|
| 433 | }
|
|---|
| 434 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 435 | return result;
|
|---|
| 436 | #else
|
|---|
| 437 | $assume(((x==0 => result == 0) && (x!=0 => result > -1)));
|
|---|
| 438 | return result;
|
|---|
| 439 | #endif
|
|---|
| 440 | }
|
|---|
| 441 |
|
|---|
| 442 | float expm1f(float x) {
|
|---|
| 443 | $abstract float EXPM1F(float X);
|
|---|
| 444 | double result = EXPM1F(x);
|
|---|
| 445 |
|
|---|
| 446 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 447 | if(x == 0)
|
|---|
| 448 | return 0;
|
|---|
| 449 | else {
|
|---|
| 450 | $assume(result > -1);
|
|---|
| 451 | return result;
|
|---|
| 452 | }
|
|---|
| 453 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 454 | return result;
|
|---|
| 455 | #else
|
|---|
| 456 | $assume(((x==0 => result == 0) && (x!=0 => result > -1)));
|
|---|
| 457 | return result;
|
|---|
| 458 | #endif
|
|---|
| 459 | }
|
|---|
| 460 |
|
|---|
| 461 | long double expm1l(long double x) {
|
|---|
| 462 | $abstract long double EXPM1L(long double X);
|
|---|
| 463 | double result = EXPM1L(x);
|
|---|
| 464 |
|
|---|
| 465 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 466 | if(x == 0)
|
|---|
| 467 | return 0;
|
|---|
| 468 | else {
|
|---|
| 469 | $assume(result > -1);
|
|---|
| 470 | return result;
|
|---|
| 471 | }
|
|---|
| 472 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 473 | return result;
|
|---|
| 474 | #else
|
|---|
| 475 | $assume(((x==0 => result == 0) && (x!=0 => result > -1)));
|
|---|
| 476 | return result;
|
|---|
| 477 | #endif
|
|---|
| 478 | }
|
|---|
| 479 |
|
|---|
| 480 | double frexp(double x, int * exp) {
|
|---|
| 481 | $abstract double FREXP_X(double X);
|
|---|
| 482 | $abstract int FREXP_EXP(double X);
|
|---|
| 483 |
|
|---|
| 484 | (*exp) = FREXP_EXP(x);
|
|---|
| 485 | $assume((FREXP_X(x) >= 1/2 && FREXP_X(x) < 1) ||
|
|---|
| 486 | FREXP_X(x) == 0);
|
|---|
| 487 | return FREXP_X(x);
|
|---|
| 488 | }
|
|---|
| 489 |
|
|---|
| 490 | float frexpf(float x, int *exp) {
|
|---|
| 491 | $abstract float FREXPF_X(float X);
|
|---|
| 492 | $abstract int FREXPF_EXP(float X);
|
|---|
| 493 |
|
|---|
| 494 | (*exp) = FREXPF_EXP(x);
|
|---|
| 495 | $assume((FREXPF_X(x) >= 1/2 && FREXPF_X(x) < 1) ||
|
|---|
| 496 | FREXPF_X(x) == 0);
|
|---|
| 497 | return FREXPF_X(x);
|
|---|
| 498 | }
|
|---|
| 499 |
|
|---|
| 500 | long double frexpl(long double x, int *exp) {
|
|---|
| 501 | $abstract long double FREXPL_X(long double X);
|
|---|
| 502 | $abstract int FREXPL_EXP(long double X);
|
|---|
| 503 |
|
|---|
| 504 | (*exp) = FREXPL_EXP(x);
|
|---|
| 505 | $assume((FREXPL_X(x) >= 1/2 && FREXPL_X(x) < 1) ||
|
|---|
| 506 | FREXPL_X(x) == 0);
|
|---|
| 507 | return FREXPL_X(x);
|
|---|
| 508 | }
|
|---|
| 509 |
|
|---|
| 510 | int ilogb(double x) {
|
|---|
| 511 | $abstract int ILOGB(double X);
|
|---|
| 512 |
|
|---|
| 513 | //TODO: x can not be infinite or NaN neither.
|
|---|
| 514 | $assert(x != 0, "Argument x cannot be zero.");
|
|---|
| 515 | return ILOGB(x);
|
|---|
| 516 | }
|
|---|
| 517 |
|
|---|
| 518 | int ilogbf(float x) {
|
|---|
| 519 | $abstract int ILOGBF(float X);
|
|---|
| 520 |
|
|---|
| 521 | //TODO: x can not be infinite or NaN neither.
|
|---|
| 522 | $assert(x != 0, "Argument x cannot be zero.");
|
|---|
| 523 | return ILOGBF(x);
|
|---|
| 524 | }
|
|---|
| 525 |
|
|---|
| 526 | int ilogbl(long double x) {
|
|---|
| 527 | $abstract int ILOGBL(long double X);
|
|---|
| 528 |
|
|---|
| 529 | //TODO: x can not be infinite or NaN neither.
|
|---|
| 530 | $assert(x != 0, "Argument x cannot be zero.");
|
|---|
| 531 | return ILOGBL(x);
|
|---|
| 532 | }
|
|---|
| 533 |
|
|---|
| 534 | double ldexp(double x, int exp) {
|
|---|
| 535 | $abstract double LDEXP(double X, int EXP);
|
|---|
| 536 |
|
|---|
| 537 | return LDEXP(x, exp);
|
|---|
| 538 | }
|
|---|
| 539 |
|
|---|
| 540 | float ldexpf(float x, int exp) {
|
|---|
| 541 | $abstract float LDEXPF(float X, int EXP);
|
|---|
| 542 |
|
|---|
| 543 | return LDEXPF(x, exp);
|
|---|
| 544 | }
|
|---|
| 545 |
|
|---|
| 546 | long double ldexpl(long double x, int exp) {
|
|---|
| 547 | $abstract long double LDEXPL(long double X, int EXP);
|
|---|
| 548 |
|
|---|
| 549 | return LDEXPL(x, exp);
|
|---|
| 550 | }
|
|---|
| 551 |
|
|---|
| 552 | double log(double x) {
|
|---|
| 553 | $abstract double LOG(double X);
|
|---|
| 554 | double result = LOG(x);
|
|---|
| 555 |
|
|---|
| 556 | $assert(x > 0, "Argument x should be greater than 0");
|
|---|
| 557 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 558 | if(x == 1)
|
|---|
| 559 | return 0;
|
|---|
| 560 | else {
|
|---|
| 561 | $assume(result != 0);
|
|---|
| 562 | return result;
|
|---|
| 563 | }
|
|---|
| 564 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 565 | return result;
|
|---|
| 566 | #else
|
|---|
| 567 | $assume(((x==1) => (result==0)) && ((x!=1) => (result!=0)));
|
|---|
| 568 | return result;
|
|---|
| 569 | #endif
|
|---|
| 570 | }
|
|---|
| 571 |
|
|---|
| 572 | float logf(float x) {
|
|---|
| 573 | $abstract float LOGF(float X);
|
|---|
| 574 | float result = LOGF(x);
|
|---|
| 575 |
|
|---|
| 576 | $assert(x > 0, "Argument x should be greater than 0");
|
|---|
| 577 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 578 | if(x == 1)
|
|---|
| 579 | return 0;
|
|---|
| 580 | else {
|
|---|
| 581 | $assume(result != 0);
|
|---|
| 582 | return result;
|
|---|
| 583 | }
|
|---|
| 584 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 585 | return result;
|
|---|
| 586 | #else
|
|---|
| 587 | $assume(((x==1) => (result==0)) && ((x!=1) => (result!=0)));
|
|---|
| 588 | return result;
|
|---|
| 589 | #endif
|
|---|
| 590 | }
|
|---|
| 591 |
|
|---|
| 592 | long double logl(long double x) {
|
|---|
| 593 | $abstract long double LOGL(long double X);
|
|---|
| 594 | long double result = LOGL(x);
|
|---|
| 595 |
|
|---|
| 596 | $assert(x > 0, "Argument x should be greater than 0");
|
|---|
| 597 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 598 | if(x == 1)
|
|---|
| 599 | return 0;
|
|---|
| 600 | else {
|
|---|
| 601 | $assume(result != 0);
|
|---|
| 602 | return result;
|
|---|
| 603 | }
|
|---|
| 604 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 605 | return result;
|
|---|
| 606 | #else
|
|---|
| 607 | $assume(((x==1) => (result==0)) && ((x!=1) => (result!=0)));
|
|---|
| 608 | return result;
|
|---|
| 609 | #endif
|
|---|
| 610 | }
|
|---|
| 611 |
|
|---|
| 612 | double log10(double x) {
|
|---|
| 613 | $abstract double LOG10(double X);
|
|---|
| 614 | double result = LOG10(x);
|
|---|
| 615 |
|
|---|
| 616 | $assert(x > 0, "Argument x should be greater than 0");
|
|---|
| 617 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 618 | if(x == 1)
|
|---|
| 619 | return 0;
|
|---|
| 620 | else {
|
|---|
| 621 | $assume(result != 0);
|
|---|
| 622 | return result;
|
|---|
| 623 | }
|
|---|
| 624 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 625 | return result;
|
|---|
| 626 | #else
|
|---|
| 627 | $assume(((x==1) => (result==0)) && ((x!=1) => (result!=0)));
|
|---|
| 628 | return result;
|
|---|
| 629 | #endif
|
|---|
| 630 | }
|
|---|
| 631 |
|
|---|
| 632 | float log10f(float x) {
|
|---|
| 633 | $abstract float LOG10F(float X);
|
|---|
| 634 | float result = LOG10F(x);
|
|---|
| 635 |
|
|---|
| 636 | $assert(x > 0, "Argument x should be greater than 0");
|
|---|
| 637 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 638 | if(x == 1)
|
|---|
| 639 | return 0;
|
|---|
| 640 | else {
|
|---|
| 641 | $assume(result != 0);
|
|---|
| 642 | return result;
|
|---|
| 643 | }
|
|---|
| 644 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 645 | return result;
|
|---|
| 646 | #else
|
|---|
| 647 | $assume(((x==1) => (result==0)) && ((x!=1) => (result!=0)));
|
|---|
| 648 | return result;
|
|---|
| 649 | #endif
|
|---|
| 650 | }
|
|---|
| 651 |
|
|---|
| 652 | long double log10l(long double x) {
|
|---|
| 653 | $abstract long double LOG10L(long double X);
|
|---|
| 654 | long double result = LOG10L(x);
|
|---|
| 655 |
|
|---|
| 656 | $assert(x > 0, "Argument x should be greater than 0");
|
|---|
| 657 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 658 | if(x == 1)
|
|---|
| 659 | return 0;
|
|---|
| 660 | else {
|
|---|
| 661 | $assume(result != 0);
|
|---|
| 662 | return result;
|
|---|
| 663 | }
|
|---|
| 664 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 665 | return result;
|
|---|
| 666 | #else
|
|---|
| 667 | $assume(((x==1) => (result==0)) && ((x!=1) => (result!=0)));
|
|---|
| 668 | return result;
|
|---|
| 669 | #endif
|
|---|
| 670 | }
|
|---|
| 671 |
|
|---|
| 672 | double log1p(double x) {
|
|---|
| 673 | $abstract double LOG1P(double X);
|
|---|
| 674 |
|
|---|
| 675 | $assert(x > -1, "Argument x should be greater than -1");
|
|---|
| 676 | return LOG1P(x);
|
|---|
| 677 | }
|
|---|
| 678 |
|
|---|
| 679 | float log1pf(float x) {
|
|---|
| 680 | $abstract float LOG1PF(float X);
|
|---|
| 681 |
|
|---|
| 682 | $assert(x > -1, "Argument x should be greater than -1");
|
|---|
| 683 | return LOG1PF(x);
|
|---|
| 684 | }
|
|---|
| 685 |
|
|---|
| 686 | long double log1pl(long double x) {
|
|---|
| 687 | $abstract long double LOG1PL(long double X);
|
|---|
| 688 |
|
|---|
| 689 | $assert(x > -1, "Argument x should be greater than -1");
|
|---|
| 690 | return LOG1PL(x);
|
|---|
| 691 | }
|
|---|
| 692 |
|
|---|
| 693 | double log2(double x) {
|
|---|
| 694 | $abstract double LOG2(double X);
|
|---|
| 695 | double result = LOG2(x);
|
|---|
| 696 |
|
|---|
| 697 | $assert(x > 0, "Argument x should be greater than 0");
|
|---|
| 698 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 699 | if(x == 1)
|
|---|
| 700 | return 0;
|
|---|
| 701 | else {
|
|---|
| 702 | $assume(result != 0);
|
|---|
| 703 | return result;
|
|---|
| 704 | }
|
|---|
| 705 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 706 | return result;
|
|---|
| 707 | #else
|
|---|
| 708 | $assume(((x==1) => (result==0)) && ((x!=1) => (result!=0)));
|
|---|
| 709 | return result;
|
|---|
| 710 | #endif
|
|---|
| 711 | }
|
|---|
| 712 |
|
|---|
| 713 | float log2f(float x) {
|
|---|
| 714 | $abstract float LOG2F(float X);
|
|---|
| 715 | float result = LOG2F(x);
|
|---|
| 716 |
|
|---|
| 717 | $assert(x > 0, "Argument x should be greater than 0");
|
|---|
| 718 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 719 | if(x == 1)
|
|---|
| 720 | return 0;
|
|---|
| 721 | else {
|
|---|
| 722 | $assume(result != 0);
|
|---|
| 723 | return result;
|
|---|
| 724 | }
|
|---|
| 725 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 726 | return result;
|
|---|
| 727 | #else
|
|---|
| 728 | $assume(((x==1) => (result==0)) && ((x!=1) => (result!=0)));
|
|---|
| 729 | return result;
|
|---|
| 730 | #endif
|
|---|
| 731 | }
|
|---|
| 732 |
|
|---|
| 733 | long double log2l(long double x) {
|
|---|
| 734 | $abstract long double LOG2L(long double X);
|
|---|
| 735 | long double result = LOG2L(x);
|
|---|
| 736 |
|
|---|
| 737 | $assert(x > 0, "Argument x should be greater than 0");
|
|---|
| 738 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 739 | if(x == 1)
|
|---|
| 740 | return 0;
|
|---|
| 741 | else {
|
|---|
| 742 | $assume(result != 0);
|
|---|
| 743 | return result;
|
|---|
| 744 | }
|
|---|
| 745 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 746 | return result;
|
|---|
| 747 | #else
|
|---|
| 748 | $assume(((x==1) => (result==0)) && ((x!=1) => (result!=0)));
|
|---|
| 749 | return result;
|
|---|
| 750 | #endif
|
|---|
| 751 | }
|
|---|
| 752 |
|
|---|
| 753 | double logb(double x) {
|
|---|
| 754 | $abstract double LOGB(double X);
|
|---|
| 755 |
|
|---|
| 756 | $assert(x != 0, "Argument x should not equal to 0");
|
|---|
| 757 | return LOGB(x);
|
|---|
| 758 | }
|
|---|
| 759 |
|
|---|
| 760 | float logbf(float x) {
|
|---|
| 761 | $abstract float LOGBF(float X);
|
|---|
| 762 |
|
|---|
| 763 | $assert(x != 0, "Argument x should not equal to 0");
|
|---|
| 764 | return LOGBF(x);
|
|---|
| 765 | }
|
|---|
| 766 |
|
|---|
| 767 | long double logbl(long double x) {
|
|---|
| 768 | $abstract long double LOGBL(long double X);
|
|---|
| 769 |
|
|---|
| 770 | $assert(x != 0, "Argument x should not equal to 0");
|
|---|
| 771 | return LOGBL(x);
|
|---|
| 772 | }
|
|---|
| 773 |
|
|---|
| 774 | double modf(double value, double *iptr) {
|
|---|
| 775 | $abstract double MODF_VALUE(double v);
|
|---|
| 776 | $abstract double MODF_EXP(double v);
|
|---|
| 777 |
|
|---|
| 778 | (*iptr) = MODF_EXP(value);
|
|---|
| 779 | return MODF_VALUE(value);
|
|---|
| 780 | }
|
|---|
| 781 |
|
|---|
| 782 | float modff(float value, float *iptr) {
|
|---|
| 783 | $abstract float MODFF_VALUE(float v);
|
|---|
| 784 | $abstract float MODFF_EXP(float v);
|
|---|
| 785 |
|
|---|
| 786 | (*iptr) = MODFF_EXP(value);
|
|---|
| 787 | return MODFF_VALUE(value);
|
|---|
| 788 | }
|
|---|
| 789 |
|
|---|
| 790 | long double modfl(long double value, long double *iptr) {
|
|---|
| 791 | $abstract long double MODFL_VALUE(long double v);
|
|---|
| 792 | $abstract long double MODFL_EXP(long double v);
|
|---|
| 793 |
|
|---|
| 794 | (*iptr) = MODFL_EXP(value);
|
|---|
| 795 | return MODFL_VALUE(value);
|
|---|
| 796 | }
|
|---|
| 797 |
|
|---|
| 798 | double scalbn(double x, int n) {
|
|---|
| 799 | $abstract double SCALBN(double x, int n);
|
|---|
| 800 |
|
|---|
| 801 | return SCALBN(x, n);
|
|---|
| 802 | }
|
|---|
| 803 |
|
|---|
| 804 | float scalbnf(float x, int n) {
|
|---|
| 805 | $abstract float SCALBNF(float x, int n);
|
|---|
| 806 |
|
|---|
| 807 | return SCALBNF(x, n);
|
|---|
| 808 | }
|
|---|
| 809 |
|
|---|
| 810 | long double scalbnl(long double x, int n) {
|
|---|
| 811 | $abstract long double SCALBNL(long double x, int n);
|
|---|
| 812 |
|
|---|
| 813 | return SCALBNL(x, n);
|
|---|
| 814 | }
|
|---|
| 815 |
|
|---|
| 816 | double scalbln(double x, int n) {
|
|---|
| 817 | $abstract double SCALBLN(double x, int n);
|
|---|
| 818 |
|
|---|
| 819 | return SCALBLN(x, n);
|
|---|
| 820 | }
|
|---|
| 821 |
|
|---|
| 822 | float scalblnf(float x, int n) {
|
|---|
| 823 | $abstract float SCALBLNF(float x, int n);
|
|---|
| 824 |
|
|---|
| 825 | return SCALBLNF(x, n);
|
|---|
| 826 | }
|
|---|
| 827 |
|
|---|
| 828 | long double scalblnl(long double x, int n) {
|
|---|
| 829 | $abstract long double SCALBLNL(long double x, int n);
|
|---|
| 830 |
|
|---|
| 831 | return SCALBLNL(x, n);
|
|---|
| 832 | }
|
|---|
| 833 |
|
|---|
| 834 | double cbrt(double x) {
|
|---|
| 835 | $abstract double CBRT(double x);
|
|---|
| 836 |
|
|---|
| 837 | return CBRT(x);
|
|---|
| 838 | }
|
|---|
| 839 |
|
|---|
| 840 | float cbrtf(float x) {
|
|---|
| 841 | $abstract float CBRTF(float x);
|
|---|
| 842 |
|
|---|
| 843 | return CBRTF(x);
|
|---|
| 844 | }
|
|---|
| 845 |
|
|---|
| 846 | long double cbrtl(long double x) {
|
|---|
| 847 | $abstract long double CBRTL(long double x);
|
|---|
| 848 |
|
|---|
| 849 | return CBRTL(x);
|
|---|
| 850 | }
|
|---|
| 851 |
|
|---|
| 852 | double fabs(double x) {
|
|---|
| 853 | $abstract double FABS(double x);
|
|---|
| 854 | double result = FABS(x);
|
|---|
| 855 |
|
|---|
| 856 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 857 | if(x >= 0)
|
|---|
| 858 | return x;
|
|---|
| 859 | else
|
|---|
| 860 | return -x;
|
|---|
| 861 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 862 | return result;
|
|---|
| 863 | #else
|
|---|
| 864 | $assume((x >= 0 => result == x) && (x < 0 => result == -x));
|
|---|
| 865 | return result;
|
|---|
| 866 | #endif
|
|---|
| 867 | }
|
|---|
| 868 |
|
|---|
| 869 | float fabsf(float x) {
|
|---|
| 870 | $abstract float FABSF(float x);
|
|---|
| 871 | float result = FABSF(x);
|
|---|
| 872 |
|
|---|
| 873 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 874 | if(x >= 0)
|
|---|
| 875 | return x;
|
|---|
| 876 | else
|
|---|
| 877 | return -x;
|
|---|
| 878 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 879 | return result;
|
|---|
| 880 | #else
|
|---|
| 881 | $assume((x >= 0 => result == x) && (x < 0 => result == -x));
|
|---|
| 882 | return result;
|
|---|
| 883 | #endif
|
|---|
| 884 | }
|
|---|
| 885 |
|
|---|
| 886 | long double fabsl(long double x) {
|
|---|
| 887 | $abstract long double FABSL(long double x);
|
|---|
| 888 | long double result = FABSL(x);
|
|---|
| 889 |
|
|---|
| 890 | #ifdef MATH_ELABORATE_ASSUMPTIONS
|
|---|
| 891 | if(x >= 0)
|
|---|
| 892 | return x;
|
|---|
| 893 | else
|
|---|
| 894 | return -x;
|
|---|
| 895 | #elif defined(MATH_NO_ASSUMPTIONS)
|
|---|
| 896 | return result;
|
|---|
| 897 | #else
|
|---|
| 898 | $assume((x >= 0 => result == x) && (x < 0 => result == -x));
|
|---|
| 899 | return result;
|
|---|
| 900 | #endif
|
|---|
| 901 | }
|
|---|
| 902 |
|
|---|
| 903 | double sqrt(double x) {
|
|---|
| 904 | $assert(x >= 0, "Argument x should be greater than 0.");
|
|---|
| 905 | return $pow(x, 0.5);
|
|---|
| 906 | }
|
|---|
| 907 |
|
|---|
| 908 | float sqrtf(float x) {
|
|---|
| 909 | $assert(x >= 0, "Argument x should be greater than 0.");
|
|---|
| 910 | return $pow(x, 0.5);
|
|---|
| 911 | }
|
|---|
| 912 |
|
|---|
| 913 | long double sqrtl(long double x) {
|
|---|
| 914 | $assert(x >= 0, "Argument x should be greater than 0.");
|
|---|
| 915 | return $pow(x, 0.5);
|
|---|
| 916 | }
|
|---|
| 917 |
|
|---|
| 918 | double hypot(double x, double y) {
|
|---|
| 919 | double xsqrPLUSysqr = x*x + y*y;
|
|---|
| 920 |
|
|---|
| 921 | return sqrt(xsqrPLUSysqr);
|
|---|
| 922 | }
|
|---|
| 923 |
|
|---|
| 924 | float hypotf(float x, float y) {
|
|---|
| 925 | double xsqrPLUSysqr = x*x + y*y;
|
|---|
| 926 |
|
|---|
| 927 | return sqrtf(xsqrPLUSysqr);
|
|---|
| 928 | }
|
|---|
| 929 |
|
|---|
| 930 | long double hypotl(long double x, long double y) {
|
|---|
| 931 | double xsqrPLUSysqr = x*x + y*y;
|
|---|
| 932 |
|
|---|
| 933 | return sqrtl(xsqrPLUSysqr);
|
|---|
| 934 | }
|
|---|
| 935 |
|
|---|
| 936 | /* See C18 7.12.7.4 The pow functions
|
|---|
| 937 | * The pow functions compute x raised to the power y.
|
|---|
| 938 | * A domain error occurs if x is finite and negative and y is finite and not an integer value.
|
|---|
| 939 | * A range error may occur.
|
|---|
| 940 | * A domain error may occur if x is zero and y is zero.
|
|---|
| 941 | * A domain error or pole error may occur if x is zero and y is less than zero.
|
|---|
| 942 | */
|
|---|
| 943 | double pow(double x, double y) {
|
|---|
| 944 | $assert(x != 0 || y > 0,
|
|---|
| 945 | "pow(double x, double y): "
|
|---|
| 946 | "It's invalid that argument x is 0 "
|
|---|
| 947 | "and y is no greater than 0.");
|
|---|
| 948 | $assert(x >= 0 || (y==rint(y)),
|
|---|
| 949 | "pow(double x, double y): "
|
|---|
| 950 | "It's invalid that argument x is infinite "
|
|---|
| 951 | "and negative and y is not an integer value.");
|
|---|
| 952 | return $pow(x, y);
|
|---|
| 953 | }
|
|---|
| 954 |
|
|---|
| 955 | float powf(float x, float y) {
|
|---|
| 956 | $assert(x != 0 || y > 0,
|
|---|
| 957 | "powf(float x, float y): "
|
|---|
| 958 | "It's invalid that argument x is 0 "
|
|---|
| 959 | "and y is no greater than 0.");
|
|---|
| 960 | $assert(x >= 0 || (y==rintf(y)),
|
|---|
| 961 | "powf(float x, float y): "
|
|---|
| 962 | "It's invalid that argument x is infinite "
|
|---|
| 963 | "and negative and y is not an integer value.");
|
|---|
| 964 | return $pow(x, y);
|
|---|
| 965 | }
|
|---|
| 966 |
|
|---|
| 967 | long double powl(long double x, long double y) {
|
|---|
| 968 | $assert(x != 0 || y > 0,
|
|---|
| 969 | "powl(long double x, long double y): "
|
|---|
| 970 | "It's invalid that argument x is 0 "
|
|---|
| 971 | "and y is no greater than 0.");
|
|---|
| 972 | $assert(x >= 0 || (y==rintl(y)),
|
|---|
| 973 | "powl(long double x, long double y): "
|
|---|
| 974 | "It's invalid that argument x is infinite "
|
|---|
| 975 | "and negative and y is not an integer value.");
|
|---|
| 976 | return $pow(x, y);
|
|---|
| 977 | }
|
|---|
| 978 |
|
|---|
| 979 | double erf(double x) {
|
|---|
| 980 | $abstract double ERF(double x);
|
|---|
| 981 |
|
|---|
| 982 | return ERF(x);
|
|---|
| 983 | }
|
|---|
| 984 |
|
|---|
| 985 | float erff(float x) {
|
|---|
| 986 | $abstract float ERFF(float x);
|
|---|
| 987 |
|
|---|
| 988 | return ERFF(x);
|
|---|
| 989 | }
|
|---|
| 990 |
|
|---|
| 991 | long double erfl(long double x) {
|
|---|
| 992 | $abstract long double ERFL(long double x);
|
|---|
| 993 |
|
|---|
| 994 | return ERFL(x);
|
|---|
| 995 | }
|
|---|
| 996 |
|
|---|
| 997 | double erfc(double x) {
|
|---|
| 998 | $abstract double ERFC(double x);
|
|---|
| 999 |
|
|---|
| 1000 | return ERFC(x);
|
|---|
| 1001 | }
|
|---|
| 1002 |
|
|---|
| 1003 | float erfcf(float x) {
|
|---|
| 1004 | $abstract float ERFCF(float x);
|
|---|
| 1005 |
|
|---|
| 1006 | return ERFCF(x);
|
|---|
| 1007 | }
|
|---|
| 1008 |
|
|---|
| 1009 | long double erfcl(long double x) {
|
|---|
| 1010 | $abstract long double ERFCL(long double x);
|
|---|
| 1011 |
|
|---|
| 1012 | return ERFCL(x);
|
|---|
| 1013 | }
|
|---|
| 1014 |
|
|---|
| 1015 | double lgamma(double x) {
|
|---|
| 1016 | $abstract double LGAMMA(double x);
|
|---|
| 1017 |
|
|---|
| 1018 | $assert((x > 0), "Argument x should be greater than 0");
|
|---|
| 1019 | return LGAMMA(x);
|
|---|
| 1020 | }
|
|---|
| 1021 |
|
|---|
| 1022 | float lgammaf(float x) {
|
|---|
| 1023 | $abstract float LGAMMAF(float x);
|
|---|
| 1024 |
|
|---|
| 1025 | $assert((x > 0), "Argument x should be greater than 0");
|
|---|
| 1026 | return LGAMMAF(x);
|
|---|
| 1027 | }
|
|---|
| 1028 |
|
|---|
| 1029 | long double lgammal(long double x) {
|
|---|
| 1030 | $abstract long double LGAMMAL(long double x);
|
|---|
| 1031 |
|
|---|
| 1032 | $assert((x > 0), "Argument x should be greater than 0");
|
|---|
| 1033 | return LGAMMAL(x);
|
|---|
| 1034 | }
|
|---|
| 1035 |
|
|---|
| 1036 | double tgamma(double x) {
|
|---|
| 1037 | $abstract double TGAMMA(double x);
|
|---|
| 1038 |
|
|---|
| 1039 | $assert((x > 0), "Argument x should be greater than 0");
|
|---|
| 1040 | return TGAMMA(x);
|
|---|
| 1041 | }
|
|---|
| 1042 |
|
|---|
| 1043 | float tgammaf(float x) {
|
|---|
| 1044 | $abstract float TGAMMAF(float x);
|
|---|
| 1045 |
|
|---|
| 1046 | $assert((x > 0), "Argument x should be greater than 0");
|
|---|
| 1047 | return TGAMMAF(x);
|
|---|
| 1048 | }
|
|---|
| 1049 |
|
|---|
| 1050 | long double tgammal(long double x) {
|
|---|
| 1051 | $abstract long double TGAMMAL(long double x);
|
|---|
| 1052 |
|
|---|
| 1053 | $assert((x > 0), "Argument x should be greater than 0");
|
|---|
| 1054 | return TGAMMAL(x);
|
|---|
| 1055 | }
|
|---|
| 1056 |
|
|---|
| 1057 | /* System functions
|
|---|
| 1058 | double ceil(double x) {
|
|---|
| 1059 | $abstract double CEIL(double x);
|
|---|
| 1060 |
|
|---|
| 1061 | $assume(CEIL(x) >= x && CEIL(x) < (x + 1));
|
|---|
| 1062 | $assume(x < 0 => (int)CEIL(x) == (int)x);
|
|---|
| 1063 | $assume(CEIL(0) == (int)0);
|
|---|
| 1064 | return CEIL(x);
|
|---|
| 1065 | }
|
|---|
| 1066 |
|
|---|
| 1067 | float ceilf(float x) {
|
|---|
| 1068 | $abstract float CEILF(float x);
|
|---|
| 1069 |
|
|---|
| 1070 | $assume(CEILF(x) >= x && CEILF(x) < (x + 1));
|
|---|
| 1071 | return CEILF(x);
|
|---|
| 1072 | }
|
|---|
| 1073 |
|
|---|
| 1074 | long double ceill(long double x) {
|
|---|
| 1075 | $abstract long double CEILL(long double x);
|
|---|
| 1076 |
|
|---|
| 1077 | $assume(CEILL(x) >= x && CEILL(x) < (x + 1));
|
|---|
| 1078 | return CEILL(x);
|
|---|
| 1079 | }
|
|---|
| 1080 |
|
|---|
| 1081 | double floor(double x) {
|
|---|
| 1082 | $abstract double FLOOR(double x);
|
|---|
| 1083 |
|
|---|
| 1084 | $assume(FLOOR(x) <= x && FLOOR(x) > (x - 1));
|
|---|
| 1085 | $assume(x > 0 => (int)FLOOR(x) == (int)x);
|
|---|
| 1086 | $assume(FLOOR(0) == (int)0);
|
|---|
| 1087 | return FLOOR(x);
|
|---|
| 1088 | }
|
|---|
| 1089 |
|
|---|
| 1090 | float floorf(float x) {
|
|---|
| 1091 | $abstract float FLOORF(float x);
|
|---|
| 1092 |
|
|---|
| 1093 | $assume(FLOORF(x) <= x && FLOORF(x) > (x - 1));
|
|---|
| 1094 | return FLOORF(x);
|
|---|
| 1095 | }
|
|---|
| 1096 |
|
|---|
| 1097 | long double floorl(long double x) {
|
|---|
| 1098 | $abstract long double FLOORL(long double x);
|
|---|
| 1099 |
|
|---|
| 1100 | $assume(FLOORL(x) <= x && FLOORL(x) > (x - 1));
|
|---|
| 1101 | return FLOORL(x);
|
|---|
| 1102 | }*/
|
|---|
| 1103 |
|
|---|
| 1104 | double nearbyint(double x) {
|
|---|
| 1105 | $abstract double NEARBYINT(double x);
|
|---|
| 1106 |
|
|---|
| 1107 | $assume(NEARBYINT(x) < (x+1) && NEARBYINT(x) > (x-1));
|
|---|
| 1108 | return NEARBYINT(x);
|
|---|
| 1109 | }
|
|---|
| 1110 |
|
|---|
| 1111 | float nearbyintf(float x) {
|
|---|
| 1112 | $abstract float NEARBYINTF(float x);
|
|---|
| 1113 |
|
|---|
| 1114 | $assume(NEARBYINTF(x) < (x+1) && NEARBYINTF(x) > (x-1));
|
|---|
| 1115 | return NEARBYINTF(x);
|
|---|
| 1116 | }
|
|---|
| 1117 |
|
|---|
| 1118 | long double nearbyintl(long double x) {
|
|---|
| 1119 | $abstract long double NEARBYINTL(long double x);
|
|---|
| 1120 |
|
|---|
| 1121 | $assume(NEARBYINTL(x) < (x+1) && NEARBYINTL(x) > (x-1));
|
|---|
| 1122 | return NEARBYINTL(x);
|
|---|
| 1123 | }
|
|---|
| 1124 |
|
|---|
| 1125 | double rint(double x) {
|
|---|
| 1126 | $abstract double RINT(double x);
|
|---|
| 1127 |
|
|---|
| 1128 | $assume(RINT(x) < (x+1) && RINT(x) > (x-1));
|
|---|
| 1129 | return RINT(x);
|
|---|
| 1130 | }
|
|---|
| 1131 |
|
|---|
| 1132 | float rintf(float x) {
|
|---|
| 1133 | $abstract float RINTF(float x);
|
|---|
| 1134 |
|
|---|
| 1135 | $assume(RINTF(x) < (x+1) && RINTF(x) > (x-1));
|
|---|
| 1136 | return RINTF(x);
|
|---|
| 1137 | }
|
|---|
| 1138 |
|
|---|
| 1139 | long double rintl(long double x) {
|
|---|
| 1140 | $abstract long double RINTL(long double x);
|
|---|
| 1141 |
|
|---|
| 1142 | $assume(RINTL(x) < (x+1) && RINTL(x) > (x-1));
|
|---|
| 1143 | return RINTL(x);
|
|---|
| 1144 | }
|
|---|
| 1145 |
|
|---|
| 1146 | long int lrint(double x) {
|
|---|
| 1147 | $abstract long int LRINT(double x);
|
|---|
| 1148 |
|
|---|
| 1149 | $assume(LRINT(x) < (x+1) && LRINT(x) > (x-1));
|
|---|
| 1150 | return LRINT(x);
|
|---|
| 1151 | }
|
|---|
| 1152 |
|
|---|
| 1153 | long int lrintf(float x) {
|
|---|
| 1154 | $abstract long int LRINTF(float x);
|
|---|
| 1155 |
|
|---|
| 1156 | $assume(LRINTF(x) < (x+1) && LRINTF(x) > (x-1));
|
|---|
| 1157 | return LRINTF(x);
|
|---|
| 1158 | }
|
|---|
| 1159 |
|
|---|
| 1160 | long int lrintl(long double x) {
|
|---|
| 1161 | $abstract long int LRINTL(long double x);
|
|---|
| 1162 |
|
|---|
| 1163 | $assume(LRINTL(x) < (x+1) && LRINTL(x) > (x-1));
|
|---|
| 1164 | return LRINTL(x);
|
|---|
| 1165 | }
|
|---|
| 1166 |
|
|---|
| 1167 | long long int llrint(double x) {
|
|---|
| 1168 | $abstract long long int LLRINT(double x);
|
|---|
| 1169 |
|
|---|
| 1170 | $assume(LLRINT(x) < (x+1) && LLRINT(x) > (x-1));
|
|---|
| 1171 | return LLRINT(x);
|
|---|
| 1172 | }
|
|---|
| 1173 |
|
|---|
| 1174 | long long int llrintf(float x) {
|
|---|
| 1175 | $abstract long long int LLRINTF(float x);
|
|---|
| 1176 |
|
|---|
| 1177 | $assume(LLRINTF(x) < (x+1) && LLRINTF(x) > (x-1));
|
|---|
| 1178 | return LLRINTF(x);
|
|---|
| 1179 | }
|
|---|
| 1180 |
|
|---|
| 1181 | long long int llrintl(long double x) {
|
|---|
| 1182 | $abstract long long int LLRINTL(long double x);
|
|---|
| 1183 |
|
|---|
| 1184 | $assume(LLRINTL(x) < (x+1) && LLRINTL(x) > (x-1));
|
|---|
| 1185 | return LLRINTL(x);
|
|---|
| 1186 | }
|
|---|
| 1187 |
|
|---|
| 1188 | double round(double x) {
|
|---|
| 1189 | $abstract double ROUND(double x);
|
|---|
| 1190 |
|
|---|
| 1191 | $assume(ROUND(x) < (x+1) && ROUND(x) > (x-1));
|
|---|
| 1192 | return ROUND(x);
|
|---|
| 1193 | }
|
|---|
| 1194 |
|
|---|
| 1195 | float roundf(float x) {
|
|---|
| 1196 | $abstract float ROUNDF(float x);
|
|---|
| 1197 |
|
|---|
| 1198 | $assume(ROUNDF(x) < (x+1) && ROUNDF(x) > (x-1));
|
|---|
| 1199 | return ROUNDF(x);
|
|---|
| 1200 | }
|
|---|
| 1201 |
|
|---|
| 1202 | long double roundl(long double x) {
|
|---|
| 1203 | $abstract long double ROUNDL(long double x);
|
|---|
| 1204 |
|
|---|
| 1205 | $assume(ROUNDL(x) < (x+1) && ROUNDL(x) > (x-1));
|
|---|
| 1206 | return ROUNDL(x);
|
|---|
| 1207 | }
|
|---|
| 1208 |
|
|---|
| 1209 | long int lround(double x) {
|
|---|
| 1210 | $abstract long int LROUND(double x);
|
|---|
| 1211 |
|
|---|
| 1212 | $assume(LROUND(x) < (x+1) && LROUND(x) > (x-1));
|
|---|
| 1213 | return LROUND(x);
|
|---|
| 1214 | }
|
|---|
| 1215 |
|
|---|
| 1216 | long int lroundf(float x) {
|
|---|
| 1217 | $abstract long int LROUNDF(float x);
|
|---|
| 1218 |
|
|---|
| 1219 | $assume(LROUNDF(x) < (x+1) && LROUNDF(x) > (x-1));
|
|---|
| 1220 | return LROUNDF(x);
|
|---|
| 1221 | }
|
|---|
| 1222 |
|
|---|
| 1223 | long int lroundl(long double x) {
|
|---|
| 1224 | $abstract long int LROUNDL(long double x);
|
|---|
| 1225 |
|
|---|
| 1226 | $assume(LROUNDL(x) < (x+1) && LROUNDL(x) > (x-1));
|
|---|
| 1227 | return LROUNDL(x);
|
|---|
| 1228 | }
|
|---|
| 1229 |
|
|---|
| 1230 | long long int llround(double x) {
|
|---|
| 1231 | $abstract long long int LLROUND(double x);
|
|---|
| 1232 |
|
|---|
| 1233 | $assume(LLROUND(x) < (x+1) && LLROUND(x) > (x-1));
|
|---|
| 1234 | return LLROUND(x);
|
|---|
| 1235 | }
|
|---|
| 1236 |
|
|---|
| 1237 | long long int llroundf(float x) {
|
|---|
| 1238 | $abstract long long int LLROUNDF(float x);
|
|---|
| 1239 |
|
|---|
| 1240 | $assume(LLROUNDF(x) < (x+1) && LLROUNDF(x) > (x-1));
|
|---|
| 1241 | return LLROUNDF(x);
|
|---|
| 1242 | }
|
|---|
| 1243 |
|
|---|
| 1244 | long long int llroundl(long double x) {
|
|---|
| 1245 | $abstract long long int LLROUNDL(long double x);
|
|---|
| 1246 |
|
|---|
| 1247 | $assume(LLROUNDL(x) < (x+1) && LLROUNDL(x) > (x-1));
|
|---|
| 1248 | return LLROUNDL(x);
|
|---|
| 1249 | }
|
|---|
| 1250 |
|
|---|
| 1251 | double trunc(double x) {
|
|---|
| 1252 | $abstract double TRUNC(double x);
|
|---|
| 1253 |
|
|---|
| 1254 | $assume(TRUNC(x) < (x) && TRUNC(x) > (x-1));
|
|---|
| 1255 | return TRUNC(x);
|
|---|
| 1256 | }
|
|---|
| 1257 |
|
|---|
| 1258 | float truncf(float x) {
|
|---|
| 1259 | $abstract float TRUNCF(float x);
|
|---|
| 1260 |
|
|---|
| 1261 | $assume(TRUNCF(x) < (x) && TRUNCF(x) > (x-1));
|
|---|
| 1262 | return TRUNCF(x);
|
|---|
| 1263 | }
|
|---|
| 1264 |
|
|---|
| 1265 | long double truncl(long double x) {
|
|---|
| 1266 | $abstract long double TRUNCL(long double x);
|
|---|
| 1267 |
|
|---|
| 1268 | $assume(TRUNCL(x) < (x) && TRUNCL(x) > (x-1));
|
|---|
| 1269 | return TRUNCL(x);
|
|---|
| 1270 | }
|
|---|
| 1271 |
|
|---|
| 1272 | double fmod(double x, double y) {
|
|---|
| 1273 | $abstract double FMOD(double x, double y);
|
|---|
| 1274 |
|
|---|
| 1275 | $assert(y != 0, "Argument y should not be 0");
|
|---|
| 1276 | return FMOD(x,y);
|
|---|
| 1277 | }
|
|---|
| 1278 |
|
|---|
| 1279 | float fmodf(float x, float y) {
|
|---|
| 1280 | $abstract float FMODF(float x, float y);
|
|---|
| 1281 |
|
|---|
| 1282 | $assert(y != 0, "Argument y should not be 0");
|
|---|
| 1283 | return FMODF(x,y);
|
|---|
| 1284 | }
|
|---|
| 1285 |
|
|---|
| 1286 | long double fmodl(long double x, long double y) {
|
|---|
| 1287 | $abstract long double FMODL(long double x, long double y);
|
|---|
| 1288 |
|
|---|
| 1289 | $assert(y != 0, "Argument y should not be 0");
|
|---|
| 1290 | return FMODL(x,y);
|
|---|
| 1291 | }
|
|---|
| 1292 |
|
|---|
| 1293 | double remainder(double x, double y) {
|
|---|
| 1294 | $abstract double REMAINDER(double x, double y);
|
|---|
| 1295 |
|
|---|
| 1296 | $assert(y != 0, "Argument y should not be 0");
|
|---|
| 1297 | return REMAINDER(x,y);
|
|---|
| 1298 | }
|
|---|
| 1299 |
|
|---|
| 1300 | float remainderf(float x, float y) {
|
|---|
| 1301 | $abstract float REMAINDERF(float x, float y);
|
|---|
| 1302 |
|
|---|
| 1303 | $assert(y != 0, "Argument y should not be 0");
|
|---|
| 1304 | return REMAINDERF(x,y);
|
|---|
| 1305 | }
|
|---|
| 1306 |
|
|---|
| 1307 | long double remainderl(long double x, long double y) {
|
|---|
| 1308 | $abstract long double REMAINDERL(long double x, long double y);
|
|---|
| 1309 |
|
|---|
| 1310 | $assert(y != 0, "Argument y should not be 0");
|
|---|
| 1311 | return REMAINDERL(x,y);
|
|---|
| 1312 | }
|
|---|
| 1313 |
|
|---|
| 1314 |
|
|---|
| 1315 | double remquo(double x, double y, int *quo) {
|
|---|
| 1316 | $abstract double REMQUO(double x, double y);
|
|---|
| 1317 | $abstract int REMQUO_QUO(double x, double y);
|
|---|
| 1318 |
|
|---|
| 1319 | $assert(y != 0, "Argument y should not be 0");
|
|---|
| 1320 | (*quo) = REMQUO_QUO(x, y);
|
|---|
| 1321 | return REMQUO(x,y);
|
|---|
| 1322 | }
|
|---|
| 1323 |
|
|---|
| 1324 | float remquof(float x, float y, int *quo) {
|
|---|
| 1325 | $abstract float REMQUOF(float x, float y);
|
|---|
| 1326 | $abstract int REMQUOF_QUO(float x, float y);
|
|---|
| 1327 |
|
|---|
| 1328 | $assert(y != 0, "Argument y should not be 0");
|
|---|
| 1329 | (*quo) = REMQUOF_QUO(x, y);
|
|---|
| 1330 | return REMQUOF(x,y);
|
|---|
| 1331 | }
|
|---|
| 1332 |
|
|---|
| 1333 | long double remquol(long double x, long double y, int *quo) {
|
|---|
| 1334 | $abstract long double REMQUOL(long double x, long double y);
|
|---|
| 1335 | $abstract int REMQUOL_QUO(long double x, long double y);
|
|---|
| 1336 |
|
|---|
| 1337 | $assert(y != 0, "Argument y should not be 0");
|
|---|
| 1338 | (*quo) = REMQUOL_QUO(x, y);
|
|---|
| 1339 | return REMQUOL(x,y);
|
|---|
| 1340 | }
|
|---|
| 1341 |
|
|---|
| 1342 | double copysign(double x, double y) {
|
|---|
| 1343 | $abstract double COPYSIGN(double x, double y);
|
|---|
| 1344 |
|
|---|
| 1345 | return COPYSIGN(x,y);
|
|---|
| 1346 | }
|
|---|
| 1347 |
|
|---|
| 1348 | float copysignf(float x, float y) {
|
|---|
| 1349 | $abstract float COPYSIGNF(float x, float y);
|
|---|
| 1350 |
|
|---|
| 1351 | return COPYSIGNF(x,y);
|
|---|
| 1352 | }
|
|---|
| 1353 |
|
|---|
| 1354 | long double copysignl(long double x, long double y) {
|
|---|
| 1355 | $abstract long double COPYSIGNL(long double x, long double y);
|
|---|
| 1356 |
|
|---|
| 1357 | return COPYSIGNL(x,y);
|
|---|
| 1358 | }
|
|---|
| 1359 |
|
|---|
| 1360 | double nan(const char *tagp) {
|
|---|
| 1361 | // changed by sfsiegel from NAN to CNAN
|
|---|
| 1362 | // since NAN is already used
|
|---|
| 1363 | $abstract double CNAN(const char *tagp);
|
|---|
| 1364 |
|
|---|
| 1365 | return CNAN(tagp);
|
|---|
| 1366 | }
|
|---|
| 1367 |
|
|---|
| 1368 | float nanf(const char *tagp) {
|
|---|
| 1369 | $abstract float NANF(const char *tagp);
|
|---|
| 1370 |
|
|---|
| 1371 | return NANF(tagp);
|
|---|
| 1372 | }
|
|---|
| 1373 |
|
|---|
| 1374 | long double nanl(const char *tagp) {
|
|---|
| 1375 | $abstract long double NANL(const char *tagp);
|
|---|
| 1376 |
|
|---|
| 1377 | return NANL(tagp);
|
|---|
| 1378 | }
|
|---|
| 1379 |
|
|---|
| 1380 | double nextafter(double x, double y) {
|
|---|
| 1381 | $abstract double NEXTAFTER(double x, double y);
|
|---|
| 1382 |
|
|---|
| 1383 | return NEXTAFTER(x,y);
|
|---|
| 1384 | }
|
|---|
| 1385 |
|
|---|
| 1386 | float nextafterf(float x, float y) {
|
|---|
| 1387 | $abstract float NEXTAFTERF(float x, float y);
|
|---|
| 1388 |
|
|---|
| 1389 | return NEXTAFTERF(x,y);
|
|---|
| 1390 | }
|
|---|
| 1391 |
|
|---|
| 1392 | long double nextafterl(long double x, long double y) {
|
|---|
| 1393 | $abstract long double NEXTAFTERL(long double x, long double y);
|
|---|
| 1394 |
|
|---|
| 1395 | return NEXTAFTERL(x,y);
|
|---|
| 1396 | }
|
|---|
| 1397 |
|
|---|
| 1398 | double nexttoward(double x, long double y) {
|
|---|
| 1399 | $abstract double NEXTTOWARD(double x, long double y);
|
|---|
| 1400 |
|
|---|
| 1401 | return NEXTTOWARD(x,y);
|
|---|
| 1402 | }
|
|---|
| 1403 |
|
|---|
| 1404 | float nexttowardf(float x, long double y) {
|
|---|
| 1405 | $abstract float NEXTTOWARDF(float x, long double y);
|
|---|
| 1406 |
|
|---|
| 1407 | return NEXTTOWARDF(x,y);
|
|---|
| 1408 | }
|
|---|
| 1409 |
|
|---|
| 1410 | long double nexttowardl(long double x, long double y) {
|
|---|
| 1411 | $abstract long double NEXTTOWARDL(long double x, long double y);
|
|---|
| 1412 |
|
|---|
| 1413 | return NEXTTOWARDL(x,y);
|
|---|
| 1414 | }
|
|---|
| 1415 |
|
|---|
| 1416 | double fdim(double x, double y) {
|
|---|
| 1417 | return (x>y)?(x-y):0;
|
|---|
| 1418 | }
|
|---|
| 1419 |
|
|---|
| 1420 | float fdimf(float x, float y) {
|
|---|
| 1421 | return (x>y)?(x-y):0;
|
|---|
| 1422 | }
|
|---|
| 1423 |
|
|---|
| 1424 | long double fdiml(long double x, long double y) {
|
|---|
| 1425 | return (x>y)?(x-y):0;
|
|---|
| 1426 | }
|
|---|
| 1427 |
|
|---|
| 1428 | double fmax(double x, double y) {
|
|---|
| 1429 | return (x>y)?(x):(y);
|
|---|
| 1430 | }
|
|---|
| 1431 |
|
|---|
| 1432 | float fmaxf(float x, float y) {
|
|---|
| 1433 | return (x>y)?(x):(y);
|
|---|
| 1434 | }
|
|---|
| 1435 |
|
|---|
| 1436 | long double fmaxl(long double x, long double y) {
|
|---|
| 1437 | return (x>y)?(x):(y);
|
|---|
| 1438 | }
|
|---|
| 1439 |
|
|---|
| 1440 | double fmin(double x, double y) {
|
|---|
| 1441 | return (x<y)?(x):(y);
|
|---|
| 1442 | }
|
|---|
| 1443 |
|
|---|
| 1444 | float fminf(float x, float y) {
|
|---|
| 1445 | return (x<y)?(x):(y);
|
|---|
| 1446 | }
|
|---|
| 1447 |
|
|---|
| 1448 | long double fminl(long double x, long double y) {
|
|---|
| 1449 | return (x<y)?(x):(y);
|
|---|
| 1450 | }
|
|---|
| 1451 |
|
|---|
| 1452 | double fma(double x, double y, double z) {
|
|---|
| 1453 | $abstract double FMA(double x, double y, double z);
|
|---|
| 1454 |
|
|---|
| 1455 | return FMA(x,y,z);
|
|---|
| 1456 | }
|
|---|
| 1457 |
|
|---|
| 1458 | float fmaf(float x, float y, float z) {
|
|---|
| 1459 | $abstract float FMAF(float x, float y, float z);
|
|---|
| 1460 |
|
|---|
| 1461 | return FMAF(x,y,z);
|
|---|
| 1462 | }
|
|---|
| 1463 |
|
|---|
| 1464 | long double fmal(long double x, long double y, long double z) {
|
|---|
| 1465 | $abstract long double FMAL(long double x,
|
|---|
| 1466 | long double y, long double z);
|
|---|
| 1467 |
|
|---|
| 1468 | return FMAL(x,y,z);
|
|---|
| 1469 | }
|
|---|
| 1470 |
|
|---|
| 1471 | #endif
|
|---|
| 1472 |
|
|---|
| 1473 |
|
|---|