<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Minssuy RSS Feed]]></title><description><![CDATA[Learning game development and sharing what I learn.]]></description><link>https://minssuy.com</link><generator>GatsbyJS</generator><lastBuildDate>Sat, 02 May 2026 10:13:59 GMT</lastBuildDate><item><title><![CDATA[0.1 + 1.1 == 1.2 는 True 이다.]]></title><description><![CDATA[편견 이 질문은, 소수점을 다루는 개발자라면 한번씩은 접해보는 문제입니다.
많은 사람들이 말하길,  는  라고 합니다.
그럼, 제가 질문을 살짝 바꿔 다시 여쭤보겠습니다.  는  가 확실한가요? 문제 본문은 Unity 엔진의 C…]]></description><link>https://minssuy.com/CS/Floating-Point-Precision/</link><guid isPermaLink="false">https://minssuy.com/CS/Floating-Point-Precision/</guid><pubDate>Thu, 16 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;편견&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#%ED%8E%B8%EA%B2%AC&quot; aria-label=&quot;편견 permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;편견&lt;/strong&gt;&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;이 질문은, 소수점을 다루는 개발자라면 한번씩은 접해보는 문제입니다.&lt;br&gt;
많은 사람들이 말하길, &lt;code class=&quot;language-text&quot;&gt;0.1 + 1.1 == 1.2&lt;/code&gt; 는 &lt;code class=&quot;language-text&quot;&gt;False&lt;/code&gt; 라고 합니다.&lt;br&gt;
그럼, 제가 질문을 살짝 바꿔 다시 여쭤보겠습니다.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;0.1 + 1.1 == 1.2&lt;/code&gt; 는 &lt;code class=&quot;language-text&quot;&gt;False&lt;/code&gt; 가 &lt;strong&gt;확실한가요?&lt;/strong&gt;&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;문제&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#%EB%AC%B8%EC%A0%9C&quot; aria-label=&quot;문제 permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;문제&lt;/strong&gt;&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;본문은 Unity 엔진의 C# 문법을 기준으로 설명하겠습니다.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;csharp&quot;&gt;&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code class=&quot;language-csharp&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Test&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token type-list&quot;&gt;&lt;span class=&quot;token class-name&quot;&gt;MonoBehaviour&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token class-name&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;float&lt;/span&gt;&lt;/span&gt; a &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0.1f&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token class-name&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;float&lt;/span&gt;&lt;/span&gt; b &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1.1f&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;token return-type class-name&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;void&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;Start&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;token class-name&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;float&lt;/span&gt;&lt;/span&gt; c &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; a &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; b&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        Debug&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;Log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;c &lt;span class=&quot;token operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1.2f&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// result is true? false?&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;잠시 스크롤을 멈추고, 코드를 보고 질문에 답해주시기 바랍니다.&lt;br&gt;
위의 코드에서, &lt;code class=&quot;language-text&quot;&gt;Debug.Log(c == 1.2f)&lt;/code&gt; 의 출력은 &lt;code class=&quot;language-text&quot;&gt;True&lt;/code&gt; 와 &lt;code class=&quot;language-text&quot;&gt;False&lt;/code&gt; 중에 어떤 것으로 나오게 될까요?&lt;/p&gt;
&lt;p&gt;5초 정도 시간을 드리겠습니다.&lt;/p&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;충분히 생각해보셨나요? 이 내용을 아는 분께선 5초라는 시간도 길었을 지도 모르겠습니다.&lt;br&gt;
그럼 직접 실행시켜보겠습니다.
&lt;br&gt;&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 562px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 81.66666666666667%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAQCAYAAAAWGF8bAAAACXBIWXMAAA7DAAAOwwHHb6hkAAACs0lEQVR42n1T227TQBT0T6AmpaRN4rvX6/XdsePECZSqFaJCQkLiAR74Dt6gAiT4G75vmN0kbUAVDyOfXe/OzjlnjuXEBcJ8CSeIMfcTyFRCpQmGasDQbTAsN1gvt7i6eYdu/RL14hp58RxpNkCqDnYgeS9GkOQQagHLETn8dAEnlLBDBU9IkqZo0xxxlEJGCjLOkfIBn2el6qGyNc8sIeRiTyjhCkVROay5LzD3BAkTA33AJck8klilNTZ5hyTrERQbyHrAzAsw9SN+Cd49KPTijPcqWHpD45jQEylcxjmVlbJEGFdwZI0wW8AIIIEdJHvIexG2n/1NeIg9LZ/rSFao2zWabkDVrpAUDUrGedPDj9M9sbzH1JEPhC7r5YS6DhIBDzt8sctbDGWHrmxRtlu43PeIQOY7RUdkdqgJk2NCdZSyMmnbIoPgWjGee7EpQyhKc+ZQv0cJtXTBBkSq2BWYBKHMqEZhWV/iZnWLprpEW25RF0tk7RVt07DrCaEMvCh5SFmT+EzDqOJaHwi59tkQL8r4rdiYEgFto5V42rtsmFb8gEMN6SGbhKYm+5R9KgtETGvE+64Kk+KhCfr7b0NsDsbUibXCnYd8vqjdrouuyXWTvAPi3JzR8WOu0PHUCXAxF7Aq2iApWlPsuClR9D0K2qJcrDhKBYlpH5VDlbWJNfR+yMezmqYv6v1/Tg1H14o5dud2xC4mBCfE32HGtScKxFlrahkmtVk3/QtjITtI6U3OdLmi8sI01Y4Gpuz2mNkNJucZxmMfo7F3BBcnI2J8DMfsH/6NRh7GpwHh42xSwBLFewTqLZL6I7zkDWbBjcE0uMY8fIWnsx4nk+oR1HhylsERryGrD/D3HNbtp99wNz932P7CdPUDk+U3XPTf8ay7w2nz5f9YfMXTxR3GxKz9jD9Xk+6/ZXDxYAAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Console&quot;
        title=&quot;&quot;
        src=&quot;/static/85faafcd24bc180d04ea6a886e34fdad/6e88f/Console.png&quot;
        srcset=&quot;/static/85faafcd24bc180d04ea6a886e34fdad/e9ff0/Console.png 180w,
/static/85faafcd24bc180d04ea6a886e34fdad/f21e7/Console.png 360w,
/static/85faafcd24bc180d04ea6a886e34fdad/6e88f/Console.png 562w&quot;
        sizes=&quot;(max-width: 562px) 100vw, 562px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
&lt;em&gt;Result is True&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;그림의 아래쪽을 보니, 콘솔창에 &lt;code class=&quot;language-text&quot;&gt;True&lt;/code&gt; 라고 적혀있습니다.&lt;br&gt;
최소한 저는 &lt;code class=&quot;language-text&quot;&gt;소수 + 소수&lt;/code&gt; 는 제대로 동작하지 않는다고 배웠기 때문에, &lt;code class=&quot;language-text&quot;&gt;False&lt;/code&gt; 라고 예측했습니다.&lt;/p&gt;
&lt;p&gt;그렇다면, 컴퓨터와 그렇게 알려준 사람들 중 누가 거짓말을 하고있는걸까요?&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;저장&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#%EC%A0%80%EC%9E%A5&quot; aria-label=&quot;저장 permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;저장&lt;/strong&gt;&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;이러한 일이 일어난 이유를 알기 위해선, 컴퓨터가 어떤식으로 소수를 저장하는지 먼저 알아야합니다.&lt;/p&gt;
&lt;p&gt;소수는 &lt;code class=&quot;language-text&quot;&gt;float&lt;/code&gt; 라는 자료형으로 값을 저장할 수 있고, &lt;code class=&quot;language-text&quot;&gt;4 Byte&lt;/code&gt; 크기를 가집니다.&lt;br&gt;
&lt;code class=&quot;language-text&quot;&gt;float&lt;/code&gt;는 아래의 그림과 같이 &lt;code class=&quot;language-text&quot;&gt;RAM&lt;/code&gt; 에 부호, 지수부, 가수부라는 공간으로 나누어 저장합니다.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 720px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 52.77777777777778%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAB+ElEQVR42o2SS2/bMBCE/c/aWwMUsSWK75eoZ2IbTntLgF76z6ezKtpeexBW3P043FnyZOsC21aobUTXPNSS0E0B3RyhGFXx0I3/lbUpomde6sJdmkTmDj5gSA6ny+Mnzo8f6G47VK/gc4ayFtY6nLeETzeHp+8Vn++OQhHWUdgYBHLdMMClCEO285YHeAq+feD52zvsY0UICnVOCMUgV4ewRpxfLfw9o98s4hKY9xQzGMn5pFF4SCoObrRQIti9NOhrw/0RMTaD/SVhmi2W1WPfApZR47qnI24r18xJXbg2GWx7xLx4bIvBmjU7NBqanU2zwflMy54zUcxpC209vl4GGJ/xfGHOuCPf98PBXS49HBk1GFilsIUep/0e8HLzuHNePkRM04ScEnKp2KeCezV4LBnXYjGPFaVWJNaFizGitUa2oOWInSM4ZatgNIcceEscskBGuuagNwIf8Qvex47xCS1YGF6K1voQPXjuM7zEYAZsUeFUAwfK9itPcc6hsgPvPRKFUy4YaCnXdthPvFkRkrpwwhfuC2QLdfY4UDBSkFalYAUQkBsEyhSQTeP4e7MIRgpKXTjhxa4X9o9gomXNdxUjH6nq2UHkWlOANoKnLXXkJHrvjk/r4cgJ/8+yoiAt37LCa1K45uGIt6L/rv83d0R+xWn8AhTsxENM9X4VAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Float&quot;
        title=&quot;&quot;
        src=&quot;/static/028023c40fe01f85965582d26e7bac88/37523/Float.png&quot;
        srcset=&quot;/static/028023c40fe01f85965582d26e7bac88/e9ff0/Float.png 180w,
/static/028023c40fe01f85965582d26e7bac88/f21e7/Float.png 360w,
/static/028023c40fe01f85965582d26e7bac88/37523/Float.png 720w,
/static/028023c40fe01f85965582d26e7bac88/302a4/Float.png 1080w,
/static/028023c40fe01f85965582d26e7bac88/c1b63/Float.png 1200w&quot;
        sizes=&quot;(max-width: 720px) 100vw, 720px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
