FIX: The fmod function returns an indeterminate (IND) value instead of the correct floating-point value in an x64-bit Visual C++ 2008 application

Article translations Article translations
Article ID: 972497 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

You develop an x64-bit Microsoft Visual C++ 2008 application that calls the fmod function. When you run the application, the returned value of the function is indicated as indeterminate (IND) instead of the correct floating-point value.

Note This problem occurs when any of the following conditions is true:
  • A denormal result is produced internally through the normal operation of the fmod routine.
  • A denormal result is produced prior to the fmod call by x87-based floating point operations in the application. The x87 floating point operations can be included in third-party libraries or in the Microsoft Macro Assembler (MASM) assembly language files.

CAUSE

This problem occurs because of a bug in the assembly code in the x64 fmod function. When the function checks the x87 status word for the denormal flag, the function incorrectly assumes that an error occurs.

RESOLUTION

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

You must have Visual Studio 2008 Service Pack 1 (SP1) installed to apply this hotfix.

Restart requirement

You do not have to restart the computer after you install the hotfix if no relative instance is in use.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Atl90.dll9.0.30729.4137176,96826-Jun-200916:04x64
Atl90.dll9.0.30729.4137417,09626-Jun-200917:36IA-64
Atl90.dll9.0.30729.4137159,03226-Jun-200919:07x86
array16,41729-Oct-200811:55
array16,41729-Oct-200811:55
random83,27329-Oct-200811:55
random83,27329-Oct-200811:55
tuple12,37129-Oct-200811:55
tuple12,37129-Oct-200811:55
xxfunction9,84529-Oct-200811:55
xxfunction9,84529-Oct-200811:55
afxframeimpl.cpp56,20424-Oct-200815:03
afxglobals.cpp34,15624-Oct-200815:03
afxglobals.h10,14424-Oct-200815:03
almap.dll18,73626-Jun-200913:43x86
almap.lib17,80826-Jun-200913:43x86
atl.lib20,01226-Jun-200913:48x86
atl.lib21,88226-Jun-200914:15x86
atl.lib19,25626-Jun-200914:35x86
atlassem.h2,03726-Jun-200913:40
atlbuild.h57226-Jun-200913:04
atlcom.h171,96322-May-200917:39
atlcomcli.h68,30922-May-200917:39
atldload.lib396,14826-Jun-200913:48x86
atldload.lib493,48026-Jun-200914:14x86
atldload.lib429,02226-Jun-200914:35x86
atlhost.h77,91310-Sep-200819:50
atls.lib1,413,00626-Jun-200913:48x86
atls.lib1,354,52626-Jun-200914:14x86
atls.lib1,114,53626-Jun-200914:35x86
atlsd.lib1,784,14426-Jun-200913:48x86
atlsd.lib2,031,79826-Jun-200914:14x86
atlsd.lib1,606,28826-Jun-200914:35x86
crtassem.h95126-Jun-200913:39x86
crtassem.h1,29826-Jun-200913:39
libcmt.lib9,217,23226-Jun-200913:47x86
libcmt.lib12,760,76226-Jun-200914:09x86
libcmt.lib10,006,90426-Jun-200914:34x86
libcmtd.lib11,365,49226-Jun-200913:47x86
libcmtd.lib16,473,87026-Jun-200914:09x86
libcmtd.lib12,787,81026-Jun-200914:34x86
libcpmt.lib5,349,93426-Jun-200913:47x86
libcpmt.lib8,755,30426-Jun-200914:09x86
libcpmt.lib6,963,46226-Jun-200914:35x86
libcpmtd.lib6,781,27026-Jun-200913:47x86
libcpmtd.lib11,713,79426-Jun-200914:09x86
libcpmtd.lib9,301,87426-Jun-200914:35x86
mfc90.lib5,196,14826-Jun-200914:58x64
mfc90.lib5,197,22426-Jun-200914:28x86
mfc90d.lib6,026,79226-Jun-200914:58x64
mfc90d.lib6,017,75626-Jun-200914:29x86
mfc90u.lib6,501,18626-Jun-200914:58x64
mfc90u.lib6,595,79226-Jun-200914:29x86
mfc90ud.lib7,541,86226-Jun-200914:59x64
mfc90ud.lib7,622,20626-Jun-200914:29x86
mfc.bsc18,705,40826-Jun-200916:05
mfc_loc.manifest5,88226-Jun-200919:12x86
mfcassem.h3,14326-Jun-200914:08
mfcdload.lib780,35426-Jun-200914:56x86
mfcm90.lib43,10426-Jun-200915:00x64
mfcm90.lib41,05226-Jun-200914:30x86
mfcm90d.lib46,18226-Jun-200915:00x64
mfcm90d.lib44,59626-Jun-200914:30x86
mfcm90u.lib44,54826-Jun-200915:00x64
mfcm90u.lib42,46026-Jun-200914:30x86
mfcm90ud.lib47,64026-Jun-200915:00x64
mfcm90ud.lib46,01426-Jun-200914:30x86
mfcs90.lib1,054,70626-Jun-200914:56x86
mfcs90.lib1,048,94426-Jun-200914:26x86
mfcs90d.lib1,049,99226-Jun-200914:56x64
mfcs90d.lib1,020,31226-Jun-200914:26x86
mfcs90u.lib1,068,31026-Jun-200914:56x64
mfcs90u.lib1,063,03026-Jun-200914:27x86
mfcs90ud.lib1,066,38026-Jun-200914:56x86
mfcs90ud.lib1,035,73026-Jun-200914:26x86
microsoft.vc90.atl.manifest85826-Jun-200916:09x64
microsoft.vc90.atl.manifest85726-Jun-200917:41IA-64
microsoft.vc90.atl.manifest85626-Jun-200919:12x86
microsoft_vc90_atl_x86_ia64.msm212,99227-Jun-200902:59IA-64
microsoft_vc90_atl_x86.msm133,63227-Jun-200902:53x86
microsoft_vc90_atl_x86_x64.msm134,65627-Jun-200902:55x64
microsoft.vc90.crt.manifest1,86226-Jun-200916:09x64
microsoft.vc90.crt.manifest1,86126-Jun-200917:41IA-64
microsoft.vc90.crt.manifest1,86026-Jun-200919:12x86
microsoft_vc90_crt_x86_ia64.msm1,025,53627-Jun-200902:58IA-64
microsoft_vc90_crt_x86.msm599,55227-Jun-200902:51x86
microsoft_vc90_crt_x86_x64.msm632,83227-Jun-200902:55x64
microsoft.vc90.debugcrt.manifest1,87026-Jun-200916:09x64
microsoft.vc90.debugcrt.manifest1,86926-Jun-200917:41IA-64
microsoft.vc90.debugcrt.manifest1,86826-Jun-200919:12x86
microsoft_vc90_debugcrt_x86_ia64.msm1,796,60827-Jun-200902:57IA-64
microsoft_vc90_debugcrt_x86.msm823,29627-Jun-200902:51x86
microsoft_vc90_debugcrt_x86_x64.msm829,44027-Jun-200902:55x64
microsoft.vc90.debugmfc.manifest2,36826-Jun-200916:09x64
microsoft.vc90.debugmfc.manifest2,36626-Jun-200919:12x86
microsoft_vc90_debugmfc_x86_ia64.msm4,759,04007-Nov-200705:58IA-64
microsoft_vc90_debugmfc_x86.msm5,553,15227-Jun-200902:52x86
microsoft_vc90_debugmfc_x86_x64.msm5,970,43227-Jun-200902:54x64
microsoft.vc90.debugopenmp.manifest86726-Jun-200919:12x86
microsoft.vc90.debugopenmp.manifest86826-Jun-200917:42x86
microsoft.vc90.debugopenmp.manifest86926-Jun-200916:09x86
microsoft_vc90_debugopenmp_x86_ia64.msm141,82427-Jun-200902:56IA-64
microsoft_vc90_debugopenmp_x86.msm92,16027-Jun-200902:52x86
microsoft_vc90_debugopenmp_x86_x64.msm91,64827-Jun-200902:53x64
microsoft.vc90.mfc.manifest2,35926-Jun-200916:09x64
microsoft.vc90.mfc.manifest2,35726-Jun-200919:12x86
microsoft_vc90_mfc_x86_ia64.msm2,600,96007-Nov-200706:10IA-64
microsoft_vc90_mfc_x86.msm4,173,31227-Jun-200902:53x86
microsoft_vc90_mfc_x86_x64.msm4,867,58427-Jun-200902:54x64
microsoft.vc90.mfcloc.manifest5,88426-Jun-200916:09x64
microsoft.vc90.mfcloc.manifest5,88226-Jun-200919:12x86
microsoft_vc90_mfcloc_x86_ia64.msm242,17607-Nov-200706:18IA-64
microsoft_vc90_mfcloc_x86.msm243,20027-Jun-200902:52x86
microsoft_vc90_mfcloc_x86_x64.msm241,15227-Jun-200902:54x64
microsoft.vc90.openmp.manifest86126-Jun-200919:12x86
microsoft.vc90.openmp.manifest86226-Jun-200917:42x86
microsoft.vc90.openmp.manifest86326-Jun-200916:09x86
microsoft_vc90_openmp_x86_ia64.msm108,54427-Jun-200902:56IA-64
microsoft_vc90_openmp_x86.msm82,43227-Jun-200902:52x86
microsoft_vc90_openmp_x86_x64.msm82,94427-Jun-200902:54x64
msvcmrt.lib1,529,80826-Jun-200913:47x86
msvcmrt.lib1,697,61226-Jun-200914:35x86
msvcmrt.lib1,846,52626-Jun-200914:09x86
msvcmrtd.lib1,625,96026-Jun-200913:47x86
msvcmrtd.lib1,804,92626-Jun-200914:35x86
msvcmrtd.lib1,956,84826-Jun-200914:09x86
msvcprt.lib1,654,51626-Jun-200913:47x86
msvcprt.lib2,140,98626-Jun-200914:09x86
msvcprt.lib1,686,81826-Jun-200914:35x86
msvcprtd.lib1,827,18626-Jun-200913:47x86
msvcprtd.lib2,369,33226-Jun-200914:09x86
msvcprtd.lib1,860,04026-Jun-200914:35x86
msvcrt.lib1,360,06826-Jun-200913:47x86
msvcrt.lib1,585,29626-Jun-200914:09x86
msvcrt.lib1,357,32226-Jun-200914:35x86
msvcrtd.lib1,392,99026-Jun-200913:47x86
msvcrtd.lib1,642,42026-Jun-200914:09x86
msvcrtd.lib1,401,63426-Jun-200914:35x86
msvcurt.lib15,375,47426-Jun-200913:47x86
msvcurt.lib15,737,15626-Jun-200914:35x86
msvcurt.lib15,882,49026-Jun-200914:09x86
msvcurtd.lib16,952,23426-Jun-200913:47x86
msvcurtd.lib17,303,54626-Jun-200914:35x86
msvcurtd.lib17,454,71026-Jun-200914:09x86
nafxcw.lib49,963,64026-Jun-200914:29x86
nafxcw.lib59,306,29426-Jun-200914:59x86
nafxcwd.lib52,949,30626-Jun-200914:28x86
nafxcwd.lib66,883,99826-Jun-200914:58x86
ompassem.h95126-Jun-200914:10
ptrustm.lib426,51826-Jun-200913:47x86
ptrustmd.lib433,69026-Jun-200913:47x86
ptrustu.lib426,51826-Jun-200913:47x86
ptrustud.lib433,69026-Jun-200913:47x86
sdknames.lib7,46226-Jun-200913:43x86
tcmap.lib29,67626-Jun-200913:43x86
tcmapdll.lib32,05826-Jun-200913:43x86
uafxcw.lib50,880,10826-Jun-200914:30x86
uafxcw.lib60,097,21226-Jun-200914:59x86
uafxcwd.lib54,310,49026-Jun-200914:29x86
uafxcwd.lib68,168,67626-Jun-200914:59x86
vcomp.lib28,44626-Jun-200914:41x86
vcomp.lib27,89026-Jun-200915:00x86
vcomp.lib33,22026-Jun-200915:40x86
vcompd.dll27,99826-Jun-200915:00x86
vcompd.lib28,57426-Jun-200914:41x86
vcompd.lib33,33026-Jun-200915:40x86
xutility128,83429-Oct-200811:55
xutility128,55929-Oct-200811:55
Mfc90.dll9.0.30729.41375,083,46426-Jun-200916:04x64
Mfc90.dll9.0.30729.41373,765,04826-Jun-200919:07x86
Mfc90chs.dll9.0.30729.413735,64826-Jun-200916:04x64
Mfc90chs.dll9.0.30729.413735,64826-Jun-200919:07x86
Mfc90cht.dll9.0.30729.413736,67226-Jun-200916:04x64
Mfc90cht.dll9.0.30729.413736,67226-Jun-200919:07x86
Mfc90d.dll9.0.30729.41377,418,18426-Jun-200916:04x64
Mfc90d.dll9.0.30729.41375,933,88826-Jun-200919:07x86
Mfc90deu.dll9.0.30729.413763,29626-Jun-200916:04x64
Mfc90deu.dll9.0.30729.413763,29626-Jun-200919:07x86
Mfc90enu.dll9.0.30729.413753,56826-Jun-200916:04x64
Mfc90enu.dll9.0.30729.413753,56826-Jun-200919:07x86
Mfc90esn.dll9.0.30729.413761,77626-Jun-200916:04x64
Mfc90esn.dll9.0.30729.413761,76026-Jun-200919:07x86
Mfc90esp.dll9.0.30729.413761,77626-Jun-200916:04x64
Mfc90esp.dll9.0.30729.413761,76026-Jun-200919:07x86
Mfc90fra.dll9.0.30729.413762,78426-Jun-200916:04x64
Mfc90fra.dll9.0.30729.413762,78426-Jun-200919:07x86
Mfc90ita.dll9.0.30729.413761,26426-Jun-200916:04x64
Mfc90ita.dll9.0.30729.413761,24826-Jun-200919:07x86
Mfc90jpn.dll9.0.30729.413743,32826-Jun-200916:04x64
Mfc90jpn.dll9.0.30729.413743,32826-Jun-200919:07x86
Mfc90kor.dll9.0.30729.413742,83226-Jun-200916:04x64
Mfc90kor.dll9.0.30729.413742,81626-Jun-200919:07x86
Mfc90u.dll9.0.30729.41375,102,40826-Jun-200916:04x64
Mfc90u.dll9.0.30729.41373,780,41626-Jun-200919:07x86
Mfc90ud.dll9.0.30729.41377,463,24826-Jun-200916:04x64
Mfc90ud.dll9.0.30729.41375,979,45626-Jun-200919:07x86
Mfcm90.dll9.0.30729.413767,07226-Jun-200916:06x64
Mfcm90.dll9.0.30729.413759,90426-Jun-200919:10x86
Mfcm90d.dll9.0.30729.413793,18426-Jun-200916:06x64
Mfcm90d.dll9.0.30729.413780,89626-Jun-200919:10x86
Mfcm90u.dll9.0.30729.413767,07226-Jun-200916:06x64
Mfcm90u.dll9.0.30729.413759,90426-Jun-200919:10x86
Mfcm90ud.dll9.0.30729.413793,69626-Jun-200916:06x64
Mfcm90ud.dll9.0.30729.413780,89626-Jun-200919:10x86
Mfcmifc80u.dll9.0.30729.413713,12028-Jun-200917:15x86
Microsoft.visualc.stlclr.dll9.0.30729.413747,96828-Jun-200917:15x86
Msvcm90.dll9.0.30729.4137245,76026-Jun-200916:06x64
Msvcm90.dll9.0.30729.4137324,09626-Jun-200917:38IA-64
Msvcm90.dll9.0.30729.4137225,28026-Jun-200919:10x86
Msvcm90d.dll9.0.30729.4137333,31226-Jun-200916:06x64
Msvcm90d.dll9.0.30729.4137429,56826-Jun-200917:38IA-64
Msvcm90d.dll9.0.30729.4137312,83226-Jun-200919:10x86
Msvcp90.dll9.0.30729.4137853,32826-Jun-200916:04x64
Msvcp90.dll9.0.30729.41371,466,19226-Jun-200917:36IA-64
Msvcp90.dll9.0.30729.4137569,66426-Jun-200919:07x86
Msvcp90d.dll9.0.30729.41371,120,59226-Jun-200916:04x64
Msvcp90d.dll9.0.30729.41372,513,74426-Jun-200917:36IA-64
Msvcp90d.dll9.0.30729.4137872,25626-Jun-200919:07x86
Msvcr90.dll9.0.30729.4137624,46426-Jun-200916:04x64
Msvcr90.dll9.0.30729.41371,505,61626-Jun-200917:36IA-64
Msvcr90.dll9.0.30729.4137653,12026-Jun-200919:07x86
Msvcr90d.dll9.0.30729.41371,350,99226-Jun-200916:04x64
Msvcr90d.dll9.0.30729.41373,603,79226-Jun-200917:36IA-64
Msvcr90d.dll9.0.30729.41371,178,94426-Jun-200919:07x86
Vcomp90.dll9.0.30729.413756,65626-Jun-200916:04x64
Vcomp90.dll9.0.30729.4137141,64826-Jun-200917:36IA-64
Vcomp90.dll9.0.30729.413751,00826-Jun-200919:07x86
Vcomp90d.dll9.0.30729.4137104,78426-Jun-200916:04x64
Vcomp90d.dll9.0.30729.4137316,24026-Jun-200917:36IA-64
Vcomp90d.dll9.0.30729.413788,38426-Jun-200919:07x86
Vcomp90ui.dll9.0.30729.413710,56028-Jun-200917:15x64
Vcomp90ui.dll9.0.30729.413710,57628-Jun-200917:15x86
Vcredist_ia64.exe9.0.30729.41374,685,64027-Jun-200901:40x86
Vcredist_x64.exe9.0.30729.41375,228,37627-Jun-200901:21x86
Vcredist_x86.exe9.0.30729.41374,492,61627-Jun-200901:53x86

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

The hotfix changes in the assembly code for the fmod function to ignore the irrelevant status word.

Properties

Article ID: 972497 - Last Review: October 7, 2011 - Revision: 2.0
APPLIES TO
  • Microsoft Visual Studio 2008 Service Pack 1
Keywords: 
kbexpertiseadvanced kbsurveynew kbqfe KB972497

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com