Is it difficult to run the example and see the result?
num5000 is just the number 5000 (means 5000 mV)

I have doubts that the IDE can be considered correct in other projects.

I wanted to get a simple power measurement:
ADMUX = _BV (REFS0) | _BV (MUX3) | _BV (MUX2) | _BV (MUX1);
ADCSRA | = _BV (ADSC); // Start conversion
while (bit_is_set (ADCSRA, ADSC)); // measuring
uint8_t low = ADCL; // must read ADCL first - it then locks ADCH
uint8_t high = ADCH; // unlocks both
What for to calculate so:
long result = (high << 8) | low;
result = my_vcc_const * 1023 * 1000 / result; or my_vcc_const * 1023000 / result; ??

uint8_t high + uint8_t low = uint16_t.

why do large numbers?
If:
float Real_Vcc = (korr_Vcc * 5.00 / result); // (in V)

Numbers with a floating point to calculate long, I want so:
mVAcc = korr_VCC * 5000 / result, where the same = my_vcc_const * 1023000 / result;

The result is correct only if korr_Vcc or num5000 = uint32_t (long)

EmSerg:
I have doubts that the IDE can be considered correct in other projects.

The Arduino IDE uses the standard GCC compiler that is very widely used and very thoroughly tested. There may be bugs in it, but if so they will only arise in very very unusual circumstances.

If the choice is between a bug in your code (or mine) or in the GCC compiler then it is 99.999999999999999999% certain that it is is NOT in the compiler. Don't even waste time asking yourself is it possible.

and num5000 = 288 and korr_VCC = 228, that multiplication overflows 16 bits (65664) so it becomes 127 and then divided by 228 (result) which is 0 (integer division)

Signed integer overflow is undefined behavior, so the results you see (or any results, for that matter) are "correct". Try changing int to uint16_t or unsigned int.

The C or C++ language /preprocessor - when not told differently with a type or through a cast - performs operations for you as integers. On a target basic Arduino that means using 16 bit signed integer (and here it’s even done at compile time, your Arduino does not calculate anything since compiler can see the values won’t change)
This is the standard - so nothing wrong, you just failed to read the documentation

J-M-L:
The C or C++ language /preprocessor - when not told differently with a type or through a cast - performs operations for you as integers. On a target basic Arduino that means using 16 bit signed integer

This is the standard - so nothing wrong, you just failed to read the documentation

Did you miss my implied [sarcasm] [/sarcasm] tags?

EmSerg:
byte x = 228; // byte 0<X<255
int y=5000; // int 0<y<65535
int z; //

void setup() {
Serial.begin(9600);
z = x * y / x;
Serial.print(z);
}

RESULT IDE: z=113
correct value: int z=25888 or long 1140000.

Error IDE: the result is calculated not in Z, but in x or y.
correct value will be only if long x or long y.

By my reckoning, the traditional result for x*y/x = y, so 5000 if we neglect any overflows. But the intermediate calculation overflows, so we get a different result…

int is -32K ~ 32K-1, not 0~64K - 0~64K is unsigned int.

The issue is that the intermediate calculations are done as signed integers.

So 228*5000 = 1140000. This overflows, so the intermediate value is 25888. Then that gets divided by 228, yielding 113.

Operands are type promoted to the larger of the two types involved, so declaring x or y as a long (or casting one of them to a long when you do the math, eg, z=((long) x)*y/x will result in the math being done as longs, so you get the “correct” result here.