&lt;em&gt;Ram (4 byte, 32 bit)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;32 bit&lt;/code&gt; 중  &lt;code class=&quot;language-text&quot;&gt;1 bit&lt;/code&gt; 는 값의 부호를, &lt;code class=&quot;language-text&quot;&gt;8 bit&lt;/code&gt; 는 지수부, 남은 &lt;code class=&quot;language-text&quot;&gt;23 bit&lt;/code&gt; 는 가수부로 사용되는 모습을 확인할 수 있습니다. 부호는 알지만, 지수부와 가수부라는 어려운 단어를 보니 벌써부터 머리가 아픈 느낌이 듭니다.&lt;br&gt;
머리와 눈이 조금 아플 수 있습니다만, 이것들을 순서대로 하나씩 알아보겠습니다.&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;예시&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#%EC%98%88%EC%8B%9C&quot; aria-label=&quot;예시 permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;예시&lt;/strong&gt;&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;11.25&lt;/code&gt; 라는 소수가 있습니다. 이 숫자가 &lt;code class=&quot;language-text&quot;&gt;float&lt;/code&gt; 자료형에 어떻게 저장되는지 살펴보겠습니다.&lt;/p&gt;
&lt;br&gt;
&lt;h3 id=&quot;1-이진법-변환&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#1-%EC%9D%B4%EC%A7%84%EB%B2%95-%EB%B3%80%ED%99%98&quot; aria-label=&quot;1 이진법 변환 permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;1. 이진법 변환&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;현재 &lt;code class=&quot;language-text&quot;&gt;11.25&lt;/code&gt; 는 십진법으로 표기되어있습니다. 이것을 이진법으로 표현하겠습니다.&lt;/p&gt;
&lt;div class=&quot;math math-display&quot;&gt;&lt;span class=&quot;katex-display&quot;&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-mathml&quot;&gt;&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mtable rowspacing=&quot;0.25em&quot; columnalign=&quot;right left&quot; columnspacing=&quot;0em&quot;&gt;&lt;mtr&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mn&gt;11&lt;/mn&gt;&lt;mo&gt;÷&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mrow&gt;&lt;/mrow&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;5&lt;/mn&gt;&lt;mo&gt;⋯&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;/mtr&gt;&lt;mtr&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mn&gt;5&lt;/mn&gt;&lt;mo&gt;÷&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mrow&gt;&lt;/mrow&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mo&gt;⋯&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;/mtr&gt;&lt;mtr&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mo&gt;÷&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mrow&gt;&lt;/mrow&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;⋯&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;/mtr&gt;&lt;mtr&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;÷&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mrow&gt;&lt;/mrow&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo&gt;⋯&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;/mtr&gt;&lt;/mtable&gt;&lt;mspace width=&quot;1em&quot;&gt;&lt;/mspace&gt;&lt;mo&gt;⇒&lt;/mo&gt;&lt;mspace width=&quot;1em&quot;&gt;&lt;/mspace&gt;&lt;mn&gt;1011&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&quot;application/x-tex&quot;&gt;\begin{aligned}
11 \div 2 &amp;#x26;= 5 \cdots 1 \\
5 \div 2 &amp;#x26;= 2 \cdots 1 \\
2 \div 2 &amp;#x26;= 1 \cdots 0 \\
1 \div 2 &amp;#x26;= 0 \cdots 1
\end{aligned}
\quad \Rightarrow \quad 1011&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:5.7em;vertical-align:-2.6em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mtable&quot;&gt;&lt;span class=&quot;col-align-r&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:3.1em;&quot;&gt;&lt;span style=&quot;top:-5.26em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;11&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;÷&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.76em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;÷&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.26em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;÷&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-0.76em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;÷&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:2.6em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:3.1em;&quot;&gt;&lt;span style=&quot;top:-5.26em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;⋯&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.76em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;⋯&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.26em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;⋯&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-0.76em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;⋯&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:2.6em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:1em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;⇒&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:1em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1011&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;math math-display&quot;&gt;&lt;span class=&quot;katex-display&quot;&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-mathml&quot;&gt;&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mtable rowspacing=&quot;0.25em&quot; columnalign=&quot;right left&quot; columnspacing=&quot;0em&quot;&gt;&lt;mtr&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mn&gt;0.25&lt;/mn&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mrow&gt;&lt;/mrow&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0.5&lt;/mn&gt;&lt;mspace width=&quot;1em&quot;&gt;&lt;/mspace&gt;&lt;mo&gt;⇒&lt;/mo&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;/mtr&gt;&lt;mtr&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mn&gt;0.5&lt;/mn&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mrow&gt;&lt;/mrow&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;1.0&lt;/mn&gt;&lt;mspace width=&quot;1em&quot;&gt;&lt;/mspace&gt;&lt;mo&gt;⇒&lt;/mo&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;/mtr&gt;&lt;/mtable&gt;&lt;mspace width=&quot;1em&quot;&gt;&lt;/mspace&gt;&lt;mo&gt;⇒&lt;/mo&gt;&lt;mspace width=&quot;1em&quot;&gt;&lt;/mspace&gt;&lt;mn&gt;.01&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&quot;application/x-tex&quot;&gt;\begin{aligned}
0.25 \times 2 &amp;#x26;= 0.5 \quad \Rightarrow 0 \\
0.5 \times 2 &amp;#x26;= 1.0 \quad \Rightarrow 1
\end{aligned}
\quad \Rightarrow \quad .01&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:2.7em;vertical-align:-1.1em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mtable&quot;&gt;&lt;span class=&quot;col-align-r&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.6em;&quot;&gt;&lt;span style=&quot;top:-3.76em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;0.25&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;×&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.26em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;0.5&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;×&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.1em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.6em;&quot;&gt;&lt;span style=&quot;top:-3.76em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0.5&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:1em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;⇒&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.26em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1.0&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:1em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;⇒&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.1em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:1em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;⇒&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:1em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;.01&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;math math-display&quot;&gt;&lt;span class=&quot;katex-display&quot;&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-mathml&quot;&gt;&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mn&gt;11.25&lt;/mn&gt;&lt;mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mn&gt;10&lt;/mn&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/msub&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;msub&gt;&lt;mn&gt;1011.01&lt;/mn&gt;&lt;mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding=&quot;application/x-tex&quot;&gt;11.25_{(10)} = 1011.01_{(2)}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.9996em;vertical-align:-0.3552em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;11.2&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3448em;&quot;&gt;&lt;span style=&quot;top:-2.5198em;margin-left:0em;margin-right:0.05em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3552em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.9996em;vertical-align:-0.3552em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1011.0&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3448em;&quot;&gt;&lt;span style=&quot;top:-2.5198em;margin-left:0em;margin-right:0.05em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3552em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br&gt;
&lt;h3 id=&quot;2-정규화&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#2-%EC%A0%95%EA%B7%9C%ED%99%94&quot; aria-label=&quot;2 정규화 permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;2. 정규화&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;가장 왼쪽에 있는 &lt;code class=&quot;language-text&quot;&gt;1&lt;/code&gt; 을 기준으로 하여, 바로 뒤에 점을 찍고, 옮긴 칸 수 만큼 지수를 곱합니다.&lt;br&gt;
이 과정을 정규화 &lt;code class=&quot;language-text&quot;&gt;Normalization&lt;/code&gt; 라고 하며, 앞부분 &lt;code class=&quot;language-text&quot;&gt;1.01101&lt;/code&gt; 을 가수부, &lt;code class=&quot;language-text&quot;&gt;2³&lt;/code&gt; 를 지수부 라고 부릅니다.&lt;/p&gt;
&lt;div class=&quot;math math-display&quot;&gt;&lt;span class=&quot;katex-display&quot;&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-mathml&quot;&gt;&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mn&gt;1011.01&lt;/mn&gt;&lt;mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/msub&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mn&gt;1.01101&lt;/mn&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;msup&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mn&gt;3&lt;/mn&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding=&quot;application/x-tex&quot;&gt;1011.01_{(2)} \;=\; 1.01101 \times 2^{3}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.9996em;vertical-align:-0.3552em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1011.0&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3448em;&quot;&gt;&lt;span style=&quot;top:-2.5198em;margin-left:0em;margin-right:0.05em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3552em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1.01101&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;×&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8641em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8641em;&quot;&gt;&lt;span style=&quot;top:-3.113em;margin-right:0.05em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;가수부(Mantissa)&lt;/strong&gt; : 실제 수치를 담고 있는 중요한 부분 &lt;code class=&quot;language-text&quot;&gt;1.01101&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;지수부(Exponent)&lt;/strong&gt; : 가수부에 얼만큼 곱할건지 결정하는 부분 &lt;code class=&quot;language-text&quot;&gt;2³&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br&gt;
&lt;h3 id=&quot;3-값-저장&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#3-%EA%B0%92-%EC%A0%80%EC%9E%A5&quot; aria-label=&quot;3 값 저장 permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;3. 값 저장&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;가수부와 지수부로 분리하였으니, 이것을 램에 저장해보겠습니다.&lt;br&gt;
첫번째 칸의 부호는, 양수일 땐 &lt;code class=&quot;language-text&quot;&gt;0&lt;/code&gt; 이고 음수일 땐 &lt;code class=&quot;language-text&quot;&gt;1&lt;/code&gt; 로 표기됩니다.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th align=&quot;center&quot;&gt;필드&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;계산값&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;저장값 (RAM)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;부호 (1 bit)&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;+&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;0&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;지수부 (8 bit)&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;3&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;10000010&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;가수부 (23 bit)&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;1.01101&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;01101000000000000000000&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;잠깐! 여기서 읽는 것을 멈추시고, 표를 다시 한번 확인해보시기 바랍니다. 제가 숫자를 제대로 기입했나요?&lt;/p&gt;
&lt;p&gt;저장된 가수부를 자세히 보면, 앞자리의 &lt;code class=&quot;language-text&quot;&gt;1&lt;/code&gt; 이 사라진 것을 알 수 있습니다.&lt;br&gt;
지수부는 어떤식으로 계산이 된건지 모르겠지만, &lt;code class=&quot;language-text&quot;&gt;10000010&lt;/code&gt; 라는 값으로 저장되어 있습니다.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;컴퓨터는 왜 이렇게 저장했을까요?&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;지수부의-bias&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#%EC%A7%80%EC%88%98%EB%B6%80%EC%9D%98-bias&quot; aria-label=&quot;지수부의 bias permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;지수부의 Bias&lt;/strong&gt;&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;지수부는 소수점을 얼만큼 이동시킬지 결정하는 부분이라고 했습니다.&lt;br&gt;
소수점을 오른쪽으로 이동하면 양의 지수, 왼쪽으로 이동하면 음의 지수가 필요합니다.&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;8 bit&lt;/code&gt; 로 표현할 수 있는 범위는 &lt;code class=&quot;language-text&quot;&gt;0 ~ 255&lt;/code&gt; 입니다.&lt;br&gt;
그런데 음의 지수도 표현해야 하는데, 이 범위에는 음수가 없습니다.&lt;/p&gt;
&lt;p&gt;그래서 &lt;code class=&quot;language-text&quot;&gt;127&lt;/code&gt; 을 기준점으로 정하고, 아래와 같이 나누어 사용합니다.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th align=&quot;center&quot;&gt;저장값&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;의미&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;0&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;특수값&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;1 ~ 126&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;음의 지수&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;127&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;0승&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;128 ~ 254&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;양의 지수&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;255&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;특수값 (∞, NaN)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;0&lt;/code&gt; 과 &lt;code class=&quot;language-text&quot;&gt;255&lt;/code&gt; 는 특수값으로, 지금은 몰라도 됩니다.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;핵심은, &lt;strong&gt;실제 지수에 127을 더한 값&lt;/strong&gt; 이 지수부에 저장된다는 것입니다. 이 기준값 &lt;code class=&quot;language-text&quot;&gt;127&lt;/code&gt; 을 &lt;strong&gt;Bias&lt;/strong&gt; 라고 부릅니다.&lt;/p&gt;
&lt;div class=&quot;math math-display&quot;&gt;&lt;span class=&quot;katex-display&quot;&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-mathml&quot;&gt;&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mtext&gt;지수부 저장값&lt;/mtext&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mtext&gt;실제 지수&lt;/mtext&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;127&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&quot;application/x-tex&quot;&gt;\text{지수부 저장값} = \text{실제 지수} + 127&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6833em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord hangul_fallback&quot;&gt;지수부&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mord hangul_fallback&quot;&gt;저장값&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7667em;vertical-align:-0.0833em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord hangul_fallback&quot;&gt;실제&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mord hangul_fallback&quot;&gt;지수&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;127&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br&gt;
&lt;p&gt;예시를 보면 더 쉽게 이해가 됩니다.&lt;/p&gt;
&lt;div class=&quot;math math-display&quot;&gt;&lt;span class=&quot;katex-display&quot;&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-mathml&quot;&gt;&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;semantics&gt;&lt;mtable rowspacing=&quot;0.25em&quot; columnalign=&quot;right left&quot; columnspacing=&quot;0em&quot;&gt;&lt;mtr&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;7&lt;/mn&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;127&lt;/mn&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mrow&gt;&lt;/mrow&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;120&lt;/mn&gt;&lt;mspace width=&quot;1em&quot;&gt;&lt;/mspace&gt;&lt;mo&gt;⇒&lt;/mo&gt;&lt;mspace width=&quot;1em&quot;&gt;&lt;/mspace&gt;&lt;msub&gt;&lt;mn&gt;01111000&lt;/mn&gt;&lt;mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;/mtr&gt;&lt;mtr&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mphantom&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;/mphantom&gt;&lt;mn&gt;0&lt;/mn&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;127&lt;/mn&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mrow&gt;&lt;/mrow&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;127&lt;/mn&gt;&lt;mspace width=&quot;1em&quot;&gt;&lt;/mspace&gt;&lt;mo&gt;⇒&lt;/mo&gt;&lt;mspace width=&quot;1em&quot;&gt;&lt;/mspace&gt;&lt;msub&gt;&lt;mn&gt;01111111&lt;/mn&gt;&lt;mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;/mtr&gt;&lt;mtr&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mphantom&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;/mphantom&gt;&lt;mn&gt;3&lt;/mn&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;127&lt;/mn&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mrow&gt;&lt;/mrow&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;130&lt;/mn&gt;&lt;mspace width=&quot;1em&quot;&gt;&lt;/mspace&gt;&lt;mo&gt;⇒&lt;/mo&gt;&lt;mspace width=&quot;1em&quot;&gt;&lt;/mspace&gt;&lt;msub&gt;&lt;mn&gt;10000010&lt;/mn&gt;&lt;mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;/mtr&gt;&lt;/mtable&gt;&lt;annotation encoding=&quot;application/x-tex&quot;&gt;\begin{aligned}
-7 + 127 &amp;#x26;= 120 \quad \Rightarrow \quad 01111000_{(2)} \\
\phantom{-}0 + 127 &amp;#x26;= 127 \quad \Rightarrow \quad 01111111_{(2)} \\
\phantom{-}3 + 127 &amp;#x26;= 130 \quad \Rightarrow \quad 10000010_{(2)}
\end{aligned}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:4.2em;vertical-align:-1.85em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mtable&quot;&gt;&lt;span class=&quot;col-align-r&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:2.35em;&quot;&gt;&lt;span style=&quot;top:-4.51em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;127&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.01em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot; style=&quot;color:transparent;&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;127&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-1.51em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot; style=&quot;color:transparent;&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;127&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.85em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:2.35em;&quot;&gt;&lt;span style=&quot;top:-4.51em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;120&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:1em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;⇒&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:1em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0111100&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3448em;&quot;&gt;&lt;span style=&quot;top:-2.5198em;margin-left:0em;margin-right:0.05em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3552em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3.01em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;127&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:1em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;⇒&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:1em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0111111&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3448em;&quot;&gt;&lt;span style=&quot;top:-2.5198em;margin-left:0em;margin-right:0.05em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3552em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-1.51em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;130&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:1em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;⇒&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:1em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1000001&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3448em;&quot;&gt;&lt;span style=&quot;top:-2.5198em;margin-left:0em;margin-right:0.05em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3552em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.85em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br&gt;
&lt;p&gt;아까 예시에서 지수부에 &lt;code class=&quot;language-text&quot;&gt;10000010&lt;/code&gt; 이 저장된 이유가 바로 이것입니다.&lt;br&gt;
&lt;code class=&quot;language-text&quot;&gt;3 + 127 = 130&lt;/code&gt;, 그리고 &lt;code class=&quot;language-text&quot;&gt;130&lt;/code&gt; 을 2진법으로 변환하면 &lt;code class=&quot;language-text&quot;&gt;10000010&lt;/code&gt; 이 됩니다.&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;가수부의-hidden-bit--implicit-bit&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#%EA%B0%80%EC%88%98%EB%B6%80%EC%9D%98-hidden-bit--implicit-bit&quot; aria-label=&quot;가수부의 hidden bit  implicit bit permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;가수부의 Hidden Bit / Implicit Bit&lt;/strong&gt;&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;이번엔 가수부가 &lt;code class=&quot;language-text&quot;&gt;1.01101&lt;/code&gt; 이 아닌 &lt;code class=&quot;language-text&quot;&gt;01101&lt;/code&gt; 로 저장된 이유를 알아보겠습니다.&lt;/p&gt;
&lt;p&gt;정규화 과정에서 한 가지 패턴이 있습니다. 정규화된 이진수는 &lt;strong&gt;항상&lt;/strong&gt; &lt;code class=&quot;language-text&quot;&gt;1.&lt;/code&gt; &lt;strong&gt;로 시작&lt;/strong&gt; 한다는 것입니다.&lt;/p&gt;
&lt;div class=&quot;math math-display&quot;&gt;&lt;span class=&quot;katex-display&quot;&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-mathml&quot;&gt;&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;semantics&gt;&lt;mtable rowspacing=&quot;0.25em&quot; columnalign=&quot;right left&quot; columnspacing=&quot;0em&quot;&gt;&lt;mtr&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mn&gt;11.25&lt;/mn&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mrow&gt;&lt;/mrow&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo&gt;→&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mn&gt;1011.01&lt;/mn&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo&gt;→&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mn mathvariant=&quot;bold&quot;&gt;1.01101&lt;/mn&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;msup&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mn&gt;3&lt;/mn&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;/mtr&gt;&lt;mtr&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mn&gt;0.40625&lt;/mn&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;mtd&gt;&lt;mstyle scriptlevel=&quot;0&quot; displaystyle=&quot;true&quot;&gt;&lt;mrow&gt;&lt;mrow&gt;&lt;/mrow&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo&gt;→&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mn&gt;0.01101&lt;/mn&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo&gt;→&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mn mathvariant=&quot;bold&quot;&gt;1.101&lt;/mn&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;msup&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mrow&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;/mstyle&gt;&lt;/mtd&gt;&lt;/mtr&gt;&lt;/mtable&gt;&lt;annotation encoding=&quot;application/x-tex&quot;&gt;\begin{aligned}
11.25 &amp;#x26;\;\rightarrow\; 1011.01 \;\rightarrow\; \mathbf{1}.01101 \times 2^{3} \\
0.40625 &amp;#x26;\;\rightarrow\; 0.01101 \;\rightarrow\; \mathbf{1}.101 \times 2^{-2}
\end{aligned}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:2.7482em;vertical-align:-1.1241em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mtable&quot;&gt;&lt;span class=&quot;col-align-r&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.6241em;&quot;&gt;&lt;span style=&quot;top:-3.76em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;11.25&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.2359em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;0.40625&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.1241em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;col-align-l&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.6241em;&quot;&gt;&lt;span style=&quot;top:-3.76em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;→&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1011.01&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;→&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathbf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;.01101&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;×&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8641em;&quot;&gt;&lt;span style=&quot;top:-3.113em;margin-right:0.05em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-2.2359em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;→&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0.01101&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;→&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathbf&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;.101&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;×&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8641em;&quot;&gt;&lt;span style=&quot;top:-3.113em;margin-right:0.05em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.1241em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br&gt;
&lt;p&gt;맨 앞의 &lt;code class=&quot;language-text&quot;&gt;1&lt;/code&gt; 은 어떤 수를 정규화해도 반드시 존재합니다. 그렇다면, 굳이 저장할 필요가 없지 않을까요?&lt;br&gt;
그래서 이 &lt;code class=&quot;language-text&quot;&gt;1.&lt;/code&gt; 부분은 &lt;strong&gt;있다고 약속&lt;/strong&gt; 하고, 실제 메모리에는 소수점 이하만 저장합니다.&lt;br&gt;
&lt;code class=&quot;language-text&quot;&gt;CPU&lt;/code&gt; 가 값을 읽을 때 자동으로 맨 앞에 &lt;code class=&quot;language-text&quot;&gt;1.&lt;/code&gt; 을 붙여 계산합니다.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;이렇게 숨겨진 &lt;code class=&quot;language-text&quot;&gt;1&lt;/code&gt; 을 &lt;strong&gt;Hidden Bit&lt;/strong&gt; 또는 &lt;strong&gt;Implicit Bit&lt;/strong&gt; 라고 합니다.&lt;br&gt;
덕분에 가수부는 &lt;code class=&quot;language-text&quot;&gt;23 bit&lt;/code&gt; 를 가지지만, 숨겨진 &lt;code class=&quot;language-text&quot;&gt;1&lt;/code&gt; 을 포함하면 실제로는 &lt;strong&gt;24 bit 의 정밀도&lt;/strong&gt; 를 가집니다.&lt;br&gt;
공짜로 &lt;code class=&quot;language-text&quot;&gt;1 bit&lt;/code&gt; 를 얻은 셈입니다.&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;계산&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#%EA%B3%84%EC%82%B0&quot; aria-label=&quot;계산 permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;계산&lt;/strong&gt;&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;그렇다면 저희가 궁금한 &lt;code class=&quot;language-text&quot;&gt;0.1 + 1.1&lt;/code&gt; 은 실제로 어떻게 계산될까요?&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;10진법&lt;/code&gt; 의 &lt;code class=&quot;language-text&quot;&gt;0.1&lt;/code&gt; 을 &lt;code class=&quot;language-text&quot;&gt;2진법&lt;/code&gt; 으로 변환하면, 아래와 같이 무한히 반복되는 순환소수가 됩니다.&lt;/p&gt;
&lt;div class=&quot;math math-display&quot;&gt;&lt;span class=&quot;katex-display&quot;&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-mathml&quot;&gt;&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mn&gt;0.1&lt;/mn&gt;&lt;mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mn&gt;10&lt;/mn&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/msub&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mn&gt;0.000110011001100110011&lt;/mn&gt;&lt;msub&gt;&lt;mo&gt;…&lt;/mo&gt;&lt;mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding=&quot;application/x-tex&quot;&gt;0.1_{(10)} = 0.000110011001100110011\ldots_{(2)}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.9996em;vertical-align:-0.3552em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0.&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3448em;&quot;&gt;&lt;span style=&quot;top:-2.5198em;margin-left:0em;margin-right:0.05em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3552em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.9996em;vertical-align:-0.3552em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0.000110011001100110011&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;&lt;span class=&quot;minner&quot;&gt;…&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3448em;&quot;&gt;&lt;span style=&quot;top:-2.5198em;margin-left:0em;margin-right:0.05em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3552em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;float&lt;/code&gt; 의 가수부는 &lt;code class=&quot;language-text&quot;&gt;24 bit&lt;/code&gt; (Hidden Bit 포함) 이므로, 24번째 자리에서 반올림하여 저장됩니다.&lt;/p&gt;
&lt;div class=&quot;math math-display&quot;&gt;&lt;span class=&quot;katex-display&quot;&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-mathml&quot;&gt;&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;0.1&lt;/mn&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo&gt;≈&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;msub&gt;&lt;mn&gt;1.10011001100110011001101&lt;/mn&gt;&lt;mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/msub&gt;&lt;mo&gt;×&lt;/mo&gt;&lt;msup&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mrow&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mn&gt;4&lt;/mn&gt;&lt;/mrow&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding=&quot;application/x-tex&quot;&gt;0.1 \;\approx\; 1.10011001100110011001101_{(2)} \times 2^{-4}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0.1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;≈&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.9996em;vertical-align:-0.3552em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1.1001100110011001100110&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3448em;&quot;&gt;&lt;span style=&quot;top:-2.5198em;margin-left:0em;margin-right:0.05em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3552em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;×&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.8641em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.8641em;&quot;&gt;&lt;span style=&quot;top:-3.113em;margin-right:0.05em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;4&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br&gt;
&lt;p&gt;이를 다시 10진법으로 변환하면 아래와 같이 됩니다.&lt;/p&gt;
&lt;div class=&quot;math math-display&quot;&gt;&lt;span class=&quot;katex-display&quot;&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-mathml&quot;&gt;&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;0.1&lt;/mn&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo&gt;≈&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mn&gt;0.10000000149011612&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&quot;application/x-tex&quot;&gt;0.1 \;\approx\; 0.10000000149011612&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0.1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;≈&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0.10000000149011612&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br&gt;
&lt;p&gt;같은 방식으로 &lt;code class=&quot;language-text&quot;&gt;1.1&lt;/code&gt; 도 정확히 표현할 수 없습니다.&lt;/p&gt;
&lt;div class=&quot;math math-display&quot;&gt;&lt;span class=&quot;katex-display&quot;&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-mathml&quot;&gt;&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;1.1&lt;/mn&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo&gt;≈&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mn&gt;1.10000002384185791&lt;/mn&gt;&lt;/mrow&gt;&lt;annotation encoding=&quot;application/x-tex&quot;&gt;1.1 \;\approx\; 1.10000002384185791&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1.1&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;≈&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1.10000002384185791&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br&gt;
&lt;p&gt;이 둘을 더하면 아래와 같이 됩니다.&lt;/p&gt;
&lt;div class=&quot;math math-display&quot;&gt;&lt;span class=&quot;katex-display&quot;&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-mathml&quot;&gt;&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;0.10000000149&lt;/mn&gt;&lt;mo&gt;…&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mn&gt;1.10000002384&lt;/mn&gt;&lt;mo&gt;…&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mn&gt;1.20000002533&lt;/mn&gt;&lt;mo&gt;…&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&quot;application/x-tex&quot;&gt;0.10000000149\ldots \;+\; 1.10000002384\ldots \;=\; 1.20000002533\ldots&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7278em;vertical-align:-0.0833em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;0.10000000149&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;…&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1.10000002384&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;…&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1.20000002533&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;…&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br&gt;
&lt;p&gt;그런데 생각해보면, 수직선 위의 숫자는 무한히 존재하고, &lt;code class=&quot;language-text&quot;&gt;float&lt;/code&gt; 는 그 모든 값을 저장할 수 없습니다. 그래서 &lt;code class=&quot;language-text&quot;&gt;float&lt;/code&gt; 는 내부적으로 특정 값들만 미리 정해두고, 점처럼 띄엄띄엄 사용합니다.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;계산 결과인 &lt;code class=&quot;language-text&quot;&gt;1.20000002533&lt;/code&gt; 은 &lt;code class=&quot;language-text&quot;&gt;float&lt;/code&gt; 가 정해둔 점들 중 하나가 아닐 수 있습니다.&lt;br&gt;
예를 들어, &lt;code class=&quot;language-text&quot;&gt;C#&lt;/code&gt; 의 &lt;code class=&quot;language-text&quot;&gt;float&lt;/code&gt; 에선 &lt;code class=&quot;language-text&quot;&gt;1.20000004768&lt;/code&gt; 을 그 특정 값 중 하나로 두고 있다고 가정해봅시다.&lt;br&gt;
그럴 경우 컴퓨터는 &lt;code class=&quot;language-text&quot;&gt;1.20000002533&lt;/code&gt; 에 가장 가까운 점인 &lt;code class=&quot;language-text&quot;&gt;1.20000004768&lt;/code&gt; 을 찾아서 저장합니다.&lt;/p&gt;
&lt;p&gt;이 과정을 &lt;strong&gt;Rounding&lt;/strong&gt; 이라고 합니다.&lt;/p&gt;
&lt;div class=&quot;math math-display&quot;&gt;&lt;span class=&quot;katex-display&quot;&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-mathml&quot;&gt;&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;1.20000002533&lt;/mn&gt;&lt;mo&gt;…&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mover&gt;&lt;mo stretchy=&quot;true&quot; minsize=&quot;3.0em&quot;&gt;→&lt;/mo&gt;&lt;mpadded width=&quot;+0.6em&quot; lspace=&quot;0.3em&quot;&gt;&lt;mtext&gt;Rounding&lt;/mtext&gt;&lt;/mpadded&gt;&lt;/mover&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mn&gt;1.20000004768&lt;/mn&gt;&lt;mo&gt;…&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&quot;application/x-tex&quot;&gt;1.20000002533\ldots \;\xrightarrow{\text{Rounding}}\; 1.20000004768\ldots&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.1191em;vertical-align:-0.011em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1.20000002533&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;…&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel x-arrow&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.1081em;&quot;&gt;&lt;span style=&quot;top:-3.322em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight x-arrow-pad&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord text mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;Rounding&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;svg-align&quot; style=&quot;top:-2.689em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;hide-tail&quot; style=&quot;height:0.522em;min-width:1.469em;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;400em&quot; height=&quot;0.522em&quot; viewBox=&quot;0 0 400000 522&quot; preserveAspectRatio=&quot;xMaxYMin slice&quot;&gt;&lt;path d=&quot;M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
 151.7 139 205zm0 0v40h399900v-40z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.011em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1.20000004768&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;…&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br&gt;
