Skip to main content
-2 votes
1 answer
132 views

I have a C function that receives data from an input source (e.g., a USB stick or sensor), where the input is ASCII characters representing numeric values. For example, I might receive: "12/04/23&...
Maaz Madha's user avatar
Best practices
0 votes
4 replies
29 views

I have a Fortran code compiled with with the following flags: -fc=ifx -O3 -r8 -i4 -fpe0 -no-ftz -fp-model=fast=2 -heap-arrays 0 -init=zero -init=arrays -I ./include/ -L ./lib/ -lfmetis -lmetis -o ...
Subject303's user avatar
0 votes
3 answers
109 views

I want to construct objects which support arithmetic operations and have extra methods, e.g: class Timestamp(int): def as_seconds(self): return self / 90000 The extra method works: >&...
tuserun's user avatar
  • 11
4 votes
1 answer
112 views

In love2D I have a string that represents a mathematical expression, for example: local expr1 = "[p35] div [p36]" local expr2 = "((([p35]*100) div [p36]) mod 100)" local params = {...
darkfrei's user avatar
  • 638
-1 votes
1 answer
118 views

print(krit) names weight 1 may 36 2 mayer 49 3 mayo 35 4 mali 50 > mean(krit$weight) [1] 42.5 > typeof(weight) [1] "double" > typeof(names) [1] "character&...
Belinda Omino's user avatar
Advice
1 vote
21 replies
409 views

From the man pages, I found that size_t has the range of 0 to SIZE_MAX, and ssize_t has the range of -1 to SSIZE_MAX. So, after printing those values on a 64bit system, I have the following results: ...
sat0sh1c's user avatar
1 vote
2 answers
239 views

The following code is trying to set the test array in the first for loop, but it can't be used in the second for loop. int main() { int *test[3]; /** Try to set the array value one by ...
stackbiz's user avatar
  • 1,962
2 votes
1 answer
140 views

I working on a code where it is necessary to have large integers, here is a simplified version of it (len_class.py): class BigLen(): def __len__(self): return 10**100 However I'm running ...
user126306's user avatar
4 votes
2 answers
182 views

I am trying to make my own file compressor and some of the chars in the file that I am trying to compress are '�'. I tried: #include <iostream> int main(){ std :: cout << (int)'�'; ...
Jordon's user avatar
  • 103
3 votes
2 answers
239 views

I am trying to solve a problem posed in this question which asks that a program be written that calculates logarithms of numbers without including <math.h>. I wrote the following program: #...
uran42's user avatar
  • 517
4 votes
2 answers
197 views

I'm seeing a strange (to me) difference in behavior between Clang and GCC when comparing an integer with its negation. Also, pre-v12 GCC behaves like Clang. Code is below, but also here's a live link ...
jwd's user avatar
  • 11.4k
3 votes
1 answer
120 views

The following lex rules are copied from int_literal in docs of rust nightly. INTEGER_LITERAL -> ( DEC_LITERAL | BIN_LITERAL | OCT_LITERAL | HEX_LITERAL ) SUFFIX_NO_E? DEC_LITERAL -> ...
Mike Li's user avatar
  • 81
5 votes
1 answer
141 views

I recognized that int(unicode_string) sometimes gives obscure results. E.g. int('᪐᭒') == 2. >>> bytes('᪐᭒', 'utf-8') b'\xe1\xaa\x90\xe1\xad\x92' >>> [f'U+{ord(c):04X}' for c in '᪐᭒'] ...
Wör Du Schnaffzig's user avatar
-4 votes
2 answers
128 views

This script takes lines from a file of lottery numbers, and is supposed to check for errors. For example, in the following: week 1;17,19,35,23,8,20,36 week 2;24,28,35,8,3,22 week x;23,29,38,1,35,18,25 ...
Dominic 's user avatar
0 votes
0 answers
62 views

Why is the sum of the iaea_mass_dat_trunc$AM_WN (integer) and iaea_mass_dat_trunc$AM_frac (numeric) 499496.6 for all results? How do I get the appropriate result (for example, the sum of the values in ...
Brian's user avatar
  • 117

15 30 50 per page
1
2 3 4 5
1551