Questions tagged [operations]
298 questions
205
votes
11 answers
What's the difference between a single precision and double precision floating point operation?
What is the difference between a single precision floating point operation and double precision floating operation?
I'm especially interested in practical terms in relation to video game consoles. For example, does the Nintendo 64 have a 64 bit…

meds
- 21,699
- 37
- 163
- 314
177
votes
7 answers
Java NIO FileChannel versus FileOutputstream performance / usefulness
I am trying to figure out if there is any difference in performance (or advantages) when we use nio FileChannel versus normal FileInputStream/FileOuputStream to read and write files to filesystem. I observed that on my machine both perform at the…

Keshav
- 4,408
- 8
- 31
- 50
150
votes
4 answers
How to generate string of a certain length to insert into a file to meet a file size criteria?
I have a requirement to test some load issues with regards to file size. I have a windows application written in C# which will automatically generate the files. I know the size of each file, ex. 100KB, and how many files to generate. What I need…

VajNyiaj
- 1,730
- 2
- 11
- 15
22
votes
3 answers
C libraries for mathematical matrix operations
I know there are some optimized algorithms around for all kind of matrix decompositions (QR decomposition, SVD,...), multiplications and the likes. Yet, I couldn't find a good overview. For C++, there is quite some useful information in this…

Joris Meys
- 106,551
- 31
- 221
- 263
21
votes
5 answers
fps - how to divide count by time function to determine fps
I have a counter working that counts every frame. what I want to do is divide this by time to determine the FPS of my program. But I'm not sure how to perform operations on timing functions within python.
I've tried initializing time as
fps_time =…

S price
- 231
- 1
- 3
- 9
17
votes
2 answers
What filesystem operations are required to be atomic?
Are unlink, fsync, and rename the only ones that are by definition atomic?
Edit: atomic means that an operation either succeeds and has an effect or has fails and has no effect; an operation must not fail and have an effect.
clearly if the kernel…

Dan D.
- 73,243
- 15
- 104
- 123
17
votes
4 answers
objective-c divide always returns 0
Something really weird is happening.
float p1 = (6 / 100);
NSLog(@"p1 = %f", p1);
With those two lines of code I get the following output:
p1 = 0.000000
Why is a simple devide with static numbers not working! I have so much work to do to deal with…

Paul Hart
- 171
- 1
- 1
- 3
15
votes
4 answers
Java - Order of Operations - Using Two Assignment Operators in a Single Line
What are the order of operations when using two assignment operators in a single line?
public static void main(String[] args){
int i = 0;
int[] a = {3, 6};
a[i] = i = 9; // this line in particular
System.out.println(i + " " + a[0] +…

HSeldon
- 419
- 1
- 4
- 9
10
votes
2 answers
Java stream - purpose of having both anyMatch and noneMatch operations?
The anyMatch operation will return true if it finds an element - the noneMatch operation will return false it if finds a matching element.
The anyMatch operation will return false if it finds no matching element - the noneMatch operation will return…

Tranquility
- 3,061
- 5
- 23
- 37
9
votes
7 answers
Is there a way to make a function atomic in C?
Is there a way to make a function atomic in C.
I am not looking for a portable solution.(platforms looking for - Win,Linux)

FL4SOF
- 4,161
- 6
- 28
- 24
8
votes
1 answer
Simple way to delete a matrix column in Mathematica
I am trying to delete both a matrix in mathematica. An inelegant way of doing it is as I do below, i.e specifying it in a new matrix as
S = Table[
Ss[[If[i < t, i, i + 1]]][[If[j < t, j, j + 1]]], {i, q}, {j, q}];
where the goal is to…

Phil
- 815
- 1
- 8
- 15
6
votes
6 answers
Why does Python evaluate this expression incorrectly?
I've been experimenting with the mathematical abilities of Python and I came upon some interesting behavior. It's related to the following expression:
(4+4)+3/4/5*35-(3*(5+7))-6+434+5+5+5
>>> 415
However, if you evaluate the expression with the…

ThisIsNotAnId
- 177
- 4
- 20
6
votes
2 answers
Matrix class in java
I needed help with creating created a Matrix class in java so I posted on stackoverflow. Eventually I figured it out. Since I could not delete this question I decided to put my finished Matrix Class online. Try to make it your own if your going to…

user7420515
- 61
- 1
- 1
- 4
6
votes
3 answers
Multiply two list objects in R
What I'm trying to do:
Multiply an object in a list by another object in a different list? I need to multiply a vector of 1000 values in List A times a vector of 1000 values in List B.
For instance:
Vector in List_A:
1
2
3
Vector in…

velociraptaco
- 69
- 1
- 1
- 3
6
votes
3 answers
#Cassandra - What is the difference between nodetool removenode , decommission, assassinate, replace?
In order to remove a node (working / non working) which command is applicable in which situation?

Bhuvan Rawal
- 386
- 4
- 15