&lt;p&gt;그리고 &lt;code class=&quot;language-text&quot;&gt;1.2f&lt;/code&gt; 를 &lt;code class=&quot;language-text&quot;&gt;float&lt;/code&gt; 에 저장할 때도 동일하게 반올림이 일어납니다.&lt;/p&gt;
&lt;div class=&quot;math math-display&quot;&gt;&lt;span class=&quot;katex-display&quot;&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-mathml&quot;&gt;&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mn&gt;1.2&lt;/mn&gt;&lt;mrow&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mn&gt;10&lt;/mn&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;/msub&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mover&gt;&lt;mo stretchy=&quot;true&quot; minsize=&quot;3.0em&quot;&gt;→&lt;/mo&gt;&lt;mpadded width=&quot;+0.6em&quot; lspace=&quot;0.3em&quot;&gt;&lt;mtext&gt;float 저장&lt;/mtext&gt;&lt;/mpadded&gt;&lt;/mover&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mn&gt;1.20000004768&lt;/mn&gt;&lt;mo&gt;…&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding=&quot;application/x-tex&quot;&gt;1.2_{(10)} \;\xrightarrow{\text{float 저장}}\; 1.20000004768\ldots&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.4633em;vertical-align:-0.3552em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1.&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;msupsub&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3448em;&quot;&gt;&lt;span style=&quot;top:-2.5198em;margin-left:0em;margin-right:0.05em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mopen mtight&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mtight&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;mclose mtight&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.3552em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel x-arrow&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.1081em;&quot;&gt;&lt;span style=&quot;top:-3.322em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight x-arrow-pad&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord text mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;float &lt;/span&gt;&lt;span class=&quot;mord hangul_fallback mtight&quot;&gt;저장&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;svg-align&quot; style=&quot;top:-2.689em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:2.7em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;hide-tail&quot; style=&quot;height:0.522em;min-width:1.469em;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;400em&quot; height=&quot;0.522em&quot; viewBox=&quot;0 0 400000 522&quot; preserveAspectRatio=&quot;xMaxYMin slice&quot;&gt;&lt;path d=&quot;M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
 151.7 139 205zm0 0v40h399900v-40z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.011em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6444em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1.20000004768&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.1667em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner&quot;&gt;…&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br&gt;
