Added the DFCS_{HOT,TRANSPARENT} definitions.
[wine/gsoc_dplay.git] / dlls / msvcrt / math.c
blob8bd91222607a02ee658f4d87c7b9079ea1a37499
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 "ms_errno.h"
24 #define __USE_ISOC9X 1
25 #define __USE_ISOC99 1
26 #include <math.h>
27 #ifdef HAVE_IEEEFP_H
28 #include <ieeefp.h>
29 #endif
31 #include "msvcrt/stdlib.h"
33 #include "wine/debug.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
37 #ifndef HAVE_FINITE
38 #ifndef finite /* Could be a macro */
39 #ifdef isfinite
40 #define finite(x) isfinite(x)
41 #else
42 #define finite(x) (!isnan(x)) /* At least catch some cases */
43 #endif
44 #endif
45 #endif
47 #ifndef signbit
48 #define signbit(x) 0
49 #endif
51 /* fpclass constants */
52 #define _FPCLASS_SNAN 1
53 #define _FPCLASS_QNAN 2
54 #define _FPCLASS_NINF 4
55 #define _FPCLASS_NN 8
56 #define _FPCLASS_ND 16
57 #define _FPCLASS_NZ 32
58 #define _FPCLASS_PZ 64
59 #define _FPCLASS_PD 128
60 #define _FPCLASS_PN 256
61 #define _FPCLASS_PINF 512
63 /* _statusfp bit flags */
64 #define _SW_INEXACT 0x1
65 #define _SW_UNDERFLOW 0x2
66 #define _SW_OVERFLOW 0x4
67 #define _SW_ZERODIVIDE 0x8
68 #define _SW_INVALID 0x10
69 #define _SW_DENORMAL 0x80000
71 /* _controlfp masks and bitflags - x86 only so far*/
72 #ifdef __i386__
73 #define _MCW_EM 0x8001f
74 #define _EM_INEXACT 0x1
75 #define _EM_UNDERFLOW 0x2
76 #define _EM_OVERFLOW 0x4
77 #define _EM_ZERODIVIDE 0x8
78 #define _EM_INVALID 0x10
80 #define _MCW_RC 0x300
81 #define _RC_NEAR 0x0
82 #define _RC_DOWN 0x100
83 #define _RC_UP 0x200
84 #define _RC_CHOP 0x300
86 #define _MCW_PC 0x30000
87 #define _PC_64 0x0
88 #define _PC_53 0x10000
89 #define _PC_24 0x20000
91 #define _MCW_IC 0x40000
92 #define _IC_AFFINE 0x40000
93 #define _IC_PROJECTIVE 0x0
95 #define _EM_DENORMAL 0x80000
96 #endif
98 typedef struct __MSVCRT_complex
100 double real;
101 double imaginary;
102 } MSVCRT_complex;
104 typedef struct __MSVCRT_exception
106 int type;
107 char *name;
108 double arg1;
109 double arg2;
110 double retval;
111 } MSVCRT_exception;
114 typedef int (*MSVCRT_matherr_func)(MSVCRT_exception *);
116 static MSVCRT_matherr_func MSVCRT_default_matherr_func = NULL;
118 #if defined(__GNUC__) && defined(__i386__)
120 #define FPU_DOUBLE(var) double var; \
121 __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var) : )
122 #define FPU_DOUBLES(var1,var2) double var1,var2; \
123 __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var2) : ); \
124 __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var1) : )
126 /*********************************************************************
127 * _CIacos (MSVCRT.@)
129 double _CIacos(void)
131 FPU_DOUBLE(x);
132 if (x < -1.0 || x > 1.0 || !finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
133 return acos(x);
136 /*********************************************************************
137 * _CIasin (MSVCRT.@)
139 double _CIasin(void)
141 FPU_DOUBLE(x);
142 if (x < -1.0 || x > 1.0 || !finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
143 return asin(x);
146 /*********************************************************************
147 * _CIatan (MSVCRT.@)
149 double _CIatan(void)
151 FPU_DOUBLE(x);
152 if (!finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
153 return atan(x);
156 /*********************************************************************
157 * _CIatan2 (MSVCRT.@)
159 double _CIatan2(void)
161 FPU_DOUBLES(x,y);
162 if (!finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
163 return atan2(x,y);
166 /*********************************************************************
167 * _CIcos (MSVCRT.@)
169 double _CIcos(void)
171 FPU_DOUBLE(x);
172 if (!finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
173 return cos(x);
176 /*********************************************************************
177 * _CIcosh (MSVCRT.@)
179 double _CIcosh(void)
181 FPU_DOUBLE(x);
182 if (!finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
183 return cosh(x);
186 /*********************************************************************
187 * _CIexp (MSVCRT.@)
189 double _CIexp(void)
191 FPU_DOUBLE(x);
192 if (!finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
193 return exp(x);
196 /*********************************************************************
197 * _CIfmod (MSVCRT.@)
199 double _CIfmod(void)
201 FPU_DOUBLES(x,y);
202 if (!finite(x) || !finite(y)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
203 return fmod(x,y);
206 /*********************************************************************
207 * _CIlog (MSVCRT.@)
209 double _CIlog(void)
211 FPU_DOUBLE(x);
212 if (x < 0.0 || !finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
213 if (x == 0.0) SET_THREAD_VAR(errno,MSVCRT_ERANGE);
214 return log(x);
217 /*********************************************************************
218 * _CIlog10 (MSVCRT.@)
220 double _CIlog10(void)
222 FPU_DOUBLE(x);
223 if (x < 0.0 || !finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
224 if (x == 0.0) SET_THREAD_VAR(errno,MSVCRT_ERANGE);
225 return log10(x);
228 /*********************************************************************
229 * _CIpow (MSVCRT.@)
231 double _CIpow(void)
233 double z;
234 FPU_DOUBLES(x,y);
235 /* FIXME: If x < 0 and y is not integral, set EDOM */
236 z = pow(x,y);
237 if (!finite(z)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
238 return z;
241 /*********************************************************************
242 * _CIsin (MSVCRT.@)
244 double _CIsin(void)
246 FPU_DOUBLE(x);
247 if (!finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
248 return sin(x);
251 /*********************************************************************
252 * _CIsinh (MSVCRT.@)
254 double _CIsinh(void)
256 FPU_DOUBLE(x);
257 if (!finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
258 return sinh(x);
261 /*********************************************************************
262 * _CIsqrt (MSVCRT.@)
264 double _CIsqrt(void)
266 FPU_DOUBLE(x);
267 if (x < 0.0 || !finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
268 return sqrt(x);
271 /*********************************************************************
272 * _CItan (MSVCRT.@)
274 double _CItan(void)
276 FPU_DOUBLE(x);
277 if (!finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
278 return tan(x);
281 /*********************************************************************
282 * _CItanh (MSVCRT.@)
284 double _CItanh(void)
286 FPU_DOUBLE(x);
287 if (!finite(x)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
288 return tanh(x);
291 #else /* defined(__GNUC__) && defined(__i386__) */
293 /* The above cannot be called on non x86 platforms, stub them for linking */
295 #define IX86_ONLY(func) double MSVCRT_##func(void) { return 0.0; }
297 IX86_ONLY(_CIacos)
298 IX86_ONLY(_CIasin)
299 IX86_ONLY(_CIatan)
300 IX86_ONLY(_CIatan2)
301 IX86_ONLY(_CIcos)
302 IX86_ONLY(_CIcosh)
303 IX86_ONLY(_CIexp)
304 IX86_ONLY(_CIfmod)
305 IX86_ONLY(_CIlog)
306 IX86_ONLY(_CIlog10)
307 IX86_ONLY(_CIpow)
308 IX86_ONLY(_CIsin)
309 IX86_ONLY(_CIsinh)
310 IX86_ONLY(_CIsqrt)
311 IX86_ONLY(_CItan)
312 IX86_ONLY(_CItanh)
314 #endif /* defined(__GNUC__) && defined(__i386__) */
316 /*********************************************************************
317 * _fpclass (MSVCRT.@)
319 int _fpclass(double num)
321 #if defined(HAVE_FPCLASS) || defined(fpclass)
322 switch (fpclass( num ))
324 case FP_SNAN: return _FPCLASS_SNAN;
325 case FP_QNAN: return _FPCLASS_QNAN;
326 case FP_NINF: return _FPCLASS_NINF;
327 case FP_PINF: return _FPCLASS_PINF;
328 case FP_NDENORM: return _FPCLASS_ND;
329 case FP_PDENORM: return _FPCLASS_PD;
330 case FP_NZERO: return _FPCLASS_NZ;
331 case FP_PZERO: return _FPCLASS_PZ;
332 case FP_NNORM: return _FPCLASS_NN;
334 return _FPCLASS_PN;
335 #elif defined (fpclassify)
336 switch (fpclassify( num ))
338 case FP_NAN: return _FPCLASS_QNAN;
339 case FP_INFINITE: return signbit(num) ? _FPCLASS_NINF : _FPCLASS_PINF;
340 case FP_SUBNORMAL: return signbit(num) ?_FPCLASS_ND : _FPCLASS_PD;
341 case FP_ZERO: return signbit(num) ? _FPCLASS_NZ : _FPCLASS_PZ;
343 return signbit(num) ? _FPCLASS_NN : _FPCLASS_PN;
344 #else
345 if (!finite(num))
346 return _FPCLASS_QNAN;
347 return num == 0.0 ? _FPCLASS_PZ : (num < 0 ? _FPCLASS_NN : _FPCLASS_PN);
348 #endif
351 /*********************************************************************
352 * _rotl (MSVCRT.@)
354 unsigned int _rotl(unsigned int num, int shift)
356 shift &= 31;
357 return (num << shift) | (num >> (32-shift));
360 /*********************************************************************
361 * _logb (MSVCRT.@)
363 double _logb(double num)
365 if (!finite(num)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
366 return logb(num);
369 /*********************************************************************
370 * _lrotl (MSVCRT.@)
372 unsigned long _lrotl(unsigned long num, int shift)
374 shift &= 0x1f;
375 return (num << shift) | (num >> (32-shift));
378 /*********************************************************************
379 * _lrotr (MSVCRT.@)
381 unsigned long _lrotr(unsigned long num, int shift)
383 shift &= 0x1f;
384 return (num >> shift) | (num << (32-shift));
387 /*********************************************************************
388 * _rotr (MSVCRT.@)
390 unsigned int _rotr(unsigned int num, int shift)
392 shift &= 0x1f;
393 return (num >> shift) | (num << (32-shift));
396 /*********************************************************************
397 * _scalb (MSVCRT.@)
399 double _scalb(double num, long power)
401 /* Note - Can't forward directly as libc expects y as double */
402 double dblpower = (double)power;
403 if (!finite(num)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
404 return scalb(num, dblpower);
407 /*********************************************************************
408 * _matherr (MSVCRT.@)
410 int _matherr(MSVCRT_exception *e)
412 if (e)
413 TRACE("(%p = %d, %s, %g %g %g)\n",e, e->type, e->name, e->arg1, e->arg2,
414 e->retval);
415 else
416 TRACE("(null)\n");
417 if (MSVCRT_default_matherr_func)
418 return MSVCRT_default_matherr_func(e);
419 ERR(":Unhandled math error!\n");
420 return 0;
423 /*********************************************************************
424 * __setusermatherr (MSVCRT.@)
426 void MSVCRT___setusermatherr(MSVCRT_matherr_func func)
428 MSVCRT_default_matherr_func = func;
429 TRACE(":new matherr handler %p\n", func);
432 /**********************************************************************
433 * _statusfp (MSVCRT.@)
435 unsigned int _statusfp(void)
437 unsigned int retVal = 0;
438 #if defined(__GNUC__) && defined(__i386__)
439 unsigned int fpword;
441 __asm__ __volatile__( "fstsw %0" : "=m" (fpword) : );
442 if (fpword & 0x1) retVal |= _SW_INVALID;
443 if (fpword & 0x2) retVal |= _SW_DENORMAL;
444 if (fpword & 0x4) retVal |= _SW_ZERODIVIDE;
445 if (fpword & 0x8) retVal |= _SW_OVERFLOW;
446 if (fpword & 0x10) retVal |= _SW_UNDERFLOW;
447 if (fpword & 0x20) retVal |= _SW_INEXACT;
448 #else
449 FIXME(":Not implemented!\n");
450 #endif
451 return retVal;
454 /*********************************************************************
455 * _clearfp (MSVCRT.@)
457 unsigned int _clearfp(void)
459 unsigned int retVal = _statusfp();
460 #if defined(__GNUC__) && defined(__i386__)
461 __asm__ __volatile__( "fnclex" );
462 #else
463 FIXME(":Not Implemented\n");
464 #endif
465 return retVal;
468 /*********************************************************************
469 * ldexp (MSVCRT.@)
471 double MSVCRT_ldexp(double num, long exp)
473 double z = ldexp(num,exp);
475 if (!finite(z))
476 SET_THREAD_VAR(errno,MSVCRT_ERANGE);
477 else if (z == 0 && signbit(z))
478 z = 0.0; /* Convert -0 -> +0 */
479 return z;
482 /*********************************************************************
483 * _cabs (MSVCRT.@)
485 double _cabs(MSVCRT_complex num)
487 return sqrt(num.real * num.real + num.imaginary * num.imaginary);
490 /*********************************************************************
491 * _chgsign (MSVCRT.@)
493 double _chgsign(double num)
495 /* FIXME: +-infinity,Nan not tested */
496 return -num;
499 /*********************************************************************
500 * _control87 (MSVCRT.@)
502 unsigned int _control87(unsigned int newval, unsigned int mask)
504 #if defined(__GNUC__) && defined(__i386__)
505 unsigned int fpword = 0;
506 unsigned int flags = 0;
508 TRACE("(%08x, %08x): Called\n", newval, mask);
510 /* Get fp control word */
511 __asm__ __volatile__( "fstcw %0" : "=m" (fpword) : );
513 TRACE("Control word before : %08x\n", fpword);
515 /* Convert into mask constants */
516 if (fpword & 0x1) flags |= _EM_INVALID;
517 if (fpword & 0x2) flags |= _EM_DENORMAL;
518 if (fpword & 0x4) flags |= _EM_ZERODIVIDE;
519 if (fpword & 0x8) flags |= _EM_OVERFLOW;
520 if (fpword & 0x10) flags |= _EM_UNDERFLOW;
521 if (fpword & 0x20) flags |= _EM_INEXACT;
522 switch(fpword & 0xC00) {
523 case 0xC00: flags |= _RC_UP|_RC_DOWN; break;
524 case 0x800: flags |= _RC_UP; break;
525 case 0x400: flags |= _RC_DOWN; break;
527 switch(fpword & 0x300) {
528 case 0x0: flags |= _PC_24; break;
529 case 0x200: flags |= _PC_53; break;
530 case 0x300: flags |= _PC_64; break;
532 if (fpword & 0x1000) flags |= _IC_AFFINE;
534 /* Mask with parameters */
535 flags = (flags & ~mask) | (newval & mask);
537 /* Convert (masked) value back to fp word */
538 fpword = 0;
539 if (flags & _EM_INVALID) fpword |= 0x1;
540 if (flags & _EM_DENORMAL) fpword |= 0x2;
541 if (flags & _EM_ZERODIVIDE) fpword |= 0x4;
542 if (flags & _EM_OVERFLOW) fpword |= 0x8;
543 if (flags & _EM_UNDERFLOW) fpword |= 0x10;
544 if (flags & _EM_INEXACT) fpword |= 0x20;
545 switch(flags & (_RC_UP | _RC_DOWN)) {
546 case _RC_UP|_RC_DOWN: fpword |= 0xC00; break;
547 case _RC_UP: fpword |= 0x800; break;
548 case _RC_DOWN: fpword |= 0x400; break;
550 switch (flags & (_PC_24 | _PC_53)) {
551 case _PC_64: fpword |= 0x300; break;
552 case _PC_53: fpword |= 0x200; break;
553 case _PC_24: fpword |= 0x0; break;
555 if (flags & _IC_AFFINE) fpword |= 0x1000;
557 TRACE("Control word after : %08x\n", fpword);
559 /* Put fp control word */
560 __asm__ __volatile__( "fldcw %0" : : "m" (fpword) );
562 return flags;
563 #else
564 FIXME(":Not Implemented!\n");
565 return 0;
566 #endif
569 /*********************************************************************
570 * _controlfp (MSVCRT.@)
572 unsigned int _controlfp(unsigned int newval, unsigned int mask)
574 return _control87( newval, mask & ~_EM_DENORMAL );
577 /*********************************************************************
578 * _copysign (MSVCRT.@)
580 double _copysign(double num, double sign)
582 /* FIXME: Behaviour for Nan/Inf? */
583 if (sign < 0.0)
584 return num < 0.0 ? num : -num;
585 return num < 0.0 ? -num : num;
588 /*********************************************************************
589 * _finite (MSVCRT.@)
591 int _finite(double num)
593 return (finite(num)?1:0); /* See comment for _isnan() */
596 /*********************************************************************
597 * _fpreset (MSVCRT.@)
599 void _fpreset(void)
601 #if defined(__GNUC__) && defined(__i386__)
602 __asm__ __volatile__( "fninit" );
603 #else
604 FIXME(":Not Implemented!\n");
605 #endif
608 /*********************************************************************
609 * _isnan (MSVCRT.@)
611 INT _isnan(double num)
613 /* Some implementations return -1 for true(glibc), msvcrt/crtdll return 1.
614 * Do the same, as the result may be used in calculations
616 return isnan(num) ? 1 : 0;
619 /*********************************************************************
620 * _y0 (MSVCRT.@)
622 double _y0(double num)
624 double retval;
625 if (!finite(num)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
626 retval = y0(num);
627 if (_fpclass(retval) == _FPCLASS_NINF)
629 SET_THREAD_VAR(errno,MSVCRT_EDOM);
630 retval = sqrt(-1);
632 return retval;
635 /*********************************************************************
636 * _y1 (MSVCRT.@)
638 double _y1(double num)
640 double retval;
641 if (!finite(num)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
642 retval = y1(num);
643 if (_fpclass(retval) == _FPCLASS_NINF)
645 SET_THREAD_VAR(errno,MSVCRT_EDOM);
646 retval = sqrt(-1);
648 return retval;
651 /*********************************************************************
652 * _yn (MSVCRT.@)
654 double _yn(int order, double num)
656 double retval;
657 if (!finite(num)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
658 retval = yn(order,num);
659 if (_fpclass(retval) == _FPCLASS_NINF)
661 SET_THREAD_VAR(errno,MSVCRT_EDOM);
662 retval = sqrt(-1);
664 return retval;
667 /*********************************************************************
668 * _nextafter (MSVCRT.@)
670 double _nextafter(double num, double next)
672 double retval;
673 if (!finite(num) || !finite(next)) SET_THREAD_VAR(errno,MSVCRT_EDOM);
674 retval = nextafter(num,next);
675 return retval;
678 #include <stdlib.h> /* div_t, ldiv_t */
680 /*********************************************************************
681 * div (MSVCRT.@)
682 * VERSION
683 * [i386] Windows binary compatible - returns the struct in eax/edx.
685 #ifdef __i386__
686 LONGLONG MSVCRT_div(int num, int denom)
688 LONGLONG retval;
689 div_t dt = div(num,denom);
690 retval = ((LONGLONG)dt.rem << 32) | dt.quot;
691 return retval;
693 #else
694 /*********************************************************************
695 * div (MSVCRT.@)
696 * VERSION
697 * [!i386] Non-x86 can't run win32 apps so we don't need binary compatibility
699 MSVCRT_div_t MSVCRT_div(int num, int denom)
701 return div(num,denom);
703 #endif /* ifdef __i386__ */
706 /*********************************************************************
707 * ldiv (MSVCRT.@)
708 * VERSION
709 * [i386] Windows binary compatible - returns the struct in eax/edx.
711 #ifdef __i386__
712 ULONGLONG MSVCRT_ldiv(long num, long denom)
714 ULONGLONG retval;
715 ldiv_t ldt = ldiv(num,denom);
716 retval = ((ULONGLONG)ldt.rem << 32) | (ULONG)ldt.quot;
717 return retval;
719 #else
720 /*********************************************************************
721 * ldiv (MSVCRT.@)
722 * VERSION
723 * [!i386] Non-x86 can't run win32 apps so we don't need binary compatibility
725 MSVCRT_ldiv_t MSVCRT_ldiv(long num, long denom)
727 return ldiv(num,denom);
729 #endif /* ifdef __i386__ */
731 /***********************************************************************
732 * _adj_fdiv_m16i (MSVCRT.@)
733 * FIXME
734 * This function is likely to have the wrong number of arguments.
736 * NOTE
737 * I _think_ this function is intended to work around the Pentium
738 * fdiv bug.
740 void _adj_fdiv_m16i(void)
742 TRACE("(): stub\n");
745 /***********************************************************************
746 * _adj_fdiv_m32 (MSVCRT.@)
747 * FIXME
748 * This function is likely to have the wrong number of arguments.
750 * NOTE
751 * I _think_ this function is intended to work around the Pentium
752 * fdiv bug.
754 void _adj_fdiv_m32(void)
756 TRACE("(): stub\n");
759 /***********************************************************************
760 * _adj_fdiv_m32i (MSVCRT.@)
761 * FIXME
762 * This function is likely to have the wrong number of arguments.
764 * NOTE
765 * I _think_ this function is intended to work around the Pentium
766 * fdiv bug.
768 void _adj_fdiv_m32i(void)
770 TRACE("(): stub\n");
773 /***********************************************************************
774 * _adj_fdiv_m64 (MSVCRT.@)
775 * FIXME
776 * This function is likely to have the wrong number of arguments.
778 * NOTE
779 * I _think_ this function is intended to work around the Pentium
780 * fdiv bug.
782 void _adj_fdiv_m64(void)
784 TRACE("(): stub\n");
787 /***********************************************************************
788 * _adj_fdiv_r (MSVCRT.@)
789 * FIXME
790 * This function is likely to have the wrong number of arguments.
792 * NOTE
793 * I _think_ this function is intended to work around the Pentium
794 * fdiv bug.
796 void _adj_fdiv_r(void)
798 TRACE("(): stub\n");
801 /***********************************************************************
802 * _adj_fdivr_m16i (MSVCRT.@)
803 * FIXME
804 * This function is likely to have the wrong number of arguments.
806 * NOTE
807 * I _think_ this function is intended to work around the Pentium
808 * fdiv bug.
810 void _adj_fdivr_m16i(void)
812 TRACE("(): stub\n");
815 /***********************************************************************
816 * _adj_fdivr_m32 (MSVCRT.@)
817 * FIXME
818 * This function is likely to have the wrong number of arguments.
820 * NOTE
821 * I _think_ this function is intended to work around the Pentium
822 * fdiv bug.
824 void _adj_fdivr_m32(void)
826 TRACE("(): stub\n");
829 /***********************************************************************
830 * _adj_fdivr_m32i (MSVCRT.@)
831 * FIXME
832 * This function is likely to have the wrong number of arguments.
834 * NOTE
835 * I _think_ this function is intended to work around the Pentium
836 * fdiv bug.
838 void _adj_fdivr_m32i(void)
840 TRACE("(): stub\n");
843 /***********************************************************************
844 * _adj_fdivr_m64 (MSVCRT.@)
845 * FIXME
846 * This function is likely to have the wrong number of arguments.
848 * NOTE
849 * I _think_ this function is intended to work around the Pentium
850 * fdiv bug.
852 void _adj_fdivr_m64(void)
854 TRACE("(): stub\n");
857 /***********************************************************************
858 * _adj_fpatan (MSVCRT.@)
859 * FIXME
860 * This function is likely to have the wrong number of arguments.
862 * NOTE
863 * I _think_ this function is intended to work around the Pentium
864 * fdiv bug.
866 void _adj_fpatan(void)
868 TRACE("(): stub\n");
871 /***********************************************************************
872 * _adj_fprem (MSVCRT.@)
873 * FIXME
874 * This function is likely to have the wrong number of arguments.
876 * NOTE
877 * I _think_ this function is intended to work around the Pentium
878 * fdiv bug.
880 void _adj_fprem(void)
882 TRACE("(): stub\n");
885 /***********************************************************************
886 * _adj_fprem1 (MSVCRT.@)
887 * FIXME
888 * This function is likely to have the wrong number of arguments.
890 * NOTE
891 * I _think_ this function is intended to work around the Pentium
892 * fdiv bug.
894 void _adj_fprem1(void)
896 TRACE("(): stub\n");
899 /***********************************************************************
900 * _adj_fptan (MSVCRT.@)
901 * FIXME
902 * This function is likely to have the wrong number of arguments.
904 * NOTE
905 * I _think_ this function is intended to work around the Pentium
906 * fdiv bug.
908 void _adj_fptan(void)
910 TRACE("(): stub\n");
913 /***********************************************************************
914 * _adjust_fdiv (MSVCRT.@)
915 * FIXME
916 * I _think_ this function should be a variable indicating whether
917 * Pentium fdiv bug safe code should be used.
919 void _adjust_fdiv(void)
921 TRACE("(): stub\n");
924 /***********************************************************************
925 * _safe_fdiv (MSVCRT.@)
926 * FIXME
927 * This function is likely to have the wrong number of arguments.
929 * NOTE
930 * I _think_ this function is intended to work around the Pentium
931 * fdiv bug.
933 void _safe_fdiv(void)
935 TRACE("(): stub\n");
938 /***********************************************************************
939 * _safe_fdivr (MSVCRT.@)
940 * FIXME
941 * This function is likely to have the wrong number of arguments.
943 * NOTE
944 * I _think_ this function is intended to work around the Pentium
945 * fdiv bug.
947 void _safe_fdivr(void)
949 TRACE("(): stub\n");
952 /***********************************************************************
953 * _safe_fprem (MSVCRT.@)
954 * FIXME
955 * This function is likely to have the wrong number of arguments.
957 * NOTE
958 * I _think_ this function is intended to work around the Pentium
959 * fdiv bug.
961 void _safe_fprem(void)
963 TRACE("(): stub\n");
966 /***********************************************************************
967 * _safe_fprem1 (MSVCRT.@)
969 * FIXME
970 * This function is likely to have the wrong number of arguments.
972 * NOTE
973 * I _think_ this function is intended to work around the Pentium
974 * fdiv bug.
976 void _safe_fprem1(void)
978 TRACE("(): stub\n");