Errors, bugs, questions - page 2623

 
Vladimir Pastushak:

Quite entertaining mathematics

Result

2020.01.05 17:09:28.798 Testert EURUSD,H1: 0. 06000000 0.01 6.00

It's a recurring question.
Everyone is always talking about IEEE Standard 754, but often when people go to Wikipedia, either because of complexity, or because of laziness, they leave without understanding the meaning of the standard.

I will spend a little time to try to explain this standard as briefly as possible and in simple words, in order to further refer to this post.


So, the type double consists of 8 bytes = 64 bits.(float 4 bytes = 32 bits)

And the number representation ofdouble and float consists of 3 components:sign, exponent and mantissa


DOUBLE:


FLOAT:

Naturally there is no decimal representation of numbers in this format, only binary.

  • The sign is 1 bit. If 0 it is + (plus), if 1 it is - (minus).
  • The exponent stores the degree for number 2. Can be in the range -12610 to 12710 for float and -1022 10 to 102310 for double
  • The mantissa is the fractional part of the number itself in binary form, reduced to a form in which the comma stands after the first unit without regard to that first unit and the comma


A little understanding of binary representation of numbers and its relation to decimal numbers:

24= 100002 = 1610

23= 10002 = 810

22= 1002 = 4

21=102= 2

20=12=110

2-1= 0.12 =(1/2)10= 0.510

2-2= 0.012 = (1/4)10= 0.2510

2-3= 0.0012 = (1/8)10= 0.12510

2-4= 0.00012 = (1/16)10= 0.062510

2-5= 0.000012 = (1/32)10= 0.0312510

2-6= 0.0000012 = (1/64)10= 0.01562510

2-7= 0.00000012 = (1/128)10= 0.007812510

2-8= 0.000000012 = (1/256)10= 0.0039062510

2-9= 0.0000000012 = (1/512)10= 0.00195312510

2-10= 0.00000000012 = (1/1024)10= 0.000976562510

2-11= 0.000000000012 = (1/2048)10= 0.0004882812510

2-12= 0.0000000000012 = (1/4096)10= 0.00024414062510

2-13= 0.00000000000012 = (1/8192)10= 0.000122070312510

Let's consider examples for the doubletype :

Example 1

We have a decimal number: 891677.4025191

This number can be represented in binary form:

1101100110110001110101.01100111000010110111011111011000101000001111111010001110
(who wants can check)))

We extract the mantissa of the given number simply by moving the comma 19 digits to the left (in this case), so that it is after the first unit.

1.1011001101100011101011001110000101101111101111000101000001111101110001110* 219

But we have a mantissa of only 52 bits. So we take the first 52 significant bits

Мантисса = 1011001101100011101011001110000101101111101111000101