&lt;p&gt;결국 두 값은 완전히 동일합니다.&lt;/p&gt;
&lt;div class=&quot;math math-display&quot;&gt;&lt;span class=&quot;katex-display&quot;&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-mathml&quot;&gt;&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;munder&gt;&lt;munder&gt;&lt;mrow&gt;&lt;mn&gt;0.1&lt;/mn&gt;&lt;mtext&gt;f&lt;/mtext&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mn&gt;1.1&lt;/mn&gt;&lt;mtext&gt;f&lt;/mtext&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;true&quot;&gt;⏟&lt;/mo&gt;&lt;/munder&gt;&lt;mrow&gt;&lt;mn&gt;1.20000004768&lt;/mn&gt;&lt;mo&gt;…&lt;/mo&gt;&lt;/mrow&gt;&lt;/munder&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mtext&gt;  &lt;/mtext&gt;&lt;munder&gt;&lt;munder&gt;&lt;mrow&gt;&lt;mn&gt;1.2&lt;/mn&gt;&lt;mtext&gt;f&lt;/mtext&gt;&lt;/mrow&gt;&lt;mo stretchy=&quot;true&quot;&gt;⏟&lt;/mo&gt;&lt;/munder&gt;&lt;mrow&gt;&lt;mn&gt;1.20000004768&lt;/mn&gt;&lt;mo&gt;…&lt;/mo&gt;&lt;/mrow&gt;&lt;/munder&gt;&lt;mspace width=&quot;1em&quot;&gt;&lt;/mspace&gt;&lt;mo&gt;⇒&lt;/mo&gt;&lt;mspace width=&quot;1em&quot;&gt;&lt;/mspace&gt;&lt;mtext mathvariant=&quot;monospace&quot;&gt;True&lt;/mtext&gt;&lt;/mrow&gt;&lt;annotation encoding=&quot;application/x-tex&quot;&gt;\underbrace{0.1\text{f} + 1.1\text{f}}_{1.20000004768\ldots} \;==\; \underbrace{1.2\text{f}}_{1.20000004768\ldots} \quad \Rightarrow \quad \texttt{True}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:2.0769em;vertical-align:-1.3824em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner munder&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6944em;&quot;&gt;&lt;span style=&quot;top:-1.6176em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;1.20000004768&lt;/span&gt;&lt;span class=&quot;minner mtight&quot;&gt;…&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner munder&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6944em;&quot;&gt;&lt;span class=&quot;svg-align&quot; style=&quot;top:-2.2687em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;stretchy&quot; style=&quot;height:0.548em;min-width:1.6em;&quot;&gt;&lt;span class=&quot;brace-left&quot; style=&quot;height:0.548em;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;400em&quot; height=&quot;0.548em&quot; viewBox=&quot;0 0 400000 548&quot; preserveAspectRatio=&quot;xMinYMin slice&quot;&gt;&lt;path d=&quot;M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;brace-center&quot; style=&quot;height:0.548em;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;400em&quot; height=&quot;0.548em&quot; viewBox=&quot;0 0 400000 548&quot; preserveAspectRatio=&quot;xMidYMin slice&quot;&gt;&lt;path d=&quot;M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;brace-right&quot; style=&quot;height:0.548em;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;400em&quot; height=&quot;0.548em&quot; viewBox=&quot;0 0 400000 548&quot; preserveAspectRatio=&quot;xMaxYMin slice&quot;&gt;&lt;path d=&quot;M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;0.1&lt;/span&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;f&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;1.1&lt;/span&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;f&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.7313em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.3824em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1.9935em;vertical-align:-1.2991em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner munder&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6944em;&quot;&gt;&lt;span style=&quot;top:-1.7009em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sizing reset-size6 size3 mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;&lt;span class=&quot;mord mtight&quot;&gt;1.20000004768&lt;/span&gt;&lt;span class=&quot;minner mtight&quot;&gt;…&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;minner munder&quot;&gt;&lt;span class=&quot;vlist-t vlist-t2&quot;&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.6944em;&quot;&gt;&lt;span class=&quot;svg-align&quot; style=&quot;top:-2.352em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;stretchy&quot; style=&quot;height:0.548em;min-width:1.6em;&quot;&gt;&lt;span class=&quot;brace-left&quot; style=&quot;height:0.548em;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;400em&quot; height=&quot;0.548em&quot; viewBox=&quot;0 0 400000 548&quot; preserveAspectRatio=&quot;xMinYMin slice&quot;&gt;&lt;path d=&quot;M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;brace-center&quot; style=&quot;height:0.548em;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;400em&quot; height=&quot;0.548em&quot; viewBox=&quot;0 0 400000 548&quot; preserveAspectRatio=&quot;xMidYMin slice&quot;&gt;&lt;path d=&quot;M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;brace-right&quot; style=&quot;height:0.548em;&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;400em&quot; height=&quot;0.548em&quot; viewBox=&quot;0 0 400000 548&quot; preserveAspectRatio=&quot;xMaxYMin slice&quot;&gt;&lt;path d=&quot;M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;top:-3em;&quot;&gt;&lt;span class=&quot;pstrut&quot; style=&quot;height:3em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord&quot;&gt;&lt;span class=&quot;mord&quot;&gt;1.2&lt;/span&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;f&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:0.648em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-s&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;vlist-r&quot;&gt;&lt;span class=&quot;vlist&quot; style=&quot;height:1.2991em;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:1em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;⇒&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:1em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6111em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord texttt&quot;&gt;True&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br&gt;
&lt;h2 id=&quot;우연의-일치&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#%EC%9A%B0%EC%97%B0%EC%9D%98-%EC%9D%BC%EC%B9%98&quot; aria-label=&quot;우연의 일치 permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;우연의 일치?&lt;/strong&gt;&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;앞서 살펴봤듯이, &lt;code class=&quot;language-text&quot;&gt;0.1f + 1.1f&lt;/code&gt; 의 Rounding 결과는 &lt;code class=&quot;language-text&quot;&gt;1.20000004768&lt;/code&gt; 입니다.&lt;br&gt;
그런데 공교롭게도, &lt;code class=&quot;language-text&quot;&gt;1.2f&lt;/code&gt; 를 &lt;code class=&quot;language-text&quot;&gt;float&lt;/code&gt; 에 저장할 때 사용하는 값도 &lt;code class=&quot;language-text&quot;&gt;1.20000004768&lt;/code&gt; 입니다.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;정리하면 아래와 같습니다.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;0.1f + 1.1f&lt;/code&gt; 의 실제 계산 결과는 &lt;code class=&quot;language-text&quot;&gt;1.20000002533&lt;/code&gt; 입니다.&lt;/li&gt;
&lt;li&gt;이 값이 &lt;code class=&quot;language-text&quot;&gt;Rounding&lt;/code&gt; 되어 가장 가까운 &lt;code class=&quot;language-text&quot;&gt;float&lt;/code&gt; 점인 &lt;code class=&quot;language-text&quot;&gt;1.20000004768&lt;/code&gt; 이 됩니다.&lt;/li&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;1.2f&lt;/code&gt; 의 실제 저장값도 &lt;code class=&quot;language-text&quot;&gt;1.20000004768&lt;/code&gt; 입니다.&lt;/li&gt;
&lt;li&gt;결국 &lt;code class=&quot;language-text&quot;&gt;c == 1.2f&lt;/code&gt; 는 &lt;code class=&quot;language-text&quot;&gt;1.20000004768 == 1.20000004768&lt;/code&gt; 이므로 &lt;code class=&quot;language-text&quot;&gt;True&lt;/code&gt; 입니다.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;csharp&quot;&gt;&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code class=&quot;language-csharp&quot;&gt;&lt;span class=&quot;token class-name&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;float&lt;/span&gt;&lt;/span&gt; a &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0.1f&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token class-name&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;float&lt;/span&gt;&lt;/span&gt; b &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1.1f&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token class-name&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;float&lt;/span&gt;&lt;/span&gt; c &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; a &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; b&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;// c     : 1.20000004768… (1.20000002533… 이 Rounding 됨)&lt;/span&gt;
&lt;span class=&quot;token comment&quot;&gt;// 1.2f  : 1.20000004768… (float 에 저장된 가장 가까운 점)&lt;/span&gt;
Debug&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;Log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;c &lt;span class=&quot;token operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1.2f&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// True&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;br&gt;
&lt;p&gt;그렇다면, 이번 문단의 제목을 다시 읽어보겠습니다.&lt;br&gt;
이건 정말 &lt;strong&gt;우연의 일치&lt;/strong&gt; 일까요?&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;ieee-754&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#ieee-754&quot; aria-label=&quot;ieee 754 permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;IEEE 754&lt;/strong&gt;&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;IEEE (Institute of Electrical and Electronics Engineers)&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;&lt;strong&gt;IEEE 부동소수점 연산 표준(IEEE Standard for Floating-Point Arithmetic, IEEE 754)&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;지금까지 살펴본 &lt;code class=&quot;language-text&quot;&gt;float&lt;/code&gt; 의 동작방식은 버그나 우연이 아닙니다.&lt;br&gt;
저희가 살펴본 이것들은 전부 &lt;code class=&quot;language-text&quot;&gt;IEEE 754&lt;/code&gt; 라는 국제 표준에 정의된 의도적이고 논리적인 동작입니다.&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;IEEE 754&lt;/code&gt; 는 1985 년에 제정된 부동소수점 연산 표준입니다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;32 bit&lt;/code&gt; 를 어떻게 나눌 것인지&lt;/li&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;Bias&lt;/code&gt; 의 값을 얼마로 할 것인지&lt;/li&gt;
&lt;li&gt;반올림은 어떤 방식으로 할 것인지 (여러가지 방법이 있지만, 머리가 아프니 생략하겠습니다.)&lt;/li&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;Hidden bit&lt;/code&gt; 를 사용할 것인지&lt;/li&gt;
&lt;/ul&gt;
&lt;br&gt;
&lt;p&gt;전세계의 &lt;code class=&quot;language-text&quot;&gt;99%&lt;/code&gt; 가 이 국제표준을 사용하고 있습니다. 이 표준의 목적은 어떤 언어에서든 동일한 부동소수점 연산에 대해 동일한 결과를 보장하는 것입니다. 그렇다면 &lt;code class=&quot;language-text&quot;&gt;C#&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;Python&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;C++&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;JavaScript&lt;/code&gt; 등의 언어들에서 &lt;code class=&quot;language-text&quot;&gt;float&lt;/code&gt; 연산을 하면 동일한 결과가 나오고, &lt;code class=&quot;language-text&quot;&gt;0.1f&lt;/code&gt; + &lt;code class=&quot;language-text&quot;&gt;1.1f&lt;/code&gt; == &lt;code class=&quot;language-text&quot;&gt;1.2f&lt;/code&gt; 는 어느 언어에서든 &lt;code class=&quot;language-text&quot;&gt;True&lt;/code&gt; 일까요?&lt;/p&gt;
&lt;p&gt;안타깝게도 그렇지 않습니다. 표준을 따른다고 해서 모든 환경에서 동일한 결과가 나오는 건 아닙니다. &lt;code class=&quot;language-text&quot;&gt;JavaScript&lt;/code&gt; 는 모든 숫자를 &lt;code class=&quot;language-text&quot;&gt;double&lt;/code&gt; (64 bit) 로 처리하기 때문에, &lt;code class=&quot;language-text&quot;&gt;float&lt;/code&gt; (32 bit) 를 사용하는 &lt;code class=&quot;language-text&quot;&gt;C#&lt;/code&gt; 과는 정밀도 자체가 다릅니다. 또한 컴파일러 최적화, &lt;code class=&quot;language-text&quot;&gt;CPU&lt;/code&gt; 아키텍처, 런타임 환경 등에 따라서도 결과가 달라질 수 있습니다.&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;stackoverflow&lt;/code&gt; 에 따르면, 변수에 저장하느냐 안하느냐에 따라서도 결과가 달라질 수 있다고 합니다.&lt;br&gt;
직접 계산식을 비교하면 &lt;code class=&quot;language-text&quot;&gt;False&lt;/code&gt; 지만, 변수에 저장한 후 비교하면 &lt;code class=&quot;language-text&quot;&gt;True&lt;/code&gt; 가 나오는 경우가 있다는 것입니다.&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;결론&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#%EA%B2%B0%EB%A1%A0&quot; aria-label=&quot;결론 permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;결론&lt;/strong&gt;&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;여러분께 다시 물어보겠습니다.&lt;br&gt;
&lt;code class=&quot;language-text&quot;&gt;0.1 + 1.1 == 1.2&lt;/code&gt; 는 &lt;code class=&quot;language-text&quot;&gt;False&lt;/code&gt; 가 &lt;strong&gt;확실한가요?&lt;/strong&gt;&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;제가 대신 대답을 해보자면, &lt;strong&gt;“일반적으로 False 가 맞다”&lt;/strong&gt; 라고 말할 것 같습니다.&lt;br&gt;
이 글에서 말하고자 하는 것은, 무조건 &lt;code class=&quot;language-text&quot;&gt;False&lt;/code&gt; 라고 대답하는 것이 항상 맞는 논리는 아니라는 점입니다.&lt;br&gt;
사람들과 책이 알려주는 것을 한번쯤 의심해보는 자세도 나쁘지 않다고 생각합니다.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;결론은, 소수를 쓸 땐 조건문을 조금 더 신경쓰고, 특히 &lt;code class=&quot;language-text&quot;&gt;==&lt;/code&gt; 연산은 쓰지 않는 것이 좋겠습니다.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 580px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 89.44444444444444%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAACXBIWXMAAA7DAAAOwwHHb6hkAAADJ0lEQVR42m1U247bNhT0R3TX3iRbeyVZV+pCUhR1tWxn42yDNEiL5qUoWiBAgPxF3pIstn3Jp/QHp4fU3hr4YUBSIodn5ow086IMBuukgBfkYFuFrCoxpgpa9CjLKwixh5QHVOoVlHoJlrdIshp+wu1ZN8gQ8AKRKjF7IMzhhZklzCuFy1yjlzto/TNagq5+QsQUwqQkssYSBneEfkpkHOlQY+aGDAbrmAjpJjaWCKWgwyVSrpHwBqzQyESDKBO4CGKsCGY057x4IgxLDrHfYLYmabHssI5SKzkZJXKt8KLeYei22PdbdO1ztMMVuuEl6trIPkCWe0RpBZfOGcmWcDeQZCYQ5BVVmE2SRwXeSHCWI4rIU0IYc7KkhE/jndw40w8eGsmlAOubR5JtUzKk5GFUSazDHG/1gIMakeY1iu4Kmd7C8SPcnXHD9LYpKTWFI9b1Q1PsbeFEmNwS6ryEzCqqTCAkFVFR35N8j3VCxNSH/3XZDR4ITbVK9eg3e2y3B+h+B65a1LQWuj9K6gSPCH1mKswtIauEraoVNSqqUvGaqtO0b6rO+n2E0H1MGLBJcrarbIWmAQ5J6Ck6LZElJg0UpYJiFDJ5VPo9oXmZlzUYZU28GBFJMjgrKXecYvMGu+41On0FJTqSPUA1l4hTjoAQ3qO4I0ytFCPZhDssJRg3GwQ8apRD3XRuO2ozZxJxRK4NuCE0G32KjM+ElRkpiURQNol8TWvzefnf4ah/YYKlE2FWVC1y6p75TrNGQ9S97SbXHXk1VZ1J8rUoqYr83u+EmsUKZZ/HNE8KSUVwzEQ1kgRBuSOYvJH5IZtgnqe8Qy578qwiX2u6bES7oT9O0aIoB/TbV6RM2nnINGaOqzGhwtOnMeYLF4uFh/nco3Ft56dzB6enFzg5WdHaxZMzz67n8ws6E+DZsxhPaDw/T83P4S19h3/RH+ZPJOo9nPQdlvEvhF+xYr/hPHiNk9UWp7c4WY4TVjv88OMG5+EbpM1HeMXvSOsPmKnDZ+z/+BcX4w2Cy2/wn3/DcvM3VuM/WA43OGu+EL4ewTXO2mssaL6oP9tx2XzCfyniMJVC/5F1AAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Result&quot;
        title=&quot;&quot;
        src=&quot;/static/fb9e06c4c63f31fac6a5c27d06c7b457/b6272/Result.png&quot;
        srcset=&quot;/static/fb9e06c4c63f31fac6a5c27d06c7b457/e9ff0/Result.png 180w,
