Ticket #12 (closed defect: fixed)

Opened 11 months ago

Last modified 11 months ago

stere projection produces wrong results on Win32 MSVC7

Reported by: warmerdam Assigned to: warmerdam
Priority: major Milestone:
Component: BuildConfig Version: unspecified
Keywords: stere win32 msvc Cc:

Description (Last modified by warmerdam)

Using the supplied Makefile.vc, I did two builds for each version. The "release" build uses the OPTFLAGS settings as distributed in the source, while the "debug" build swaps the OPTFLAGS to use the second set of settings (which is commented out in the sources).

The command:

echo 105 40 | proj +proj=stere +lat_0=90 +lon_0=0 +lat_ts=70 +datum=WGS84

The Results:

Flavor 7 (debug): 5577808.93      1494569.40
Flavor 7 (release): 5610189.12      1503245.64
Flavor 8 (debug): 5577808.93      1494569.40
Flavor 8 (release): 5577808.93      1494569.40
Flavor 9 (debug): 5577808.93      1494569.40
Flavor 9 (release): 5577808.93      1494569.40

So, we can see this is a direct result of doing an optimized build with Flavor 7 (Visual Studio .Net 2003).

So, then I downloaded and installed Service Pack 1 (http://www.microsoft.com/downloads/details.aspx?familyid=69d2219f-ce82-46a5-8aec-072bd4bb955e ) and rebuilt a "release" version. The results were the same.

Then, I added the "/Op" (Improve Float Consistency) flag and then the "release" results matched the "debug" results.

OPTFLAGS= /nologo /Ox /Op /MD

Eric G. Miller

Change History

08/21/08 15:49:07 changed by warmerdam

  • status changed from new to closed.
  • resolution set to fixed.

I have modified nmake.opt to use /Op by default for optimized builds. I also updated nad/testvarious to include a small test of stere projection though this test script does not actually work on win32 since it depends on bash.

08/22/08 00:19:04 changed by warmerdam

  • description changed.