Hi I am trying to write a code that finds approximations of sine and cosine using the equations below with a given value of theta in degrees basically as a novice programmer i am having trouble setting upa a while loop for the expansions. Also can you guys please quote sources(books,web pages, etc.) for a beginner programmer in python for syntax and basic concepts. cos(x)= 1- x2/2! + x4/4! - x6/6! + .. sin(x)= x - x3/3! + x5/5! - x7/7! + .. Thanks in advance. |
+0 forum
3 | ||

I'm trying to implement an algoirthm descirbed here: http://pub.uni-bielefeld.de/luur/download?func=downloadFile&recordOId=2497720&fileOId=2525546 The purpose of that algorithm is to create a concept hierarchy based on a document corpus. For instants, a "Dog" concept would be a child of the "Animal" concept in such a hierarchy. To the point, I've come accross a peice of the implementation that I can't riddle out. It's refering to a mysteriouse (t1, m) and (t2, n). Though t1 and t2 clearly refer to terms (and before are mentioned as the tuple: (t1, t2)), m and n are never explained. Anywhere. I do computer science as a hobby, so … |
+0 forum
2 | ||

I have the code for the first part of a problem, which is to write a program that reads an angle x (in radians) from the keyboard. Then, in a function, compute the cosine of the angle using the ﬁrst ﬁve terms of this series. Print the value computed along with the value of the cosine computed using the C++ library function. However, I need help modifying the program so that the approximation uses terms from the series as long as the absolute value of a term is greater than 0.0001. Also, print the number of terms used in the … |
+0 forum
8 | ||

I'm trying to create a program that computes the values of cos using the Taylor Series as long as the absolute value of a term is greater than 0.0001 and prints the number of terms used in the series approximation. My code is the following and as of right now I am getting the wrong result. Please help me fix it! I've spent hours trying to figure it out and don't know what to do. Enter the angle in radians: 3.14 There were 8 numbers of terms used in the series approximation. The calculated cosine of 3.14 is 0.00499852 The … |
+0 forum
12 | ||

Below are my code lines for computing cosine similarity over a list of values. My goal is to compute cosine similarity for each value in the f-list (f=[[3492.6], [13756.2], [22442.1], [22361.9], [26896.4]]) by taking a value from the list and compute how close in terms of cosine distance the rest values in the list are from it. Hence the result should be five different similarity scores. However, for some reason, I keep getting 1.0 as the cosine similarity even when I tested the code on other data sets. Obviously, [22361.9] is more similar to [22442.1] than [13756.2] (with respect to … |
+0 forum
0 | ||

Can anyone please explain to me how to compute DCT? I'm finding it hard to understand it. ![2D-DCT](/attachments/large/3/2D-DCT.png "2D-DCT") ![dct1](/attachments/small/3/dct1.png "align-right") I attached the formulas the Discrete Cosine Transform (DCT) and it's Inverse-DCT. |
+0 forum
6 | ||

How to get the **Sine** and **Cosine** of an **inputed** number by the user? |
+0 forum
2 |

The End.