Questions tagged [evaluation]

Anything related to evaluation of expressions, i.e. the process used to determine the value of expressions in a running program.

What is it?

Evaluation is about rules, algorithms and strategies used for the evaluation of expressions or the computation of evaluation functions.

Related tags

  • The tag may be used more specifically for the execution or invocation of evaluations.
  • For more specific questions use tags such as for example

See also:

1334 questions
-2
votes
2 answers

Saving instructions for later evaluation, possible?

I want to save "instructions" for how a value should be determined at a later time, instead of saving the actual value at the current time. Is this even possible? A simple C# example: int[] myArray = new int[2]; Dictionary myDictionary…
Sebastian Norr
  • 7,686
  • 2
  • 12
  • 17
-2
votes
4 answers

why bitwise operators require parentheses?

#include using namespace std; int main() { int n; cin>>n; if(n&1==0) //without using bracket (n&1) cout<<"Number is even"; else cout<<"Number is odd"; return 0; } output : odd //for…
Nishant sharma
  • 116
  • 1
  • 11
-2
votes
2 answers

C++ operator precedence in output stream

int a = 1, b = 2; int c = a*b + b==0; // c = 0 cout << a*b + b==0; // outputs 4 c evaluates to 0 because the operator precedence of the * and + operators is higher than == as a result of which c essentially evaluates to (a*b+b)==0 which is…
f1zz0_13
  • 495
  • 2
  • 8
  • 19
-2
votes
1 answer

Does relational operator in C have fixed evaluation order?

Here's the problem: With int a,b,c;, is a = a * b + a; equivalent to (c = a * b)!=(a = c + a); with respect to modification of a? At first glance I think they are the same, but then does specification say that in expr1 != expr2, expr1 will always…
Virgil Ming
  • 549
  • 4
  • 12
-2
votes
1 answer

Does a computer remember results of evaluated expressions?

Does a computer store results of evaluated expressions to speed up future evaluations during the same execution session of a program, or does the program need to include this functionality manually?
-2
votes
2 answers

"And" and "Or" operators in conditionals in C

I always wondered about something and couldn`t find an answer somewhere else. If I have this piece of code: if ((cond1) &&(cond2) && (cond 3) && (cond 4)) { // do something } Let`s say the first condition is false, then my program will…
Myrky
  • 47
  • 1
  • 5
-2
votes
1 answer

How to plot a math function from a string

I have a string, "x * (x - 32 ( 2 /x) )", which represents a math function. How can I use python and matplotlib to convert this string into an array of points to plot?
Fabrício
  • 91
  • 2
  • 7
-2
votes
3 answers

How can I evaluate math expressions with human readable units in python?

Is there a way to evaluate expressions from strings that include human readable number units? For example: myformula='1u+1e-6' result = eval(myformula) ... should be equivalent to 1e-6+1e-6 (where u=micro).
-2
votes
1 answer

Self learning data evaluation in Python

I have about 300.000 images - all categorized manually as "clip art" or "photo". For each image I can calculate three independent, numerical features that give a clear hint about whether the image is indeed a clip art or a photo. None of these…
-2
votes
2 answers

How to Implement Kirchoff Rules

1.What data structure to use for electric circuit representation for Kirchoff Rules computation purposes how to differentiate between different types of electric components how to 'recognize' wire inter-connections between them 2.how to implement…
Mike
  • 241
  • 1
  • 4
  • 11
-2
votes
2 answers

c++ operator evaluation order

In order to find out what happened at the expression "i++ + i++ + i++ + i++", I wrote a test program as below. compile it with g++ 4.6.3 and running this program under Ubuntu 12.04, the result are: construct 3 construct 7 …
terry
  • 341
  • 2
  • 6
  • 13
-2
votes
4 answers

PHP IF Statement Evaluation & Server Overhead

I'm curious what the impact on the server is when PHP if statements are evaluated, i.e. memory consumption and CPU usage and if this could become a major issue as traffic grows? For example, if I use a lot of PHP IF statements in the theme for each…
undoIT
  • 611
  • 1
  • 7
  • 13
-2
votes
6 answers

Installation vs. Virtual Machine Images

I seem to end up evaluating a lot of software. This requires me to constantly install all kinds of things on my system. It creates a huge clutter and I spend a lot of time during the install process, and if I don't like it, then removing…
dacracot
  • 22,002
  • 26
  • 104
  • 152
-3
votes
3 answers

Check if T-SQL is only select and does not affect any change

I have a dynamic price policy application in C# that execute T-SQL select statement and fetch value from query. but as you know, user can execute dangerous query like drop, update, delete, insert and etc. So, how can I check a T-SQL query and ensure…
-3
votes
1 answer

how does c evaluate less than and more than expretion?

I would like to know how i is evaluated in this code in C language ? int x = 10, y = 20, z = 5, i; i = x < y < z; printf("%d\n",i);
1 2 3
88
89