/static/fb9e06c4c63f31fac6a5c27d06c7b457/f21e7/Result.png 360w,
/static/fb9e06c4c63f31fac6a5c27d06c7b457/b6272/Result.png 580w&quot;
        sizes=&quot;(max-width: 580px) 100vw, 580px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
&lt;em&gt;Result is false, But this may be a bias.&lt;br&gt;
Bias 는 컴퓨터에선 지수를 양수로 만드는걸 의미하지만, 일반적인 의미는 편견, 편향이라는 뜻.&lt;/em&gt;&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;reference&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#reference&quot; aria-label=&quot;reference permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;Reference&lt;/strong&gt;&lt;/h2&gt;
&lt;hr&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://ko.wikipedia.org/wiki/IEEE_754&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;wikipedia - IEEE754&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/37303825/why-0-1-0-2-0-3-in-c-sharp-when-to-use-float-type?noredirect=1&amp;#x26;lq=1&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;stackoverflow - Why 0.1 + 0.2 == 0.3 in C# when to use float type?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/15117037/1f-2f-3f-1f-2f-equals-3f-why&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;stackoverflow - (.1f+.2f==.3f) != (.1f+.2f).Equals(.3f) Why?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/62727051/is-0-1-0-2-0-3-true-or-false&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;stackoverflow - is (0.1 + 0.2) == 0.3 true or false?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Rigidbody - Interpolation]]></title><description><![CDATA[계산과 예측 여러분은 다음 날 아침에, 친구와 놀러 가기로 했습니다. 어떤 옷을 입을지 결정하기 위해 일기예보를 확인해봅니다. 내일 오전 9시는 , 1…]]></description><link>https://minssuy.com/Unity/Rigidbody-Interpolation/</link><guid isPermaLink="false">https://minssuy.com/Unity/Rigidbody-Interpolation/</guid><pubDate>Fri, 27 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;계산과-예측&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#%EA%B3%84%EC%82%B0%EA%B3%BC-%EC%98%88%EC%B8%A1&quot; aria-label=&quot;계산과 예측 permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;계산과 예측&lt;/strong&gt;&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;여러분은 다음 날 아침에, 친구와 놀러 가기로 했습니다. 어떤 옷을 입을지 결정하기 위해 일기예보를 확인해봅니다. 내일 오전 9시는 &lt;code class=&quot;language-text&quot;&gt;10°&lt;/code&gt;, 10시는 &lt;code class=&quot;language-text&quot;&gt;14°&lt;/code&gt;라고 합니다. 오전에는 조금 쌀쌀하지만, 시간이 지나면서 기온이 오를 것으로 보입니다. 그래서 외투를 입을지 고민이 됩니다. 그런데 아쉽게도 일기예보는 10시까지만 제공되고 있습니다. 이제 우리는 주어진 정보만으로 판단해야 합니다.&lt;/p&gt;
&lt;p&gt;현재 우리가 알고 있는 것은 다음과 같습니다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;오전 9시&lt;/code&gt; : 10°&lt;/li&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;오전 10시&lt;/code&gt; : 14°&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;그렇다면, 오전 9시 30분의 기온은 어느 정도일까요?&lt;br&gt;
아마도 &lt;code class=&quot;language-text&quot;&gt;12°&lt;/code&gt; 정도로 예측을 해볼 수 있겠네요. 이건 꽤나 정확할 가능성이 높습니다.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;이번에는, 오전 11시의 기온은 어느 정도일까요?&lt;br&gt;
주어진 정보만으로 판단해보면, 9시에서 10시 사이에 &lt;code class=&quot;language-text&quot;&gt;4°&lt;/code&gt;가 상승했으므로, 같은 흐름이 이어진다고 가정했을 때 오전 11시는 약 &lt;code class=&quot;language-text&quot;&gt;18°&lt;/code&gt; 정도일 것으로 예상할 수 있습니다.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;그럼 여기서 질문해보겠습니다.&lt;br&gt;
오전 9시 30분의 예측 기온과, 오전 11시의 예측 기온 중 어떤 값이 더 정확할까요?&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;내삽과-외삽&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#%EB%82%B4%EC%82%BD%EA%B3%BC-%EC%99%B8%EC%82%BD&quot; aria-label=&quot;내삽과 외삽 permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;내삽과 외삽&lt;/strong&gt;&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;아마도 여러분은 오전 &lt;strong&gt;9시 30분&lt;/strong&gt;의 예측 기온이 더 정확할 것이라고 생각하셨을 것입니다.&lt;br&gt;
그렇다면 우리는 왜 이런 판단을 내렸을까요?&lt;/p&gt;
&lt;p&gt;그 이유는, 두 경우가 서로 다른 범위에 있기 때문입니다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;오전 9시 30분&lt;/strong&gt;은 &lt;strong&gt;9시&lt;/strong&gt;와 &lt;strong&gt;10시&lt;/strong&gt; 사이, 즉 우리가 알고 있는 데이터의 범위 안에 있습니다.&lt;br&gt;
반면, &lt;strong&gt;오전 11시&lt;/strong&gt;는 주어진 데이터의 범위를 벗어난 값입니다.&lt;/p&gt;
&lt;p&gt;따라서 9시 30분의 경우는 기존 정보를 바탕으로 계산한 값이고, 11시는 그 흐름을 바탕으로 예측한 값이기 때문에 정확도에서 차이가 발생합니다.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;앞의 예시를 기준으로 정리해보면 다음과 같습니다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;오전 9시 ~ 10시 사이의 값을 예측한 것 → &lt;strong&gt;내삽(보간)&lt;/strong&gt; &lt;code class=&quot;language-text&quot;&gt;Interpolation&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;오전 11시처럼 범위를 벗어난 값을 예측한 것 → &lt;strong&gt;외삽&lt;/strong&gt; &lt;code class=&quot;language-text&quot;&gt;Extrapolation&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br&gt;
&lt;p&gt;이것이 이 포스트에서 다뤄볼 내삽과 외삽의 개념입니다.&lt;br&gt;
한국, 일본, 중국 등 개발이나 그래픽스 분야에서는 &lt;code class=&quot;language-text&quot;&gt;내삽&lt;/code&gt;보다는 &lt;code class=&quot;language-text&quot;&gt;보간&lt;/code&gt; 이라는 표현이 더 일반적으로 사용됩니다. 지금부터는 &lt;strong&gt;보간&lt;/strong&gt;이라는 용어를 사용하겠습니다.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;그럼, 이 개념을 Unity 의 &lt;code class=&quot;language-text&quot;&gt;Rigidbody&lt;/code&gt; 와 연결해보겠습니다.&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;rigidbody---interpolation&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#rigidbody---interpolation&quot; aria-label=&quot;rigidbody   interpolation permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Rigidbody - Interpolation&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;Unity에는 매 프레임마다 실행되는 &lt;code class=&quot;language-text&quot;&gt;Update&lt;/code&gt;와, 고정된 간격으로 실행되는 &lt;code class=&quot;language-text&quot;&gt;FixedUpdate&lt;/code&gt;가 있습니다. 물리 연산은 &lt;code class=&quot;language-text&quot;&gt;FixedUpdate&lt;/code&gt;에서 처리되며, 기본값은 초당 50회입니다. 반면 &lt;code class=&quot;language-text&quot;&gt;Update&lt;/code&gt;는 프레임률에 따라 가변적으로 실행됩니다.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 720px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 33.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAHCAYAAAAIy204AAAACXBIWXMAAA7DAAAOwwHHb6hkAAABHklEQVR42q2Pa07CUBhEu3TjCvyhO3ALBhRopS2UIEJ8IEJpi1CEXvoALEhFerxhCzLJ5MzMjy/5FP6pPM+PjKKYeRijLIoFfi2TWfGGjamxs3SWeoV1TSVtVNk0q6TNexJLZdsxiBoVspc6myeT9NkA+wHGXQ6FCw61a5Qv3+cQR6zGYzIh2Ich2/mMnZiTheLoXRiwFZ/8xAtSyf0yJIvF0aQJZFvynjzutVE4sZRB32Y4dLFtB8f5wB54uM5EbtK2j+fOZJ7ieULuAa4rGHmRzCGj0VL2hCD45u5W0G6tUEqlCqqqUy4bVKsNyZpkC01ryf0Rw3hFUzuY5ju63pO9T73uyWxjWRPZx7x1l5yfdbm6dE/38nTqs14n/AEjOQmglc4eKwAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Default&quot;
        title=&quot;&quot;
        src=&quot;/static/75f48234808ef7980e4f80f79282b4a6/37523/Default.png&quot;
        srcset=&quot;/static/75f48234808ef7980e4f80f79282b4a6/e9ff0/Default.png 180w,
