Solved

PHP vs EXCEL Formula

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This article discusses how to implement server side field validation and display customized error messages to the client.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

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