Solved

PHP vs EXCEL Formula

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

773 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