/static/75f48234808ef7980e4f80f79282b4a6/f21e7/Default.png 360w,
/static/75f48234808ef7980e4f80f79282b4a6/37523/Default.png 720w,
/static/75f48234808ef7980e4f80f79282b4a6/302a4/Default.png 1080w,
/static/75f48234808ef7980e4f80f79282b4a6/c1b63/Default.png 1200w&quot;
        sizes=&quot;(max-width: 720px) 100vw, 720px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
&lt;em&gt;Update, FixedUpdate&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;이 두 루프는 항상 같은 타이밍에 실행되지 않습니다. 물리 위치는 &lt;code class=&quot;language-text&quot;&gt;FixedUpdate&lt;/code&gt;마다 갱신되지만, 화면에 그려지는 건 &lt;code class=&quot;language-text&quot;&gt;Update&lt;/code&gt;(렌더링) 타이밍입니다. 그럼 &lt;code class=&quot;language-text&quot;&gt;Interpolation&lt;/code&gt; 프로퍼티에 대해서 알아보겠습니다.&lt;/p&gt;
&lt;br&gt;
&lt;h3 id=&quot;비교&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#%EB%B9%84%EA%B5%90&quot; aria-label=&quot;비교 permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;비교&lt;/h3&gt;
&lt;p&gt;백문이 불여일견입니다. 세 가지 옵션을 직접 비교해보겠습니다. 각 큐브의 Interpolation을 다르게 설정하고, &lt;code class=&quot;language-text&quot;&gt;TimeScale&lt;/code&gt;을 낮춰 슬로우모션으로 확인해보면 어떤 모습으로 보일까요?&lt;/p&gt;
&lt;div class=&quot;video-wrapper&quot;&gt;&lt;video src=&quot;/a327843ae678e937b612efc7acdb6dde/Test.mp4&quot; autoplay loop muted playsinline&gt;&lt;/video&gt;&lt;/div&gt;&lt;div class=&quot;video-caption&quot;&gt;&lt;em&gt;TimeScale: 0.3, FPS: 60&lt;/em&gt;&lt;/div&gt;
&lt;p&gt;차이점이 느껴지시나요? 제 눈으로 본 느낌을 그대로 말해보겠습니다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;None&lt;/strong&gt; : 움직일 때 뚝뚝 끊겨 보이는 떨림이 발생합니다.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interpolate&lt;/strong&gt; : 부드럽지만, 다른 큐브들보다 살짝 늦게 도착하는 것처럼 보입니다.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Extrapolate&lt;/strong&gt; : 부드럽지만, 바닥에 닿을 때 더 많이 찌그러지는 것처럼 보입니다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;왜 이런 차이를 보이게 되는 걸까요?&lt;/p&gt;
&lt;br&gt;
&lt;h3 id=&quot;none&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#none&quot; aria-label=&quot;none permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;None&lt;/h3&gt;
&lt;p&gt;보정을 하지 않습니다. 렌더링 시점에서 가장 최신의 &lt;code class=&quot;language-text&quot;&gt;FixedUpdate&lt;/code&gt;에서 계산된 물리 위치를 그대로 렌더링합니다. &lt;code class=&quot;language-text&quot;&gt;FixedUpdate&lt;/code&gt;와 렌더링 타이밍이 어긋나면 오브젝트 위치가 불연속적으로 바뀌면서 &lt;strong&gt;떨림(Jitter)&lt;/strong&gt; 이 발생합니다. 쉽게 말해서, 물리 위치 자체는 정확하지만, 렌더링 타이밍과 맞지 않아 위치가 뚝뚝 끊겨 보이는 겁니다.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 720px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 33.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAHCAYAAAAIy204AAAACXBIWXMAAA7DAAAOwwHHb6hkAAABV0lEQVR42q2P2U7CYBSE++r6Bl7oE/gMBlxAWgtowLhgC1asULAtZSlFSvfPHzTGO2+cZPJNzpybkfhLRcFyHeItgx+HcfKrLnaczeY40zmSVy6TNVTs0gnrqxpRU8GXKwTqJR/XMusbGb9RZaKc4jcruOop0b3Kon3J6l4huJNJzQeK0gG5eoy0Ghjk0wm+2SW2LVLPJXx/I7QHxJMxsTsSHBK6Q5LZOx+2SeZ7rJ1XoqnFxrNIVgtyXQbzFokkpshSyDMQLASLNPnOOcW2T79+tplcMN062uUsiViufDbRZjddeug886T16QgbxkDwFb07pNuz0Hsjng2bR21Ev+/ypDsYLx49Yyo6j5f+QuQ5rrOhXHJot3yks7MLKhWF83OFWq0pqAq2qFZb4t5GUTqCd6hXXWqyjiL3qNdN8WPQqFuiH6BpPvt7GkeHppj8TxqPRwTBgk9s7wY2kPzjIwAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;None&quot;
        title=&quot;&quot;
        src=&quot;/static/7b926ea950fc088f1f52472af6dea429/37523/None.png&quot;
        srcset=&quot;/static/7b926ea950fc088f1f52472af6dea429/e9ff0/None.png 180w,
