473,671 Members | 2,321 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mathematical Programming

Hi there, I have a problem in writing a mathematical function using C++
programming. How to write an input that can insert whole equation?
Example is the input are x² + 3y - 4z³ = 0. In maple, it was
x^2+3*y-4*z^3 = 0, but how to write it in C++ ? How about the
declaration?

Jul 23 '05 #1
3 3108
"gelong" <ge******@yahoo .com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
Hi there, I have a problem in writing a mathematical function using C++
programming. How to write an input that can insert whole equation?
Example is the input are x² + 3y - 4z³ = 0. In maple, it was
x^2+3*y-4*z^3 = 0, but how to write it in C++ ? How about the
declaration?

It's somewhat hard (at least for me) to understand what you're asking:

If your question is how to use C++ mathematical operators, then you can use
+,-,*,/ as usual, e.g., x + y, and for ^ you can use the function pow.

But when you write x² + 3y - 4z³ = 0, then you're writing a mathematical
equation - a concept which C++ doesn't directly "understand ". The question
is what do you want to do with "x² + 3y - 4z³ = 0"? Do you want plot it?
search numerically for minimum and maximum? solve it symbolically (say for
x)? Based on your answer, you need to find an appropriate library.

So it might help if you clarify further. For example, you might repost and
say "I'm looking for a library that can plot 3D mathematical functions", or
something like that.
Jul 23 '05 #2
Fri, 28 Jan 2005 20:21:38 -0800|gelong :
Hi there, I have a problem in writing a mathematical function using C++
programming. How to write an input that can insert whole equation? Example
is the input are x² + 3y - 4z³ = 0. In maple, it was x^2+3*y-4*z^3 = 0,
but how to write it in C++ ? How about the declaration?

Hi , maybe somthin like that :
-/+ * multi * ( X * n ) ^ pow as elements of array
struct Node {
int multi; // if not exist =1
int n; // ... 1
int pow; // 1
int sign; // 1 or -1
} ;
Node abc[3];
/*
abc[0] : */
multi=1;n=1;pow =3;sign=1; /* will be 1 * 1 * ( X * 1 ) ^ 3 etc.. */
sry4engl

Jul 23 '05 #3
gelong wrote:
Hi there, I have a problem in writing a mathematical function using C++
programming. How to write an input that can insert whole equation?
Example is the input are x² + 3y - 4z³ = 0. In maple, it was
x^2+3*y-4*z^3 = 0, but how to write it in C++ ? How about the
declaration?

You will have to accept the input as text, parse it and make the
necessary calculations and output.


--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #4

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

Similar topics

6
1721
by: administrata | last post by:
Hi! I'm programming maths programs. And I got some questions about mathematical signs. 1. Inputing suqare like a * a, It's too long when I do time-consuming things. Can it be simplified? 2. Inputing fractions like (a / b) + (c / d), It's tiring work too. Can it be simplified? 3. How can i input root?
1
3613
by: Jerry chapman | last post by:
Does C# have the standart mathematical functions such as sin,cos etc.? Or does one have to use pinvoke>
0
1657
by: Juan R. | last post by:
I have updated some basic requirements for a generic mathematical markup language for scientific requirements at the next link. http://canonicalscience.blogspot.com/2006/04/scientific-language-canonml-is.html] Some requirements fit into the XML model and could be considered for debate for the future mathML specifications. Other requirements do not fit and will be developed in alternative mathematical approaches to those from the w3c...
4
1912
by: Xah Lee | last post by:
i've long time been interested in algorithmic mathematical art. That is, mathematical or algorithmic visual art works that are generated by computer such that the program's source code reflects the algorithmic essence of the visual quality in the art work. (for detail, see Algorithmic Mathematical Art at http://xahlee.org/Periodic_dosage_dir/t1/20040113_cmaci_larcu.html ) Mathematica programers, especially Michael Trott, have been doing...
2
3593
by: rameshadari | last post by:
Hello Guys, I am new to SQL Server Database programming. My specific question is:- Is it possible to do some mathematical operations on columns present in a table. If possible, How? For example, how can the following operation be performed:- (25*Column3) - (2*Column1) Please kindly let me know
4
3071
by: Talbot Katz | last post by:
Greetings Pythoners! I hope you'll indulge an ignorant outsider. I work at a financial software firm, and the tool I currently use for my research is R, a software environment for statistical computing and graphics. R is designed with matrix manipulation in mind, and it's very easy to do regression and time series modeling, and to plot the results and test hypotheses. The kinds of functionality we rely on the most are standard and...
3
5246
by: gelong83 | last post by:
Guyz, I really need help on this. I'm trying to make some mathematical programming. We can input any equation and then the compiler will detect how many variables was (on the equation). After that, we'll input the variable value to get the final solution. Example: Please input an equation,f = = (x*x)+(4*y)-(4*z*z*z) // ( f ) = x² + 4y - 3z³ = 0
13
2149
by: jacek.strzelczyk | last post by:
Hello, I'm looking for a C library that provides the notation of n- dimensional mathematical functions. Or is there any other way to decode that kind of functions in C language? Thanks in advance, Jacek
2
2393
by: Madmartigan | last post by:
Hi Operating system is WinXP using SharpDevelop version 1.1.0 and build 2124. I'm new to C# and have a problem trying to get a user to enter 3 mathematical operators of choice, then 2 numbers of choice, and giving ouput for each of the mathematical operations using the 2 numbers. The general script will work but I have a user inputting a string which I don't know how to convert to int to be capable of using it in mathematical...
0
8397
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8821
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...
0
8670
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7439
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
6230
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
4225
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
4409
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2813
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
1810
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.