473,394 Members | 1,875 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,394 software developers and data experts.

Algebra

173 100+
Hi,

algebra: z = pr%q+w/x - y

Perl code for this is: $z = $p * $r % $q + $w / $x - $y;

Can someone please explain to me : in what order does Perl calculate the operators? What would be calculated first, second, third etc... why?

I just cant get my head around the algebra business..
How does perl simplify the above algebra?
Feb 21 '09 #1
2 2438
numberwhun
3,509 Expert Mod 2GB
@Beany
What you are looking for is the "order of operations" for Perl. Perl always processes things in a pre-defined order. A quick google search reveals plenty of links or, you can open your copy of Learning Perl or any other basic Perl book and read about it.

Regards,

Jeff
Feb 21 '09 #2
KevinADC
4,059 Expert 2GB
Its the same as math:

First do anything in parentheses
Then do any multiplication or division working left to right
then do any addition or subtraction working left to right

Why would you think perl would do it any different? If it did then the answer has the potential of not being correct.
Feb 21 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Sam | last post by:
Hello, I am looking for a module that will evaluate alegbraic equations with multiple variables like this equation for a straight line: y - y1 = m(x - x1) and solve problems like...
17
by: Rahul | last post by:
Hi. Well is there an open source computer algebra system written in python or at least having a python interface? I know of 2 efforts: pythonica and pyginac...are there any others? rahul
0
by: Bernard Xhumga | last post by:
hello, I present my work : a freeware, (Language C, GnuPlot). Linear algebra : (fractions, 30 packages). http://www.geocities.com/xhungab/package.html The purpose of this work is to verify...
0
by: Wit Baas | last post by:
Hi all I need do the following based on Boolean Algebra ex 1. (M271/M272/M651)+(450/965)/M642/M646 All possible result M271 + 450 M271 + 965 M272 + 450 M272 + 965
3
by: Regardt | last post by:
Hi all I need do the following based on Boolean Algebra ex 1. (M271/M272/M651)+(450/965)/M642/M646 All possible result M271 + 450 M271 + 965 M272 + 450 M272 + 965
1
by: lava4112 | last post by:
Have a test on SQL, only teacher wants to know what type of relational algebra is a select, where, from--I have no idea and can not understand the teacher. We are using Concepts of Database...
3
Metallicat
by: Metallicat | last post by:
I have been posed and attempted to answer several questions but I do not seem to be getting anywhere. I have emailed my tutor a week ago and he has not responded, If anyone can take a look and help...
0
by: Bas | last post by:
On Sep 22, 10:02 am, Al Kabaila <akaba...@pcug.org.auwrote: That argument might have been valid 3 years ago, but as already said by others, Numeric and Numarray are deprecated. Numpy should be the...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...

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.