PHP Formulas

For a person who knows how to program, I know that this question may seem ridiculous, but please bear with me. I am involved in a lawsuit, and a critical moment depends on the answer to a couple of questions.

Given the mathematical formula along with the full documentation formula, as shown here: alt text http://img69.imageshack.us/img69/1937/formula.png
(some descriptors are pixelated)

  • When solving the equation for P, is there any requirement or need to implement the formula in Microsoft Excel before it is implemented in the PHP source code?

  • Can a competent PHP programmer simply enter a formula into the PHP source code without using Microsoft Excel in the interim?

Many thanks!

+3
source share
5 answers

The formulas that you presented are corrective mathematics, any worthy programmer with any programming language (including PHP) can implement these formulas without Excel or any other software. Therefore, the answers to your questions:

1.) NO

2.) YES

+5
source

1: No, I (and many here) probably probably would not use excel. 2: Absolutely.

What you need to understand is that programming languages ​​rarely deal with "equations", they are not "symmetrical", as in mathematics, the right side is evaluated to the left.

+8
source

, , . . , , , .

<?php
$C  = 1;
$I  = 2;
$N  = 3;
$T  = 4;
$TA = 5;
$Q  = 6;
$E  = 7;
$L  = 8;
$D  = 9;

$i = 1.0/12.0;
$v = 1.0/(1.0+$i);
$f = (1.0+$i)/(1.0+($i*$Q/30.0));
$a = ((1.0 - pow($v, $N))/$i)*$f;
$b = (1.0 - pow($v, $N+$T))/$i;
$ff = ($E - $Q)/30.0;
$aa = $A*$ff;
$j = $D*$TA/100.0;
$k = (($L*$T)/(600.0*($T+1.0))) * ((($T-$a+$b)/$i)+$aa);
$P = $C / ($a - $j - $k);
echo $P;
?>
+4

Excel PHP. -, Excel , , PHP .

+2

, .

P - Microsoft Excel PHP?

Microsoft Excel PHP, - , , Excel PHP.

The original implementation may have been in Excel, and after a while, when users were happy with the results, the formulas were transcoded into PHP.

Can a competent PHP programmer simply enter a formula into the PHP source code without using Microsoft Excel in the interim?

Yes.

0
source

Source: https://habr.com/ru/post/1746045/


All Articles