Exponent = (19+1023)10 = 100000100102(as the exponent is a signed number and the exponent can be negative (for example if we have 0.0000042132), we need to add 1023 to10(01111111111112), 011111111112 is zero, everything more is positive, less is negative. In other words, to get the reverse value of the exponent, we need to subtract 1023 from the 11 bit value of the exponent.

In total, our number 891677.4025191 will look as follows in type double:

0100000100101011001101100011101011001110000101101111101111000101

But since this is a binary representation, let's convert it exactly to decimal:

that would be891677.40251909999996425211429595947265625


Example #2

We have a decimal number: -0.00000145258556224114

This number can be represented in binary form:

-0.000000000000000000011000010111101100111010110111010011010101001111001110

We extract the mantissa of this number by simply moving the comma 20 digits to the right, so that it is after the first one.

1.1000010111101100111010110111010011010101001111001110 * 2-20

Мантисса = 1000010111101100111010110111010011010101001111001110

exponent = (-20+1023)10=011111010112

minus sign, so the first bit is 1.

Our total number -0.00000145258556224114 will look as follows in the double type:

1011111010111000010111101100111010110111010011010101001111001110

convert it exactly to decimal:

это будет -0.00000145258556224113991124017968015191826225418481044471263885498046875



In your case, the problem occurs with the number 0.01, since in the double type it will be represented in the form:

0 01111111000 0100011110101110000101000111101011100001010001111011

which when converted into the decimal notation system is equal to 0.0100000000000000000000208166817117216858513294309377670288085937510

Whereas with representation

310 = 1.5*2 = 1.12*21

510 = 2.5*2 = 10.12*21

610 = 1.5*4 = 1.12*22

710 = 3.5*2 = 11.12*21

no problem.

Why is the number double 0.01 really greater than 0.01?

Here's why:

0 01111111000 0100011110110101110100001010111101011101001010001111011 - 0.0100000000000000000000000020816681711721685132943093776702880859375 error = 0.000 000 000 000 000 000 208166817...

0 0111111111000 01000111101101011100001011110111001010001111010 - 0.00999999999999999998474734433411404097569175064563751220703125 error = - 0.000 000 000 000 000 001 5265566...

To understand this process chemistry you can play around with these calculators:
https://babbage.cs.qc.cuny.edu/IEEE-754.old/Decimal.html

https://baseconvert.com/ieee-754-floating-point

 
Vladimir Pastushak:

Quite entertaining maths

Result

2020.01.05 17:09:28.798 Testert EURUSD,H1: 0.06000000 0.01 6.00 Next lot = 0.06999999999999999
2020.01.05 17:09:28.798 Testert EURUSD,H1: 0.06000000 0.01 6.00 Next lot = 0.06999999999999999
2020.01.05 17:09:28.798 Testert EURUSD,H1: 0.06000000 0.01 6.00 Next lot = 0.06999999999999999
2020.01.05 17:09:28.798 Testert EURUSD,H1: 0.06000000 0.01 6.00 Next lot = 0.069999999999999
2020.01.05 17:09:28.798 Testert EURUSD,H1: 0.06000000 0.01 6.00 Next lot = 0.06999999999999999 As 0.06000000 + 0.01 becomes 0.0699999999999999999
2020.01.05 17:09:28.798 Testert EURUSD,H1: 0.05000000 0.01 5.00 Next lot = 0.06
2020.01.05 17:09:28.798 Testert EURUSD,H1: 0.04000000 0.01 4.00 Next lot = 0.05
2020.01.05 17:09:28.798 Testert EURUSD,H1: 0.03000000 0.01 3.00 Next lot = 0.04
2020.01.05 17:09:28.798 Testert EURUSD,H1: 0.02000000 0.01 2.00 Next lot = 0.03
2020.01.05 17:09:28.798 Testert EURUSD,H1: 0.01000000 0.01 1.00 Next lot = 0.02


Why use the function MathFloor (Returns the nearest integer value from below) for fractional numbers (double)?
 
Nikolai Semko:

This question comes up all the time.

cool! you go sleepwalking through the internet, but can you answer the question "where did the last iteration go"? ;) in this example:

void OnStart()
{
   for(double x = 10.0; x <= 20.0; x += 0.1) {
      printf("x = %10.60f", x);
      Sleep(111);
   }
}

2020.01.06 01:26:11.016 tst_double (EURUSD,H1) x = 10.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

2020.01.06 01:26:11.127 tst_double (EURUSD,H1) x = 10.099999999999999996447286321199949907064437866210937500000000000

2020.01.06 01:26:11.239 tst_double (EURUSD,H1) x = 10.19999999999999999289457264239899814128875732421875000000000000

2020.01.06 01:26:11.350 tst_double (EURUSD,H1) x = 10.2999999999999999893434185896359849721193313598632812500000000000

2020.01.06 01:26:11.462 tst_double (EURUSD,H1) x = 10.39999999999999999985978914528479799628257751464843750000000000000

2020.01.06 01:26:11.574 tst_double (EURUSD,H1) x = 10.49999999999999998223643160599749535322189331054687500000000000

2020.01.06 01:26:11.686 tst_double (EURUSD,H1) x = 10.599999999999999978968371792719699442386627197265625000000000000

2020.01.06 01:26:11.798 tst_double (EURUSD,H1) x = 10.6999999999999999997597513100424839649349451065063476562500000000000

2020.01.06 01:26:11.910 tst_double (EURUSD,H1) x = 10.799999999999999971599971578290569595992565155029296875000000000000

2020.01.06 01:26:12.022 tst_double (EURUSD,H1) x = 10.8999999999999999699808025579079549163579940795898437500000000000

2020.01.06 01:26:12.134 tst_double (EURUSD,H1) x = 10.999999999999996447286323211999499070644378662109375000000000000

2020.01.06 01:26:12.246 tst_double (EURUSD,H1) x = 11.099999999999999960920194953319448977708816528320312500000000000

2020.01.06 01:26:12.358 tst_double (EURUSD,H1) x = 11.199999999999999999595795435567854393988847732543945312500000000000

2020.01.06 01:26:12.470 tst_double (EURUSD,H1) x = 11.299999999999999999995381472217559348791837692260742187500000000000

