Questions tagged [long-integer]

A long integer is an integer number, typically twice the size of a standard integer. It is represented by the keyword 'long' in several programming languages.

A long integer is an integer number, typically twice the size of a standard integer. It is represented by the keyword 'long' in several programming languages.

http://en.wikipedia.org/wiki/Integer_(computer_science)#Long_integer

2408 questions
0
votes
0 answers

How to reshape from wide to long format?

I would like to reshape my data frame from wide to long format. I am using reshape but it's not working. My data: mydata = data.frame(number_p = c(1,2,3,4,1,2,3,4,5,6), SpeciesName = c('speciesA', 'speciesA', 'speciesA', 'speciesA', 'speciesB',…
BMT
  • 65
  • 6
0
votes
1 answer

Replacing IP 2 bytes function

I am in the process of optimizing a script that handles members IPs. This converts to 4-byte char and works fine - function ip2bytes($ip) { $res = ''; $parts = explode('.', $ip); if (count($parts) !== 4) return null; for…
WiiLF
  • 304
  • 3
  • 11
0
votes
0 answers

Working with large integer data type, possibly larger than 10^18

What data type or what ways can I store large integers possibly greater than 10^18 and How can I efficiently improve my approach to the problem? I am currently working on a problem that asks to find the sum of all divisors d(k) given that: N …
mark
  • 1
0
votes
3 answers

How to combine two numbers to get a long long integer?

I am trying to combine two large numbers together which would result making a "long long int". For example: a = -1716642972; b = 43828807; z = a and b; In this case, I want z to equal -171664297243828807. I know most of you are thinking, "why on…
boblerbob
  • 149
  • 3
  • 9
0
votes
1 answer

Df from long to wide format with multiple id and time variables

I am stuck trying to convert a df from long format to wide format. My data looks like this for one id (example 1102; in the complete df there are many different ids: >df_long[1:30,] id roi mean sd timepoint 1 1102…
Nima H.
  • 25
  • 4
0
votes
2 answers

Calculation exceeding the Java Long type maximum

Multiplication with the maximum value of the Long type in eclipse results in the following result. I wonder what the result means. long long1 = 9223372036854775807L; long long2 = 9223372036854775807L; int n = 5; long tmp_long =…
shindang5
  • 11
  • 2
0
votes
1 answer

VBA CSV import: long numbers are not written out

I have a CSV File, which I want to display in my Spreadsheet using the QueryTable. Because I have long numbers, I want to format the cells as text (because the last digits are turned to a "0"). I tried formatting the cells beforehand and setting the…
Lazian24
  • 11
  • 1
0
votes
1 answer

Ajax long polling problem

I looked at a brief introduction to ajax long polling here and tried to mimic it on my own pc using wamp, however I have encountered a couple of problems. I kept getting an error about undefined index in the longpolling.php file, line 29 which is …
Michael
  • 5,994
  • 7
  • 44
  • 56
0
votes
1 answer

Why the number stuck and doesn't increase anymore?

first of all, i'm new in programming. This is just a simple fun project for me, but i met unexpectedly problem and i don't know why. Background: This is something like "Groundhog Day", start loop from a month, by next loop the time decrease by one…
0
votes
1 answer

What is the difference between long and long int in c?

I know that an integer has a range of -2147483648 to 2147483647 and a long has the range of -9223372036854775808 to 9223372036854775807 but what range does a long int have?
Dami Karv
  • 1
  • 6
0
votes
0 answers

why is ```long int``` not working on turbo c

Our teacher requires us to use turbo c on our assignments. The program is working fine on other compiler applications but it doesn't with turbo c. Here is the code: #include struct Name { char last[100]; char…
PABLO1403
  • 11
  • 4
0
votes
2 answers

How to add a long and preserve precision when printing

How do I preserve precision in my sum output? I think that what is happening is that the precision is exactly the same, but one option chooses to round. public class Main { public static void main(String[] args) { final long seconds =…
sdc
  • 2,603
  • 1
  • 27
  • 40
0
votes
1 answer

VBA Long variable keeps resetting during a Do While loop?

I'm writing some code in Excel to scan a row for a particular value, then get the cell address of that value. lngCol = 0 search_start = "D1" Do While current_week <> week_one lgnCol = lngCol + 1 current_week = Range(search_start).Offset(0,…
TomCrow
  • 47
  • 8
0
votes
0 answers

Java casting in wrapper Number classes

Why it's correct: Long l = new Long(10); but it's not correct: Long l2 = 10; I understand that int is substituted here, but why is new Long(10) correct?
EuginK
  • 1
0
votes
2 answers

Calc pi with long double in C

i have a problem in calc of pi, when i put long double in variable appears a big number, but not the correct value, if you change for calcf function with double it works. My code: #include #include long double calc(int n, double…
kavain
  • 451
  • 2
  • 8
  • 20