Revert some word-splits to their normal form, e.g. InstallShield.
[wine/multimedia.git] / dlls / msvcrt / math.c
blob06f4eb523a6e459e7dce81b61b01fc1ba8ed661c
1 /*
2 * msvcrt.dll math functions
4 * Copyright 2000 Jon Griffiths
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #include "config.h"
21 #include "msvcrt.h"
22 #include "msvcrt/errno.h"
24 #include <stdio.h>
25 #define __USE_ISOC9X 1
26 #define __USE_ISOC99 1
27 #include <math.h>
28 #ifdef HAVE_IEEEFP_H
29 #include <ieeefp.h>
30 #endif
32 #include "msvcrt/stdlib.h"
34 #include "wine/debug.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
38 #ifndef HAVE_FINITE
39 #ifndef finite /* Could be a macro */
40 #ifdef isfinite
41 #define finite(x) isfinite(x)
42 #else
43 #define finite(x) (!isnan(x)) /* At least catch some cases */
44 #endif
45 #endif
46 #endif
48 #ifndef signbit
49 #define signbit(x) 0
50 #endif
52 /* fpclass constants */
53 #define _FPCLASS_SNAN 1
54 #define _FPCLASS_QNAN 2
55 #define _FPCLASS_NINF 4
56 #define _FPCLASS_NN 8
57 #define _FPCLASS_ND 16
58 #define _FPCLASS_NZ 32
59 #define _FPCLASS_PZ 64
60 #define _FPCLASS_PD 128
61 #define _FPCLASS_PN 256
62 #define _FPCLASS_PINF 512
64 /* _statusfp bit flags */
65 #define _SW_INEXACT 0x1
66 #define _SW_UNDERFLOW 0x2
67 #define _SW_OVERFLOW 0x4
68 #define _SW_ZERODIVIDE 0x8
69 #define _SW_INVALID 0x10
70 #define _SW_DENORMAL 0x80000
72 /* _controlfp masks and bitflags - x86 only so far*/
73 #ifdef __i386__
74 #define _MCW_EM 0x8001f
75 #define _EM_INEXACT 0x1
76 #define _EM_UNDERFLOW 0x2
77 #define _EM_OVERFLOW 0x4
78 #define _EM_ZERODIVIDE 0x8
79 #define _EM_INVALID 0x10
81 #define _MCW_RC 0x300
82 #define _RC_NEAR 0x0
83 #define _RC_DOWN 0x100
84 #define _RC_UP 0x200
85 #define _RC_CHOP 0x300
87 #define _MCW_PC 0x30000
88 #define _PC_64 0x0
89 #define _PC_53 0x10000
90 #define _PC_24 0x20000
92 #define _MCW_IC 0x40000
93 #define _IC_AFFINE 0x40000
94 #define _IC_PROJECTIVE 0x0
96 #define _EM_DENORMAL 0x80000
97 #endif
99 typedef struct __MSVCRT_complex
101 double real;
102 double imaginary;
103 } MSVCRT_complex;
105 typedef struct __MSVCRT_exception
107 int type;
108 char *name;
109 double arg1;
110 double arg2;
111 double retval;
112 } MSVCRT_exception;
115 typedef int (*MSVCRT_matherr_func)(MSVCRT_exception *);
117 static MSVCRT_matherr_func MSVCRT_default_matherr_func = NULL;
119 #if defined(__GNUC__) && defined(__i386__)
121 #define FPU_DOUBLE(var) double var; \
122 __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var) : )
123 #define FPU_DOUBLES(var1,var2) double var1,var2; \
124 __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var2) : ); \
125 __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var1) : )
127 /*********************************************************************
128 * _CIacos (MSVCRT.@)
130 double _CIacos(void)
132 FPU_DOUBLE(x);
133 if (x < -1.0 || x > 1.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
134 return acos(x);
137 /*********************************************************************
138 * _CIasin (MSVCRT.@)
140 double _CIasin(void)
142 FPU_DOUBLE(x);
143 if (x < -1.0 || x > 1.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
144 return asin(x);
147 /*********************************************************************
148 * _CIatan (MSVCRT.@)
150 double _CIatan(void)
152 FPU_DOUBLE(x);
153 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
154 return atan(x);
157 /*********************************************************************
158 * _CIatan2 (MSVCRT.@)
160 double _CIatan2(void)
162 FPU_DOUBLES(x,y);
163 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
164 return atan2(x,y);
167 /*********************************************************************
168 * _CIcos (MSVCRT.@)
170 double _CIcos(void)
172 FPU_DOUBLE(x);
173 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
174 return cos(x);
177 /*********************************************************************
178 * _CIcosh (MSVCRT.@)
180 double _CIcosh(void)
182 FPU_DOUBLE(x);
183 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
184 return cosh(x);
187 /*********************************************************************
188 * _CIexp (MSVCRT.@)
190 double _CIexp(void)
192 FPU_DOUBLE(x);
193 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
194 return exp(x);
197 /*********************************************************************
198 * _CIfmod (MSVCRT.@)
200 double _CIfmod(void)
202 FPU_DOUBLES(x,y);
203 if (!finite(x) || !finite(y)) *MSVCRT__errno() = MSVCRT_EDOM;
204 return fmod(x,y);
207 /*********************************************************************
208 * _CIlog (MSVCRT.@)
210 double _CIlog(void)
212 FPU_DOUBLE(x);
213 if (x < 0.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
214 if (x == 0.0) *MSVCRT__errno() = MSVCRT_ERANGE;
215 return log(x);
218 /*********************************************************************
219 * _CIlog10 (MSVCRT.@)
221 double _CIlog10(void)
223 FPU_DOUBLE(x);
224 if (x < 0.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
225 if (x == 0.0) *MSVCRT__errno() = MSVCRT_ERANGE;
226 return log10(x);
229 /*********************************************************************
230 * _CIpow (MSVCRT.@)
232 double _CIpow(void)
234 double z;
235 FPU_DOUBLES(x,y);
236 /* FIXME: If x < 0 and y is not integral, set EDOM */
237 z = pow(x,y);
238 if (!finite(z)) *MSVCRT__errno() = MSVCRT_EDOM;
239 return z;
242 /*********************************************************************
243 * _CIsin (MSVCRT.@)
245 double _CIsin(void)
247 FPU_DOUBLE(x);
248 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
249 return sin(x);
252 /*********************************************************************
253 * _CIsinh (MSVCRT.@)
255 double _CIsinh(void)
257 FPU_DOUBLE(x);
258 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
259 return sinh(x);
262 /*********************************************************************
263 * _CIsqrt (MSVCRT.@)
265 double _CIsqrt(void)
267 FPU_DOUBLE(x);
268 if (x < 0.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
269 return sqrt(x);
272 /*********************************************************************
273 * _CItan (MSVCRT.@)
275 double _CItan(void)
277 FPU_DOUBLE(x);
278 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
279 return tan(x);
282 /*********************************************************************
283 * _CItanh (MSVCRT.@)
285 double _CItanh(void)
287 FPU_DOUBLE(x);
288 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
289 return tanh(x);
292 #else /* defined(__GNUC__) && defined(__i386__) */
294 /* The above cannot be called on non x86 platforms, stub them for linking */
296 #define IX86_ONLY(func) double func(void) { return 0.0; }
298 IX86_ONLY(_CIacos)
299 IX86_ONLY(_CIasin)
300 IX86_ONLY(_CIatan)
301 IX86_ONLY(_CIatan2)
302 IX86_ONLY(_CIcos)
303 IX86_ONLY(_CIcosh)
304 IX86_ONLY(_CIexp)
305 IX86_ONLY(_CIfmod)
306 IX86_ONLY(_CIlog)
307 IX86_ONLY(_CIlog10)
308 IX86_ONLY(_CIpow)
309 IX86_ONLY(_CIsin)
310 IX86_ONLY(_CIsinh)
311 IX86_ONLY(_CIsqrt)
312 IX86_ONLY(_CItan)
313 IX86_ONLY(_CItanh)
315 #endif /* defined(__GNUC__) && defined(__i386__) */
317 /*********************************************************************
318 * _fpclass (MSVCRT.@)
320 int _fpclass(double num)
322 #if defined(HAVE_FPCLASS) || defined(fpclass)
323 switch (fpclass( num ))
325 case FP_SNAN: return _FPCLASS_SNAN;
326 case FP_QNAN: return _FPCLASS_QNAN;
327 case FP_NINF: return _FPCLASS_NINF;
328 case FP_PINF: return _FPCLASS_PINF;
329 case FP_NDENORM: return _FPCLASS_ND;
330 case FP_PDENORM: return _FPCLASS_PD;
331 case FP_NZERO: return _FPCLASS_NZ;
332 case FP_PZERO: return _FPCLASS_PZ;
333 case FP_NNORM: return _FPCLASS_NN;
334 case FP_PNORM: return _FPCLASS_PN;
336 return _FPCLASS_PN;
337 #elif defined (fpclassify)
338 switch (fpclassify( num ))
340 case FP_NAN: return _FPCLASS_QNAN;
341 case FP_INFINITE: return signbit(num) ? _FPCLASS_NINF : _FPCLASS_PINF;
342 case FP_SUBNORMAL: return signbit(num) ?_FPCLASS_ND : _FPCLASS_PD;
343 case FP_ZERO: return signbit(num) ? _FPCLASS_NZ : _FPCLASS_PZ;
345 return signbit(num) ? _FPCLASS_NN : _FPCLASS_PN;
346 #else
347 if (!finite(num))
348 return _FPCLASS_QNAN;
349 return num == 0.0 ? _FPCLASS_PZ : (num < 0 ? _FPCLASS_NN : _FPCLASS_PN);
350 #endif
353 /*********************************************************************
354 * _rotl (MSVCRT.@)
356 unsigned int _rotl(unsigned int num, int shift)
358 shift &= 31;
359 return (num << shift) | (num >> (32-shift));
362 /*********************************************************************
363 * _logb (MSVCRT.@)
365 double _logb(double num)
367 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
368 return logb(num);
371 /*********************************************************************
372 * _lrotl (MSVCRT.@)
374 unsigned long _lrotl(unsigned long num, int shift)
376 shift &= 0x1f;
377 return (num << shift) | (num >> (32-shift));
380 /*********************************************************************
381 * _lrotr (MSVCRT.@)
383 unsigned long _lrotr(unsigned long num, int shift)
385 shift &= 0x1f;
386 return (num >> shift) | (num << (32-shift));
389 /*********************************************************************
390 * _rotr (MSVCRT.@)
392 unsigned int _rotr(unsigned int num, int shift)
394 shift &= 0x1f;
395 return (num >> shift) | (num << (32-shift));
398 /*********************************************************************
399 * _scalb (MSVCRT.@)
401 double _scalb(double num, long power)
403 /* Note - Can't forward directly as libc expects y as double */
404 double dblpower = (double)power;
405 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
406 return scalb(num, dblpower);
409 /*********************************************************************
410 * _matherr (MSVCRT.@)
412 int _matherr(MSVCRT_exception *e)
414 if (e)
415 TRACE("(%p = %d, %s, %g %g %g)\n",e, e->type, e->name, e->arg1, e->arg2,
416 e->retval);
417 else
418 TRACE("(null)\n");
419 if (MSVCRT_default_matherr_func)
420 return MSVCRT_default_matherr_func(e);
421 ERR(":Unhandled math error!\n");
422 return 0;
425 /*********************************************************************
426 * __setusermatherr (MSVCRT.@)
428 void MSVCRT___setusermatherr(MSVCRT_matherr_func func)
430 MSVCRT_default_matherr_func = func;
431 TRACE(":new matherr handler %p\n", func);
434 /**********************************************************************
435 * _statusfp (MSVCRT.@)
437 unsigned int _statusfp(void)
439 unsigned int retVal = 0;
440 #if defined(__GNUC__) && defined(__i386__)
441 unsigned int fpword;
443 __asm__ __volatile__( "fstsw %0" : "=m" (fpword) : );
444 if (fpword & 0x1) retVal |= _SW_INVALID;
445 if (fpword & 0x2) retVal |= _SW_DENORMAL;
446 if (fpword & 0x4) retVal |= _SW_ZERODIVIDE;
447 if (fpword & 0x8) retVal |= _SW_OVERFLOW;
448 if (fpword & 0x10) retVal |= _SW_UNDERFLOW;
449 if (fpword & 0x20) retVal |= _SW_INEXACT;
450 #else
451 FIXME(":Not implemented!\n");
452 #endif
453 return retVal;
456 /*********************************************************************
457 * _clearfp (MSVCRT.@)
459 unsigned int _clearfp(void)
461 unsigned int retVal = _statusfp();
462 #if defined(__GNUC__) && defined(__i386__)
463 __asm__ __volatile__( "fnclex" );
464 #else
465 FIXME(":Not Implemented\n");
466 #endif
467 return retVal;
470 /*********************************************************************
471 * ldexp (MSVCRT.@)
473 double MSVCRT_ldexp(double num, long exp)
475 double z = ldexp(num,exp);
477 if (!finite(z))
478 *MSVCRT__errno() = MSVCRT_ERANGE;
479 else if (z == 0 && signbit(z))
480 z = 0.0; /* Convert -0 -> +0 */
481 return z;
484 /*********************************************************************
485 * _cabs (MSVCRT.@)
487 double _cabs(MSVCRT_complex num)
489 return sqrt(num.real * num.real + num.imaginary * num.imaginary);
492 /*********************************************************************
493 * _chgsign (MSVCRT.@)
495 double _chgsign(double num)
497 /* FIXME: +-infinity,Nan not tested */
498 return -num;
501 /*********************************************************************
502 * _control87 (MSVCRT.@)
504 unsigned int _control87(unsigned int newval, unsigned int mask)
506 #if defined(__GNUC__) && defined(__i386__)
507 unsigned int fpword = 0;
508 unsigned int flags = 0;
510 TRACE("(%08x, %08x): Called\n", newval, mask);
512 /* Get fp control word */
513 __asm__ __volatile__( "fstcw %0" : "=m" (fpword) : );
515 TRACE("Control word before : %08x\n", fpword);
517 /* Convert into mask constants */
518 if (fpword & 0x1) flags |= _EM_INVALID;
519 if (fpword & 0x2) flags |= _EM_DENORMAL;
520 if (fpword & 0x4) flags |= _EM_ZERODIVIDE;
521 if (fpword & 0x8) flags |= _EM_OVERFLOW;
522 if (fpword & 0x10) flags |= _EM_UNDERFLOW;
523 if (fpword & 0x20) flags |= _EM_INEXACT;
524 switch(fpword & 0xC00) {
525 case 0xC00: flags |= _RC_UP|_RC_DOWN; break;
526 case 0x800: flags |= _RC_UP; break;
527 case 0x400: flags |= _RC_DOWN; break;
529 switch(fpword & 0x300) {
530 case 0x0: flags |= _PC_24; break;
531 case 0x200: flags |= _PC_53; break;
532 case 0x300: flags |= _PC_64; break;
534 if (fpword & 0x1000) flags |= _IC_AFFINE;
536 /* Mask with parameters */
537 flags = (flags & ~mask) | (newval & mask);
539 /* Convert (masked) value back to fp word */
540 fpword = 0;
541 if (flags & _EM_INVALID) fpword |= 0x1;
542 if (flags & _EM_DENORMAL) fpword |= 0x2;
543 if (flags & _EM_ZERODIVIDE) fpword |= 0x4;
544 if (flags & _EM_OVERFLOW) fpword |= 0x8;
545 if (flags & _EM_UNDERFLOW) fpword |= 0x10;
546 if (flags & _EM_INEXACT) fpword |= 0x20;
547 switch(flags & (_RC_UP | _RC_DOWN)) {
548 case _RC_UP|_RC_DOWN: fpword |= 0xC00; break;
549 case _RC_UP: fpword |= 0x800; break;
550 case _RC_DOWN: fpword |= 0x400; break;
552 switch (flags & (_PC_24 | _PC_53)) {
553 case _PC_64: fpword |= 0x300; break;
554 case _PC_53: fpword |= 0x200; break;
555 case _PC_24: fpword |= 0x0; break;
557 if (flags & _IC_AFFINE) fpword |= 0x1000;
559 TRACE("Control word after : %08x\n", fpword);
561 /* Put fp control word */
562 __asm__ __volatile__( "fldcw %0" : : "m" (fpword) );
564 return flags;
565 #else
566 FIXME(":Not Implemented!\n");
567 return 0;
568 #endif
571 /*********************************************************************
572 * _controlfp (MSVCRT.@)
574 unsigned int _controlfp(unsigned int newval, unsigned int mask)
576 #ifdef __i386__
577 return _control87( newval, mask & ~_EM_DENORMAL );
578 #else
579 FIXME(":Not Implemented!\n");
580 return 0;
581 #endif
584 /*********************************************************************
585 * _copysign (MSVCRT.@)
587 double _copysign(double num, double sign)
589 /* FIXME: Behaviour for Nan/Inf? */
590 if (sign < 0.0)
591 return num < 0.0 ? num : -num;
592 return num < 0.0 ? -num : num;
595 /*********************************************************************
596 * _finite (MSVCRT.@)
598 int _finite(double num)
600 return (finite(num)?1:0); /* See comment for _isnan() */
603 /*********************************************************************
604 * _fpreset (MSVCRT.@)
606 void _fpreset(void)
608 #if defined(__GNUC__) && defined(__i386__)
609 __asm__ __volatile__( "fninit" );
610 #else
611 FIXME(":Not Implemented!\n");
612 #endif
615 /*********************************************************************
616 * _isnan (MSVCRT.@)
618 INT _isnan(double num)
620 /* Some implementations return -1 for true(glibc), msvcrt/crtdll return 1.
621 * Do the same, as the result may be used in calculations
623 return isnan(num) ? 1 : 0;
626 /*********************************************************************
627 * _y0 (MSVCRT.@)
629 double _y0(double num)
631 double retval;
632 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
633 retval = y0(num);
634 if (_fpclass(retval) == _FPCLASS_NINF)
636 *MSVCRT__errno() = MSVCRT_EDOM;
637 retval = sqrt(-1);
639 return retval;
642 /*********************************************************************
643 * _y1 (MSVCRT.@)
645 double _y1(double num)
647 double retval;
648 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
649 retval = y1(num);
650 if (_fpclass(retval) == _FPCLASS_NINF)
652 *MSVCRT__errno() = MSVCRT_EDOM;
653 retval = sqrt(-1);
655 return retval;
658 /*********************************************************************
659 * _yn (MSVCRT.@)
661 double _yn(int order, double num)
663 double retval;
664 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
665 retval = yn(order,num);
666 if (_fpclass(retval) == _FPCLASS_NINF)
668 *MSVCRT__errno() = MSVCRT_EDOM;
669 retval = sqrt(-1);
671 return retval;
674 /*********************************************************************
675 * _nextafter (MSVCRT.@)
677 double _nextafter(double num, double next)
679 double retval;
680 if (!finite(num) || !finite(next)) *MSVCRT__errno() = MSVCRT_EDOM;
681 retval = nextafter(num,next);
682 return retval;
685 /*********************************************************************
686 * _ecvt (MSVCRT.@)
688 char *_ecvt( double number, int ndigits, int *decpt, int *sign )
690 MSVCRT_thread_data *data = msvcrt_get_thread_data();
691 char *dec;
693 if (!data->efcvt_buffer)
694 data->efcvt_buffer = MSVCRT_malloc( 80 ); /* ought to be enough */
696 snprintf(data->efcvt_buffer, 80, "%.*e", ndigits /* FIXME wrong */, number);
697 *sign = (number < 0);
698 dec = strchr(data->efcvt_buffer, '.');
699 *decpt = (dec) ? dec - data->efcvt_buffer : -1;
700 return data->efcvt_buffer;
703 /***********************************************************************
704 * _fcvt (MSVCRT.@)
706 char *_fcvt( double number, int ndigits, int *decpt, int *sign )
708 MSVCRT_thread_data *data = msvcrt_get_thread_data();
709 char *dec;
711 if (!data->efcvt_buffer)
712 data->efcvt_buffer = MSVCRT_malloc( 80 ); /* ought to be enough */
714 snprintf(data->efcvt_buffer, 80, "%.*e", ndigits, number);
715 *sign = (number < 0);
716 dec = strchr(data->efcvt_buffer, '.');
717 *decpt = (dec) ? dec - data->efcvt_buffer : -1;
718 return data->efcvt_buffer;
721 /***********************************************************************
722 * _gcvt (MSVCRT.@)
724 * FIXME: uses both E and F.
726 char *_gcvt( double number, int ndigit, char *buff )
728 sprintf(buff, "%.*E", ndigit, number);
729 return buff;
732 #include <stdlib.h> /* div_t, ldiv_t */
734 /*********************************************************************
735 * div (MSVCRT.@)
736 * VERSION
737 * [i386] Windows binary compatible - returns the struct in eax/edx.
739 #ifdef __i386__
740 LONGLONG MSVCRT_div(int num, int denom)
742 LONGLONG retval;
743 div_t dt = div(num,denom);
744 retval = ((LONGLONG)dt.rem << 32) | dt.quot;
745 return retval;
747 #else
748 /*********************************************************************
749 * div (MSVCRT.@)
750 * VERSION
751 * [!i386] Non-x86 can't run win32 apps so we don't need binary compatibility
753 MSVCRT_div_t MSVCRT_div(int num, int denom)
755 div_t dt = div(num,denom);
756 MSVCRT_div_t ret;
757 ret.quot = dt.quot;
758 ret.rem = dt.rem;
760 return ret;
763 #endif /* ifdef __i386__ */
766 /*********************************************************************
767 * ldiv (MSVCRT.@)
768 * VERSION
769 * [i386] Windows binary compatible - returns the struct in eax/edx.
771 #ifdef __i386__
772 ULONGLONG MSVCRT_ldiv(long num, long denom)
774 ULONGLONG retval;
775 ldiv_t ldt = ldiv(num,denom);
776 retval = ((ULONGLONG)ldt.rem << 32) | (ULONG)ldt.quot;
777 return retval;
779 #else
780 /*********************************************************************
781 * ldiv (MSVCRT.@)
782 * VERSION
783 * [!i386] Non-x86 can't run win32 apps so we don't need binary compatibility
785 MSVCRT_ldiv_t MSVCRT_ldiv(long num, long denom)
787 ldiv_t result = ldiv(num,denom);
789 MSVCRT_ldiv_t ret;
790 ret.quot = result.quot;
791 ret.rem = result.rem;
793 return ret;
795 #endif /* ifdef __i386__ */
797 /***********************************************************************
798 * _adj_fdiv_m16i (MSVCRT.@)
799 * FIXME
800 * This function is likely to have the wrong number of arguments.
802 * NOTE
803 * I _think_ this function is intended to work around the Pentium
804 * fdiv bug.
806 void _adj_fdiv_m16i(void)
808 TRACE("(): stub\n");
811 /***********************************************************************
812 * _adj_fdiv_m32 (MSVCRT.@)
813 * FIXME
814 * This function is likely to have the wrong number of arguments.
816 * NOTE
817 * I _think_ this function is intended to work around the Pentium
818 * fdiv bug.
820 void _adj_fdiv_m32(void)
822 TRACE("(): stub\n");
825 /***********************************************************************
826 * _adj_fdiv_m32i (MSVCRT.@)
827 * FIXME
828 * This function is likely to have the wrong number of arguments.
830 * NOTE
831 * I _think_ this function is intended to work around the Pentium
832 * fdiv bug.
834 void _adj_fdiv_m32i(void)
836 TRACE("(): stub\n");
839 /***********************************************************************
840 * _adj_fdiv_m64 (MSVCRT.@)
841 * FIXME
842 * This function is likely to have the wrong number of arguments.
844 * NOTE
845 * I _think_ this function is intended to work around the Pentium
846 * fdiv bug.
848 void _adj_fdiv_m64(void)
850 TRACE("(): stub\n");
853 /***********************************************************************
854 * _adj_fdiv_r (MSVCRT.@)
855 * FIXME
856 * This function is likely to have the wrong number of arguments.
858 * NOTE
859 * I _think_ this function is intended to work around the Pentium
860 * fdiv bug.
862 void _adj_fdiv_r(void)
864 TRACE("(): stub\n");
867 /***********************************************************************
868 * _adj_fdivr_m16i (MSVCRT.@)
869 * FIXME
870 * This function is likely to have the wrong number of arguments.
872 * NOTE
873 * I _think_ this function is intended to work around the Pentium
874 * fdiv bug.
876 void _adj_fdivr_m16i(void)
878 TRACE("(): stub\n");
881 /***********************************************************************
882 * _adj_fdivr_m32 (MSVCRT.@)
883 * FIXME
884 * This function is likely to have the wrong number of arguments.
886 * NOTE
887 * I _think_ this function is intended to work around the Pentium
888 * fdiv bug.
890 void _adj_fdivr_m32(void)
892 TRACE("(): stub\n");
895 /***********************************************************************
896 * _adj_fdivr_m32i (MSVCRT.@)
897 * FIXME
898 * This function is likely to have the wrong number of arguments.
900 * NOTE
901 * I _think_ this function is intended to work around the Pentium
902 * fdiv bug.
904 void _adj_fdivr_m32i(void)
906 TRACE("(): stub\n");
909 /***********************************************************************
910 * _adj_fdivr_m64 (MSVCRT.@)
911 * FIXME
912 * This function is likely to have the wrong number of arguments.
914 * NOTE
915 * I _think_ this function is intended to work around the Pentium
916 * fdiv bug.
918 void _adj_fdivr_m64(void)
920 TRACE("(): stub\n");
923 /***********************************************************************
924 * _adj_fpatan (MSVCRT.@)
925 * FIXME
926 * This function is likely to have the wrong number of arguments.
928 * NOTE
929 * I _think_ this function is intended to work around the Pentium
930 * fdiv bug.
932 void _adj_fpatan(void)
934 TRACE("(): stub\n");
937 /***********************************************************************
938 * _adj_fprem (MSVCRT.@)
939 * FIXME
940 * This function is likely to have the wrong number of arguments.
942 * NOTE
943 * I _think_ this function is intended to work around the Pentium
944 * fdiv bug.
946 void _adj_fprem(void)
948 TRACE("(): stub\n");
951 /***********************************************************************
952 * _adj_fprem1 (MSVCRT.@)
953 * FIXME
954 * This function is likely to have the wrong number of arguments.
956 * NOTE
957 * I _think_ this function is intended to work around the Pentium
958 * fdiv bug.
960 void _adj_fprem1(void)
962 TRACE("(): stub\n");
965 /***********************************************************************
966 * _adj_fptan (MSVCRT.@)
967 * FIXME
968 * This function is likely to have the wrong number of arguments.
970 * NOTE
971 * I _think_ this function is intended to work around the Pentium
972 * fdiv bug.
974 void _adj_fptan(void)
976 TRACE("(): stub\n");
979 /***********************************************************************
980 * _adjust_fdiv (MSVCRT.@)
981 * FIXME
982 * I _think_ this function should be a variable indicating whether
983 * Pentium fdiv bug safe code should be used.
985 void _adjust_fdiv(void)
987 TRACE("(): stub\n");
990 /***********************************************************************
991 * _safe_fdiv (MSVCRT.@)
992 * FIXME
993 * This function is likely to have the wrong number of arguments.
995 * NOTE
996 * I _think_ this function is intended to work around the Pentium
997 * fdiv bug.
999 void _safe_fdiv(void)
1001 TRACE("(): stub\n");
1004 /***********************************************************************
1005 * _safe_fdivr (MSVCRT.@)
1006 * FIXME
1007 * This function is likely to have the wrong number of arguments.
1009 * NOTE
1010 * I _think_ this function is intended to work around the Pentium
1011 * fdiv bug.
1013 void _safe_fdivr(void)
1015 TRACE("(): stub\n");
1018 /***********************************************************************
1019 * _safe_fprem (MSVCRT.@)
1020 * FIXME
1021 * This function is likely to have the wrong number of arguments.
1023 * NOTE
1024 * I _think_ this function is intended to work around the Pentium
1025 * fdiv bug.
1027 void _safe_fprem(void)
1029 TRACE("(): stub\n");
1032 /***********************************************************************
1033 * _safe_fprem1 (MSVCRT.@)
1035 * FIXME
1036 * This function is likely to have the wrong number of arguments.
1038 * NOTE
1039 * I _think_ this function is intended to work around the Pentium
1040 * fdiv bug.
1042 void _safe_fprem1(void)
1044 TRACE("(): stub\n");