Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenfmod.c
Go to the documentation of this file.
00001 /* Math functions for i387. 00002 Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. 00003 This file is part of the GNU C Library. 00004 Contributed by John C. Bowman <bowman@ipp-garching.mpg.de>, 1995. 00005 00006 The GNU C Library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Lesser General Public 00008 License as published by the Free Software Foundation; either 00009 version 2.1 of the License, or (at your option) any later version. 00010 00011 The GNU C Library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Lesser General Public License for more details. 00015 00016 You should have received a copy of the GNU Lesser General Public 00017 License along with the GNU C Library; if not, write to the Free 00018 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #include <math.h> 00023 00024 double fmod (double __x, double __y); 00025 00026 double fmod (double __x, double __y) 00027 { 00028 register double __val; 00029 #ifdef __GNUC__ 00030 __asm __volatile__ 00031 ("1: fprem\n\t" 00032 "fstsw %%ax\n\t" 00033 "sahf\n\t" 00034 "jp 1b" 00035 : "=t" (__val) : "0" (__x), "u" (__y) : "ax", "cc"); 00036 #else 00037 __asm 00038 { 00039 fld __y 00040 fld __x 00041 L1: fprem1 00042 fstsw ax 00043 sahf 00044 jp L1 00045 fstp __val 00046 } 00047 #endif /*__GNUC__*/ 00048 return __val; 00049 } Generated on Sun May 27 2012 04:36:28 for ReactOS by
1.7.6.1
|