Skip to main content
The 2024 Developer Survey results are live! See the results

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.

long-integer
0 votes
0 answers
40 views

Why is the returned type of query.getSingleResult() in javax persistence API BigDecimal? [closed]

In my Student class the data type of id is Long. @Data @Entity public class Student { @Id private Long id; private String name; } public Long getId(Long registrationId) { try { ...
190303458's user avatar
0 votes
1 answer
69 views

How to convert Long datatype to Hex format in XSLT and Perform Long Parsing in XSLT. XSLT to be used in DataPower

Below is my .Net VB code. How do we implement below code in XSLT (XSLT to be used in DataPower). Since we do not have Long datatype in XSLT, we're having tough time to implement below .Net code in ...
Ram Adabala's user avatar
0 votes
1 answer
63 views

How to split large integers without converting to a string? [duplicate]

I ran into a problem when trying to convert a 5,000 digit long integer into a string. I realised that I did not need an integer in that case, but I would still like to know if there is a way to ...
Qmrl's user avatar
  • 9
0 votes
0 answers
29 views

Representing an 8-digit hexadecimal as a long [duplicate]

I am writing a Java program that performs bitwise operations on bites in a data stream. I have been given test values in the form of 8-digit hexadecimal strings, which I have converted to base 10 and ...
T. J. Foster's user avatar
-1 votes
0 answers
89 views

How to implement longer data type than long long int in C/C++? [duplicate]

It is answered and quoted by many that such problem can be resolved by just using GMP library. But I am wondering how one would actually implement such datatype in C/C++, and is there any "...
fdc's user avatar
  • 7
1 vote
0 answers
90 views

Stable calculation of large binomial coefficients in c++ [duplicate]

I am looking for a way to reliably calculate large binomial coefficients in c++. My current implementation can handle numbers up to around n=60, but after that f * (n - i) exceeds the limit of long ...
Alice Schwarze's user avatar
0 votes
1 answer
35 views

How to change long format into wide and add new derived variable based on the original rows

I have a long table format and try to construct a wide format that contains additional variables based on the rows. My data has rows based on patients, their treatments, and their visits. Each row ...
joejoe9's user avatar
  • 99
1 vote
1 answer
63 views

Different result in JS & PHP because of different integer range

<script> function hs(e, n) { return e * n % e; } alert(hs(1752865668, 1716717484170)); //result: 1752622684 </script> <?php function hs($e, $n) { return $e * $n % $e; } echo ...
Alo's user avatar
  • 360
-1 votes
1 answer
108 views

Why does the sum give a different result when i add values and change the num variable from int to long data type [closed]

I've been trying the cs50 credit problem and i am stuck in the part where you add every other digit in the number. This is what i came up with. #include <iostream> using namespace std; int main(...
Overpaint's user avatar
0 votes
1 answer
85 views

C long int always accesses memory as big endian?

In the comment discussion of an old unanswered question, a fellow user is claiming that the C long int type "accesses memory in big endian mode". I apologize beforehand for my lack of ...
mindoverflow's user avatar
1 vote
1 answer
78 views

C++ multiplication of long integers resulting in unexpected output [duplicate]

I have a simple C++ program that multiplies two long int variables and prints the result. Here's the code: #include <iostream> using namespace std; int main() { long int a = 100000; ...
m7real's user avatar
  • 13
0 votes
0 answers
44 views

Training Resnet18 on MedMNIST data problem with datatypes

I want to train a model on the MedMNIST database, specifically RetinaMNIST. I start by defining the data transforms and creating the dataloaders: import torch import torch.nn as nn import torch.optim ...
Tom Liefman's user avatar
4 votes
1 answer
261 views

Need large integers and floats. Trouble with long long int and long double

I am a sort of newbie to programming (actually coming back to it after a gap of 20 yrs :) ). I am trying to make a program for a question on project euler, to find sum of all prime numbers under 2 ...
Vinayak Deshmukh's user avatar
1 vote
0 answers
40 views

SQLBindCol for long integer value on 64Bit platform?

I want to query data from an oracle db with unixodbc which has an NUMBER(19) column. So this must fit in an long under 64 bit. But i dont know the right type for the TargetType parameter. With type ...
Marco's user avatar
  • 171
1 vote
1 answer
22 views

will there be overflow or not in this case

I want to know that why there is no error in this code when I run it, especially in this line ret[(int) b[i]] = p;. Actually this solution I found in leetcode contest 387, user who got rank 3. public ...
Md Sajid Anwar's user avatar

15 30 50 per page
1
2 3 4 5
163