source: trunk/src/msvcrt/math.c@ 9633

Last change on this file since 9633 was 9633, checked in by sandervl, 23 years ago

PF: Msvcrt Wine port with GCC

File size: 23.7 KB
Line 
1/*
2 * msvcrt.dll math functions
3 *
4 * Copyright 2000 Jon Griffiths
5 *
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.
10 *
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.
15 *
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
19 */
20#ifdef __WIN32OS2__
21#include <emxheader.h>
22#else
23#include "config.h"
24#endif
25
26#include "msvcrt.h"
27#include "msvcrt/errno.h"
28
29#define __USE_ISOC9X 1
30#define __USE_ISOC99 1
31#include <math.h>
32#ifdef HAVE_IEEEFP_H
33#include <ieeefp.h>
34#endif
35
36#include "msvcrt/stdlib.h"
37
38#include "wine/debug.h"
39
40WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
41
42#ifndef HAVE_FINITE
43#ifndef finite /* Could be a macro */
44#ifdef isfinite
45#define finite(x) isfinite(x)
46#else
47#define finite(x) (!isnan(x)) /* At least catch some cases */
48#endif
49#endif
50#endif
51
52#ifndef signbit
53#define signbit(x) 0
54#endif
55
56/* fpclass constants */
57#define _FPCLASS_SNAN 1
58#define _FPCLASS_QNAN 2
59#define _FPCLASS_NINF 4
60#define _FPCLASS_NN 8
61#define _FPCLASS_ND 16
62#define _FPCLASS_NZ 32
63#define _FPCLASS_PZ 64
64#define _FPCLASS_PD 128
65#define _FPCLASS_PN 256
66#define _FPCLASS_PINF 512
67
68/* _statusfp bit flags */
69#define _SW_INEXACT 0x1
70#define _SW_UNDERFLOW 0x2
71#define _SW_OVERFLOW 0x4
72#define _SW_ZERODIVIDE 0x8
73#define _SW_INVALID 0x10
74#define _SW_DENORMAL 0x80000
75
76/* _controlfp masks and bitflags - x86 only so far*/
77#ifdef __i386__
78#define _MCW_EM 0x8001f
79#define _EM_INEXACT 0x1
80#define _EM_UNDERFLOW 0x2
81#define _EM_OVERFLOW 0x4
82#define _EM_ZERODIVIDE 0x8
83#define _EM_INVALID 0x10
84
85#define _MCW_RC 0x300
86#define _RC_NEAR 0x0
87#define _RC_DOWN 0x100
88#define _RC_UP 0x200
89#define _RC_CHOP 0x300
90
91#define _MCW_PC 0x30000
92#define _PC_64 0x0
93#define _PC_53 0x10000
94#define _PC_24 0x20000
95
96#define _MCW_IC 0x40000
97#define _IC_AFFINE 0x40000
98#define _IC_PROJECTIVE 0x0
99
100#define _EM_DENORMAL 0x80000
101#endif
102
103typedef struct __MSVCRT_complex
104{
105 double real;
106 double imaginary;
107} MSVCRT_complex;
108
109typedef struct __MSVCRT_exception
110{
111 int type;
112 char *name;
113 double arg1;
114 double arg2;
115 double retval;
116} MSVCRT_exception;
117
118
119typedef int (*MSVCRT_matherr_func)(MSVCRT_exception *);
120
121static MSVCRT_matherr_func MSVCRT_default_matherr_func = NULL;
122
123#if defined(__GNUC__) && defined(__i386__)
124
125#define FPU_DOUBLE(var) double var; \
126 __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var) : )
127#define FPU_DOUBLES(var1,var2) double var1,var2; \
128 __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var2) : ); \
129 __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var1) : )
130
131/*********************************************************************
132 * _CIacos (MSVCRT.@)
133 */
134double _CIacos(void)
135{
136 FPU_DOUBLE(x);
137 if (x < -1.0 || x > 1.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
138 return acos(x);
139}
140
141/*********************************************************************
142 * _CIasin (MSVCRT.@)
143 */
144double _CIasin(void)
145{
146 FPU_DOUBLE(x);
147 if (x < -1.0 || x > 1.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
148 return asin(x);
149}
150
151/*********************************************************************
152 * _CIatan (MSVCRT.@)
153 */
154double _CIatan(void)
155{
156 FPU_DOUBLE(x);
157 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
158 return atan(x);
159}
160
161/*********************************************************************
162 * _CIatan2 (MSVCRT.@)
163 */
164double _CIatan2(void)
165{
166 FPU_DOUBLES(x,y);
167 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
168 return atan2(x,y);
169}
170
171/*********************************************************************
172 * _CIcos (MSVCRT.@)
173 */
174double _CIcos(void)
175{
176 FPU_DOUBLE(x);
177 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
178 return cos(x);
179}
180
181/*********************************************************************
182 * _CIcosh (MSVCRT.@)
183 */
184double _CIcosh(void)
185{
186 FPU_DOUBLE(x);
187 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
188 return cosh(x);
189}
190
191/*********************************************************************
192 * _CIexp (MSVCRT.@)
193 */
194double _CIexp(void)
195{
196 FPU_DOUBLE(x);
197 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
198 return exp(x);
199}
200
201/*********************************************************************
202 * _CIfmod (MSVCRT.@)
203 */
204double _CIfmod(void)
205{
206 FPU_DOUBLES(x,y);
207 if (!finite(x) || !finite(y)) *MSVCRT__errno() = MSVCRT_EDOM;
208 return fmod(x,y);
209}
210
211/*********************************************************************
212 * _CIlog (MSVCRT.@)
213 */
214double _CIlog(void)
215{
216 FPU_DOUBLE(x);
217 if (x < 0.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
218 if (x == 0.0) *MSVCRT__errno() = MSVCRT_ERANGE;
219 return log(x);
220}
221
222/*********************************************************************
223 * _CIlog10 (MSVCRT.@)
224 */
225double _CIlog10(void)
226{
227 FPU_DOUBLE(x);
228 if (x < 0.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
229 if (x == 0.0) *MSVCRT__errno() = MSVCRT_ERANGE;
230 return log10(x);
231}
232
233/*********************************************************************
234 * _CIpow (MSVCRT.@)
235 */
236double _CIpow(void)
237{
238 double z;
239 FPU_DOUBLES(x,y);
240 /* FIXME: If x < 0 and y is not integral, set EDOM */
241 z = pow(x,y);
242 if (!finite(z)) *MSVCRT__errno() = MSVCRT_EDOM;
243 return z;
244}
245
246/*********************************************************************
247 * _CIsin (MSVCRT.@)
248 */
249double _CIsin(void)
250{
251 FPU_DOUBLE(x);
252 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
253 return sin(x);
254}
255
256/*********************************************************************
257 * _CIsinh (MSVCRT.@)
258 */
259double _CIsinh(void)
260{
261 FPU_DOUBLE(x);
262 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
263 return sinh(x);
264}
265
266/*********************************************************************
267 * _CIsqrt (MSVCRT.@)
268 */
269double _CIsqrt(void)
270{
271 FPU_DOUBLE(x);
272 if (x < 0.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
273 return sqrt(x);
274}
275
276/*********************************************************************
277 * _CItan (MSVCRT.@)
278 */
279double _CItan(void)
280{
281 FPU_DOUBLE(x);
282 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
283 return tan(x);
284}
285
286/*********************************************************************
287 * _CItanh (MSVCRT.@)
288 */
289double _CItanh(void)
290{
291 FPU_DOUBLE(x);
292 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
293 return tanh(x);
294}
295
296#else /* defined(__GNUC__) && defined(__i386__) */
297
298/* The above cannot be called on non x86 platforms, stub them for linking */
299
300#define IX86_ONLY(func) double func(void) { return 0.0; }
301
302IX86_ONLY(_CIacos)
303IX86_ONLY(_CIasin)
304IX86_ONLY(_CIatan)
305IX86_ONLY(_CIatan2)
306IX86_ONLY(_CIcos)
307IX86_ONLY(_CIcosh)
308IX86_ONLY(_CIexp)
309IX86_ONLY(_CIfmod)
310IX86_ONLY(_CIlog)
311IX86_ONLY(_CIlog10)
312IX86_ONLY(_CIpow)
313IX86_ONLY(_CIsin)
314IX86_ONLY(_CIsinh)
315IX86_ONLY(_CIsqrt)
316IX86_ONLY(_CItan)
317IX86_ONLY(_CItanh)
318
319#endif /* defined(__GNUC__) && defined(__i386__) */
320
321/*********************************************************************
322 * _fpclass (MSVCRT.@)
323 */
324int _fpclass(double num)
325{
326#if defined(HAVE_FPCLASS) || defined(fpclass)
327 switch (fpclass( num ))
328 {
329 case FP_SNAN: return _FPCLASS_SNAN;
330 case FP_QNAN: return _FPCLASS_QNAN;
331 case FP_NINF: return _FPCLASS_NINF;
332 case FP_PINF: return _FPCLASS_PINF;
333 case FP_NDENORM: return _FPCLASS_ND;
334 case FP_PDENORM: return _FPCLASS_PD;
335 case FP_NZERO: return _FPCLASS_NZ;
336 case FP_PZERO: return _FPCLASS_PZ;
337 case FP_NNORM: return _FPCLASS_NN;
338 case FP_PNORM: return _FPCLASS_PN;
339 }
340 return _FPCLASS_PN;
341#elif defined (fpclassify)
342 switch (fpclassify( num ))
343 {
344 case FP_NAN: return _FPCLASS_QNAN;
345 case FP_INFINITE: return signbit(num) ? _FPCLASS_NINF : _FPCLASS_PINF;
346 case FP_SUBNORMAL: return signbit(num) ?_FPCLASS_ND : _FPCLASS_PD;
347 case FP_ZERO: return signbit(num) ? _FPCLASS_NZ : _FPCLASS_PZ;
348 }
349 return signbit(num) ? _FPCLASS_NN : _FPCLASS_PN;
350#else
351 if (!finite(num))
352 return _FPCLASS_QNAN;
353 return num == 0.0 ? _FPCLASS_PZ : (num < 0 ? _FPCLASS_NN : _FPCLASS_PN);
354#endif
355}
356
357/*********************************************************************
358 * _rotl (MSVCRT.@)
359 */
360unsigned int _rotl(unsigned int num, int shift)
361{
362 shift &= 31;
363 return (num << shift) | (num >> (32-shift));
364}
365
366/*********************************************************************
367 * _logb (MSVCRT.@)
368 */
369double _logb(double num)
370{
371 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
372 return logb(num);
373}
374
375/*********************************************************************
376 * _lrotl (MSVCRT.@)
377 */
378unsigned long _lrotl(unsigned long num, int shift)
379{
380 shift &= 0x1f;
381 return (num << shift) | (num >> (32-shift));
382}
383
384/*********************************************************************
385 * _lrotr (MSVCRT.@)
386 */
387unsigned long _lrotr(unsigned long num, int shift)
388{
389 shift &= 0x1f;
390 return (num >> shift) | (num << (32-shift));
391}
392
393/*********************************************************************
394 * _rotr (MSVCRT.@)
395 */
396unsigned int _rotr(unsigned int num, int shift)
397{
398 shift &= 0x1f;
399 return (num >> shift) | (num << (32-shift));
400}
401
402/*********************************************************************
403 * _scalb (MSVCRT.@)
404 */
405double _scalb(double num, long power)
406{
407 /* Note - Can't forward directly as libc expects y as double */
408 double dblpower = (double)power;
409 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
410 return scalb(num, dblpower);
411}
412
413/*********************************************************************
414 * _matherr (MSVCRT.@)
415 */
416int _matherr(MSVCRT_exception *e)
417{
418 if (e)
419 TRACE("(%p = %d, %s, %g %g %g)\n",e, e->type, e->name, e->arg1, e->arg2,
420 e->retval);
421 else
422 TRACE("(null)\n");
423 if (MSVCRT_default_matherr_func)
424 return MSVCRT_default_matherr_func(e);
425 ERR(":Unhandled math error!\n");
426 return 0;
427}
428
429/*********************************************************************
430 * __setusermatherr (MSVCRT.@)
431 */
432void MSVCRT___setusermatherr(MSVCRT_matherr_func func)
433{
434 MSVCRT_default_matherr_func = func;
435 TRACE(":new matherr handler %p\n", func);
436}
437
438/**********************************************************************
439 * _statusfp (MSVCRT.@)
440 */
441unsigned int _statusfp(void)
442{
443 unsigned int retVal = 0;
444#if defined(__GNUC__) && defined(__i386__)
445 unsigned int fpword;
446
447 __asm__ __volatile__( "fstsw %0" : "=m" (fpword) : );
448 if (fpword & 0x1) retVal |= _SW_INVALID;
449 if (fpword & 0x2) retVal |= _SW_DENORMAL;
450 if (fpword & 0x4) retVal |= _SW_ZERODIVIDE;
451 if (fpword & 0x8) retVal |= _SW_OVERFLOW;
452 if (fpword & 0x10) retVal |= _SW_UNDERFLOW;
453 if (fpword & 0x20) retVal |= _SW_INEXACT;
454#else
455 FIXME(":Not implemented!\n");
456#endif
457 return retVal;
458}
459
460/*********************************************************************
461 * _clearfp (MSVCRT.@)
462 */
463unsigned int _clearfp(void)
464{
465 unsigned int retVal = _statusfp();
466#if defined(__GNUC__) && defined(__i386__)
467 __asm__ __volatile__( "fnclex" );
468#else
469 FIXME(":Not Implemented\n");
470#endif
471 return retVal;
472}
473
474/*********************************************************************
475 * ldexp (MSVCRT.@)
476 */
477double MSVCRT_ldexp(double num, long exp)
478{
479 double z = ldexp(num,exp);
480
481 if (!finite(z))
482 *MSVCRT__errno() = MSVCRT_ERANGE;
483 else if (z == 0 && signbit(z))
484 z = 0.0; /* Convert -0 -> +0 */
485 return z;
486}
487
488/*********************************************************************
489 * _cabs (MSVCRT.@)
490 */
491double _cabs(MSVCRT_complex num)
492{
493 return sqrt(num.real * num.real + num.imaginary * num.imaginary);
494}
495
496/*********************************************************************
497 * _chgsign (MSVCRT.@)
498 */
499double _chgsign(double num)
500{
501 /* FIXME: +-infinity,Nan not tested */
502 return -num;
503}
504
505/*********************************************************************
506 * _control87 (MSVCRT.@)
507 */
508unsigned int _control87(unsigned int newval, unsigned int mask)
509{
510#if defined(__GNUC__) && defined(__i386__)
511 unsigned int fpword = 0;
512 unsigned int flags = 0;
513
514 TRACE("(%08x, %08x): Called\n", newval, mask);
515
516 /* Get fp control word */
517 __asm__ __volatile__( "fstcw %0" : "=m" (fpword) : );
518
519 TRACE("Control word before : %08x\n", fpword);
520
521 /* Convert into mask constants */
522 if (fpword & 0x1) flags |= _EM_INVALID;
523 if (fpword & 0x2) flags |= _EM_DENORMAL;
524 if (fpword & 0x4) flags |= _EM_ZERODIVIDE;
525 if (fpword & 0x8) flags |= _EM_OVERFLOW;
526 if (fpword & 0x10) flags |= _EM_UNDERFLOW;
527 if (fpword & 0x20) flags |= _EM_INEXACT;
528 switch(fpword & 0xC00) {
529 case 0xC00: flags |= _RC_UP|_RC_DOWN; break;
530 case 0x800: flags |= _RC_UP; break;
531 case 0x400: flags |= _RC_DOWN; break;
532 }
533 switch(fpword & 0x300) {
534 case 0x0: flags |= _PC_24; break;
535 case 0x200: flags |= _PC_53; break;
536 case 0x300: flags |= _PC_64; break;
537 }
538 if (fpword & 0x1000) flags |= _IC_AFFINE;
539
540 /* Mask with parameters */
541 flags = (flags & ~mask) | (newval & mask);
542
543 /* Convert (masked) value back to fp word */
544 fpword = 0;
545 if (flags & _EM_INVALID) fpword |= 0x1;
546 if (flags & _EM_DENORMAL) fpword |= 0x2;
547 if (flags & _EM_ZERODIVIDE) fpword |= 0x4;
548 if (flags & _EM_OVERFLOW) fpword |= 0x8;
549 if (flags & _EM_UNDERFLOW) fpword |= 0x10;
550 if (flags & _EM_INEXACT) fpword |= 0x20;
551 switch(flags & (_RC_UP | _RC_DOWN)) {
552 case _RC_UP|_RC_DOWN: fpword |= 0xC00; break;
553 case _RC_UP: fpword |= 0x800; break;
554 case _RC_DOWN: fpword |= 0x400; break;
555 }
556 switch (flags & (_PC_24 | _PC_53)) {
557 case _PC_64: fpword |= 0x300; break;
558 case _PC_53: fpword |= 0x200; break;
559 case _PC_24: fpword |= 0x0; break;
560 }
561 if (flags & _IC_AFFINE) fpword |= 0x1000;
562
563 TRACE("Control word after : %08x\n", fpword);
564
565 /* Put fp control word */
566 __asm__ __volatile__( "fldcw %0" : : "m" (fpword) );
567
568 return flags;
569#else
570 FIXME(":Not Implemented!\n");
571 return 0;
572#endif
573}
574
575/*********************************************************************
576 * _controlfp (MSVCRT.@)
577 */
578unsigned int _controlfp(unsigned int newval, unsigned int mask)
579{
580#ifdef __i386__
581 return _control87( newval, mask & ~_EM_DENORMAL );
582#else
583 FIXME(":Not Implemented!\n");
584 return 0;
585#endif
586}
587
588/*********************************************************************
589 * _copysign (MSVCRT.@)
590 */
591double _copysign(double num, double sign)
592{
593 /* FIXME: Behaviour for Nan/Inf? */
594 if (sign < 0.0)
595 return num < 0.0 ? num : -num;
596 return num < 0.0 ? -num : num;
597}
598
599/*********************************************************************
600 * _finite (MSVCRT.@)
601 */
602int _finite(double num)
603{
604 return (finite(num)?1:0); /* See comment for _isnan() */
605}
606
607/*********************************************************************
608 * _fpreset (MSVCRT.@)
609 */
610void _fpreset(void)
611{
612#if defined(__GNUC__) && defined(__i386__)
613 __asm__ __volatile__( "fninit" );
614#else
615 FIXME(":Not Implemented!\n");
616#endif
617}
618
619/*********************************************************************
620 * _isnan (MSVCRT.@)
621 */
622INT _isnan(double num)
623{
624 /* Some implementations return -1 for true(glibc), msvcrt/crtdll return 1.
625 * Do the same, as the result may be used in calculations
626 */
627 return isnan(num) ? 1 : 0;
628}
629
630/*********************************************************************
631 * _y0 (MSVCRT.@)
632 */
633double _y0(double num)
634{
635 double retval;
636 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
637 retval = y0(num);
638 if (_fpclass(retval) == _FPCLASS_NINF)
639 {
640 *MSVCRT__errno() = MSVCRT_EDOM;
641 retval = sqrt(-1);
642 }
643 return retval;
644}
645
646/*********************************************************************
647 * _y1 (MSVCRT.@)
648 */
649double _y1(double num)
650{
651 double retval;
652 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
653 retval = y1(num);
654 if (_fpclass(retval) == _FPCLASS_NINF)
655 {
656 *MSVCRT__errno() = MSVCRT_EDOM;
657 retval = sqrt(-1);
658 }
659 return retval;
660}
661
662/*********************************************************************
663 * _yn (MSVCRT.@)
664 */
665double _yn(int order, double num)
666{
667 double retval;
668 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
669 retval = yn(order,num);
670 if (_fpclass(retval) == _FPCLASS_NINF)
671 {
672 *MSVCRT__errno() = MSVCRT_EDOM;
673 retval = sqrt(-1);
674 }
675 return retval;
676}
677
678/*********************************************************************
679 * _nextafter (MSVCRT.@)
680 */
681double _nextafter(double num, double next)
682{
683 double retval;
684 if (!finite(num) || !finite(next)) *MSVCRT__errno() = MSVCRT_EDOM;
685 retval = nextafter(num,next);
686 return retval;
687}
688
689#include <stdlib.h> /* div_t, ldiv_t */
690
691/*********************************************************************
692 * div (MSVCRT.@)
693 * VERSION
694 * [i386] Windows binary compatible - returns the struct in eax/edx.
695 */
696#ifdef __i386__
697LONGLONG MSVCRT_div(int num, int denom)
698{
699 LONGLONG retval;
700 div_t dt = div(num,denom);
701 retval = ((LONGLONG)dt.rem << 32) | dt.quot;
702 return retval;
703}
704#else
705/*********************************************************************
706 * div (MSVCRT.@)
707 * VERSION
708 * [!i386] Non-x86 can't run win32 apps so we don't need binary compatibility
709 */
710MSVCRT_div_t MSVCRT_div(int num, int denom)
711{
712 div_t dt = div(num,denom);
713 MSVCRT_div_t ret;
714 ret.quot = dt.quot;
715 ret.rem = dt.rem;
716
717 return ret;
718
719}
720#endif /* ifdef __i386__ */
721
722
723/*********************************************************************
724 * ldiv (MSVCRT.@)
725 * VERSION
726 * [i386] Windows binary compatible - returns the struct in eax/edx.
727 */
728#ifdef __i386__
729ULONGLONG MSVCRT_ldiv(long num, long denom)
730{
731 ULONGLONG retval;
732 ldiv_t ldt = ldiv(num,denom);
733 retval = ((ULONGLONG)ldt.rem << 32) | (ULONG)ldt.quot;
734 return retval;
735}
736#else
737/*********************************************************************
738 * ldiv (MSVCRT.@)
739 * VERSION
740 * [!i386] Non-x86 can't run win32 apps so we don't need binary compatibility
741 */
742MSVCRT_ldiv_t MSVCRT_ldiv(long num, long denom)
743{
744 ldiv_t result = ldiv(num,denom);
745
746 MSVCRT_ldiv_t ret;
747 ret.quot = result.quot;
748 ret.rem = result.rem;
749
750 return ret;
751}
752#endif /* ifdef __i386__ */
753
754/***********************************************************************
755 * _adj_fdiv_m16i (MSVCRT.@)
756 * FIXME
757 * This function is likely to have the wrong number of arguments.
758 *
759 * NOTE
760 * I _think_ this function is intended to work around the Pentium
761 * fdiv bug.
762 */
763void _adj_fdiv_m16i(void)
764{
765 TRACE("(): stub\n");
766}
767
768/***********************************************************************
769 * _adj_fdiv_m32 (MSVCRT.@)
770 * FIXME
771 * This function is likely to have the wrong number of arguments.
772 *
773 * NOTE
774 * I _think_ this function is intended to work around the Pentium
775 * fdiv bug.
776 */
777void _adj_fdiv_m32(void)
778{
779 TRACE("(): stub\n");
780}
781
782/***********************************************************************
783 * _adj_fdiv_m32i (MSVCRT.@)
784 * FIXME
785 * This function is likely to have the wrong number of arguments.
786 *
787 * NOTE
788 * I _think_ this function is intended to work around the Pentium
789 * fdiv bug.
790 */
791void _adj_fdiv_m32i(void)
792{
793 TRACE("(): stub\n");
794}
795
796/***********************************************************************
797 * _adj_fdiv_m64 (MSVCRT.@)
798 * FIXME
799 * This function is likely to have the wrong number of arguments.
800 *
801 * NOTE
802 * I _think_ this function is intended to work around the Pentium
803 * fdiv bug.
804 */
805void _adj_fdiv_m64(void)
806{
807 TRACE("(): stub\n");
808}
809
810/***********************************************************************
811 * _adj_fdiv_r (MSVCRT.@)
812 * FIXME
813 * This function is likely to have the wrong number of arguments.
814 *
815 * NOTE
816 * I _think_ this function is intended to work around the Pentium
817 * fdiv bug.
818 */
819void _adj_fdiv_r(void)
820{
821 TRACE("(): stub\n");
822}
823
824/***********************************************************************
825 * _adj_fdivr_m16i (MSVCRT.@)
826 * FIXME
827 * This function is likely to have the wrong number of arguments.
828 *
829 * NOTE
830 * I _think_ this function is intended to work around the Pentium
831 * fdiv bug.
832 */
833void _adj_fdivr_m16i(void)
834{
835 TRACE("(): stub\n");
836}
837
838/***********************************************************************
839 * _adj_fdivr_m32 (MSVCRT.@)
840 * FIXME
841 * This function is likely to have the wrong number of arguments.
842 *
843 * NOTE
844 * I _think_ this function is intended to work around the Pentium
845 * fdiv bug.
846 */
847void _adj_fdivr_m32(void)
848{
849 TRACE("(): stub\n");
850}
851
852/***********************************************************************
853 * _adj_fdivr_m32i (MSVCRT.@)
854 * FIXME
855 * This function is likely to have the wrong number of arguments.
856 *
857 * NOTE
858 * I _think_ this function is intended to work around the Pentium
859 * fdiv bug.
860 */
861void _adj_fdivr_m32i(void)
862{
863 TRACE("(): stub\n");
864}
865
866/***********************************************************************
867 * _adj_fdivr_m64 (MSVCRT.@)
868 * FIXME
869 * This function is likely to have the wrong number of arguments.
870 *
871 * NOTE
872 * I _think_ this function is intended to work around the Pentium
873 * fdiv bug.
874 */
875void _adj_fdivr_m64(void)
876{
877 TRACE("(): stub\n");
878}
879
880/***********************************************************************
881 * _adj_fpatan (MSVCRT.@)
882 * FIXME
883 * This function is likely to have the wrong number of arguments.
884 *
885 * NOTE
886 * I _think_ this function is intended to work around the Pentium
887 * fdiv bug.
888 */
889void _adj_fpatan(void)
890{
891 TRACE("(): stub\n");
892}
893
894/***********************************************************************
895 * _adj_fprem (MSVCRT.@)
896 * FIXME
897 * This function is likely to have the wrong number of arguments.
898 *
899 * NOTE
900 * I _think_ this function is intended to work around the Pentium
901 * fdiv bug.
902 */
903void _adj_fprem(void)
904{
905 TRACE("(): stub\n");
906}
907
908/***********************************************************************
909 * _adj_fprem1 (MSVCRT.@)
910 * FIXME
911 * This function is likely to have the wrong number of arguments.
912 *
913 * NOTE
914 * I _think_ this function is intended to work around the Pentium
915 * fdiv bug.
916 */
917void _adj_fprem1(void)
918{
919 TRACE("(): stub\n");
920}
921
922/***********************************************************************
923 * _adj_fptan (MSVCRT.@)
924 * FIXME
925 * This function is likely to have the wrong number of arguments.
926 *
927 * NOTE
928 * I _think_ this function is intended to work around the Pentium
929 * fdiv bug.
930 */
931void _adj_fptan(void)
932{
933 TRACE("(): stub\n");
934}
935
936/***********************************************************************
937 * _adjust_fdiv (MSVCRT.@)
938 * FIXME
939 * I _think_ this function should be a variable indicating whether
940 * Pentium fdiv bug safe code should be used.
941 */
942void _adjust_fdiv(void)
943{
944 TRACE("(): stub\n");
945}
946
947/***********************************************************************
948 * _safe_fdiv (MSVCRT.@)
949 * FIXME
950 * This function is likely to have the wrong number of arguments.
951 *
952 * NOTE
953 * I _think_ this function is intended to work around the Pentium
954 * fdiv bug.
955 */
956void _safe_fdiv(void)
957{
958 TRACE("(): stub\n");
959}
960
961/***********************************************************************
962 * _safe_fdivr (MSVCRT.@)
963 * FIXME
964 * This function is likely to have the wrong number of arguments.
965 *
966 * NOTE
967 * I _think_ this function is intended to work around the Pentium
968 * fdiv bug.
969 */
970void _safe_fdivr(void)
971{
972 TRACE("(): stub\n");
973}
974
975/***********************************************************************
976 * _safe_fprem (MSVCRT.@)
977 * FIXME
978 * This function is likely to have the wrong number of arguments.
979 *
980 * NOTE
981 * I _think_ this function is intended to work around the Pentium
982 * fdiv bug.
983 */
984void _safe_fprem(void)
985{
986 TRACE("(): stub\n");
987}
988
989/***********************************************************************
990 * _safe_fprem1 (MSVCRT.@)
991 *
992 * FIXME
993 * This function is likely to have the wrong number of arguments.
994 *
995 * NOTE
996 * I _think_ this function is intended to work around the Pentium
997 * fdiv bug.
998 */
999void _safe_fprem1(void)
1000{
1001 TRACE("(): stub\n");
1002}
Note: See TracBrowser for help on using the repository browser.