<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FCSharp_Tutorial%2FDevelopment%2FMath_Function</id>
		<title>Csharp/CSharp Tutorial/Development/Math Function - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FCSharp_Tutorial%2FDevelopment%2FMath_Function"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Development/Math_Function&amp;action=history"/>
		<updated>2026-04-29T23:44:38Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Development/Math_Function&amp;diff=5209&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Development/Math_Function&amp;diff=5209&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:53Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:31, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Development/Math_Function&amp;diff=5210&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Development/Math_Function&amp;diff=5210&amp;oldid=prev"/>
				<updated>2010-05-26T12:14:36Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Calculate the radius of a circle given its area using Math function==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System; &lt;br /&gt;
 &lt;br /&gt;
class MainClass {    &lt;br /&gt;
  public static void Main() {    &lt;br /&gt;
    Double r; &lt;br /&gt;
    Double area; &lt;br /&gt;
 &lt;br /&gt;
    area = 10.0; &lt;br /&gt;
 &lt;br /&gt;
    r = Math.Sqrt(area / 3.1416); &lt;br /&gt;
 &lt;br /&gt;
    Console.WriteLine(&amp;quot;Radius is &amp;quot; + r); &lt;br /&gt;
  }    &lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Radius is 1.78412203012729&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Math.Cos()==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System; &lt;br /&gt;
 &lt;br /&gt;
class Example {    &lt;br /&gt;
  public static void Main() {    &lt;br /&gt;
    Double theta; // angle in radians &lt;br /&gt;
     &lt;br /&gt;
    for(theta = 0.1; theta &amp;lt;= 1.0; theta = theta + 0.1) { &lt;br /&gt;
      Console.WriteLine(&amp;quot;Cosine of &amp;quot; + theta + &amp;quot;  is &amp;quot; + &lt;br /&gt;
                        Math.Cos(theta)); &lt;br /&gt;
      Console.WriteLine(); &lt;br /&gt;
    } &lt;br /&gt;
 &lt;br /&gt;
  }    &lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Cosine of 0.1  is 0.995004165278026&lt;br /&gt;
Cosine of 0.2  is 0.980066577841242&lt;br /&gt;
Cosine of 0.3  is 0.955336489125606&lt;br /&gt;
Cosine of 0.4  is 0.921060994002885&lt;br /&gt;
Cosine of 0.5  is 0.877582561890373&lt;br /&gt;
Cosine of 0.6  is 0.825335614909678&lt;br /&gt;
Cosine of 0.7  is 0.764842187284489&lt;br /&gt;
Cosine of 0.8  is 0.696706709347166&lt;br /&gt;
Cosine of 0.9  is 0.621609968270665&lt;br /&gt;
Cosine of 1  is 0.54030230586814&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Math defines several standard mathematical operations. ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&amp;lt;LI&amp;gt;All of the methods defined by Math are static.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;All angles are in radians.&amp;lt;/LI&amp;gt;&amp;lt;/OL&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Math also defines these two fields:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;OL&amp;gt;&amp;lt;LI&amp;gt;public const double E&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;public const double PI&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;E is the value of the natural logarithm base, commonly referred to as e.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;PI is the value of pi.&amp;lt;/LI&amp;gt;&amp;lt;/OL&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Math class is sealed and it cannot be inherited.&amp;lt;/p&amp;gt;&lt;br /&gt;
14.13.Math Function&lt;br /&gt;
14.13.1.&lt;br /&gt;
Math defines several standard mathematical operations. &lt;br /&gt;
14.13.2.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0280__Development/TheMethodsDefinedbyMath.htm&amp;quot;&amp;gt;The Methods Defined by Math &amp;lt;/a&amp;gt;&lt;br /&gt;
14.13.3.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0280__Development/Mathfunctionsinaction.htm&amp;quot;&amp;gt;Math functions in action&amp;lt;/a&amp;gt;&lt;br /&gt;
14.13.4.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0280__Development/MathSin.htm&amp;quot;&amp;gt;Math.Sin()&amp;lt;/a&amp;gt;&lt;br /&gt;
14.13.5.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0280__Development/CalculatetheradiusofacirclegivenitsareausingMathfunction.htm&amp;quot;&amp;gt;Calculate the radius of a circle given its area using Math function&amp;lt;/a&amp;gt;&lt;br /&gt;
14.13.6.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0280__Development/MathCos.htm&amp;quot;&amp;gt;Math.Cos()&amp;lt;/a&amp;gt;&lt;br /&gt;
14.13.7.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0280__Development/MathTan.htm&amp;quot;&amp;gt;Math.Tan()&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Math functions in action==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.Globalization;&lt;br /&gt;
using System.IO;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Security.Cryptography;&lt;br /&gt;
public class MainClass&lt;br /&gt;
{&lt;br /&gt;
    public static void Main()&lt;br /&gt;
    {&lt;br /&gt;
        Console.WriteLine(&amp;quot;Abs({0}) = {1}&amp;quot;, -55, Math.Abs(-55));&lt;br /&gt;
        Console.WriteLine(&amp;quot;Ceiling({0}) = {1}&amp;quot;, 55.3, Math.Ceiling(55.3));&lt;br /&gt;
        Console.WriteLine(&amp;quot;Pow({0},{1}) = {2}&amp;quot;, 10.5, 3, Math.Pow(10.5, 3));&lt;br /&gt;
        Console.WriteLine(&amp;quot;Round({0},{1}) = {2}&amp;quot;,10.55358, 2, Math.Round(10.55358, 2));&lt;br /&gt;
        Console.WriteLine(&amp;quot;Sin({0}) = {1}&amp;quot;, 323.333, Math.Sin(323.333));&lt;br /&gt;
        Console.WriteLine(&amp;quot;Cos({0}) = {1}&amp;quot;, 323.333, Math.Cos(323.333));&lt;br /&gt;
        Console.WriteLine(&amp;quot;Tan({0}) = {1}&amp;quot;, 323.333, Math.Tan(323.333));&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Abs(-55) = 55&lt;br /&gt;
Ceiling(55.3) = 56&lt;br /&gt;
Pow(10.5,3) = 1157.625&lt;br /&gt;
Round(10.55358,2) = 10.55&lt;br /&gt;
Sin(323.333) = 0.248414709883854&lt;br /&gt;
Cos(323.333) = -0.968653772982546&lt;br /&gt;
Tan(323.333) = -0.256453561440193&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Math.Sin()==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System; &lt;br /&gt;
 &lt;br /&gt;
class MainClass {    &lt;br /&gt;
  public static void Main() {    &lt;br /&gt;
    Double theta; // angle in radians &lt;br /&gt;
     &lt;br /&gt;
    for(theta = 0.1; theta &amp;lt;= 1.0; theta = theta + 0.1) { &lt;br /&gt;
      Console.WriteLine(&amp;quot;Sine of &amp;quot; + theta + &amp;quot;  is &amp;quot; + &lt;br /&gt;
                        Math.Sin(theta)); &lt;br /&gt;
      Console.WriteLine(); &lt;br /&gt;
    } &lt;br /&gt;
 &lt;br /&gt;
  }    &lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Sine of 0.1  is 0.0998334166468282&lt;br /&gt;
Sine of 0.2  is 0.198669330795061&lt;br /&gt;
Sine of 0.3  is 0.29552020666134&lt;br /&gt;
Sine of 0.4  is 0.389418342308651&lt;br /&gt;
Sine of 0.5  is 0.479425538604203&lt;br /&gt;
Sine of 0.6  is 0.564642473395035&lt;br /&gt;
Sine of 0.7  is 0.644217687237691&lt;br /&gt;
Sine of 0.8  is 0.717356090899523&lt;br /&gt;
Sine of 0.9  is 0.783326909627483&lt;br /&gt;
Sine of 1  is 0.841470984807896&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Math.Tan()==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System; &lt;br /&gt;
 &lt;br /&gt;
class Example {    &lt;br /&gt;
  public static void Main() {    &lt;br /&gt;
    Double theta; // angle in radians &lt;br /&gt;
     &lt;br /&gt;
    for(theta = 0.1; theta &amp;lt;= 1.0; theta = theta + 0.1) { &lt;br /&gt;
      Console.WriteLine(&amp;quot;Tangent of &amp;quot; + theta + &amp;quot;  is &amp;quot; + &lt;br /&gt;
                        Math.Tan(theta)); &lt;br /&gt;
      Console.WriteLine(); &lt;br /&gt;
    } &lt;br /&gt;
 &lt;br /&gt;
  }    &lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Tangent of 0.1  is 0.100334672085451&lt;br /&gt;
Tangent of 0.2  is 0.202710035508673&lt;br /&gt;
Tangent of 0.3  is 0.309336249609623&lt;br /&gt;
Tangent of 0.4  is 0.422793218738162&lt;br /&gt;
Tangent of 0.5  is 0.54630248984379&lt;br /&gt;
Tangent of 0.6  is 0.684136808341692&lt;br /&gt;
Tangent of 0.7  is 0.842288380463079&lt;br /&gt;
Tangent of 0.8  is 1.02963855705036&lt;br /&gt;
Tangent of 0.9  is 1.26015821755034&lt;br /&gt;
Tangent of 1  is 1.5574077246549&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The Methods Defined by Math ==&lt;br /&gt;
&lt;br /&gt;
Method&lt;br /&gt;
Meaning&lt;br /&gt;
public static double Abs(double v)&lt;br /&gt;
the absolute value.&lt;br /&gt;
public static float Abs(float v)&lt;br /&gt;
the absolute value.&lt;br /&gt;
public static decimal Abs(decimal v)&lt;br /&gt;
the absolute value.&lt;br /&gt;
public static int Abs(int v)&lt;br /&gt;
the absolute value.&lt;br /&gt;
public static short Abs(short v)&lt;br /&gt;
the absolute value.&lt;br /&gt;
public static long Abs(long v)&lt;br /&gt;
the absolute value.&lt;br /&gt;
public static sbyte Abs(sbyte v)&lt;br /&gt;
the absolute value.&lt;br /&gt;
public static double Acos(double v)&lt;br /&gt;
the arc cosine. v must be between -1 and 1.&lt;br /&gt;
public static double Asin(double v)&lt;br /&gt;
the arc sine. v must be between -1 and 1.&lt;br /&gt;
public static double Atan(double v)&lt;br /&gt;
the arc tangent.&lt;br /&gt;
public static double Atan2(double y, double x)&lt;br /&gt;
the arc tangent of y/x.&lt;br /&gt;
public static double Ceiling(double v)&lt;br /&gt;
the smallest integer (represented as a floating-point value) not less than v. For example, given 1.02, Ceiling() returns 2.0. Given -1.02, Ceiling() returns -1.&lt;br /&gt;
public static double Cos(double v)&lt;br /&gt;
the cosine.&lt;br /&gt;
public static double Cosh(double v)&lt;br /&gt;
the hyperbolic cosine.&lt;br /&gt;
public static double Exp(double v)&lt;br /&gt;
the natural logarithm base e raised to the v power.&lt;br /&gt;
public static double Floor(double v)&lt;br /&gt;
the largest integer (represented as a floating-point value) not greater than v. For example, given 1.02, Floor() returns 1.0. Given -1.02, Floor() returns -2.&lt;br /&gt;
public static doubleIEEERemainder(double dividend,double divisor)&lt;br /&gt;
Returns the remainder of dividend / divisor.&lt;br /&gt;
public static double Log(double v)&lt;br /&gt;
the natural logarithm.&lt;br /&gt;
public static double Log(double v,double base)&lt;br /&gt;
Returns the logarithm for v using base base.&lt;br /&gt;
public static double Log10(double v)&lt;br /&gt;
Returns the base 10 logarithm for v.&lt;br /&gt;
public static double Max(double v1, double v2)&lt;br /&gt;
Returns the greater of v1 and v2.&lt;br /&gt;
public static float Max(float v1, float v2)&lt;br /&gt;
Returns the greater of v1 and v2.&lt;br /&gt;
public static decimal Max(decimal v1,decimal v2)&lt;br /&gt;
Returns the greater of v1 and v2.&lt;br /&gt;
public static int Max(int v1, int v2)&lt;br /&gt;
Returns the greater of v1 and v2.&lt;br /&gt;
public static short Max(short v1, short v2)&lt;br /&gt;
Returns the greater of v1 and v2.&lt;br /&gt;
public static long Max(long v1, long v2)&lt;br /&gt;
Returns the greater of v1 and v2.&lt;br /&gt;
public static uint Max(uint v1, uint v2)&lt;br /&gt;
Returns the greater of v1 and v2.&lt;br /&gt;
public static ushort Max(ushort v1,ushort v2)&lt;br /&gt;
Returns the greater of v1 and v2.&lt;br /&gt;
public static ulong Max(ulong v1,ulong v2)&lt;br /&gt;
Returns the greater of v1 and v2.&lt;br /&gt;
public static byte Max(byte v1, byte v2)&lt;br /&gt;
Returns the greater of v1 and v2.&lt;br /&gt;
public static sbyte Max(sbyte v1, sbyte v2)&lt;br /&gt;
Returns the greater of v1 and v2.&lt;br /&gt;
public static double Min(double v1,double v2)&lt;br /&gt;
Returns the lesser of v1 and v2.&lt;br /&gt;
public static float Min(float v1, float v2)&lt;br /&gt;
Returns the lesser of v1 and v2.&lt;br /&gt;
public static decimal Min(decimal v1,decimal v2)&lt;br /&gt;
Returns the lesser of v1 and v2.&lt;br /&gt;
public static int Min(int v1, int v2)&lt;br /&gt;
Returns the lesser of v1 and v2.&lt;br /&gt;
public static short Min(short v1, short v2)&lt;br /&gt;
Returns the lesser of v1 and v2.&lt;br /&gt;
public static long Min(long v1, long v2)&lt;br /&gt;
Returns the lesser of v1 and v2.&lt;br /&gt;
public static uint Min(uint v1, uint v2)&lt;br /&gt;
Returns the lesser of v1 and v2.&lt;br /&gt;
public static ushort Min(ushort v1,ushort v2)&lt;br /&gt;
Returns the lesser of v1 and v2.&lt;br /&gt;
public static ulong Min(ulong v1, ulong v2)&lt;br /&gt;
Returns the lesser of v1 and v2.&lt;br /&gt;
public static byte Min(byte v1, byte v2)&lt;br /&gt;
Returns the lesser of v1 and v2.&lt;br /&gt;
public static sbyte Min(sbyte v1, sbyte v2)&lt;br /&gt;
Returns the lesser of v1 and v2.&lt;br /&gt;
public static double Pow(double base,double exp)&lt;br /&gt;
Returns base raised to the exp power(baseexp).&lt;br /&gt;
public static double Round(double v)&lt;br /&gt;
Returns v rounded to the nearest whole number.&lt;br /&gt;
public static decimal Round(decimal v)&lt;br /&gt;
Returns v rounded to the nearest whole number.&lt;br /&gt;
public static double Round(double v,int frac)&lt;br /&gt;
Returns v rounded to the number of fractional digits specified by frac.&lt;br /&gt;
public static decimal Round(decimal v,int frac)&lt;br /&gt;
Returns v rounded to the number of fractional digits specified by frac.&lt;br /&gt;
public static int Sign(double v)&lt;br /&gt;
Returns -1 if v is less than zero, 0 if v is zero, and 1 if v is greater than zero.&lt;br /&gt;
public static int Sign(float v)&lt;br /&gt;
Returns -1 if v is less than zero, 0 if v is zero, and 1 if v is greater than zero.&lt;br /&gt;
public static int Sign(decimal v)&lt;br /&gt;
Returns -1 if v is less than zero, 0 if v is zero, and 1 if v is greater than zero.&lt;br /&gt;
public static int Sign(int v)&lt;br /&gt;
Returns -1 if v is less than zero, 0 if v is zero, and 1 if v is greater than zero.&lt;br /&gt;
public static int Sign(short v)&lt;br /&gt;
Returns -1 if v is less than zero, 0 if v is zero, and 1 if v is greater than zero.&lt;br /&gt;
public static int Sign(long v)&lt;br /&gt;
Returns -1 if v is less than zero, 0 if v is zero, and 1 if v is greater than zero.&lt;br /&gt;
public static int Sign(sbyte v)&lt;br /&gt;
Returns -1 if v is less than zero, 0 if v is zero, and 1 if v is greater than zero.&lt;br /&gt;
public static double Sin(double v)&lt;br /&gt;
Returns the sine of v.&lt;br /&gt;
public static double Sinh(double v)&lt;br /&gt;
Returns the hyperbolic sine of v.&lt;br /&gt;
public static double Sqrt(double v)&lt;br /&gt;
Returns the square root of v.&lt;br /&gt;
public static double Tan(double v)&lt;br /&gt;
Returns the tangent of v.&lt;br /&gt;
public static double Tanh(double v)&lt;br /&gt;
Returns the hyperbolic tangent of v.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>