2020.01.06 01:26:12.582 tst_double (EURUSD,H1) x = 11.39999999999999995095026200849679298698902130126953125000000000000

2020.01.06 01:26:12.695 tst_double (EURUSD,H1) x = 11.499999999999999994670929481799248605966567993164062500000000000

2020.01.06 01:26:12.808 tst_double (EURUSD,H1) x = 11.59999999999999999994315658113919198513031005859375000000000000000

2020.01.06 01:26:12.920 tst_double (EURUSD,H1) x = 11.6999999999999999993993960386746039148420020044373725585937500000000000

2020.01.06 01:26:13.032 tst_double (EURUSD,H1) x = 11.7999999999999999993605115378151590983271598815917968975000000000000

2020.01.06 01:26:13.143 tst_double (EURUSD,H1) x = 11.89999999999999993294984401027904823422431945458007812500000000000

2020.01.06 01:26:13.254 tst_double (EURUSD,H1) x = 11.9999999999999928945726423989981412887573242187500000000000

2020.01.06 01:26:13.367 tst_double (EURUSD,H1) x = 12.099999999999999999992539301274518948048353195190429687500000000000

2020.01.06 01:26:13.478 tst_double (EURUSD,H1) x = 12.1999999999999929992184029906638897955417633056640625000000000000

2020.01.06 01:26:13.590 tst_double (EURUSD,H1) x = 12.299999999999999999182828758538758847862482070922851562500000000000

2020.01.06 01:26:13.702 tst_double (EURUSD,H1) x = 12.3999999999999999999147348717087879777795695465087890625000000000000

2020.01.06 01:26:13.813 tst_double (EURUSD,H1) x = 12.49999999999999991191118215802998747676610946655273437500000000000

2020.01.06 01:26:13.925 tst_double (EURUSD,H1) x = 12.5999999999999999990762944435118697583675384521484375000000000000

2020.01.06 01:26:14.037 tst_double (EURUSD,H1) x = 12.6999999999999999090407673067238647490739822387695312500000000000

2020.01.06 01:26:14.149 tst_double (EURUSD,H1) x = 12.7999999999999999990090052401699358597397804260253906250000000000000

2020.01.06 01:26:14.261 tst_double (EURUSD,H1) x = 12.89999999999999989896971303314785474730484868698120117187500000000000

2020.01.06 01:26:14.372 tst_double (EURUSD,H1) x = 12.99999999999998934341858963598497211933135986328125000000000000

2020.01.06 01:26:14.483 tst_double (EURUSD,H1) x = 13.099999999999999889889865875957184471189977573852539062500000000000

2020.01.06 01:26:14.596 tst_double (EURUSD,H1) x = 13.199999999999999886313161622783839397026062011718750000000000000000

2020.01.06 01:26:14.707 tst_double (EURUSD,H1) x = 13.2999999999999889276044859958346933126449584960937500000000000

2020.01.06 01:26:14.820 tst_double (EURUSD,H1) x = 13.3999999999999999987920773492078296840190887451171875000000000000

2020.01.06 01:26:14.932 tst_double (EURUSD,H1) x = 13.49999999999999999875502124198246747255325317382812500000000000

2020.01.06 01:26:15.044 tst_double (EURUSD,H1) x = 13.599999999999999999987281023027563181966543197631835937500000000000

2020.01.06 01:26:15.157 tst_double (EURUSD,H1) x = 13.6999999999999999986854959388438146561380104249804687500000000000

2020.01.06 01:26:15.270 tst_double (EURUSD,H1) x = 13.7999999999999999986499688020558096468448638916015625000000000000

2020.01.06 01:26:15.381 tst_double (EURUSD,H1) x = 13.899999999999999869914441665267804637551303076782226562500000000000

2020.01.06 01:26:15.493 tst_double (EURUSD,H1) x = 13.999999999999999857891789145284797629982577514648437500000000000000

2020.01.06 01:26:15.604 tst_double (EURUSD,H1) x = 14.09999999999999985985433873916917946189641952514648437500000000000

2020.01.06 01:26:15.717 tst_double (EURUSD,H1) x = 14.199999999999999850878602549037896096706390380859375000000000000

2020.01.06 01:26:15.828 tst_double (EURUSD,H1) x = 14.299999999999999849723331181157846003770708282470312500000000000

2020.01.06 01:26:15.941 tst_double (EURUSD,H1) x = 14.399999999999999849999843680598132777959108352661132812500000000000

2020.01.06 01:26:16.054 tst_double (EURUSD,H1) x = 14.4999999999999849984012788445397745817899703979492187500000000000

