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 |
281264
Messages: 272 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 |
|
mirek
Messages: 14038 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
|
|
|
|
Goto Forum:
Current Time: Fri Sep 20 07:43:58 CEST 2024
Total time taken to generate the page: 0.03910 seconds
|