One of the most, if not THE most, beautiful formulas in math, is from Euler: ![Euler_e_pi_i.png](/attachments/large/1/b32f45540a27b3efc328d14c60ee286c.png "align-center") It combines in it a relation between the number **e**, the number **Pi** and the complex number **i**, plus the basic math symbols 1, +, = and zero. Is that not amazing? More info on this formula can be found [here](https://en.wikipedia.org/wiki/Euler's_formula). The Complex type in C# is available as of .NET v4.0 and lives in the System.Numerics namespace. As this type is not used on a regular basis it is not included as reference in every project by default. So you have to … |
+1 forum
7 | ||

This snippet shows how to find the complex roots of a polynomial using python (tested with python 2.6). You need the scipy or numpy module. |
+2 forum
6 | ||

For the if discriminant < 0 statement, I need to not only display the error message, but I must display the complex roots in the correct format for complex numbers. How should I go about that? #include <iostream> #include <cmath> using std::cout; using std::cin; int main() { int a = 0, b = 0, c = 0, x1 = 0, x2 = 0, discriminant = 0; cout <<"Enter value for A: "; cin >> a; cout <<"Enter value for B: "; cin >> b; cout <<"Enter value for C: "; cin >> c; x1 = (-b + sqrt ((b * … |
+0 forum
2 | ||

Oh boy They ust be tired of me now. My trouble: I have two ArrayLists of custom classes. ``ArrayList<Subject>` **a**` ``ArrayList<Student>` **b**` Within those custom classes are other custom classes which themselves have primitive data types as well as an ArrayList of other custom classes. It's a big circus going on. How do I XMLEncode those two ArrayLists, **a** and **b**, so that all the information within them branching all the way down, is saved? (Also, is it possible to save both of these to the same file please?) |
+0 forum
4 | ||

Hello, I have used taylor polynomials to approximate floating-point values before. I am wondering whether there is a way to still apply them to functions with complex arguments, and if there is a way what its constraints would be. For example, to calculate the sine of a floating-point number to a specific precision I keep adding terms until the error value is less than the precision. However, I noticed (by testing it with the taylor expansion of ln(x) ) that this gives the wrong value when I use complex numbers (with the standard operators appropriately defined). For example: ln(0.5)~=-(0.5+(0.5^2)/2+(0.5^3)/3) --- … |
+0 forum
1 | ||

I wrote out a test for a Complex class on python but I'm getting an error. Here's what I have: class Complex: def __init__(self, real=0, imaginary=0): self._r=real self._i=imaginary def __add__ (self, other): return Complex((self._r + other._r), (self._i + other._i)) def __sub__ (self, other): return Complex((self._r - other._r), (self._i - other._i)) def __mul__ (self, other): return Complex((self._r * other._r - self._i * other._i), (self._r * other._i + self._i * other._r)) def __truediv__ (self, other): return Complex(((self._r * other._r + self._i * other._i)) / (self._i**2 + other._i**2), ((self._r * other._i - other._r * self._i)) / (self._i**2 + other._i**2)) def __str__ (self): if … |
+0 forum
3 | ||

Hello, this is just a general question. I always look at every website source when I visit it and I notice they are very robust and complex. Then I look at my site and think wow, mine is nothing like that. Is there an issue with that? Am I not taking the correct procidures to develop my website? It looks the same in every browser and behaves how I want it to. To my knowledge it seems to accomplish what I want, but its not complex at all. Bassically I am just curious if I am missing something. |
+0 forum
4 | ||

So i have write the following code (above) and now for the second part i am required to apply the Complex Number into finding the voltage across the Resistor in a series RLC circuit. The following tasks : Create an executable program Resonant Circuit, which allows you to output the voltage across the resistor. Output is through the main function. ![Capture](/attachments/small/4/Capture.JPG "align-left") The characteristic values of the resistance R (10 Ω), the inductance L (10 mH) and the capacitance C (10 nF) to be created as a constant in the function. Create a function voltageOverResistor that calculates the complex AC … |
+0 forum
2 | ||

I will show you how to use EasyXLS, a .NET or Java library, as a calculation engine. EasyXLS supports all mathematical operators like arithmetic, logical and unary operators, and a various set of functions as Financial functions, Logical functions, Lookup and Reference functions, Database and List Management functions, Math and Trigonometry functions, Information functions, Statistical functions, Text functions or Date and Time Functions. You may find a full list of supported formulas on chapter Formula Support from this document: [www.easyxls.com/docs/EasyXLS_DetailedSpecificationsSheet.pdf](http://www.easyxls.com/docs/EasyXLS_DetailedSpecificationsSheet.pdf) EasyXLS uses a table to store data. You may fill the table with values and formulas that use those values. … |
+0 forum
0 | ||

Hi, everybody I need to conduct a large amount of data analysis on database. Could anyone recommend an interactive application for data analysis? The requirements are: 1. Able to cope with the unexpected requirement rapidly. 2. Able to perform further computations on results interactively. 3. Easy to confront even a large amount of complex computations What would you great expert recommend? Thanks in advance. |
+0 forum
5 | ||

Hi, Is this a valid while loop? : while((grid[tr][tc]=='0'||grid[tr][tc]==s[i]) && tr<row && count<strlen(s)) { ++count; ++tr; } Although the full program compiles fine, but *sometimes* my program crashes during runtime giving me a "Access violation(Segmentation Fault)" error and the debugger points to this loop statement... By the way, I'm using dev c++ ... Regards, |
+0 forum
3 | ||

hi.. this is part of an assignment.. but any help will be greatly appreciated F(0) = 0 where F(z) is a linear polynomial of order n with complex coefficients F(z) = A(n)Z^n + A(n-1)Z^n-1 + ... + A(1) Z + A(0) = 0 this hasent formatted very well.. it's A(subscript n-1) and then Z to the power n-1. I need to solve the comlplex roots Z(1),Z(2),Z(3)...Z(n) i have already written a complex solver for simple functions eg x^2 = cos(x)-tan(x) and x^x. and i have written a complex quadratic solver. but i am unsure how to implement this function. i … |
+0 forum
4 | ||

Hello Guys! I have just inherited a huge mammoth php project, which is not quite organised. Few of the files are of 25K+ php lines of code. Several sections of code are redundant across the project. Several files are imported into several files... My job is to strip many of the unwanted features of this project. I am not a php guy, but I am comfortable with programming, so that should not be a problem. Can you folks please tell me what should be my strategy to work with project? I have the following in my mind. (1) Use eclipse, … |
+0 forum
1 | ||

I participated discussion about complex numbers and did some experiments in Python. I do not understand this behaviour (same behavious in 2.7.2 and 3.2.2): [CODE] >>> -(0+1j) (-0-1j) >>> -(0+1j)==-1j True >>> -(0+1j)+0 -1j >>> -(0+1j)-0 (-0-1j) >>>[/CODE] EDIT: Further investigation shows that there is -0.0 in Python, is this property of IEEE floating point arithmetic? [CODE]>>> -(1j) (-0-1j) >>> -(1j).real -0.0 >>> -0.0 -0.0 >>> -0.0==0 True >>> -0.0 is 0.0 False >>> 0.0 is 0.0 True >>> -0 is 0 True >>> [/CODE] And further it's id seems to change in each instance unlike 0.0: [CODE]>>> id(-0.0) 12428376 … |
+0 forum
1 | ||

i) Create a class called Complex for performing arithmetic with complex numbers. ii) Write a driver program to test your class. Complex numbers have the form realPart+imaginaryPart *i Where i is: √-1 Use floating point variables to represent the private data of the class. Provide a constructor method that enables an object of this class to be initialized when it is declared. Provide a no argument constructor with default values in case no initializes performing arithmetic with complex numbers are provided. Provide public methods for each of the following a) Addition of two Complex numbers: The real parts are added … |
+0 forum
14 | ||