2020.01.06 01:26:16.167 tst_double (EURUSD,H1) x = 14.599999999999999998399657517077517695724964141845703125000000000000

2020.01.06 01:26:16.280 tst_double (EURUSD,H1) x = 14.69999999999999999838330224545709637645632028579711914062500000000000

2020.01.06 01:26:16.393 tst_double (EURUSD,H1) x = 14.7999999999999999982946947434175759553909301757812500000000000

2020.01.06 01:26:16.504 tst_double (EURUSD,H1) x = 14.89999999999999999899825917092973877545446157455444335937500000000000

2020.01.06 01:26:16.615 tst_double (EURUSD,H1) x = 14.999999999999982236431605997495353221893310546875000000000000

2020.01.06 01:26:16.728 tst_double (EURUSD,H1) x = 15.0999999999999999981881160238117445260286331176757812500000000000

2020.01.06 01:26:16.841 tst_double (EURUSD,H1) x = 15.19999999999998981515258888887023739516737350769090429687500000000000

2020.01.06 01:26:16.953 tst_double (EURUSD,H1) x = 15.29999999999999999811706175023573450744152069091796897500000000000

2020.01.06 01:26:17.066 tst_double (EURUSD,H1) x = 15.399999999999999998080815346134477294981479644775390625000000000000

2020.01.06 01:26:17.179 tst_double (EURUSD,H1) x = 15.4999999999999998080460074766597244888544082641601562500000000000

2020.01.06 01:26:17.290 tst_double (EURUSD,H1) x = 15.59999999999999999801048033987171947956085205078125000000000000

2020.01.06 01:26:17.402 tst_double (EURUSD,H1) x = 15.699999999999999997979749749532030837144702672958374023437500000000000

2020.01.06 01:26:17.514 tst_double (EURUSD,H1) x = 15.7999999999999999979793942426066295709460973739396240234375000000000000

2020.01.06 01:26:17.627 tst_double (EURUSD,H1) x = 15.89999999999999999790938989295077044516801834106445312500000000000

2020.01.06 01:26:17.740 tst_double (EURUSD,H1) x = 15.9999999999999997837371792719619442386627197265625000000000000000

2020.01.06 01:26:17.851 tst_double (EURUSD,H1) x = 16.0999999999999998010480339871719479560852050507812500000000000000

2020.01.06 01:26:17.964 tst_double (EURUSD,H1) x = 16.199999999999981599815258888702373951673735076909042968750000000000000

2020.01.06 01:26:18.076 tst_double (EURUSD,H1) x = 16.29999999999999989829469474341757595539093017578125000000000000000

2020.01.06 01:26:18.189 tst_double (EURUSD,H1) x = 16.3999999999999998499849984368080598132777959108352661132812500000000000

2020.01.06 01:26:18.302 tst_double (EURUSD,H1) x = 16.499999999999999998599998578917891452847979962628257751464843750000000000000000

2020.01.06 01:26:18.414 tst_double (EURUSD,H1) x = 16.5999999999999999987210230756318196654319763183593750000000000000

2020.01.06 01:26:18.526 tst_double (EURUSD,H1) x = 16.699999999999999998863131622783839702606201171875000000000000

2020.01.06 01:26:18.638 tst_double (EURUSD,H1) x = 16.7999999999999999990090052401699358597397804260253906250000000000000

2020.01.06 01:26:18.750 tst_double (EURUSD,H1) x = 16.8999999999999999999147348717087879777795695465087890625000000000000

2020.01.06 01:26:18.861 tst_double (EURUSD,H1) x = 16.9999999999999928945972642398998141288757324218750000000000000

2020.01.06 01:26:18.973 tst_double (EURUSD,H1) x = 17.0999999999999999994315658113919198513031005859375000000000000000

2020.01.06 01:26:19.085 tst_double (EURUSD,H1) x = 17.1999999999999999995739579543585439398884773254394531250000000000000

2020.01.06 01:26:19.197 tst_double (EURUSD,H1) x = 17.2999999999999999997157829056959599256515502929687500000000000000

2020.01.06 01:26:19.309 tst_double (EURUSD,H1) x = 17.399999999999999985978914528479799628257751464843750000000000000

2020.01.06 01:26:19.420 tst_double (EURUSD,H1) x = 17.5000000000000000000000000000000000000000000000000000000000000000000000

2020.01.06 01:26:19.532 tst_double (EURUSD,H1) x = 17.60000000000000142108547152020037371742248535156250000000000000

