473,750 Members | 2,529 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Math Library

I am unable to find System.Math Library. How to add it. I am trying find
squre root of a number
Sep 4 '07 #1
2 3615
On Sep 4, 2:12 pm, raju <r...@discussio ns.microsoft.co mwrote:
I am unable to find System.Math Library. How to add it. I am trying find
squre root of a number
Math is a static class in the System namespace in the mscorlib
library. Unless you have your compilation settings to remove mscorlib
(not smart) you should have it referenced

double result = System.Math.Sqr t(myval);

or

using System;

....

double result = Math.Sqrt(myval );
Sep 4 '07 #2
raju,

Math is a class in the System namespace, and is included in
mscorlib.dll. To find the square root of a number, you can easily do this:

double squareRoot = Math.Sqrt(4);
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"raju" <ra**@discussio ns.microsoft.co mwrote in message
news:7F******** *************** ***********@mic rosoft.com...
>I am unable to find System.Math Library. How to add it. I am trying find
squre root of a number

Sep 4 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2299
by: Jussi Mononen | last post by:
Hi, I'm having problems to successfully execute the test scripts on a Compaq host ( OSF1 tr51bdev V5.1 2650 alpha ). Almost all tests end up with the following error message "PARI: *** Invalid arguments to divll. at test_eng/Testout.pm line 30. ...propagated at t/polyser.t line 9. t/polyser.....dubious
8
2921
by: Sensei | last post by:
I have a quick question about the math library included in the standard C90 (and 99). The gcc, xlc and possibly other compilers/linkers on some unix platforms cannot use any math functions in math.h if a switch (-lm) is used, so *explicitly* having the linker use a file called libm.so or libm.a/dylib/whatever. Is it true on all the platforms? (answer: probably no)
21
2847
by: Rich | last post by:
I was considering C# for developing a scientific application, but I have noticed a ~30% difference between VC++ .NET and C# on the same machine, under identical conditions: double a = 0,b = 0, c = 0, d = 0, e = 0; for(int n = 0; n != 6000000; n++) { a = n % 5 *2 / 3 - 4 + 6 / 3 - n + n * 2; b = n * 2.3 - 1 *2 / 3 - 4 + 6 / 3 - n + n * 2; c = n * 3 / 3.5 *2 / 3 - 4 + 6 / 3 - n + n * 2;
3
8530
by: DrJRice | last post by:
I have just switched from VB6 to vb .net. In Vosual Studio.net I am missing the reference to System.Math and can not find it anywhere. I assume is is System.Math.dll. Where the hell is it? Thanks, Jim
6
9553
by: Mitchell Vincent | last post by:
Just making sure I'm not missing the boat here, but are there any special routines for doing currency math (fixed precision stuff) in .NET? The wonderful problems of doing math on decimals tend to shine when writing accounting software :-) How are others dealing with this? -- - Mitchell Vincent
5
9999
by: Martin Vilcans | last post by:
Hi, I'm new to this mailing list and fairly new to Python as well. I'm working on a prototype for a 3D game using OpenGL, and take this opportunity to learn Python better. I'm looking for a good library for vector math. I need to do vector addition, cross products, dot products etc. and probably in the future I'll need matrix math as well. So far I've used the Scientific library, which is very nice, but unfortunately it crashes when I...
110
8589
by: Gregory Pietsch | last post by:
I'm writing a portable implementation of the C standard library for http://www.clc-wiki.net and I was wondering if someone could check the functions in math.h for sanity/portability/whatever. I'm almost halfway through writing the over 200 functions needed to implement C99's version of math.h, and I would like to have some feedback and/or expert advice on my implementations. Sincerely, Gregory Pietsch
1
1223
by: imdognuts | last post by:
hi, My application that contains the .o's that were generated from using "freeze" needs to import math. The point of using freeze was to make a static application that can be shipped as a single entity (it contains the dot o's from libpython2.4.a), vs having to worry about external python dependencies. "importing math" as far as I can tell right now, invokes a shared library (math.so). Now I have a shared library dependency that I...
15
3102
by: Chris | last post by:
>>from math import * 0.0 1.2246063538223773e-016 -2.4492127076447545e-016 1.0 -1.0 1.0 The cosine function works fine, but I'm getting weird answers for sine. Is this a bug? Am I doing something wrong?
5
13543
by: aguirre.adolfo | last post by:
Hi, I am a very newbie who would very much appreciate some hints. Python 2.52. on Windows XP for now. Soon on Ubuntu 8 I am teaching myself Python following free tutorials. I can solve problems using arithmetic, but when I try to upgrade the programs using math libraries nothing seems to work. I downloaded a 2002 tutorial from Zelle "An Introduction to Computer Science" where he uses a "import math" statement to calculate a square...
0
8840
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9584
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9259
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6817
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4717
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4895
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3328
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2228
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.