<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Trouble on Samidare Blog</title><link>https://samidare20.github.io/samidare20/categories/trouble/</link><description>Recent content in Trouble on Samidare Blog</description><generator>Hugo -- gohugo.io</generator><language>ko-kr</language><lastBuildDate>Mon, 23 Feb 2026 10:46:00 +0900</lastBuildDate><atom:link href="https://samidare20.github.io/samidare20/categories/trouble/index.xml" rel="self" type="application/rss+xml"/><item><title>C# 큰 소수 처리</title><link>https://samidare20.github.io/samidare20/p/c%23-%ED%81%B0-%EC%86%8C%EC%88%98-%EC%B2%98%EB%A6%AC/</link><pubDate>Mon, 23 Feb 2026 10:46:00 +0900</pubDate><guid>https://samidare20.github.io/samidare20/p/c%23-%ED%81%B0-%EC%86%8C%EC%88%98-%EC%B2%98%EB%A6%AC/</guid><description>&lt;h2 id="c은-소수점이-길어지면-이를-모두-보여주지-않음"&gt;C#은 소수점이 길어지면 이를 모두 보여주지 않음
&lt;/h2&gt;&lt;p&gt;계산기처럼 E를 사용하거나, 소수점 뒤쪽이 모두 표기되지 않는 식.
이때 포맷팅을 사용해 강제로 모두 보이도록 할 수 있음.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-csharp" data-lang="csharp"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="n"&gt;ans&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="n"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Pow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,-&lt;/span&gt;&lt;span class="m"&gt;100&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ans&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ToString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;F400&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;TrimEnd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sc"&gt;&amp;#39;0&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;F 뒤의 숫자만큼 0을 채워서라도 강제로 보여주는 형식이므로 TrimEnd를 통해 뒤의 0을 지워줌.&lt;/p&gt;</description></item></channel></rss>