2020.01.06 01:26:19.644 tst_double (EURUSD,H1) x = 17.70000000000000002842170943030404007434344497070312500000000000000

2020.01.06 01:26:19.757 tst_double (EURUSD,H1) x = 17.80000000000000426363256414560601115226745605468750000000000000

2020.01.06 01:26:19.870 tst_double (EURUSD,H1) x = 17.9000000000005684341886080801486968994140625000000000000000

2020.01.06 01:26:19.982 tst_double (EURUSD,H1) x = 18.000000000000007105427357601001858711242675781250000000000000

2020.01.06 01:26:20.093 tst_double (EURUSD,H1) x = 18.100000000000008526512829121202230453491210937500000000000000

2020.01.06 01:26:20.205 tst_double (EURUSD,H1) x = 18.200000000000009947598300641402602195739746093750000000000000

2020.01.06 01:26:20.316 tst_double (EURUSD,H1) x = 18.300000000000011368683772161602973937988281250000000000000000

2020.01.06 01:26:20.429 tst_double (EURUSD,H1) x = 18.400000000001278976924368180334568023681640625000000000000000

2020.01.06 01:26:20.542 tst_double (EURUSD,H1) x = 18.5000000001421085471520200373717422485351562500000000000000

2020.01.06 01:26:20.653 tst_double (EURUSD,H1) x = 18.6000000000000156319401867222020408916473333886718750000000000000

2020.01.06 01:26:20.764 tst_double (EURUSD,H1) x = 18.7000000000017053052565824240446090698242187500000000000

2020.01.06 01:26:20.877 tst_double (EURUSD,H1) x = 18.800000000184741111297626260483264923095703125000000000

2020.01.06 01:26:20.989 tst_double (EURUSD,H1) x = 18.900000000000019895196601282805204391479492187500000000000000

2020.01.06 01:26:21.101 tst_double (EURUSD,H1) x = 19.00000000000002131616282072803003005576133728027343750000000000000

2020.01.06 01:26:21.213 tst_double (EURUSD,H1) x = 19.10000000000227373675444432320594789775976562500000000000000000

2020.01.06 01:26:21.326 tst_double (EURUSD,H1) x = 19.2000000002415845301584340631961822225097656250000000000000

2020.01.06 01:26:21.438 tst_double (EURUSD,H1) x = 19.3000000000025579538487363609669136047363232812500000000000000

2020.01.06 01:26:21.551 tst_double (EURUSD,H1) x = 19.40000000000002762395888380807063102722167968750000000000000

2020.01.06 01:26:21.664 tst_double (EURUSD,H1) x = 19.5000000000028421709430304040074343444970703125000000000000000

2020.01.06 01:26:21.776 tst_double (EURUSD,H1) x = 19.60000000000000029842794901924207806587219238282812500000000000

2020.01.06 01:26:21.887 tst_double (EURUSD,H1) x = 19.7000000000000312126386808037344440817832946773437500000000000000

2020.01.06 01:26:22.000 tst_double (EURUSD,H1) x = 19.8000000000032684949844964608550071716308593750000000000000

2020.01.06 01:26:22.112 tst_double (EURUSD,H1) x = 19.90000000034106051316484808921813964843750000000000000000



in all seriousness, i want to understand and explain where the 20.0 has gone ?

 
Igor Makanu:

cool! you've been surfing the net at bedtime, but can you answer the question "where did the last iteration go"? ;) in this example:

in all seriousness, I want to figure out and explain where 20.0 went?

Well, it's pretty straightforward:

0.1 in the double type is really 0.10000000000000000000000000055511151231257827021181583404541015625, i.e. more than 0.1

therefore ? on the last check it will already be more than 20, more precisely 10+100*0.100000000000000000000000000000055511151231257827021181583404541015625 ~ 20.000000000000000000000000555111512312578

and the cycle ends

and if we do this experiment:

void OnStart() {
   for(double x = 0.0; x <= 1.0; x += 0.01) {
      printf("x = %10.60f", x);
   }
}

then the result of the last iteration:

2020.01.05 16:51:40.480 TestDouble (EURUSD,M1)  x = 0.970000000000000639488462184090167284011840820312500000000000
2020.01.05 16:51:40.480 TestDouble (EURUSD,M1)  x = 0.980000000000000648370246381091419607400894165039062500000000
2020.01.05 16:51:40.480 TestDouble (EURUSD,M1)  x = 0.990000000000000657252030578092671930789947509765625000000000

But if we change double to float, the result will be:

