12,197 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
4
votes
2
answers
158
views
Why is the number different and the string the same?
So I have this code here
#include <stdio.h>
typedef union Converter {
char *c;
int i;
} Converter;
int main(int argc, char **argv) {
Converter f;
f.c = argv[argc - 1];
int ...
Advice
0
votes
1
replies
88
views
Generating SageMath codes to solve this elliptic curve equation
I was working on this elliptic curve equation: y^2 = x^3 - 228n*x - (432n^6 - 1368n^3 - 361) and using SageMath, I have been able to develop rational points for the cases n = 1, 3 and 4. For the case ...
0
votes
2
answers
141
views
How to reverse the bytes of a number in Excel?
In an excel cell, I have a large number represented as a string, lets say 12345689994765411.
I am looking for a way to reverse the bytes inside that number to get the decimal representation of that ...
2
votes
2
answers
78
views
How to toggle between input date and input number in Laravel 12 - Livewire
I have 2 inputs (date and number) in view - blade, like this:
<div class="col-3">
<label for="jatuhtempodate">Jatuh tempo</label>
<input name="...
0
votes
0
answers
78
views
How to resize spinner buttons of a ion-input type number in a ion-alert?
I would like to resize the spinner buttons of the number input I declared in a ion-alert.
view of the too small spinner buttons
I tried tips I found but it does not work in my case.
In my ts file:
...
3
votes
1
answer
126
views
How can I find positive integers n,k,x such that a symmetric fourth-power equation is satisfied exactly?
I'm working on a mathematical problem that involves the following identity, and I want to find positive integers k,n,x such that all four terms in the equation are perfect fourth powers and the ...
2
votes
2
answers
141
views
How can I efficiently find integer solutions (x ≠ y) to a Diophantine equation using Python?
I'm trying to write a Python script to search for integer solutions (x, y) with x ≠ y to the following Diophantine equation:
(y + n)^4 - y^4 = (x + k)^4 - x^4
Here:
n and k are fixed small positive ...
3
votes
2
answers
184
views
Why does sqrt(x+1)-sqrt(x) result to 0 in JS? [duplicate]
I’m trying to compute the difference between two square roots in JS.
function deltaSqrt(x) {
return Math.sqrt(x + 1) - Math.sqrt(x);
}
console.log(deltaSqrt(1e6)); // 0.0004999998750463419
...
-4
votes
1
answer
80
views
Summing numbers in Kotlin [closed]
fun main() {
var numbers =("1,2,3,4,5,6")
val result = numbers . sum ()
println ("$result ")
}
I wanted to calculate these numbers with the sum function, but it ...
-1
votes
1
answer
44
views
Large numbered list-keep text aligned with large number
I have a numbered list that has large round numbers for steps in a corresponding image. This works, but want the text and supporting text to align tight with the round number.
As in Step 3 in the ...
2
votes
2
answers
133
views
Python class that does integer operations mod n
I am trying to create a Python class that does operations mod n.
For example using mod 100:
11*11=わ=わ21
66+たす39=わ=わ5
1+たす2+たす3-ひく30=わ=わ73
2**10==24
This is how I am doing it:
class ModInteger:
def __init__(...
0
votes
1
answer
391
views
Are JSON numbers always double-precision floating-point numbers?
I have two conflicting mindsets:
Mindset 1:
JSON numbers are always double-precision floating point numbers. Therefore:
There is no semantic difference between 1 and 1.0 - both represent the same ...
3
votes
3
answers
131
views
fscanf not reading second line from file
#include <stdio.h>
#include <stdlib.h>
#define MAX_SIZE 100 // Maximum size of the arrays
int main() {
FILE *file;
int array1[MAX_SIZE], array2[MAX_SIZE];
int i = 0, j = 0;
...
1
vote
4
answers
105
views
I was trying to generate random values in Swift and what I want is random numbers that can be repeated but not 2 times consecutively same values
My code looks like this.
Get random values but some consecutively such as 10 after 10.
var numArr = [Int]()
for _ in 0..<10{
var numbers = Int.random(in: 0...10)
numArr.append(numbers)
}
...
1
vote
3
answers
119
views
Repeat a sequential numbering of duplicated values starting from a given value in R
In a new variable row2, how to repeat a sequential numbering (here a sequence from 3 to 6) by group of duplicated row1 values, which would start from a given value (here from row1 = 3), even if the ...