This is hopefully example of properly tested code snippet (fingers crossed). |
+0 forum
3 | ||

Hi All I am new to XSLT development and have stuck at simple but essential point. I want to remove the content which is in between two specific comment tag <!--E-->Text which need to remove<!--/E--> I do try with the given below code [CODE]<xsl:template match="comment()"> <xsl:text disable-output-escaping="yes"><</xsl:text><xsl:value-of select="."><xsl:text disable-output-escaping="yes">></xsl:text> </xsl:template> <xsl:template match="E"/>[/CODE] But it won't seem to work. |
+0 forum
7 | ||

Hello everyone, I have successfully WRITTEN an array of complex numbers into .txt file using fprintf and scanf(). However, I have no idea how to READ this file. Please see the attached code and reply with your suggestions. Thank you in advance!! Joelem [CODE] #include<stdio.h> #include<stdlib.h> #include<math.h> #include<complex.h> int main() { _Complex double x[2][2],y[2][2]; x[0][0]=1+1i; x[0][1]=1+2i; x[1][0]=2+1i; x[1][1]=2+2i; //Writing the above complex array into .txt file FILE *fp; fp=fopen("tdata.txt", "w"); int j,k; for(j=0;j<2;j++) { for (k=0; k<2; k++) { fprintf(fp,"%g+%gi\t",creal(x[j][k]),cimag(x[j][k])); } fprintf(fp,"\n"); } fclose(fp); //Reading the file from .txt file FILE *hFile; hFile = fopen("tdata.txt", "r"); if (hFile == NULL) … |
+0 forum
1 | ||