2020.01.05 16:53:06.926 TestDouble (EURUSD,M1)  x = 0.979999363422393798828125000000000000000000000000000000000000
2020.01.05 16:53:06.926 TestDouble (EURUSD,M1)  x = 0.989999353885650634765625000000000000000000000000000000000000
2020.01.05 16:53:06.926 TestDouble (EURUSD,M1)  x = 0.999999344348907470703125000000000000000000000000000000000000

because 0.01 for double is greater than 0.01, and for float is less than

 
Nikolai Semko:

It's as simple as that:

0.1 in type double is really 0.100000000000000000000005511151231257827021181583404541015625, that is larger than 0.1

hence? at the last check it will already be more than 20, more precisely 10+100*0.10000000000000000000000000055511151231257827021181583404541015625 ~ 20.0000000000000000000000000555111512312578

and the cycle ends

OK, got it.

yes, the for() loop will iterate and compare the condition, the issue is resolved

you can show this code as an example:

void OnStart()
{
   for(int x = 10; x <= 20; x += 1) {
      printf("x = %10.60f", x);
      Sleep(111);
   }
}

2020.01.06 01:48:50.513 tst_double (EURUSD,H1) x = 10.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

2020.01.06 01:48:50.642 tst_double (EURUSD,H1) x = 11.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

2020.01.06 01:48:50.767 tst_double (EURUSD,H1) x = 12.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

2020.01.06 01:48:50.892 tst_double (EURUSD,H1) x = 13.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

2020.01.06 01:48:51.017 tst_double (EURUSD,H1) x = 14.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

2020.01.06 01:48:51.142 tst_double (EURUSD,H1) x = 15.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

2020.01.06 01:48:51.267 tst_double (EURUSD,H1) x = 16.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

2020.01.06 01:48:51.392 tst_double (EURUSD,H1) x = 17.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

2020.01.06 01:48:51.517 tst_double (EURUSD,H1) x = 18.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

2020.01.06 01:48:51.642 tst_double (EURUSD,H1) x = 19.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

2020.01.06 01:48:51.767 tst_double (EURUSD,H1) x = 20.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000


as expected, the loop was terminated when it reached 20

 
Nikolai Semko:

It's a question that comes up all the time.
Everyone is always talking about IEEE Standard 754, but often when people go to wikipedia - either because of complexity, or because of laziness, they leave without understanding the meaning of the standard.

I will spend a little time to try to explain this standard as briefly as possible and in simple words, in order to refer to this post in the future.

I thank you, from the bottom of my heart! Thank you!

This message can be referred to not only as the workings of double numbers, but also as an example, a competent, understandable answer to the user, without sending googling.

 
Igor Makanu:

So you are suggesting that those who post on the Market should be ignored? I'm not sure I would want to do that, there was a question, there was a discussion, I think it's a normal situation

PS:

on top of that .... try to unprint double via printf(), I have a suspicion, there will be a lot of "how many wondrous discoveries the spirit of enlightenment prepares for us..."

;)

I haven't suggested anything or called anyone to anything. I just think that you should read more often on the forum, not only what you yourself have written, but also what others have written. Especially if some of the really inexperienced ask questions. For it is in these questions and answers can learn a lot for themselves. You can even find an answer to the question that did not even occur to you. About this standard IEEE 754 personally I learnedmuch earlier, just reading the questions of beginners. Real beginners... That was the message was addressed to Vladimir in response to you.

 
Alexey Viktorov:

I haven't suggested anything or called anyone to anything. I just think that you should read more often on the forum, not only what you yourself have written, but also what others have written. Especially if some of the really inexperienced ask questions. For it is in these questions and answers can learn a lot for themselves. You can even find an answer to the question that did not even occur to you. About this standard IEEE 754 personally I learnedmuch earlier, just reading the questions of beginners. Real beginners... That was the message was addressed to Vladimir in response to you.

I will add my 5 cents. Everything is IMHO. It's very strange to do more than one year of programming and not study the base, while floating-point number maths is exactly the base. So, only docks and standards will save the fathers of Russian (and not only) democracy. Smoke them thoughtfully.
 
Vladimir Pastushak:

I thank you, from the bottom of my heart! Thank you!

You can refer to this post not only as the workings of double numbers, but also as an example, of a competent, understandable answer to a user, without sending googling.

You're welcome :)

 

I don't often look for arrow codes, but they are incredibly hard to find in the help!

It's a table with asterisks, circles, etc.

And the search returns anything but the right one!

Reason: