N
N
Neonoviiwolf2021-06-24 19:31:14
C++ / C#
Neonoviiwolf, 2021-06-24 19:31:14

Whether influences speed of calculation how many signs in double?

Good afternoon, I wondered if there is a difference in multiplication / division in the cost of processor resources, for example:
0.2 * 0.2 or 0.2 * 0.2000002 or 0.220022 * 0.2331564654

That is, the jump of numbers after the decimal point?
If the tags are not set correctly, correct

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
Wataru, 2021-06-24
@Neonoviiwolf

Usually it doesn't matter. First, all these numbers in binary notation have almost the same number of occupied bits - the entire mantissa. Secondly, the operation is performed by a hardware unit - whether it is in parallel with units or zeros in bits.
But, if the processor does not know how to operate with floating point numbers, then there will be software emulation - and it may already depend there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question