I am new to SQL query. I would like to join two SQL queries (MS Office Query and Computer Details Quer) into one. The tables output can be found at [URL="http://rapidshare.com/files/412276985/SQL_query.zip"]http://rapidshare.com/files/412276985/SQL_query.zip[/URL] Or, from [email removed] Thanks for your guidance, below are the query: 1) MS Office Query: ================ [CODE]select v_Add_Remove_Programs.DisplayName0 AS [MS Office Edition] from v_Add_Remove_Programs where DisplayName0 like 'Microsoft Office Project Professional%' OR DisplayName0 like 'Microsoft Office Visio Standard%' OR DisplayName0 like'Microsoft Office Visio Professional%' OR DisplayName0 like 'Microsoft Office Enterprise%'OR DisplayName0 like 'Microsoft Office Standard%' OR DisplayName0 like 'Microsoft Office Professional%'[/CODE] 2) Computer Details Query: ======================= [CODE]select distinct … |
+0 forum
1 | ||

Hey guys, my name is Ross. Im new to programming and i need some help with assembler. I have a menu with a number of options that the user can do. 1. The first one is the user must input a string of characters up to the limit of 25 and then give a error message. i can get the menu done with the input but i cant seem to get the error message. 2. The second option is to display the string inputted by the user, which i have done, so no problem there. 3. I need to display … |
+0 forum
0 | ||

My problem is I want to be able to read through this xml document and populate a winform before validating it and then storing it into a table. This is a snippet of the xml document, it's way too big to put it all here. [code=xml] - <Applicant> + <common:PersonName> <pdt:PersonNameTitle>Mrs</pdt:PersonNameTitle> <pdt:PersonGivenName>Helen</pdt:PersonGivenName> <pdt:PersonFamilyName>Smith</pdt:PersonFamilyName> </common:PersonName> <common:OrgName>Royal Borough of Kingston</common:OrgName> + <common:ExternalAddress> - <common:InternationalAddress> <apd:IntAddressLine>Learning & Children's Services</apd:IntAddressLine> <apd:IntAddressLine>High Road</apd:IntAddressLine> <apd:IntAddressLine>Noth London</apd:IntAddressLine> <apd:IntAddressLine>Edmonton</apd:IntAddressLine> <apd:IntAddressLine /> <apd:Country /> <apd:InternationalPostCode>JT1 1EU</apd:InternationalPostCode> </common:InternationalAddress> </common:ExternalAddress> - <common:ContactDetails PreferredContactMedium="Telephone"> - <common:Email EmailPreferred="no" EmailUsage="work"> <apd:EmailAddress>helen.smith@someemail.com</apd:EmailAddress> </common:Email> - <common:Telephone TelMobile="no" TelPreferred="yes" TelUse="work"> <apd:TelNationalNumber>020 888 8888</apd:TelNationalNumber> </common:Telephone> - <common:Telephone TelMobile="yes" … |
+0 forum
2 | ||

I'm trying to create a program in C# that allows for arithmetic of Complex Numbers. Just adding, subtracting, multiplying and dividing. Anyone got any suggestions? |
+0 forum
2 | ||

Hi, There's not much to add to the title... after I assign the complex object to the session object, the following response.redirect method stops working and hangs the development server. (I tried without it and it works great) maybe there is some considerations to care about session objects, I don't know... Help please!... Thanks |
+0 forum
0 |

The End.