199 views

Uploaded by Sarourn Soth

Math in Visual basic 2010

- Math246 Exercises
- VCE Mathematical Methods 1&2
- Fortran 77 Intrinsic Functions
- Calculus-Based-Physics.pdf
- Graphing Sine and Cosine (1)
- hwk4
- Trigonometry and Double Algebra (1849)
- PRO2_03e
- Trigonometry Condensed Formula Sheet
- ACT数学难题集（蒋正浩老师）.docx
- Integration Using Trig Identities
- Editing-Mathematics.pdf
- Integral Digest
- Graphs of Trigo Functions
- Mathematics Formulary
- Mathematical and Scientific Symbols
- 9.5 Trigonometric Ratios
- GeomTrigStats_1.pdf
- FE Exam Common File
- Complex Mindlin

You are on page 1of 4

Basic)

Visual Studio 2015

Other Versions

The methods of the System.Math class provide trigonometric, logarithmic, and other

common mathematical functions.

Remarks

The following table lists methods of the System.Math class. You can use these in a Visual

Basic program.

.NET Framework

method

Description

Abs

Acos

Asin

Atan

Atan2

numbers.

BigMul

Ceiling

Returns the smallest integral value that's greater than or equal to the

specified Decimal or Double.

Cos

Cosh

DivRem

Returns the quotient of two 32-bit or 64-bit signed integers, and also

returns the remainder in an output parameter.

Exp

power.

Floor

specified Decimal or Double number.

IEEERemainder

Log

logarithm of a specified number in a specified base.

Log10

Max

Min

Pow

Round

value or to a specified number of fractional digits.

Sign

Sin

Sinh

Sqrt

Tan

Tanh

Truncate

specified Decimal or Double number.

To use these functions without qualification, import the System.Math namespace into

your project by adding the following code to the top of your source file:

Imports System.Math

Example

This example uses the Abs method of the Math class to compute the absolute value of a

number.

' Returns 50.3.

Dim MyNumber1 As Double = Math.Abs(50.3)

' Returns 50.3.

Dim MyNumber2 As Double = Math.Abs(-50.3)

Example

This example uses the Atan method of the Math class to calculate the value of pi.

Public Function GetPi() As Double

' Calculate the value of pi.

Return 4.0 * Math.Atan(1.0)

End Function

Example

This example uses the Cos method of the Math class to return the cosine of an angle.

' Calculate the secant of angle, in radians.

Return 1.0 / Math.Cos(angle)

End Function

Example

This example uses the Exp method of the Math class to return e raised to a power.

Public Function Sinh(ByVal angle As Double) As Double

' Calculate hyperbolic sine of an angle, in radians.

Return (Math.Exp(angle) - Math.Exp(-angle)) / 2.0

End Function

Example

This example uses the Log method of the Math class to return the natural logarithm of a

number.

Public Function Asinh(ByVal value As Double) As Double

' Calculate inverse hyperbolic sine, in radians.

Return Math.Log(value + Math.Sqrt(value * value + 1.0))

End Function

Example

This example uses the Round method of the Math class to round a number to the nearest

integer.

' Returns 3.

Dim MyVar2 As Double = Math.Round(2.8)

Example

This example uses the Sign method of the Math class to determine the sign of a number.

' Returns 1.

Dim MySign1 As Integer = Math.Sign(12)

' Returns -1.

Dim MySign2 As Integer = Math.Sign(-2.4)

' Returns 0.

Dim MySign3 As Integer = Math.Sign(0)

Example

This example uses the Sin method of the Math class to return the sine of an angle.

Public Function Csc(ByVal angle As Double) As Double

' Calculate cosecant of an angle, in radians.

Return 1.0 / Math.Sin(angle)

End Function

Example

This example uses the Sqrt method of the Math class to calculate the square root of a

number.

' Returns 2.

Dim MySqr1 As Double = Math.Sqrt(4)

' Returns 4.79583152331272.

Dim MySqr2 As Double = Math.Sqrt(23)

' Returns 0.

Dim MySqr3 As Double = Math.Sqrt(0)

' Returns NaN (not a number).

Dim MySqr4 As Double = Math.Sqrt(-4)

Example

This example uses the Tan method of the Math class to return the tangent of an angle.

Public Function Ctan(ByVal angle As Double) As Double

' Calculate cotangent of an angle, in radians.

End Function

Requirements

Class: Math

Namespace: System

Assembly: mscorlib (in mscorlib.dll)

