Solved

PHP vs EXCEL Formula

Posted on 2014-04-17
1
339 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_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

726 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