Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Coffee corner » math functions, MSC and MinGW compilers. Floating-point arithmetic.
math functions, MSC and MinGW compilers. Floating-point arithmetic. [message #29198] Sun, 10 October 2010 12:01 Go to next message
281264 is currently offline  281264
Messages: 269
Registered: June 2010
Location: Spain
Experienced Member
Hi,

I have some queries regarding Microsoft and MinGW compilers, related to U++ and floating point arithmetic. I am attaching a simple example about calculating the absolute value of a double precision variable:

1.- When using the Microsoft C++ compiler (latest available issue), the application is complied without problems and it works correctly. The same operation with MinGW compiler produces an error related with ambiguity of functions. Why is this happening?. I notice that cmath library functions are available in U++ without the need to include <cmath>.

2.- I am interested in developing algorithms for exact floating point arithmetic, capable to be compiled with both MSC and MinGW compilers and capable to work with Intel and AMD microprocessors. Where can I find the referred compilerís detailed instruction manuals? If there is someone interested in the matter, I would appreciate hints.

Many thanks.

Cheers,

Javier.
Re: math functions, MSC and MinGW compilers. Floating-point arithmetic. [message #29209 is a reply to message #29198] Sun, 10 October 2010 18:53 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13053
Registered: November 2005
Ultimate Member
281264 wrote on Sun, 10 October 2010 06:01

Hi,

I have some queries regarding Microsoft and MinGW compilers, related to U++ and floating point arithmetic. I am attaching a simple example about calculating the absolute value of a double precision variable:

1.- When using the Microsoft C++ compiler (latest available issue), the application is complied without problems and it works correctly. The same operation with MinGW compiler produces an error related with ambiguity of functions. Why is this happening?.



This is pretty much normal - compilers have different understanding of C++ standard. Well, in practice they are the same for the most part, but there are some small differences. Sometimes you hit one during the development. Fix is usually simple.

Quote:


I notice that cmath library functions are available in U++ without the need to include <cmath>.



Yes, it is included by standard by including Core.h.

Quote:


2.- I am interested in developing algorithms for exact floating point arithmetic, capable to be compiled with both MSC and MinGW compilers and capable to work with Intel and AMD microprocessors. Where can I find the referred compilerís detailed instruction manuals? If there is someone interested in the matter, I would appreciate hints.



MSDN
http://gcc.gnu.org/

Mirek
Re: math functions, MSC and MinGW compilers. Floating-point arithmetic. [message #29250 is a reply to message #29209] Wed, 13 October 2010 10:28 Go to previous message
281264 is currently offline  281264
Messages: 269
Registered: June 2010
Location: Spain
Experienced Member
Thank you.

Javier
Previous Topic: Is my RSS feed broken?
Next Topic: Souptoys
Goto Forum:
  


Current Time: Tue Jan 26 22:51:38 CET 2021

Total time taken to generate the page: 0.01568 seconds