Moved a few remaining 16-bit window functions to wnd16.c and moved it
[wine.git] / dlls / msvcrt / math.c
blobefc63539fa85412d961c6e0bf6a6b0e133a0176d
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 #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)) *MSVCRT__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)) *MSVCRT__errno() = MSVCRT_EDOM;
143 return asin(x);
146 /*********************************************************************
147 * _CIatan (MSVCRT.@)
149 double _CIatan(void)
151 FPU_DOUBLE(x);
152 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
153 return atan(x);
156 /*********************************************************************
157 * _CIatan2 (MSVCRT.@)
159 double _CIatan2(void)
161 FPU_DOUBLES(x,y);
162 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
163 return atan2(x,y);
166 /*********************************************************************
167 * _CIcos (MSVCRT.@)
169 double _CIcos(void)
171 FPU_DOUBLE(x);
172 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
173 return cos(x);
176 /*********************************************************************
177 * _CIcosh (MSVCRT.@)
179 double _CIcosh(void)
181 FPU_DOUBLE(x);
182 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
183 return cosh(x);
186 /*********************************************************************
187 * _CIexp (MSVCRT.@)
189 double _CIexp(void)
191 FPU_DOUBLE(x);
192 if (!finite(x)) *MSVCRT__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)) *MSVCRT__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)) *MSVCRT__errno() = MSVCRT_EDOM;
213 if (x == 0.0) *MSVCRT__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)) *MSVCRT__errno() = MSVCRT_EDOM;
224 if (x == 0.0) *MSVCRT__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)) *MSVCRT__errno() = MSVCRT_EDOM;
238 return z;
241 /*********************************************************************
242 * _CIsin (MSVCRT.@)
244 double _CIsin(void)
246 FPU_DOUBLE(x);
247 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
248 return sin(x);
251 /*********************************************************************
252 * _CIsinh (MSVCRT.@)
254 double _CIsinh(void)
256 FPU_DOUBLE(x);
257 if (!finite(x)) *MSVCRT__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)) *MSVCRT__errno() = MSVCRT_EDOM;
268 return sqrt(x);
271 /*********************************************************************
272 * _CItan (MSVCRT.@)
274 double _CItan(void)
276 FPU_DOUBLE(x);
277 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
278 return tan(x);
281 /*********************************************************************
282 * _CItanh (MSVCRT.@)
284 double _CItanh(void)
286 FPU_DOUBLE(x);
287 if (!finite(x)) *MSVCRT__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 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;
333 case FP_PNORM: return _FPCLASS_PN;
335 return _FPCLASS_PN;
336 #elif defined (fpclassify)
337 switch (fpclassify( num ))
339 case FP_NAN: return _FPCLASS_QNAN;
340 case FP_INFINITE: return signbit(num) ? _FPCLASS_NINF : _FPCLASS_PINF;
341 case FP_SUBNORMAL: return signbit(num) ?_FPCLASS_ND : _FPCLASS_PD;
342 case FP_ZERO: return signbit(num) ? _FPCLASS_NZ : _FPCLASS_PZ;
344 return signbit(num) ? _FPCLASS_NN : _FPCLASS_PN;
345 #else
346 if (!finite(num))
347 return _FPCLASS_QNAN;
348 return num == 0.0 ? _FPCLASS_PZ : (num < 0 ? _FPCLASS_NN : _FPCLASS_PN);
349 #endif
352 /*********************************************************************
353 * _rotl (MSVCRT.@)
355 unsigned int _rotl(unsigned int num, int shift)
357 shift &= 31;
358 return (num << shift) | (num >> (32-shift));
361 /*********************************************************************
362 * _logb (MSVCRT.@)
364 double _logb(double num)
366 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
367 return logb(num);
370 /*********************************************************************
371 * _lrotl (MSVCRT.@)
373 unsigned long _lrotl(unsigned long num, int shift)
375 shift &= 0x1f;
376 return (num << shift) | (num >> (32-shift));
379 /*********************************************************************
380 * _lrotr (MSVCRT.@)
382 unsigned long _lrotr(unsigned long num, int shift)
384 shift &= 0x1f;
385 return (num >> shift) | (num << (32-shift));
388 /*********************************************************************
389 * _rotr (MSVCRT.@)
391 unsigned int _rotr(unsigned int num, int shift)
393 shift &= 0x1f;
394 return (num >> shift) | (num << (32-shift));
397 /*********************************************************************
398 * _scalb (MSVCRT.@)
400 double _scalb(double num, long power)
402 /* Note - Can't forward directly as libc expects y as double */
403 double dblpower = (double)power;
404 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
405 return scalb(num, dblpower);
408 /*********************************************************************
409 * _matherr (MSVCRT.@)
411 int _matherr(MSVCRT_exception *e)
413 if (e)
414 TRACE("(%p = %d, %s, %g %g %g)\n",e, e->type, e->name, e->arg1, e->arg2,
415 e->retval);
416 else
417 TRACE("(null)\n");
418 if (MSVCRT_default_matherr_func)
419 return MSVCRT_default_matherr_func(e);
420 ERR(":Unhandled math error!\n");
421 return 0;
424 /*********************************************************************
425 * __setusermatherr (MSVCRT.@)
427 void MSVCRT___setusermatherr(MSVCRT_matherr_func func)
429 MSVCRT_default_matherr_func = func;
430 TRACE(":new matherr handler %p\n", func);
433 /**********************************************************************
434 * _statusfp (MSVCRT.@)
436 unsigned int _statusfp(void)
438 unsigned int retVal = 0;
439 #if defined(__GNUC__) && defined(__i386__)
440 unsigned int fpword;
442 __asm__ __volatile__( "fstsw %0" : "=m" (fpword) : );
443 if (fpword & 0x1) retVal |= _SW_INVALID;
444 if (fpword & 0x2) retVal |= _SW_DENORMAL;
445 if (fpword & 0x4) retVal |= _SW_ZERODIVIDE;
446 if (fpword & 0x8) retVal |= _SW_OVERFLOW;
447 if (fpword & 0x10) retVal |= _SW_UNDERFLOW;
448 if (fpword & 0x20) retVal |= _SW_INEXACT;
449 #else
450 FIXME(":Not implemented!\n");
451 #endif
452 return retVal;
455 /*********************************************************************
456 * _clearfp (MSVCRT.@)
458 unsigned int _clearfp(void)
460 unsigned int retVal = _statusfp();
461 #if defined(__GNUC__) && defined(__i386__)
462 __asm__ __volatile__( "fnclex" );
463 #else
464 FIXME(":Not Implemented\n");
465 #endif
466 return retVal;
469 /*********************************************************************
470 * ldexp (MSVCRT.@)
472 double MSVCRT_ldexp(double num, long exp)
474 double z = ldexp(num,exp);
476 if (!finite(z))
477 *MSVCRT__errno() = MSVCRT_ERANGE;
478 else if (z == 0 && signbit(z))
479 z = 0.0; /* Convert -0 -> +0 */
480 return z;
483 /*********************************************************************
484 * _cabs (MSVCRT.@)
486 double _cabs(MSVCRT_complex num)
488 return sqrt(num.real * num.real + num.imaginary * num.imaginary);
491 /*********************************************************************
492 * _chgsign (MSVCRT.@)
494 double _chgsign(double num)
496 /* FIXME: +-infinity,Nan not tested */
497 return -num;
500 /*********************************************************************
501 * _control87 (MSVCRT.@)
503 unsigned int _control87(unsigned int newval, unsigned int mask)
505 #if defined(__GNUC__) && defined(__i386__)
506 unsigned int fpword = 0;
507 unsigned int flags = 0;
509 TRACE("(%08x, %08x): Called\n", newval, mask);
511 /* Get fp control word */
512 __asm__ __volatile__( "fstcw %0" : "=m" (fpword) : );
514 TRACE("Control word before : %08x\n", fpword);
516 /* Convert into mask constants */
517 if (fpword & 0x1) flags |= _EM_INVALID;
518 if (fpword & 0x2) flags |= _EM_DENORMAL;
519 if (fpword & 0x4) flags |= _EM_ZERODIVIDE;
520 if (fpword & 0x8) flags |= _EM_OVERFLOW;
521 if (fpword & 0x10) flags |= _EM_UNDERFLOW;
522 if (fpword & 0x20) flags |= _EM_INEXACT;
523 switch(fpword & 0xC00) {
524 case 0xC00: flags |= _RC_UP|_RC_DOWN; break;
525 case 0x800: flags |= _RC_UP; break;
526 case 0x400: flags |= _RC_DOWN; break;
528 switch(fpword & 0x300) {
529 case 0x0: flags |= _PC_24; break;
530 case 0x200: flags |= _PC_53; break;
531 case 0x300: flags |= _PC_64; break;
533 if (fpword & 0x1000) flags |= _IC_AFFINE;
535 /* Mask with parameters */
536 flags = (flags & ~mask) | (newval & mask);
538 /* Convert (masked) value back to fp word */
539 fpword = 0;
540 if (flags & _EM_INVALID) fpword |= 0x1;
541 if (flags & _EM_DENORMAL) fpword |= 0x2;
542 if (flags & _EM_ZERODIVIDE) fpword |= 0x4;
543 if (flags & _EM_OVERFLOW) fpword |= 0x8;
544 if (flags & _EM_UNDERFLOW) fpword |= 0x10;
545 if (flags & _EM_INEXACT) fpword |= 0x20;
546 switch(flags & (_RC_UP | _RC_DOWN)) {
547 case _RC_UP|_RC_DOWN: fpword |= 0xC00; break;
548 case _RC_UP: fpword |= 0x800; break;
549 case _RC_DOWN: fpword |= 0x400; break;
551 switch (flags & (_PC_24 | _PC_53)) {
552 case _PC_64: fpword |= 0x300; break;
553 case _PC_53: fpword |= 0x200; break;
554 case _PC_24: fpword |= 0x0; break;
556 if (flags & _IC_AFFINE) fpword |= 0x1000;
558 TRACE("Control word after : %08x\n", fpword);
560 /* Put fp control word */
561 __asm__ __volatile__( "fldcw %0" : : "m" (fpword) );
563 return flags;
564 #else
565 FIXME(":Not Implemented!\n");
566 return 0;
567 #endif
570 /*********************************************************************
571 * _controlfp (MSVCRT.@)
573 unsigned int _controlfp(unsigned int newval, unsigned int mask)
575 #ifdef __i386__
576 return _control87( newval, mask & ~_EM_DENORMAL );
577 #else
578 FIXME(":Not Implemented!\n");
579 return 0;
580 #endif
583 /*********************************************************************
584 * _copysign (MSVCRT.@)
586 double _copysign(double num, double sign)
588 /* FIXME: Behaviour for Nan/Inf? */
589 if (sign < 0.0)
590 return num < 0.0 ? num : -num;
591 return num < 0.0 ? -num : num;
594 /*********************************************************************
595 * _finite (MSVCRT.@)
597 int _finite(double num)
599 return (finite(num)?1:0); /* See comment for _isnan() */
602 /*********************************************************************
603 * _fpreset (MSVCRT.@)
605 void _fpreset(void)
607 #if defined(__GNUC__) && defined(__i386__)
608 __asm__ __volatile__( "fninit" );
609 #else
610 FIXME(":Not Implemented!\n");
611 #endif
614 /*********************************************************************
615 * _isnan (MSVCRT.@)
617 INT _isnan(double num)
619 /* Some implementations return -1 for true(glibc), msvcrt/crtdll return 1.
620 * Do the same, as the result may be used in calculations
622 return isnan(num) ? 1 : 0;
625 /*********************************************************************
626 * _y0 (MSVCRT.@)
628 double _y0(double num)
630 double retval;
631 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
632 retval = y0(num);
633 if (_fpclass(retval) == _FPCLASS_NINF)
635 *MSVCRT__errno() = MSVCRT_EDOM;
636 retval = sqrt(-1);
638 return retval;
641 /*********************************************************************
642 * _y1 (MSVCRT.@)
644 double _y1(double num)
646 double retval;
647 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
648 retval = y1(num);
649 if (_fpclass(retval) == _FPCLASS_NINF)
651 *MSVCRT__errno() = MSVCRT_EDOM;
652 retval = sqrt(-1);
654 return retval;
657 /*********************************************************************
658 * _yn (MSVCRT.@)
660 double _yn(int order, double num)
662 double retval;
663 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
664 retval = yn(order,num);
665 if (_fpclass(retval) == _FPCLASS_NINF)
667 *MSVCRT__errno() = MSVCRT_EDOM;
668 retval = sqrt(-1);
670 return retval;
673 /*********************************************************************
674 * _nextafter (MSVCRT.@)
676 double _nextafter(double num, double next)
678 double retval;
679 if (!finite(num) || !finite(next)) *MSVCRT__errno() = MSVCRT_EDOM;
680 retval = nextafter(num,next);
681 return retval;
684 #include <stdlib.h> /* div_t, ldiv_t */
686 /*********************************************************************
687 * div (MSVCRT.@)
688 * VERSION
689 * [i386] Windows binary compatible - returns the struct in eax/edx.
691 #ifdef __i386__
692 LONGLONG MSVCRT_div(int num, int denom)
694 LONGLONG retval;
695 div_t dt = div(num,denom);
696 retval = ((LONGLONG)dt.rem << 32) | dt.quot;
697 return retval;
699 #else
700 /*********************************************************************
701 * div (MSVCRT.@)
702 * VERSION
703 * [!i386] Non-x86 can't run win32 apps so we don't need binary compatibility
705 MSVCRT_div_t MSVCRT_div(int num, int denom)
707 div_t dt = div(num,denom);
708 MSVCRT_div_t ret;
709 ret.quot = dt.quot;
710 ret.rem = dt.rem;
712 return ret;
715 #endif /* ifdef __i386__ */
718 /*********************************************************************
719 * ldiv (MSVCRT.@)
720 * VERSION
721 * [i386] Windows binary compatible - returns the struct in eax/edx.
723 #ifdef __i386__
724 ULONGLONG MSVCRT_ldiv(long num, long denom)
726 ULONGLONG retval;
727 ldiv_t ldt = ldiv(num,denom);
728 retval = ((ULONGLONG)ldt.rem << 32) | (ULONG)ldt.quot;
729 return retval;
731 #else
732 /*********************************************************************
733 * ldiv (MSVCRT.@)
734 * VERSION
735 * [!i386] Non-x86 can't run win32 apps so we don't need binary compatibility
737 MSVCRT_ldiv_t MSVCRT_ldiv(long num, long denom)
739 ldiv_t result = ldiv(num,denom);
741 MSVCRT_ldiv_t ret;
742 ret.quot = result.quot;
743 ret.rem = result.rem;
745 return ret;
747 #endif /* ifdef __i386__ */
749 /***********************************************************************
750 * _adj_fdiv_m16i (MSVCRT.@)
751 * FIXME
752 * This function is likely to have the wrong number of arguments.
754 * NOTE
755 * I _think_ this function is intended to work around the Pentium
756 * fdiv bug.
758 void _adj_fdiv_m16i(void)
760 TRACE("(): stub\n");
763 /***********************************************************************
764 * _adj_fdiv_m32 (MSVCRT.@)
765 * FIXME
766 * This function is likely to have the wrong number of arguments.
768 * NOTE
769 * I _think_ this function is intended to work around the Pentium
770 * fdiv bug.
772 void _adj_fdiv_m32(void)
774 TRACE("(): stub\n");
777 /***********************************************************************
778 * _adj_fdiv_m32i (MSVCRT.@)
779 * FIXME
780 * This function is likely to have the wrong number of arguments.
782 * NOTE
783 * I _think_ this function is intended to work around the Pentium
784 * fdiv bug.
786 void _adj_fdiv_m32i(void)
788 TRACE("(): stub\n");
791 /***********************************************************************
792 * _adj_fdiv_m64 (MSVCRT.@)
793 * FIXME
794 * This function is likely to have the wrong number of arguments.
796 * NOTE
797 * I _think_ this function is intended to work around the Pentium
798 * fdiv bug.
800 void _adj_fdiv_m64(void)
802 TRACE("(): stub\n");
805 /***********************************************************************
806 * _adj_fdiv_r (MSVCRT.@)
807 * FIXME
808 * This function is likely to have the wrong number of arguments.
810 * NOTE
811 * I _think_ this function is intended to work around the Pentium
812 * fdiv bug.
814 void _adj_fdiv_r(void)
816 TRACE("(): stub\n");
819 /***********************************************************************
820 * _adj_fdivr_m16i (MSVCRT.@)
821 * FIXME
822 * This function is likely to have the wrong number of arguments.
824 * NOTE
825 * I _think_ this function is intended to work around the Pentium
826 * fdiv bug.
828 void _adj_fdivr_m16i(void)
830 TRACE("(): stub\n");
833 /***********************************************************************
834 * _adj_fdivr_m32 (MSVCRT.@)
835 * FIXME
836 * This function is likely to have the wrong number of arguments.
838 * NOTE
839 * I _think_ this function is intended to work around the Pentium
840 * fdiv bug.
842 void _adj_fdivr_m32(void)
844 TRACE("(): stub\n");
847 /***********************************************************************
848 * _adj_fdivr_m32i (MSVCRT.@)
849 * FIXME
850 * This function is likely to have the wrong number of arguments.
852 * NOTE
853 * I _think_ this function is intended to work around the Pentium
854 * fdiv bug.
856 void _adj_fdivr_m32i(void)
858 TRACE("(): stub\n");
861 /***********************************************************************
862 * _adj_fdivr_m64 (MSVCRT.@)
863 * FIXME
864 * This function is likely to have the wrong number of arguments.
866 * NOTE
867 * I _think_ this function is intended to work around the Pentium
868 * fdiv bug.
870 void _adj_fdivr_m64(void)
872 TRACE("(): stub\n");
875 /***********************************************************************
876 * _adj_fpatan (MSVCRT.@)
877 * FIXME
878 * This function is likely to have the wrong number of arguments.
880 * NOTE
881 * I _think_ this function is intended to work around the Pentium
882 * fdiv bug.
884 void _adj_fpatan(void)
886 TRACE("(): stub\n");
889 /***********************************************************************
890 * _adj_fprem (MSVCRT.@)
891 * FIXME
892 * This function is likely to have the wrong number of arguments.
894 * NOTE
895 * I _think_ this function is intended to work around the Pentium
896 * fdiv bug.
898 void _adj_fprem(void)
900 TRACE("(): stub\n");
903 /***********************************************************************
904 * _adj_fprem1 (MSVCRT.@)
905 * FIXME
906 * This function is likely to have the wrong number of arguments.
908 * NOTE
909 * I _think_ this function is intended to work around the Pentium
910 * fdiv bug.
912 void _adj_fprem1(void)
914 TRACE("(): stub\n");
917 /***********************************************************************
918 * _adj_fptan (MSVCRT.@)
919 * FIXME
920 * This function is likely to have the wrong number of arguments.
922 * NOTE
923 * I _think_ this function is intended to work around the Pentium
924 * fdiv bug.
926 void _adj_fptan(void)
928 TRACE("(): stub\n");
931 /***********************************************************************
932 * _adjust_fdiv (MSVCRT.@)
933 * FIXME
934 * I _think_ this function should be a variable indicating whether
935 * Pentium fdiv bug safe code should be used.
937 void _adjust_fdiv(void)
939 TRACE("(): stub\n");
942 /***********************************************************************
943 * _safe_fdiv (MSVCRT.@)
944 * FIXME
945 * This function is likely to have the wrong number of arguments.
947 * NOTE
948 * I _think_ this function is intended to work around the Pentium
949 * fdiv bug.
951 void _safe_fdiv(void)
953 TRACE("(): stub\n");
956 /***********************************************************************
957 * _safe_fdivr (MSVCRT.@)
958 * FIXME
959 * This function is likely to have the wrong number of arguments.
961 * NOTE
962 * I _think_ this function is intended to work around the Pentium
963 * fdiv bug.
965 void _safe_fdivr(void)
967 TRACE("(): stub\n");
970 /***********************************************************************
971 * _safe_fprem (MSVCRT.@)
972 * FIXME
973 * This function is likely to have the wrong number of arguments.
975 * NOTE
976 * I _think_ this function is intended to work around the Pentium
977 * fdiv bug.
979 void _safe_fprem(void)
981 TRACE("(): stub\n");
984 /***********************************************************************
985 * _safe_fprem1 (MSVCRT.@)
987 * FIXME
988 * This function is likely to have the wrong number of arguments.
990 * NOTE
991 * I _think_ this function is intended to work around the Pentium
992 * fdiv bug.
994 void _safe_fprem1(void)
996 TRACE("(): stub\n");