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
2 answers

Why Does Java Compiler Treat Long Data Type As Double Instead of Integer By Default?

I'm new to Java and I stumbled upon this while testing some code. Why does Java pass in x (of data type long) into the function that takes in double parameters instead of the one with integer parameters. I would appreciate it if somebody could…
0
votes
1 answer

Different amount of time varying variables from wide to long format

I am converting from wide to long format for longitduinal data. This is as much so I understand what is going on "in the background" as well as understand whether it is actually possible. df1 is a combination of 4 waves of data which I have…
0
votes
2 answers

Using a long variable to store a char and printing it

I am storing a char in a long variable and trying to print it using printf. long a = 'A'; printf("%c \n",a); Considering default argument promotions the arguments get promoted to int but as long has higher rank than int it should not get promoted…
LocalHost
  • 910
  • 3
  • 8
  • 24
0
votes
1 answer

Arduino/C++ adjusting Long Millis () in loop

So I have made a simple Arduino circuit for practice. I am able to start and stop the loop at any moment via a button. Now I want to make some sick led light sequences. My initial thought is changing the delay_led1 function at the end of the loop.…
Grasmat
  • 75
  • 6
0
votes
1 answer

required int but there is a problem and found zero bytes

How to solve this? File f=new File("d:/tester.txt"); long size=f.length(); // returns the size in bytes char buff[]=new char[size]; // line of ERROR // will not accept long in it's argument // I can't do…
Suhail Gupta
  • 22,386
  • 64
  • 200
  • 328
0
votes
1 answer

how to stop springboot convert string "2020-02-05 14:20:00" to timestamp format?

I use spring boot as the basic framework, I define a Long format field named startTime, but when the input value is a string like "2020-04-21 12:00:00", the framework converts "2020-04-21 12:00:00" to a timestamp like 253652458665256 automatically.…
0
votes
1 answer

How to handle calculations with really big numbers on java?

I'm working on a program that reads from a file some numbers. With those numbers, then the program needs to calculate a result number using a formula I will provide later. File format looks like: 3 //number of tests 28347823734 /*argument 1 of test…
user157629
  • 624
  • 4
  • 17
0
votes
1 answer

How to use std::ratio for values larger than int64_t?

I want to encode solar mass as a std::ratio (in order to convert it to kg). How can I do such a thing if solar mass is 1.988478e+30 kg? std::ratio<(unsigned long long)1'988'478e+30, 1> kg_to_solar_mass // overflow
0
votes
0 answers

Implement the Long Integer class. Provide the ability to perform arithmetic operations with instances of the class

I have an implementation of the Long Integer class, which should provide the ability to perform arithmetic operations with instances of the class. It works in 95% of situations, but sometimes it shows wrong results. The screen with wrong answers is…
Nikitonix
  • 13
  • 4
0
votes
5 answers

Help me translate long value, expressed in hex, back in to a date/time

I have a date value, which I'm told is 8 bytes, a single "long" (aka int64) value, and converted to hex: 60f347d15798c901 How can I convert this and values like this, using PHP, into a time/date? Converting it to decimal gives me: 96 243 71 209…
lynn
  • 2,868
  • 5
  • 31
  • 34
0
votes
1 answer

Why is my MutableLiveData nullable?

I would like to know why my elapsed variable ends up Long? instead of Long. I defined it as not nullable and none of the operations I execute on it could result in null. Still get the error for the last line: Operator call corresponds to a…
achillin
  • 45
  • 1
  • 6
0
votes
4 answers

C and Objective-C: What's the difference between using Float64 and long?

What's the difference, in C and Objective-C, between using Float64 and long?
neowinston
  • 7,584
  • 10
  • 52
  • 83
0
votes
1 answer

Encode long into an int and vice versa

If I have an application, Ryno, that produces unique increasing long numbers. I have another application, Cyan,that sends a message and needs a unique integer id. I would want to use the number from Ryno as the id for message in Cyan. Is there a way…
Kaleb Blue
  • 487
  • 1
  • 5
  • 20
0
votes
1 answer

Why does (ULONG_PTR)x > (ULONG_PTR)y comparison fail?

0x8A81FAA is less then 0x7FFFFFF0000 so why is it true? #if defined(_X86_) #define ProbeForReadUnicodeStringFullBuffer(String) \ if (((ULONG_PTR)((String).Buffer) & (sizeof(BYTE) - 1))…
SSpoke
  • 5,656
  • 10
  • 72
  • 124
0
votes
1 answer

Modify numeric data type to set its minimum to 1

I want to have a numeric data type starting at 1. Not use negative and 0. So I could use Example class public class Example extends Long { private int min = 1; public LifeTime(long value) { this.value = value; } How could I…
1 2 3
99
100