Solved

PHP vs EXCEL Formula

Posted on 2014-04-17
1
329 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to count occurrences of each item in an array.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

757 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

20 Experts available now in Live!

Get 1:1 Help Now