Tag: int

1 votes
0 answers
204 views
Hello i am interested :)

Hello i am interested :)  Hello i am interested :) Hello i am interested :) Hello i am int

avatar
Alfred Marku
0 0 0 0
asked 21 October, 2021
56 votes
3 answers
2.2K views
What does `dword ptr` mean?

Could someone explain what this means? (Intel Syntax, x86, Windows) and dword ptr [ebp-4], 0

avatar
Kisha
0 1 0 9
asked 07 September, 2021
65 votes
3 answers
3K views
How do you use gcc to generate assembly code in Intel syntax?

The gcc -S option will generate assembly code in AT&T syntax, is there a way to generate files in Intel sy

avatar
Brianne
0 1 0 9
asked 07 September, 2021
62 votes
5 answers
2.4K views
Why does GCC use multiplication by a strange number in implementing integer division?

I've been reading about div and mul assembly operations, and I decided to see them in action by writing a

avatar
Xavier
0 1 0 9
asked 07 September, 2021
53 votes
7 answers
1.5K views
What is exactly the base pointer and stack pointer? To what do they point?

Using this example coming from wikipedia, in which DrawSquare() calls DrawLine(), (Note that this diagram h

avatar
Jesenia
0 1 0 9
asked 07 September, 2021
58 votes
12 answers
923 views
Why doesn't GCC optimize a*a*a*a*a*a to (a*a*a)*(a*a*a)?

I am doing some numerical optimization on a scientific application. One thing I noticed is that GCC will optim

avatar
Venice
0 1 0 9
asked 07 September, 2021
54 votes
13 answers
2.3K views
How can I maximize the editor pane in IntelliJ IDEA?

In Eclipse, I can type Ctrl+M or click the maximize icon in the editor pane to make the editor pane take up th

avatar
Nereida
0 1 0 9
asked 07 September, 2021
55 votes
5 answers
1.1K views
Does Notepad++ show all hidden characters?

In Notepad++ I have set "replace tab with 2 spaces". When coding in Python I copy-pasted some code from the w

avatar
Stacia
0 1 0 9
asked 07 September, 2021
54 votes
6 answers
2.4K views
How do I turn off the unlimited whitespace in IntelliJ editor?

How do I remove the ability to move the cursor after then end of line in IntelliJ?

avatar
Louetta
0 1 0 9
asked 07 September, 2021
52 votes
3 answers
1.1K views
Why does Python's hash of infinity have the digits of π?

The hash of infinity in Python has digits matching pi: >>> inf = float('inf') >>>

avatar
Xavier
0 1 0 9
asked 07 September, 2021
63 votes
6 answers
1.9K views
What is the behavior of integer division?

For example, int result; result = 125/100; or result = 43/100; Will result always be the floor of the

avatar
Hallie
0 1 0 9
asked 07 September, 2021
58 votes
11 answers
502 views
Safest way to convert float to integer in python?

Python's math module contain handy functions like floor & ceil. These functions take a floating point

avatar
Karolyn
0 1 0 9
asked 07 September, 2021
48 votes
19 answers
453 views
Mapping two integers to one, in a unique and deterministic way

Imagine two positive integers A and B. I want to combine these two into a single integer C. There can be no

avatar
Benton
0 1 0 9
asked 07 September, 2021
62 votes
7 answers
937 views
Why is division in Ruby returning an integer instead of decimal value?

For example: 9 / 5 #=> 1 but I expected 1.8. How can I get the correct decimal (non-integer) result? Wh

avatar
Robt
0 1 0 9
asked 07 September, 2021
63 votes
21 answers
2.4K views
Why can't decimal numbers be represented exactly in binary?

There have been several questions posted to SO about floating-point representation. For example, the decimal n

avatar
Renaldo
0 1 0 9
asked 07 September, 2021
57 votes
7 answers
2.5K views
How can I divide two integers to get a double?

How do I divide two integers to get a double?

avatar
Santiago
0 1 0 9
asked 07 September, 2021
62 votes
30 answers
1.2K views
Designing function f(f(n)) == -n

A question I got on my last interview: Design a function f, such that: f(f(n)) == -n Where n is a 3

avatar
Alphonso
0 1 0 9
asked 07 September, 2021
52 votes
18 answers
1.6K views
How to perform an integer division, and separately get the remainder, in JavaScript?

In JavaScript, how do I get: The whole number of times a given integer goes into another? The remainder?

avatar
Dusty
0 1 0 9
asked 07 September, 2021
61 votes
30 answers
1.4K views
Is floating point math broken?

Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004

avatar
Dwain
0 1 0 9
asked 07 September, 2021
56 votes
18 answers
1.3K views
How do I edit a file after I shell to a Docker container?

I successfully shelled to a Docker container using: docker exec -i -t 69f1711a205e bash Now I need to edit

avatar
Corey
0 1 0 9
asked 07 September, 2021