/static/7b926ea950fc088f1f52472af6dea429/f21e7/None.png 360w,
/static/7b926ea950fc088f1f52472af6dea429/37523/None.png 720w,
/static/7b926ea950fc088f1f52472af6dea429/302a4/None.png 1080w,
/static/7b926ea950fc088f1f52472af6dea429/c1b63/None.png 1200w&quot;
        sizes=&quot;(max-width: 720px) 100vw, 720px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
&lt;em&gt;None - Uses the latest FixedUpdate position&lt;/em&gt;&lt;/p&gt;
&lt;br&gt;
&lt;h3 id=&quot;interpolate&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#interpolate&quot; aria-label=&quot;interpolate permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Interpolate&lt;/h3&gt;
&lt;p&gt;직전 두 &lt;code class=&quot;language-text&quot;&gt;FixedUpdate&lt;/code&gt;의 위치를 사용하여, 그 사이를 &lt;strong&gt;보간&lt;/strong&gt;합니다.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 720px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 33.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAHCAYAAAAIy204AAAACXBIWXMAAA7DAAAOwwHHb6hkAAABNElEQVR42qWP2U7CUBRF++v6Bb7oF/gLRhQsdBIkDGoEgdJegZLSUqZSJoEurzz6ROJOdtY5++yXo/BPpWl64mQyZRRNUcaZew5FEz9zx8rMsy3qzPUnYkslKWmsyhpJucCspLKum0xeVL4bJWbVAss3k/hVYy/eSTNXHK1blKXncZxOWPT77MKQfRSxHvlswxG7KDx5GwUsfY/12GfhD+Q+IgmGsiPk7HPcJNAySEUN5dy3lquEWPqXu/2Ow+EAkn+ldNo23a6LbTs4Tg+7I3CdgcykbQ/h+nIeIkQg74HcQ8TXjHZnTNeZ47pTgmDD40NIrTJHyWafUFWdXM5A00qSlmSFfL4i8yqG8UFerWOaLXTtE0NvY1mu7NgUnwfy3qPZmHN50eTmWpz38jkaDj3ieMYPrNIIb2G+OAAAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Interpolate&quot;
        title=&quot;&quot;
        src=&quot;/static/1cc756bd58b840c954db40e274917c91/37523/Interpolate.png&quot;
        srcset=&quot;/static/1cc756bd58b840c954db40e274917c91/e9ff0/Interpolate.png 180w,
/static/1cc756bd58b840c954db40e274917c91/f21e7/Interpolate.png 360w,
/static/1cc756bd58b840c954db40e274917c91/37523/Interpolate.png 720w,
/static/1cc756bd58b840c954db40e274917c91/302a4/Interpolate.png 1080w,
/static/1cc756bd58b840c954db40e274917c91/c1b63/Interpolate.png 1200w&quot;
        sizes=&quot;(max-width: 720px) 100vw, 720px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
&lt;em&gt;Uses the previous two FixedUpdate results and renders one step behind&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;직전 두 &lt;code class=&quot;language-text&quot;&gt;FixedUpdate&lt;/code&gt; 위치를 A, B라 하면, A에서 B까지의 구간 중 &lt;strong&gt;렌더링 시점이 어디에 해당하는지 비율(α)&lt;/strong&gt; 을 구하고, A와 B 사이의 위치를 보간하여 렌더링합니다. &lt;code class=&quot;language-text&quot;&gt;FixedUpdate&lt;/code&gt;가 초당 50번만 실행되더라도, 매 프레임마다 조금씩 다른 위치를 렌더링하기 때문에 움직임이 부드럽게 보입니다. 단, 항상 이미 완료된 과거 두 위치를 기준으로 보간하기 때문에, 렌더링 위치는 실제 물리 위치보다 &lt;strong&gt;한 FixedUpdate 스텝만큼 뒤처집니다.&lt;/strong&gt;&lt;br&gt;왜 위의 영상에서 &lt;code class=&quot;language-text&quot;&gt;Interpolate&lt;/code&gt; 로 설정된 큐브가 늦게 떨어지는지 아시겠나요?&lt;/p&gt;
&lt;br&gt;
&lt;h3 id=&quot;extrapolate&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#extrapolate&quot; aria-label=&quot;extrapolate permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Extrapolate&lt;/h3&gt;
&lt;p&gt;현재 속도를 기반으로 다음 위치를 &lt;strong&gt;예측(외삽)&lt;/strong&gt; 합니다. 일기예보에서 10시까지의 데이터로 11시 기온을 예측했던 것과 같습니다. 주어진 데이터 범위를 넘어서는 예측이기 때문에, 속도나 방향이 급격히 바뀌는 상황에서는 예측이 빗나가면서 오브젝트가 실제 위치를 넘어갔다가 되돌아오는 현상이 발생할 수 있습니다.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 720px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 33.33333333333333%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAHCAYAAAAIy204AAAACXBIWXMAAA7DAAAOwwHHb6hkAAABNUlEQVR42qWP21KCcBjEefWmF+imnqBXaLRUCAVx1HI6aCUiZZCA4IGDSiW//uNdVznTzuzsfrt780n8E0VR7DWK5njhHGlWLvFtaEzLF2Sawtaos6zXiHWZtKWStVXS9jULQ2bd04haNfKHJtmdRnqvg9mBSZ9d6YSdfo6UOA67ecRqMiEPAr7CkLU3ZRt45GGw5zb0yfyPvSaeSz4P2ESin71CuoB8TfHUAPsW6eDXBJN1RpwmrNIVqfDF50YUu187afhiMhqNMU0Ly3rDHNqMrXeRCZoO9ngqvIttB1gjT9AXWSiyANNaMrYTfH/D1WXAbXeJVKnUkOU61WoDVW0J1YV2UZSuyG9oNB5R5B6a9kxdHYh7SLNpi41Jy3DodGYM+guOjwacndqHv/wXXNchjhf8AFCQCO9wUwt9AAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Extrapolate&quot;
        title=&quot;&quot;
        src=&quot;/static/2305344e06c643855d9002881d5586e3/37523/Extrapolate.png&quot;
        srcset=&quot;/static/2305344e06c643855d9002881d5586e3/e9ff0/Extrapolate.png 180w,
/static/2305344e06c643855d9002881d5586e3/f21e7/Extrapolate.png 360w,
/static/2305344e06c643855d9002881d5586e3/37523/Extrapolate.png 720w,
/static/2305344e06c643855d9002881d5586e3/302a4/Extrapolate.png 1080w,
/static/2305344e06c643855d9002881d5586e3/c1b63/Extrapolate.png 1200w&quot;
        sizes=&quot;(max-width: 720px) 100vw, 720px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
        decoding=&quot;async&quot;
      /&gt;
    &lt;/span&gt;
