Notation refers to a specific way of writing various concepts, functions, etc. Usually it is introduced to abbreviate complicated expressions and make common idioms more readable.
Questions tagged [notation]
633 questions
18
votes
4 answers
Slashes and dots in function names and prototypes?
I'm new to C and looking at Go's source tree I found this:
https://code.google.com/p/go/source/browse/src/pkg/runtime/race.c
void runtime∕race·Read(int32 goid, void *addr, void *pc);
void runtime∕race·Write(int32 goid, void *addr, void…

thwd
- 23,956
- 8
- 74
- 108
17
votes
14 answers
conversion from infix to prefix
I am preparing for an exam where i couldn't understand the convertion of infix notation to polish notation for the below expression:
(a–b)/c*(d + e – f / g)
Can any one tell step by step how the given expression will be converted to prefix?

kar
- 209
- 1
- 3
- 5
16
votes
8 answers
Historic reason for using periods in version numbers?
Is there a historic reason that periods are used instead of any other separator for software versions?
One of our products was previously version 3.5, and now it's 3.08 -- I'm sure this was management saying that putting a leading zero would make it…

Mark Rushakoff
- 249,864
- 45
- 407
- 398
15
votes
1 answer
Powershell: Two dimension arrays
The following works as expected:
$values = @( ("a", "b"), ("c", "d") )
foreach($value in $values)
{
write-host "Value 0 =" $value[0]
write-host "Value 1 =" $value[1]
}
which results(1) in:
Value 0 = a
Value 1 = b
Value 0 = c
Value 1 = d
But if…

Michael Frederick
- 297
- 2
- 5
- 12
14
votes
2 answers
matlab matrix scientific notation
I've wondered about this for a while now. When Matlab prints the matrix A, for instance, with
A
it sometimes appears in scientific notation such as
A =
1.0e+03 *
0 0 0.0070 0.0080 0.0030 0.0010
0 …

Hanmyo
- 543
- 4
- 8
- 18
14
votes
2 answers
What does the notation T(n) mean?
We learned about big O notation, but I often see T(n) as well. For example,
public static Comparable[] mergeSort(Comparable[] A, int low, int high) {
if (low < high) { //at least 2 elements? //cost = c
int mid = (low + high)/2; …

James
- 706
- 3
- 8
- 16
14
votes
1 answer
What we mean by this xsl notation
I don't understand what we mean by the following:
Please help me out..
…

Ironman
- 556
- 3
- 7
- 21
13
votes
5 answers
Art of Computer programming notation question
I'm just starting to read TAOCP Volume 1 and I'm having trouble understanding the style.
Knuth mentions a computational method to be a quadruple (Q,I, Omega, f) -- but I am having trouble understanding what each of these is intended to be. I…

Hortitude
- 13,638
- 16
- 58
- 72
13
votes
1 answer
A #define in C with three dots
#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "native-activity", __VA_ARGS__))
#define LOGW(...) ((void)__android_log_print(ANDROID_LOG_WARN, "native-activity", __VA_ARGS__))
This is definition for these 2 macros; later in the code…

Ken
- 2,105
- 3
- 19
- 22
12
votes
1 answer
Lua: colon notation, 'self' and function definition vs. call
I'm getting terribly confused by the colon notation used when defining/calling Lua functions.
I thought I'd got my head round it until I saw this piece of code:
function string.PatternSafe( str )
return ( str:gsub( ".",…

cabbageforall
- 620
- 1
- 5
- 12
12
votes
5 answers
Why do Python function docs include the comma after the bracket for optional args?
The format of the function signatures in the Python docs is a bit confusing. What is the significance in putting the comma after the open bracket, rather than before? What is the significance of nesting the brackets?
How they…

orokusaki
- 55,146
- 59
- 179
- 257
12
votes
1 answer
Why does Big-O Notation use O(1) instead of O(k)?
If I understand Big-O notation correctly, k should be a constant time for the efficiency of an algorithm. Why would a constant time be considered O(1) rather than O(k), considering it takes a variable time? Linear growth ( O(n + k) ) uses this…

SImon
- 839
- 2
- 10
- 13
12
votes
1 answer
Prove f(n) + g(n) is O(max(f(n),g(n)))
Hello I am having a bit of difficulty proving the following.
f(n) + g(n) is O(max(f(n),g(n)))
This makes logical sense, and by looking at this I can tell you that its correct but I'm having trouble coming up with a proof.
Here is what I have so…

csnate
- 1,601
- 4
- 19
- 31
11
votes
8 answers
Java what is the double underscore notation for?
I was browsing the web and found this example. Within the public static void main method is this line syntax which I have never seen before __main:
As in:
public class Klass {
public static void main(String[] args) {
// code goes…

klonq
- 3,535
- 4
- 36
- 58
11
votes
4 answers
Scala - Prefix Unary Operators
I've recently given Scala a second chance, and started with the project I always implement (in functional or pseudo-functional languages): an automated reasoner for propositional logic (and later predicate logic).
Now, I've tried to get the notation…

wen
- 3,782
- 9
- 34
- 54