473,382 Members | 1,526 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

can someone check this for me?

sum += pow(-1., (double)n) * ((pow((2. * angle_rad),(2. * (double)n))) / factori
al);
value = 0.5 * (1 + sum);


this is the equation i wrote out for

cos^2(x)=0.5*(1+Sum[(-1)^n (2*x)^(2n)/(2n)!])

assuming i set up all the variables correctly, does this seem right?
Oct 30 '06 #1
0 1005

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: MarcJessome | last post by:
Hi, I was wondering if someone could help me through learning C++. I've tried learning before, but I find I would work better if I had someone that could help explain a few things to me. Im using...
6
by: Helmut Giese | last post by:
Hello out there, I am a rather experienced C programmer. However, today I got a javascript assignment because someone left (something like: "You're a great programmer - you'll handle this.") and I...
1
by: sparks | last post by:
I have done a LOT of databases in access 97 but I am new to access 2000. We are S L O W L Y converting over. Yesterday I had a 97 database that I had to run the converter to 2000 and everything...
17
by: Zach | last post by:
#include <stdio.h> #include <math.h> int i=0, j=0, *z=0; double tanjent=0.0; void main(int *) { for(;;)
4
by: BinWang85 | last post by:
The following is the code: #include <iostream.h> #include <math.h> //needed for decimal calculations int main() { int employee_num; double FetchHours(void);
3
by: Amy | last post by:
Hi, I have 6 If Then Else statements I was supposed to write. I did so but I know that they have to be wrong because they all look the same. Could someone take a look at them and point me in the...
0
by: **Developer** | last post by:
Would someone pass this on to MS and/or check to see it the problem persists in 2005? I don't have 2005 and do not know how to pass it on. Nor do I have the time to spend learning how unless...
1
by: A C | last post by:
Hi For use with a c++ created dll. The idea is that client will purchase time based licenses (eg 2 months) and the dll will check with the license management software each time it is run to...
5
by: patelxxx | last post by:
I have a FORM with allows user to input their name and then user clicks submit which this goes to my .cgi script. Can someone check this .cgi script as the results are not being displayed as...
3
by: shapper | last post by:
Hello, I have two tables: Polls and Options: Poll PollID, Question Options OptionID, PollID, Answer I want to select a Poll given its ID and all Options associated to it. Options should...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.