&lt;em&gt;Predicts the next position based on current velocity and renders ahead&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Extrapolate 로 설정한 큐브가 바닥에 닿았을 때, 왜 다른 큐브들 보다 더 찌그러져 보였는지 아시겠나요? 렌더러는 큐브가 계속해서 아래로 내려갈 것이라고 예측해서 그렸으나, 갑작스런 바닥과의 충돌에 미처 예상을 하지 않았다는 것입니다.&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;정리&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#%EC%A0%95%EB%A6%AC&quot; aria-label=&quot;정리 permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;정리&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;영상을 다시 보겠습니다. 이번엔 최종 결과에 초점을 잡아봅시다.&lt;/p&gt;
&lt;div class=&quot;video-wrapper&quot;&gt;&lt;video src=&quot;/a327843ae678e937b612efc7acdb6dde/Test.mp4&quot; autoplay loop muted playsinline&gt;&lt;/video&gt;&lt;/div&gt;&lt;div class=&quot;video-caption&quot;&gt;&lt;em&gt;TimeScale: 0.3, FPS: 60&lt;/em&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Physics&lt;/strong&gt; &lt;code class=&quot;language-text&quot;&gt;실제로 바닥과 충돌한 시간&lt;/code&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;Extrapolate Cube&lt;/code&gt; : 0.920s&lt;/li&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;None Cube&lt;/code&gt; : 0.920s&lt;/li&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;Interpolate Cube&lt;/code&gt; : 0.920s&lt;/li&gt;
&lt;/ol&gt;
&lt;br&gt;
&lt;p&gt;&lt;strong&gt;Render&lt;/strong&gt; &lt;code class=&quot;language-text&quot;&gt;그림이 바닥에 닿은 시간&lt;/code&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;Extrapolate Cube&lt;/code&gt; : 0.893s&lt;/li&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;None Cube&lt;/code&gt; : 0.904s&lt;/li&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;Interpolate Cube&lt;/code&gt; : 0.914s&lt;/li&gt;
&lt;/ol&gt;
&lt;br&gt;
&lt;p&gt;여기서 주목할 점은 실제 물리 충돌은 세 큐브 모두 동일한 시간에 발생했다는 것입니다. &lt;code class=&quot;language-text&quot;&gt;Interpolation&lt;/code&gt; 설정은 물리 연산 자체에는 영향을 주지 않습니다. 그렇습니다. 차이가 나는 것은 &lt;strong&gt;렌더링 타이밍&lt;/strong&gt; 뿐입니다.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;물리 충돌은 동일한데, 렌더링 도착 시간이 다른 이유를 정리하면 이렇습니다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;Extrapolate&lt;/code&gt; : 미래를 &lt;strong&gt;예측&lt;/strong&gt;하므로 실제보다 앞서 그려짐. 이에 따라 바닥을 많이 관통함.&lt;/li&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;Interpolate&lt;/code&gt; : &lt;strong&gt;과거 두 위치&lt;/strong&gt;를 보간하므로 실제보다 뒤처져 그려짐.&lt;/li&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;None&lt;/code&gt; : &lt;code class=&quot;language-text&quot;&gt;FixedUpdate&lt;/code&gt; 위치를 그대로 사용하므로 그 중간.&lt;/li&gt;
&lt;/ul&gt;
&lt;br&gt;
&lt;p&gt;그렇다면 우리는 언제, 무엇을 써야 할까요?&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;옵션&lt;/th&gt;
&lt;th&gt;상황&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;None&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;물리 오브젝트가 카메라에 보이지 않거나, 떨림이 눈에 띄지 않는 경우&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Interpolate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;플레이어 캐릭터, 카메라가 추적하는 오브젝트 등 &lt;strong&gt;부드러운 움직임이 중요한 경우&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Extrapolate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Interpolate의 약간의 지연조차 허용하기 어려운 경우. 단, 급격한 방향 전환 시 오차가 발생할 수 있음&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;br&gt;
&lt;p&gt;대부분의 경우 &lt;strong&gt;Interpolate&lt;/strong&gt;를 사용하면 됩니다. 연산이 걱정이라면 괜찮습니다. Interpolate의 핵심 연산은 선형 보간(Lerp)입니다.&lt;/p&gt;
&lt;div class=&quot;math math-display&quot;&gt;&lt;span class=&quot;katex-display&quot;&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-mathml&quot;&gt;&lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;mi&gt;e&lt;/mi&gt;&lt;mi&gt;s&lt;/mi&gt;&lt;mi&gt;u&lt;/mi&gt;&lt;mi&gt;l&lt;/mi&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;A&lt;/mi&gt;&lt;mo&gt;+&lt;/mo&gt;&lt;mo stretchy=&quot;false&quot;&gt;(&lt;/mo&gt;&lt;mi&gt;B&lt;/mi&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;A&lt;/mi&gt;&lt;mo stretchy=&quot;false&quot;&gt;)&lt;/mo&gt;&lt;mo&gt;⋅&lt;/mo&gt;&lt;mi&gt;α&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding=&quot;application/x-tex&quot;&gt;result = A + (B - A) \cdot \alpha&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.6944em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0278em;&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;es&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;u&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0197em;&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2778em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.7667em;vertical-align:-0.0833em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mopen&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0502em;&quot;&gt;B&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;−&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:1em;vertical-align:-0.25em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot;&gt;A&lt;/span&gt;&lt;span class=&quot;mclose&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mbin&quot;&gt;⋅&lt;/span&gt;&lt;span class=&quot;mspace&quot; style=&quot;margin-right:0.2222em;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;strut&quot; style=&quot;height:0.4306em;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mord mathnormal&quot; style=&quot;margin-right:0.0037em;&quot;&gt;α&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br&gt;
&lt;p&gt;이전 위치 A, 직전 위치 B, 진행 비율 α만 있으면 덧셈과 곱셈 몇 번으로 끝나는 &lt;strong&gt;O(1)&lt;/strong&gt; 연산입니다. Rigidbody 하나당 렌더링 프레임마다 한 번만 실행되므로, 물리 시뮬레이션 자체의 비용에 비하면 무시할 수 있는 수준입니다. 특별한 이유가 없다면 &lt;strong&gt;Interpolate&lt;/strong&gt;를 기본값으로 두는 것이 좋습니다.&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;reference&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#reference&quot; aria-label=&quot;reference permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Reference&lt;/h2&gt;
&lt;hr&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.unity3d.com/2022.3/Documentation/Manual/rigidbody-interpolation.html&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Unity Documentation - Apply interpolation to a Rigidbody&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[디자인 패턴을 시작하기에 앞서]]></title><description><![CDATA[…]]></description><link>https://minssuy.com/DesignPattern/Before-Study-DesignPattern/</link><guid isPermaLink="false">https://minssuy.com/DesignPattern/Before-Study-DesignPattern/</guid><pubDate>Mon, 09 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;프로그래밍을-입문하신-분이라면-나중에-방문해주세요&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D%EC%9D%84-%EC%9E%85%EB%AC%B8%ED%95%98%EC%8B%A0-%EB%B6%84%EC%9D%B4%EB%9D%BC%EB%A9%B4-%EB%82%98%EC%A4%91%EC%97%90-%EB%B0%A9%EB%AC%B8%ED%95%B4%EC%A3%BC%EC%84%B8%EC%9A%94&quot; aria-label=&quot;프로그래밍을 입문하신 분이라면 나중에 방문해주세요 permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;프로그래밍을 입문하신 분이라면 나중에 방문해주세요.&lt;/strong&gt;&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;이것은 제가 게임개발을 공부하면서 느낀 점 입니다. 지금의 저도 실력이 좋은 편은 아니지만, 프로그래밍을 입문했던 시기에는 욕심이 많았습니다. &lt;code class=&quot;language-text&quot;&gt;C#&lt;/code&gt;의 문법과 &lt;code class=&quot;language-text&quot;&gt;Unity&lt;/code&gt; 의 기능들이 어떤 것이 있는지 샅샅이 알아보려고 노력했었고, 그 중 &lt;code class=&quot;language-text&quot;&gt;알고리즘&lt;/code&gt; 이라던가 &lt;code class=&quot;language-text&quot;&gt;디자인 패턴&lt;/code&gt; 도 포함되어 있었습니다.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;프로그래밍 입문자가 디자인 패턴을 공부하고 직접 적용을 시키려고 하면 어렵습니다. 어려울 뿐만 아니라,  &lt;em&gt;&lt;u&gt;“이게 뭔지는 알았는데, 이걸 대체 왜 사용하는거지?”&lt;/u&gt;&lt;/em&gt;  라는 의문만이 생깁니다. 왜냐하면 단순히 필요한 지식처럼 보여 공부하려 했을 뿐,
실제로 답답함이나 불편함을 겪어본 적이 없기 때문입니다.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;공부를 하다보면, 지식을 공유해주시는 분들께서 꽤 많이 사용하는 말이 있습니다.&lt;br&gt;
&lt;em&gt;&lt;strong&gt;“이러한 것을 하고싶을 때가 있을텐데, 그때 그러한 것을 사용해주시면 됩니다”&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;입문자였던 저는 위와 같은 말을 많이 보고 들었으며, 그렇게 하고 싶은 순간이 대체 언제 오는지부터 의문이였습니다. 똑같은 의문이 들었다면 해당 지식은 여러분에게 당장 필요없는 공부일 가능성이 높습니다.&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;필요한-공부를-합시다&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#%ED%95%84%EC%9A%94%ED%95%9C-%EA%B3%B5%EB%B6%80%EB%A5%BC-%ED%95%A9%EC%8B%9C%EB%8B%A4&quot; aria-label=&quot;필요한 공부를 합시다 permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;필요한 공부를 합시다.&lt;/strong&gt;&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;혹시 이 글을 보고 계시는 분이 입문자라면, 이렇게 물어보고 싶습니다. 게임개발에 필요한 공부가 뭐라고 생각하시나요? &lt;code class=&quot;language-text&quot;&gt;C#&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;C++&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;자료구조&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;알고리즘&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;디자인 패턴&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;CS&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;게임엔진&lt;/code&gt; 일까요? 이것들을 전부 마스터 해야할까요?&lt;/p&gt;
&lt;p&gt;단순히 캐릭터를 움직이는 간단한 기능을 만들고 싶다고 가정해봅시다. 캐릭터의 이동을 구현하기 위해 수학, 물리 법칙부터 시작하여, 어떤 자료구조를 사용해야하고, 어떤 디자인 패턴을 사용해야하며, 구현했을 때 CPU 와 GPU, RAM 에선 어떤 일이 일어나는지 공부해야할까요?&lt;/p&gt;
&lt;p&gt;깊이 있는 이해는 개발에 있어서 당연히 유리합니다. 하지만 깊이 있는 이해가 있다고 해서 재미있는 게임을 만들 수 있다는 것은 아닙니다.&lt;/p&gt;
&lt;p&gt;일단 구현하세요. 궁금증이 생기면, 깊이 있는 이해를 원한다면 그때 알아보셔도 전혀 문제되지 않습니다.&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;코드를-마음껏-작성하며-망쳐보세요&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#%EC%BD%94%EB%93%9C%EB%A5%BC-%EB%A7%88%EC%9D%8C%EA%BB%8F-%EC%9E%91%EC%84%B1%ED%95%98%EB%A9%B0-%EB%A7%9D%EC%B3%90%EB%B3%B4%EC%84%B8%EC%9A%94&quot; aria-label=&quot;코드를 마음껏 작성하며 망쳐보세요 permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;코드를 마음껏 작성하며 망쳐보세요.&lt;/strong&gt;&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;디자인 패턴은 공부하는 것이 아니라, 경험하는 것입니다. 코드를 마음대로 작성하며 망쳐보는 것은 디자인 패턴을 가장 빠르게 배우는 방법입니다. 코드가 점점 지저분해지고 관리하기 어려워지면 자연스럽게 답답함과 불편함을 느끼게 됩니다. 그때 스스로 코드를 정리해보시기 바랍니다. 깔끔하게 정리가 되었다면, 여러분께선 은연 중에 디자인 패턴을 사용하셨을 지도 모릅니다.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;디자인 패턴은 반드시 지켜야 하는 &lt;code class=&quot;language-text&quot;&gt;수칙&lt;/code&gt; 같은 것이 아닙니다. 그리고 누군가가 디자인 패턴을 &lt;strong&gt;“이런 것이 디자인 패턴이다!”&lt;/strong&gt; 라고 먼저 정의하고 만들어 낸 것이 아닙니다. 이전 세대의 개발자들이 코드를 작성하며 &lt;em&gt;“이렇게 작성하는게 관리가 수월하고 편하더라”&lt;/em&gt;  라고 느꼈던 설계를 &lt;code class=&quot;language-text&quot;&gt;디자인 패턴&lt;/code&gt; 이라고 이름을 붙여 공유한 것입니다.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;이 이야기는 디자인 패턴뿐만 아니라 대부분의 개발 지식에도 적용됩니다. 여러분께서 게임을 만드려고 하는 이유는 무엇인가요? 아마도 재미있는 게임을 만들어 이 경험을 다른 사람에게도 공유하고 싶기 때문일 것입니다.&lt;/p&gt;
&lt;br&gt;
&lt;a href=&quot;https://www.youtube.com/watch?v=uVnd5rK_VUw&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; class=&quot;bookmark-card&quot;&gt;&lt;div class=&quot;bookmark-card__content&quot;&gt;&lt;div class=&quot;bookmark-card__title&quot;&gt;Silksong Code Review: Optimization, Code Quality, Hidden things&lt;/div&gt;&lt;div class=&quot;bookmark-card__description&quot;&gt;Today, we&amp;amp;#39;ll review the reverse-engineered C# code of Silksong.We&amp;amp;#39;ll look at the code improvements, bugs, optimization techniques, etc.👉 How to code a mod f...&lt;/div&gt;&lt;div class=&quot;bookmark-card__url&quot;&gt;https://www.youtube.com/watch?v=uVnd5rK_VUw&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;bookmark-card__thumbnail&quot;&gt;&lt;img src=&quot;https://i.ytimg.com/vi/uVnd5rK_VUw/maxresdefault.jpg&quot; alt=&quot;&quot;&gt;&lt;/div&gt;&lt;/a&gt;
&lt;p&gt;위의 유튜브 영상은, 유명 인디게임인 &lt;code class=&quot;language-text&quot;&gt;할로우 나이트: 실크송&lt;/code&gt; 에 대한 코드리뷰입니다.
&lt;br&gt;
이 영상을 보면, 이 게임의 로직은 객체지향 프로그래밍 &lt;code class=&quot;language-text&quot;&gt;OOP&lt;/code&gt; 의 5가지 원칙인 &lt;code class=&quot;language-text&quot;&gt;SOLID&lt;/code&gt; 원칙을 전혀 지키지 않는 모습을 볼 수 있습니다. 이전 작인 &lt;code class=&quot;language-text&quot;&gt;할로우 나이트&lt;/code&gt; 는 코드품질이 더욱 좋지 않습니다. 그렇다면 여러분께 질문해보겠습니다. &lt;code class=&quot;language-text&quot;&gt;할로우 나이트&lt;/code&gt; 는 실패한 게임인가요?&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;본질&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#%EB%B3%B8%EC%A7%88&quot; aria-label=&quot;본질 permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;본질&lt;/strong&gt;&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;게이머들은 &lt;em&gt;&lt;u&gt;‘이 게임이 재미있는가?’&lt;/u&gt;&lt;/em&gt;  를 판단하는 고객입니다. 게이머들은 저희가 작성한 코드를 보며 아름다움을 느끼고 감탄하지 않습니다. 물론, 설계라던가 &lt;code class=&quot;language-text&quot;&gt;SOLID&lt;/code&gt; 원칙 등 각종 개발 지식은 중요합니다만, 탄탄한 설계, 아름다운 코드에 집착하지 않으시길 바랍니다.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;&lt;strong&gt;‘게임은 재미가 있어야 한다.’&lt;/strong&gt; 라는 본질을 잊지 않는 것이 중요하다고 생각합니다.&lt;br&gt;
공부는 잠시 내려두고, 코드를 망쳐보세요.&lt;/p&gt;
&lt;br&gt;
&lt;h2 id=&quot;reference&quot; style=&quot;position:relative;&quot;&gt;&lt;a href=&quot;#reference&quot; aria-label=&quot;reference permalink&quot; class=&quot;anchor before&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;strong&gt;Reference&lt;/strong&gt;&lt;/h2&gt;
&lt;hr&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=uVnd5rK_VUw&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Howdyツ’s Youtube - Silksong Code Review: Bugs, Code Quality, Optimization&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item></channel></rss>