- Math246 ExercisesUploaded byJose Francisco
- VCE Mathematical Methods 1&2Uploaded byLuke Xu
- Fortran 77 Intrinsic FunctionsUploaded byrodwellhead
- Calculus-Based-Physics.pdfUploaded byRaee Rifiuti
- Graphing Sine and Cosine (1)Uploaded byNia
- hwk4Uploaded byakr_659
- Trigonometry and Double Algebra (1849)Uploaded byMarcelo Silvano de Camargo
- PRO2_03eUploaded byghita_gabriel
- Trigonometry Condensed Formula SheetUploaded byRiza Azari
- ACT数学难题集（蒋正浩老师）.docxUploaded byo
- Integration Using Trig IdentitiesUploaded byJose Villegas
- Editing-Mathematics.pdfUploaded byWilliam Guaman
- Integral DigestUploaded bySzép Gyuszi
- Graphs of Trigo FunctionsUploaded byAzratee Zawawi
- Mathematics FormularyUploaded bySahilChandna
- Mathematical and Scientific SymbolsUploaded byEm Bi Cuong
- 9.5 Trigonometric RatiosUploaded by17roopa2010
- GeomTrigStats_1.pdfUploaded bygozamen
- FE Exam Common FileUploaded byMuZzamil ShahId
- Complex MindlinUploaded bybabel_stan
- 9 inverse sine cosine and tangentUploaded byapi-299265916
- 6 5 TrigonometryUploaded byic
- Fields Lec9Uploaded bytogauravsaxena
- Inverse Trig Functions2 (1)Uploaded byFemina Lucas
- classnote-5048e993daf23.pdfUploaded byPuneet Gupta
- IOandDataUploaded byAAer Hiar AAry
- rUploaded byapi-444439435
- Ch# 10+11 (T#2)Uploaded byQaisar Riaz
- unit 6Uploaded byapi-295570773
- mc-ty-doubleangle-2009-1Uploaded byapi-213604106

- Tunnel Face Stability Analysis in Soft Ground in Urban Tunneling by EPB Shield.Uploaded byChin Thau Wui
- Jasi2010.pdfUploaded bySatish Dhandole
- Code_snippets_Intro_to_scripting_in_Blender_25xUploaded bySubbu Addanki
- Aieee Detailed Notes With Illustrative Examples Physics Gravitation-1 DecryptedUploaded byVishal Kalra
- Staircases 1Uploaded byHundeejireenya
- WR ENV Sample 80Uploaded byhasan2010j
- 10ElectrostaticsandElectricFieldsUploaded bysteve223255313251
- Research Methodology and Statistical AnalysisUploaded bySahibzadi Ayesha Aziz
- graphic organizer answer sample shin sulUploaded byapi-302581865
- UTRAN Cell User Throughput(Day) P612 (2)Uploaded byRaju Sutradhar
- UML NotationsUploaded bymk_valiant
- Treatise of Human Nature I.iv Modern EnglishUploaded bysf387
- Giovanni Landi, Alessandro Zampini - Linear Algebra and Analytic Geometry for Physical Sciences (2018, Springer).pdfUploaded byThiago Ferreira
- Railway Curve BookUploaded byPeggy Jan Qorban
- Mc Donald & Da-Wen-(1999) Predictive Food Microbiology for the Meat Industry a ReviewUploaded bysophie_7411
- Pde in DIPUploaded byAhlad Kumar
- Stability Theory of Large-Scale Dynamical Systems.pdfUploaded byriki
- Exam Questions - Probability and Tree DiagramsUploaded byJoel Gray
- 2. Matematik Tambahan SoalanUploaded byDequeNo Mohd Noor
- Olver PDE Student Solutions ManualUploaded byKhaled Tamimy
- Force SystemsUploaded byArjay
- Fourier Series in MathsUploaded byCh Ashish Dahiya
- Micro-FGM-pull-inUploaded byhmsedighi459
- Urban Air Pollution and Its Effect on Forced Expiratory Volume of LungsUploaded byAJER JOURNAL
- Power System Optimization [Kothari].pdfUploaded byCManzur
- Chapter 1-MATH 101Uploaded byHassan Mosa
- AEE 463 Homework 12Uploaded byAndy Tran
- Quadratic EquationsUploaded byNíkhíl Bansal
- Adaptive Neuro Fuzzy Controller Based Power System Stabilizer for Damping of Power Oscillation Control in Two Area Four Machine Power SystemUploaded byIJMTST-Online Journal
- Neural Conversational ModelUploaded byAdam Cadmon