473,672 Members | 2,497 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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,doub le).
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 1360
"Andy" <An**@discussio ns.microsoft.co mwrote in message
news:04******** *************** ***********@mic rosoft.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,doub le).
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
19060
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) The expected answer, of course, is -1.
5
2705
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. >>> pow(2, 0+1j) (0.76923890136397211+0.63896127631363475j) >>> >>> import math >>> math.pow(2, 0+1j)
89
5098
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 0.90000000000000013
5
1687
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
2283
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 so my queries got to be manual rather than an MS Excel/Query 'munge'. To be honest, the report itself is very basic, so hopefully my ramble will make sense. I need to report that shows 6 columns at best, 4 columns if
4
1177
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 understand the differences between the VS. NET 2002 and VS.NET 2003. Will I restrict myself in any way learning ASP.NET 2003 but only using VS.NET 2002 and C# 2002?
11
7353
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
4878
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
4211
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);
0
8828
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8605
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7446
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6238
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5704
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4417
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2819
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.