473,378 Members | 1,422 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

math.h / complex - issue porting 2002 app to 2003

Hi,
I noticed when migrating a 2002 application to 2003 that the system changed
to a different usage for pow(2,-15).
In 2002, it used double pow(double,double).
In 2003, it is using double pow(int,int).
You may note that pow(2,-15) and pow(2.0,-15.0) give different results.
math.h is included.
Is there some way to force studio to not use the complex prototypes?
math.h is the only include file being used. Why is it even linking to the
others?
Is there a project option to control that?
I'd rather not go through and verify every math operation in this code for
prototype changes..
Sep 20 '06 #1
1 1340
"Andy" <An**@discussions.microsoft.comwrote in message
news:04**********************************@microsof t.com...
Hi,
I noticed when migrating a 2002 application to 2003 that the system changed
to a different usage for pow(2,-15).
In 2002, it used double pow(double,double).
In 2003, it is using double pow(int,int).
You may note that pow(2,-15) and pow(2.0,-15.0) give different results.
math.h is included.
Is there some way to force studio to not use the complex prototypes?
math.h is the only include file being used. Why is it even linking to the
others?
Is there a project option to control that?
I'd rather not go through and verify every math operation in this code for
prototype changes..
The compiler is going to choose the function that has matching argument types, if one is present,
since that's a C++ requirement. If pow(int, int) has been added to <math.hsince 2002 then it's
going to choose that for 2, -15. I don't see how any project options could change the language rules
just for math functions, and I don't see any #ifdefs in the header for excluding the new functions
in C++. I suspect that you're going to have to pass doubles if you want pow(double, double) or
compile it as C instead of C++. My knowledge of 2003 (and 2002) is very limited, however.

DW
Sep 21 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: David Eppstein | last post by:
Why doesn't this work? >>> import math >>> math.exp(1j*math.pi) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: can't convert complex to float; use e.g. abs(z) ...
5
by: Clueless Moron | last post by:
Why do they act differently with respect to complex numbers? Python 2.2.2 (#1, Feb 24 2003, 19:13:11) on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>...
89
by: Radioactive Man | last post by:
In python 2.3 (IDLE 1.0.3) running under windows 95, I get the following types of errors whenever I do simple arithmetic: 1st example: >>> 12.10 + 8.30 20.399999999999999 >>> 1.1 - 0.2...
5
by: Mart Rogers | last post by:
I am porting an Add In from VB6 to VB.Net. Does anyone know what the equivelent of Application.CodePane and Application.CodeModule are under .Net? Thanks.
3
by: AstrA | last post by:
Hi All Wondered if you could help. Basically I have 2 tables that contain all the data I want for my report, but I need to put it in a particular way and I need to display it in an ASP page...
4
by: Jon S via DotNetMonster.com | last post by:
Hi all I've taught myself C# 2002 using VS.NET 2002. I've recently brought myself an ASP.NET 2003 book. I will work through this ASP.NET 2003 using VS.NET 2002 and C# 2002. I don't fully...
11
by: Sambo | last post by:
I have the following module: ------------------------------- import math def ac_add_a_ph( amp1, ph1, amp2, ph2 ): amp3 = 0.0 ph3 = 0.0 ac1 = ( 0, 0j ) ac2 = ( 0, 0j )
2
by: igotyourdotnet | last post by:
How can I perform a math function in C# example: int sales = 25 int goal = 225 i want to devide sales by goal so the sale person knows how much of his goal he's at
21
by: Lane Straatman | last post by:
#include <stdio.h> #include <stdlib.h> #include <complex.h> int main(void) { _Complex z1, z2, z3; z1 = .4 + .7i; z2 = pow(z1, 2); z3 = z1 * z1; printf("%f, %f \n", z1);
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.