Solved

PHP vs EXCEL Formula

Posted on 2014-04-17
1
333 Views
Last Modified: 2014-04-17
Hello,

Wondering if someone can help. I am trying to convert an excel formula into a PHP string to calculate the value.

FORMULA:   =-0.91*(SIN(0.79/2))^3  which gives the answer -0.05  which is correct.
PHP:  echo -0.91*(sin(0.79/2))^3;   gives me an answer of 3.

Wondering if anyone can point me in the right direction of what I might be doing wrong.  I have check and SIN is support in php.

Regards
Ben
0
Comment
Question by:Benji_
1 Comment
 
LVL 2

Accepted Solution

by:
Benji_ earned 0 total points
ID: 40006290
You cannot use ^3 and need to use the pow() function.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now